From c1e25536d67fba33ad6ddae5556115340d99000a Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Tue, 15 Dec 2015 23:57:46 +0100 Subject: Expose enabled language extensions to TH This exposes `template-haskell` functions for querying the language extensions which are enabled when compiling a module, - an `isExtEnabled` function to check whether an extension is enabled - an `extsEnabled` function to obtain a full list of enabled extensions To avoid code duplication this adds a `GHC.LanguageExtensions` module to `ghc-boot` and moves `DynFlags.ExtensionFlag` into it. A happy consequence of this is that the ungainly `DynFlags` lost around 500 lines. Moreover, flags corresponding to language extensions are now clearly distinguished from other flags due to the `LangExt.*` prefix. Updates haddock submodule. This fixes #10820. Test Plan: validate Reviewers: austin, spinda, hvr, goldfire, alanz Reviewed By: goldfire Subscribers: mpickering, RyanGlScott, hvr, simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1200 GHC Trac Issues: #10820 --- libraries/template-haskell/template-haskell.cabal | 1 + 1 file changed, 1 insertion(+) (limited to 'libraries/template-haskell/template-haskell.cabal') diff --git a/libraries/template-haskell/template-haskell.cabal b/libraries/template-haskell/template-haskell.cabal index d4dd81e0a5..ad51144d68 100644 --- a/libraries/template-haskell/template-haskell.cabal +++ b/libraries/template-haskell/template-haskell.cabal @@ -41,6 +41,7 @@ Library Language.Haskell.TH.PprLib Language.Haskell.TH.Quote Language.Haskell.TH.Syntax + Language.Haskell.TH.LanguageExtensions other-modules: Language.Haskell.TH.Lib.Map -- cgit v1.2.1