[GHC] #10893: Consistent error message suggestions for using language extensions

GHC ghc-devs at haskell.org
Fri Sep 18 08:55:31 UTC 2015


#10893: Consistent error message suggestions for using language extensions
-------------------------------------+-------------------------------------
              Reporter:  spl         |             Owner:
                  Type:  feature     |            Status:  new
  request                            |
              Priority:  normal      |         Milestone:
             Component:  Compiler    |           Version:  7.10.2
              Keywords:              |  Operating System:  Unknown/Multiple
          Architecture:              |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
             Test Case:              |        Blocked By:
              Blocking:              |   Related Tickets:
Differential Revisions:              |
-------------------------------------+-------------------------------------
 I saw this error today in 7.10.2:

 {{{
 Parse error: naked expression at top level
 Perhaps you intended to use TemplateHaskell
 }}}

 I'm glad it suggests using !TemplateHaskell; however, the suggestion seems
 incomplete. I did in fact intend to use Template Haskell, but I think this
 suggestion implies the ''language extension'' though it doesn't explicitly
 say so.

 I believe other error message suggestions are more explicit about
 mentioning language extension, e.g. {{{use -XFlexibleContexts}}}, which
 refers to the flag.

 I'm just bringing this issue up to request a consistent error message
 suggestion format for language extensions that explicitly mentions
 “language extension” or {{{-X}}}. (It may be that the above message is the
 only one not doing that; I haven't checked.)

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10893>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list