GhcMode(..), isOneShot,
GhcLink(..), isNoLink,
PackageFlag(..),
- Option(..),
+ Option(..), showOpt,
DynLibLoader(..),
fFlags, xFlags,
dphPackage,
getStgToDo,
-- * Compiler configuration suitable for display to the user
+ Printable(..),
compilerInfo
) where
| Opt_WarnUnusedMatches
| Opt_WarnWarningsDeprecations
| Opt_WarnDeprecatedFlags
+ | Opt_WarnDodgyExports
| Opt_WarnDodgyImports
| Opt_WarnOrphans
| Opt_WarnTabs
| Opt_GeneralizedNewtypeDeriving
| Opt_RecursiveDo
| Opt_PostfixOperators
+ | Opt_TupleSections
| Opt_PatternGuards
| Opt_LiberalTypeSynonyms
| Opt_Rank2Types
| Opt_GenManifest
| Opt_EmbedManifest
| Opt_EmitExternalCore
+ | Opt_SharedImplib
-- temporary flags
| Opt_RunCPS
Opt_DoAsmMangling,
+ Opt_SharedImplib,
+
Opt_GenManifest,
Opt_EmbedManifest,
Opt_PrintBindContents
String -- the filepath/filename portion
| Option String
+showOpt :: Option -> String
+showOpt (FileOption pre f) = pre ++ f
+showOpt (Option s) = s
+
-----------------------------------------------------------------------------
-- Setting the optimisation level
Opt_WarnUnusedMatches,
Opt_WarnUnusedImports,
Opt_WarnIncompletePatterns,
+ Opt_WarnDodgyExports,
Opt_WarnDodgyImports
]
fFlags :: [(String, DynFlag, Bool -> Deprecated)]
fFlags = [
( "warn-dodgy-foreign-imports", Opt_WarnDodgyForeignImports, const Supported ),
+ ( "warn-dodgy-exports", Opt_WarnDodgyExports, const Supported ),
( "warn-dodgy-imports", Opt_WarnDodgyImports, const Supported ),
( "warn-duplicate-exports", Opt_WarnDuplicateExports, const Supported ),
( "warn-hi-shadowing", Opt_WarnHiShadows, const Supported ),
( "gen-manifest", Opt_GenManifest, const Supported ),
( "embed-manifest", Opt_EmbedManifest, const Supported ),
( "ext-core", Opt_EmitExternalCore, const Supported ),
+ ( "shared-implib", Opt_SharedImplib, const Supported ),
( "implicit-import-qualified", Opt_ImplicitImportQualified, const Supported )
]
xFlags = [
( "CPP", Opt_Cpp, const Supported ),
( "PostfixOperators", Opt_PostfixOperators, const Supported ),
+ ( "TupleSections", Opt_TupleSections, const Supported ),
( "PatternGuards", Opt_PatternGuards, const Supported ),
( "UnicodeSyntax", Opt_UnicodeSyntax, const Supported ),
( "MagicHash", Opt_MagicHash, const Supported ),
-- -----------------------------------------------------------------------------
-- Compiler Info
-compilerInfo :: [(String, String)]
-compilerInfo = [("Project name", cProjectName),
- ("Project version", cProjectVersion),
- ("Booter version", cBooterVersion),
- ("Stage", cStage),
- ("Interface file version", cHscIfaceFileVersion),
- ("Have interpreter", cGhcWithInterpreter),
- ("Object splitting", cSplitObjs),
- ("Have native code generator", cGhcWithNativeCodeGen),
- ("Support SMP", cGhcWithSMP),
- ("Unregisterised", cGhcUnregisterised),
- ("Tables next to code", cGhcEnableTablesNextToCode),
- ("Win32 DLLs", cEnableWin32DLLs),
- ("RTS ways", cGhcRTSWays),
- ("Leading underscore", cLeadingUnderscore),
- ("Debug on", show debugIsOn)
+data Printable = String String
+ | FromDynFlags (DynFlags -> String)
+
+compilerInfo :: [(String, Printable)]
+compilerInfo = [("Project name", String cProjectName),
+ ("Project version", String cProjectVersion),
+ ("Booter version", String cBooterVersion),
+ ("Stage", String cStage),
+ ("Have interpreter", String cGhcWithInterpreter),
+ ("Object splitting", String cSplitObjs),
+ ("Have native code generator", String cGhcWithNativeCodeGen),
+ ("Support SMP", String cGhcWithSMP),
+ ("Unregisterised", String cGhcUnregisterised),
+ ("Tables next to code", String cGhcEnableTablesNextToCode),
+ ("Win32 DLLs", String cEnableWin32DLLs),
+ ("RTS ways", String cGhcRTSWays),
+ ("Leading underscore", String cLeadingUnderscore),
+ ("Debug on", String (show debugIsOn)),
+ ("LibDir", FromDynFlags topDir)
]