[GHC] #3647: unify handling and error messages for -X vs. {-#LANGUAGE ...#-} pragmas/extensions
GHC
cvs-ghc at haskell.org
Thu Dec 9 20:57:07 CET 2010
#3647: unify handling and error messages for -X vs. {-#LANGUAGE ...#-}
pragmas/extensions
--------------------------------+-------------------------------------------
Reporter: eflister | Owner:
Type: feature request | Status: infoneeded
Priority: normal | Milestone: 7.0.1
Component: Compiler (Parser) | Version: 6.10.4
Resolution: | Keywords: language pragma extensions error message warning
Testcase: | Blockedby:
Difficulty: | Os: Unknown/Multiple
Blocking: | Architecture: Unknown/Multiple
Failure: None/Unknown |
--------------------------------+-------------------------------------------
Changes (by michalt):
* cc: michal.terepeta@… (added)
* status: new => infoneeded
Comment:
To be honest -X<extension> error messages are a bit annoying at times. But
what
output exactly do we want? For instance now GHC reports something
like this:
{{{
`Foo' has no constructors (-XEmptyDataDecls permits this)
}}}
maybe removing -X would be better?
{{{
`Foo' has no constructors (EmptyDataDecls permits this)
}}}
or
{{{
`Foo' has no constructors (-XEmptyDataDecls/EmptyDataDecls permits this)
}}}
or even
{{{
`Foo' has no constructors (-XEmptyDataDecls/LANGUAGE EmptyDataDecls
permits this)
}}}
Personally I think simply removing -X would be both readable and easy to
paste
(I usually specify the extensions in LANGUAGE pragmas and not as a command
line
arguments). On the other hand the last one is easiest for pasting but
quite a
bit longer and somewhat less readable. Any opinions?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3647#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list