Ticket #8200: export_languageExtensions.patch

File export_languageExtensions.patch, 3.2 KB (added by Fuuzetsu, 19 months ago)
  • compiler/main/DynFlags.hs

    From a38ea4498cb57ebdc309a6e21f9baac77bd93b4b Mon Sep 17 00:00:00 2001
    From: Mateusz Kowalczyk <[email protected]>
    Date: Fri, 30 Aug 2013 04:56:52 +0100
    Subject: [PATCH] Export languageExtensions as part of the API.
    
    Clobber whitespace while I'm here.
    ---
     compiler/main/DynFlags.hs | 13 +++++++------
     1 file changed, 7 insertions(+), 6 deletions(-)
    
    diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
    index e8efca2..e80cf65 100644
    a b module DynFlags ( 
    101101        flagsPackage, 
    102102 
    103103        supportedLanguagesAndExtensions, 
     104        languageExtensions, 
    104105 
    105106        -- ** DynFlags C compiler options 
    106107        picCCOpts, picPOpts, 
    data ExtensionFlag 
    515516   | Opt_PolyKinds                -- Kind polymorphism 
    516517   | Opt_DataKinds                -- Datatype promotion 
    517518   | Opt_InstanceSigs 
    518   
     519 
    519520   | Opt_StandaloneDeriving 
    520521   | Opt_DeriveDataTypeable 
    521522   | Opt_AutoDeriveTypeable       -- Automatic derivation of Typeable 
    setObjectDir, setHiDir, setStubDir, setDumpDir, setOutputDir, 
    16821683         setDylibInstallName, 
    16831684         setObjectSuf, setHiSuf, setHcSuf, parseDynLibLoaderMode, 
    16841685         setPgmP, addOptl, addOptc, addOptP, 
    1685          addCmdlineFramework, addHaddockOpts, addGhciScript,  
     1686         addCmdlineFramework, addHaddockOpts, addGhciScript, 
    16861687         setInteractivePrint 
    16871688   :: String -> DynFlags -> DynFlags 
    16881689setOutputFile, setDynOutputFile, setOutputHi, setDumpPrefixForce 
    safeFlagCheck cmdl dflags = 
    19671968 
    19681969        apFix f = if safeInferOn dflags then id else f 
    19691970 
    1970         safeFailure loc str  
     1971        safeFailure loc str 
    19711972           = [L loc $ str ++ " is not allowed in Safe Haskell; ignoring " ++ str] 
    19721973 
    19731974{- ********************************************************************** 
    dynamic_flags = [ 
    22942295  , Flag "O"      (optIntSuffixM (\mb_n -> setOptLevel (mb_n `orElse` 1))) 
    22952296                -- If the number is missing, use 1 
    22962297 
    2297   
     2298 
    22982299  , Flag "fmax-relevant-binds"         (intSuffix (\n d -> d{ maxRelevantBinds = Just n })) 
    22992300  , Flag "fno-max-relevant-binds"      (noArg (\d -> d{ maxRelevantBinds = Nothing })) 
    23002301  , Flag "fsimplifier-phases"          (intSuffix (\n d -> d{ simplPhases = n })) 
    fFlags = [ 
    25842585fLangFlags :: [FlagSpec ExtensionFlag] 
    25852586fLangFlags = [ 
    25862587  ( "th",                               Opt_TemplateHaskell, 
    2587     \on -> deprecatedForExtension "TemplateHaskell" on  
     2588    \on -> deprecatedForExtension "TemplateHaskell" on 
    25882589        >> checkTemplateHaskellOk on ), 
    25892590  ( "fi",                               Opt_ForeignFunctionInterface, 
    25902591    deprecatedForExtension "ForeignFunctionInterface" ), 
    xFlags = [ 
    26762677  ( "TypeOperators",                    Opt_TypeOperators, nop ), 
    26772678  ( "ExplicitNamespaces",               Opt_ExplicitNamespaces, nop ), 
    26782679  ( "RecursiveDo",                      Opt_RecursiveDo, nop ),  -- Enables 'mdo' and 'rec' 
    2679   ( "DoRec",                            Opt_RecursiveDo,  
     2680  ( "DoRec",                            Opt_RecursiveDo, 
    26802681     deprecatedForExtension "RecursiveDo" ), 
    26812682  ( "Arrows",                           Opt_Arrows, nop ), 
    26822683  ( "ParallelArrays",                   Opt_ParallelArrays, nop ),