• Ben Gamari's avatar
    Expose enabled language extensions to TH · c1e25536
    Ben Gamari authored
    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
    c1e25536
RnNames.hs 86.4 KB