Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Add 'Add EmptyDataDecls' code action #1183

Closed
@expipiplus1

Description

@expipiplus1
Contributor

Given the below code, GHC suggests turning on EmptyDataDecls:

data Foo

The error message from GHC looks like ‘Foo’ has no constructors (EmptyDataDecls permits this)

It would be great to have this as a code action.

See also #890

Activity

fendor

fendor commented on Apr 20, 2019

@fendor
Collaborator

Looks like this is a single line change in Pragmas.hs, adding "EmptyDataDecls" to line 96.

fendor

fendor commented on Apr 20, 2019

@fendor
Collaborator

Actually, that just compiles for me on ghc-8.2.2, what ghc version is that for?

expipiplus1

expipiplus1 commented on Apr 21, 2019

@expipiplus1
ContributorAuthor

@fendor I'm using ghc 8.6.4

fendor

fendor commented on Apr 21, 2019

@fendor
Collaborator

Still just compiles for me. Very weird.

fendor

fendor commented on Apr 21, 2019

@fendor
Collaborator

@expipiplus1 Can you check whether #1187 solves your issue? Because, I can not reproduce that problem at all.

expipiplus1

expipiplus1 commented on Apr 22, 2019

@expipiplus1
ContributorAuthor

#1187 works perfectly, ++@fendor!

added this to the 2019-04 milestone on May 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @alanz@expipiplus1@lukel97@fendor

      Issue actions

        Add 'Add EmptyDataDecls' code action · Issue #1183 · haskell/haskell-ide-engine