allFlags,
-- misc stuff
- machdepCCOpts, picCCOpts
+ machdepCCOpts, picCCOpts,
+ supportedLanguages,
+ compilerInfo,
) where
#include "HsVersions.h"
| 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_UnliftedFFITypes
| Opt_PArr -- Syntactic support for parallel arrays
| Opt_Arrows -- Arrow-notation syntax
- | Opt_TH
+ | Opt_TemplateHaskell
| Opt_ImplicitParams
| Opt_Generics
| Opt_ImplicitPrelude
| Opt_RecordWildCards
| Opt_RecordPuns
| Opt_GADTs
- | Opt_RelaxedPolyRec -- -X=RelaxedPolyRec
+ | Opt_RelaxedPolyRec
| Opt_StandaloneDeriving
| Opt_DeriveDataTypeable
| Opt_TypeSynonymInstances
------ Optimisation flags ------------------------------------------
, ( "O" , NoArg (upd (setOptLevel 1)))
- , ( "Onot" , NoArg (upd (setOptLevel 0)))
+ , ( "Onot" , NoArg (upd (setOptLevel 0))) -- deprecated
, ( "O" , OptIntSuffix (\mb_n -> upd (setOptLevel (mb_n `orElse` 1))))
-- If the number is missing, use 1
( "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_ForeignFunctionInterface ),
-- Deprecated in favour of -XForeignFunctionInterface:
( "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<blah> flags can all be reversed with -XNo<blah>
xFlags :: [(String, DynFlag)]
( "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 ),
( "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])]
-- Splitting
can_split :: Bool
-can_split =
-#if defined(i386_TARGET_ARCH) \
- || defined(x86_64_TARGET_ARCH) \
- || defined(alpha_TARGET_ARCH) \
- || defined(hppa_TARGET_ARCH) \
- || defined(m68k_TARGET_ARCH) \
- || defined(mips_TARGET_ARCH) \
- || defined(powerpc_TARGET_ARCH) \
- || defined(rs6000_TARGET_ARCH) \
- || defined(sparc_TARGET_ARCH)
- True
-#else
- False
-#endif
+can_split = cSplitObjs == "YES"
+
+-- -----------------------------------------------------------------------------
+-- Compiler Info
+
+compilerInfo :: [(String, String)]
+compilerInfo = [("Project name", cProjectName),
+ ("Project version", cProjectVersion),
+ ("Booter version", cBooterVersion),
+ ("Stage", cStage),
+ ("Interface file version", cHscIfaceFileVersion),
+ ("Object splitting", cSplitObjs),
+ ("Have native code generator", cGhcWithNativeCodeGen),
+ ("Unregisterised", cGhcUnregisterised),
+ ("Tables next to code", cGhcEnableTablesNextToCode),
+ ("Win32 DLLs", cEnableWin32DLLs),
+ ("Leading underscore", cLeadingUnderscore)]