Skip to content

unify handling and error messages for -X vs. {-#LANGUAGE ...#-} pragmas/extensions

it's easy to accidentally cut and paste a -XExtentionName from a ghc error message into one's {-#LANGUAGE ...#-} pragma, and then one has to track down the problem when that doesn't work. it would be nice if -XExtentionName were accepted in the pragma list. even though -X is ghc specific, i don't see that it hurts anything to be lenient in the pragma format accepted (a warning could be produced to indicate that the program will not be portable). also, the ghc error message indicating that an extension should be added should print out a message that would make for easy cut and paste without modification into *either* one's language pragma or command line -X extension args. see http://hackage.haskell.org/trac/ghc/ticket/3616##3647.

Trac metadata
Trac field Value
Version 6.10.4
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Parser)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC erik.flister@gmail.com
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information