[GHC] #10820: Provide a way to detect what extensions are enabled via TH

GHC ghc-devs at haskell.org
Tue Sep 1 06:31:07 UTC 2015


#10820: Provide a way to detect what extensions are enabled via TH
-------------------------------------+-------------------------------------
        Reporter:  spinda            |                   Owner:
            Type:  feature request   |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Template Haskell  |                 Version:  7.10.2
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------
Description changed by spinda:

Old description:

> This would be helpful for providing users with intuitive error messages
> if generated code relies on an extension that the user may not have
> enabled.
>
> Sample specification, to get things started:
>
> {{{
> enabledExts :: Q [Extension]
> isExtEnabled :: Extension -> Q Bool
> data Extension = LiberalTypeSynonyms | RankNTypes | ...
>     -- mirroring ExtensionFlag in DynFlags
> }}}
>
> See #10819 for an example case where this could be of use.

New description:

 This would be helpful for providing users with intuitive/explanatory error
 messages if generated code relies on an extension that the user may not
 have enabled.

 Sample specification, to get things started:

 {{{
 enabledExts :: Q [Extension]
 isExtEnabled :: Extension -> Q Bool
 data Extension = LiberalTypeSynonyms | RankNTypes | ...
     -- mirroring ExtensionFlag in DynFlags
 }}}

 See #10819 for an example case where this could be of use.

--

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


More information about the ghc-tickets mailing list