X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDynFlags.hs;h=f12bb7927fdc885ce3cd72f95b81f170a4b56eaf;hb=d4050431de1adddedb240e497f77f89301f77070;hp=cecaa1090fd6d0c4844ec3cfdb69764ce398e292;hpb=858269e2e699b3980a879f4b60adae04443146e8;p=ghc-hetmet.git diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index cecaa10..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,17 +161,17 @@ 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 - | Opt_FFI + | Opt_ForeignFunctionInterface | Opt_UnliftedFFITypes | Opt_PArr -- Syntactic support for parallel arrays | Opt_Arrows -- Arrow-notation syntax - | Opt_TH + | Opt_TemplateHaskell | Opt_ImplicitParams | Opt_Generics | Opt_ImplicitPrelude @@ -183,7 +184,7 @@ data DynFlag | Opt_RecordWildCards | Opt_RecordPuns | Opt_GADTs - | Opt_RelaxedPolyRec -- -X=RelaxedPolyRec + | Opt_RelaxedPolyRec | Opt_StandaloneDeriving | Opt_DeriveDataTypeable | Opt_TypeSynonymInstances @@ -1136,11 +1137,11 @@ fFlags = [ ( "break-on-exception", Opt_BreakOnException ), ( "vectorise", Opt_Vectorise ), -- Deprecated in favour of -XTemplateHaskell: - ( "th", Opt_TH ), + ( "th", Opt_TemplateHaskell ), -- Deprecated in favour of -XForeignFunctionInterface: - ( "fi", Opt_FFI ), + ( "fi", Opt_ForeignFunctionInterface ), -- Deprecated in favour of -XForeignFunctionInterface: - ( "ffi", Opt_FFI ), + ( "ffi", Opt_ForeignFunctionInterface ), -- Deprecated in favour of -XArrows: ( "arrows", Opt_Arrows ), -- Deprecated in favour of -XGenerics: @@ -1159,14 +1160,18 @@ fFlags = [ ( "implicit-params", Opt_ImplicitParams ), -- Deprecated in favour of -XScopedTypeVariables: ( "scoped-type-variables", Opt_ScopedTypeVariables ), + -- 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)] @@ -1181,7 +1186,7 @@ xFlags = [ ( "PatternSignatures", Opt_PatternSignatures ), ( "EmptyDataDecls", Opt_EmptyDataDecls ), ( "ParallelListComp", Opt_ParallelListComp ), - ( "ForeignFunctionInterface", Opt_FFI ), + ( "ForeignFunctionInterface", Opt_ForeignFunctionInterface ), ( "UnliftedFFITypes", Opt_UnliftedFFITypes ), ( "PartiallyAppliedClosedTypeSynonyms", Opt_PartiallyAppliedClosedTypeSynonyms ), @@ -1190,8 +1195,8 @@ xFlags = [ ( "TypeOperators", Opt_TypeOperators ), ( "RecursiveDo", Opt_RecursiveDo ), ( "Arrows", Opt_Arrows ), - ( "Parr", Opt_PArr ), - ( "TemplateHaskell", Opt_TH ), + ( "PArr", Opt_PArr ), + ( "TemplateHaskell", Opt_TemplateHaskell ), ( "Generics", Opt_Generics ), -- On by default: ( "ImplicitPrelude", Opt_ImplicitPrelude ), @@ -1220,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])] @@ -1232,7 +1237,7 @@ impliedFlags = [ glasgowExtsFlags = [ Opt_PrintExplicitForalls - , Opt_FFI + , Opt_ForeignFunctionInterface , Opt_UnliftedFFITypes , Opt_GADTs , Opt_ImplicitParams