X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDynFlags.hs;h=f12bb7927fdc885ce3cd72f95b81f170a4b56eaf;hb=d4050431de1adddedb240e497f77f89301f77070;hp=bbcf40d3325ef63b425812030628899cc3f58ff0;hpb=b5e939dafc4c5e4943901b5ff26d55b30a64b5eb;p=ghc-hetmet.git diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index bbcf40d..f12bb79 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -47,7 +47,8 @@ module DynFlags ( allFlags, -- misc stuff - machdepCCOpts, picCCOpts + machdepCCOpts, picCCOpts, + supportedLanguages, ) where #include "HsVersions.h" @@ -160,9 +161,9 @@ data DynFlag | Opt_WarnTabs -- language opts - | Opt_AllowOverlappingInstances - | Opt_AllowUndecidableInstances - | Opt_AllowIncoherentInstances + | Opt_OverlappingInstances + | Opt_UndecidableInstances + | Opt_IncoherentInstances | Opt_MonomorphismRestriction | Opt_MonoPatBinds | Opt_ExtendedDefaultRules -- Use GHC's extended rules for defaulting @@ -183,7 +184,7 @@ data DynFlag | Opt_RecordWildCards | Opt_RecordPuns | Opt_GADTs - | Opt_RelaxedPolyRec -- -X=RelaxedPolyRec + | Opt_RelaxedPolyRec | Opt_StandaloneDeriving | Opt_DeriveDataTypeable | Opt_TypeSynonymInstances @@ -1162,13 +1163,15 @@ fFlags = [ -- Deprecated in favour of -XPArr: ( "parr", Opt_PArr ), -- Deprecated in favour of -XOverlappingInstances: - ( "AllowOverlappingInstances", Opt_AllowOverlappingInstances ), + ( "allow-overlapping-instances", Opt_OverlappingInstances ), -- Deprecated in favour of -XUndecidableInstances: - ( "AllowUndecidableInstances", Opt_AllowUndecidableInstances ), + ( "allow-undecidable-instances", Opt_UndecidableInstances ), -- Deprecated in favour of -XIncoherentInstances: - ( "AllowIncoherentInstances", Opt_AllowIncoherentInstances ) + ( "allow-incoherent-instances", Opt_IncoherentInstances ) ] +supportedLanguages :: [String] +supportedLanguages = map fst xFlags -- These -X flags can all be reversed with -XNo xFlags :: [(String, DynFlag)] @@ -1222,9 +1225,9 @@ xFlags = [ ( "MultiParamTypeClasses", Opt_MultiParamTypeClasses ), ( "FunctionalDependencies", Opt_FunctionalDependencies ), ( "GeneralizedNewtypeDeriving", Opt_GeneralizedNewtypeDeriving ), - ( "OverlappingInstances", Opt_AllowOverlappingInstances ), - ( "UndecidableInstances", Opt_AllowUndecidableInstances ), - ( "IncoherentInstances", Opt_AllowIncoherentInstances ) + ( "OverlappingInstances", Opt_OverlappingInstances ), + ( "UndecidableInstances", Opt_UndecidableInstances ), + ( "IncoherentInstances", Opt_IncoherentInstances ) ] impliedFlags :: [(DynFlag, [DynFlag])]