[GHC] #10820: Provide a way to detect what extensions are enabled via TH
GHC
ghc-devs at haskell.org
Tue Dec 15 23:11:01 UTC 2015
#10820: Provide a way to detect what extensions are enabled via TH
-------------------------------------+-------------------------------------
Reporter: spinda | Owner: spinda
Type: feature request | Status: closed
Priority: normal | Milestone: 8.0.1
Component: Template Haskell | Version: 7.10.2
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case: th/T18020.hs
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1200
Wiki Page: |
-------------------------------------+-------------------------------------
Description changed by bgamari:
Old 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.
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:
{{{#!hs
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:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list