|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
[GHC] #3647: unify handling and error messages for -X vs. {-#LANGUAGE ...#-} pragmas/extensions#3647: unify handling and error messages for -X vs. {-#LANGUAGE ...#-}
pragmas/extensions -------------------------------------------------------------+-------------- Reporter: eflister | Owner: Type: feature request | Status: new Priority: normal | Component: Compiler (Parser) Version: 6.10.4 | Severity: trivial Keywords: language pragma extensions error message warning | Testcase: Os: Unknown/Multiple | Architecture: Unknown/Multiple -------------------------------------------------------------+-------------- 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#comment:8. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3647> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
|
Re: [GHC] #3647: unify handling and error messages for -X vs. {-#LANGUAGE ...#-} pragmas/extensions#3647: unify handling and error messages for -X vs. {-#LANGUAGE ...#-}
pragmas/extensions --------------------------------------------------------------+------------- Reporter: eflister | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler (Parser) | Version: 6.10.4 Severity: trivial | Resolution: Keywords: language pragma extensions error message warning | Testcase: Os: Unknown/Multiple | Architecture: Unknown/Multiple --------------------------------------------------------------+------------- Comment (by duncan): By all means improve the error message but please do not extend the LANGUAGE pragma syntax. It means every other compiler and tool that has to know about the pragma must also be extended (and in a rather quirky way). Standards are a good thing! :-) Perhaps we can get ghc's error messages to suggest LANGUAGE pragmas rather than the ghc -XBlah style. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3647#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
|
Re: [GHC] #3647: unify handling and error messages for -X vs. {-#LANGUAGE ...#-} pragmas/extensions#3647: unify handling and error messages for -X vs. {-#LANGUAGE ...#-}
pragmas/extensions --------------------------------------------------------------+------------- Reporter: eflister | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler (Parser) | Version: 6.10.4 Severity: trivial | Resolution: Keywords: language pragma extensions error message warning | Testcase: Os: Unknown/Multiple | Architecture: Unknown/Multiple --------------------------------------------------------------+------------- Comment (by eflister): not to be annoying, but i don't understand why it's not ok for ghc to accept (with a warning) a SUPERSET of the official syntax. that doesn't change the standard and it doesn't imply that any other compiler has to do anything different. a warning would be the best user interaction -- "i know what you meant to say, and i'm doing it, you should just know that what you said isn't portable, and here's how to fix it. would you like me to fix it for you?" -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3647#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
|
Re: [GHC] #3647: unify handling and error messages for -X vs. {-#LANGUAGE ...#-} pragmas/extensions#3647: unify handling and error messages for -X vs. {-#LANGUAGE ...#-}
pragmas/extensions --------------------------------------------------------------+------------- Reporter: eflister | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler (Parser) | Version: 6.10.4 Severity: trivial | Resolution: Keywords: language pragma extensions error message warning | Testcase: Os: Unknown/Multiple | Architecture: Unknown/Multiple --------------------------------------------------------------+------------- Comment (by duncan): Replying to [comment:2 eflister]: > not to be annoying, but i don't understand why it's not ok for ghc to accept (with a warning) a SUPERSET of the official syntax. At first you'd expect that accepting a superset would not cause any problems. However what happens is that people will start using that new syntax and then suddenly those packages/programs cannot be used with the tools that stick to the official syntax. > that doesn't change the standard and it doesn't imply that any other compiler has to do anything different. It doesn't change the official standard but it does change the de-facto standard, and other compilers and tools will have to change to keep up so that they can continue to process all code that people write. > a warning would be the best user interaction -- "i know what you meant to say, and i'm doing it, you should just know that what you said isn't portable, and here's how to fix it. would you like me to fix it for you?" Certainly a nice error message is good however I would suggest that it be "i know what you meant to say, here's how to fix it." (and perhaps an IDE could also do "would you like me to fix it for you?"). Also accepting the program has a low benefit and a non-trivial cost. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3647#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
| Free embeddable forum powered by Nabble | Forum Help |