X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDynFlags.hs;h=bebea761cd38256e087ec3697547e30203bd1a1c;hb=46bef1c09f499c5b34a00b650614bebfa1d6ba4b;hp=d8b2e784a5d005dfdf9ee6c932064dd45654a612;hpb=d49e38db67eaefa9c53356a9193c7a1e13a9b8f9;p=ghc-hetmet.git diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index d8b2e78..bebea76 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -1,4 +1,3 @@ - -- | -- Dynamic flags -- @@ -93,7 +92,7 @@ import Data.IORef import Control.Monad ( when ) import Data.Char -import Data.List ( intersperse ) +import Data.List import System.FilePath import System.IO ( stderr, hPutChar ) @@ -192,6 +191,9 @@ data DynFlag | Opt_WarnUnrecognisedPragmas | Opt_WarnDodgyForeignImports | Opt_WarnLazyUnliftedBindings + | Opt_WarnUnusedDoBind + | Opt_WarnWrongDoBind + -- language opts | Opt_OverlappingInstances @@ -203,6 +205,7 @@ data DynFlag | Opt_ExtendedDefaultRules -- Use GHC's extended rules for defaulting | Opt_ForeignFunctionInterface | Opt_UnliftedFFITypes + | Opt_GHCForeignImportPrim | Opt_PArr -- Syntactic support for parallel arrays | Opt_Arrows -- Arrow-notation syntax | Opt_TemplateHaskell @@ -306,6 +309,7 @@ data DynFlag | Opt_PrintBindContents | Opt_GenManifest | Opt_EmbedManifest + | Opt_EmitExternalCore -- temporary flags | Opt_RunCPS @@ -822,7 +826,7 @@ addDepSuffix s d = d { depSuffixes = deOptDep s : depSuffixes d } -- We used to use "-optdep-flag -optdeparg", so for legacy applications -- we need to strip the "-optdep" off of the arg deOptDep :: String -> String -deOptDep x = case maybePrefixMatch "-optdep" x of +deOptDep x = case stripPrefix "-optdep" x of Just rest -> rest Nothing -> x @@ -908,7 +912,8 @@ standardWarnings Opt_WarnMissingMethods, Opt_WarnDuplicateExports, Opt_WarnLazyUnliftedBindings, - Opt_WarnDodgyForeignImports + Opt_WarnDodgyForeignImports, + Opt_WarnWrongDoBind ] minusWOpts :: [DynFlag] @@ -928,7 +933,8 @@ minusWallOpts Opt_WarnNameShadowing, Opt_WarnMissingSigs, Opt_WarnHiShadows, - Opt_WarnOrphans + Opt_WarnOrphans, + Opt_WarnUnusedDoBind ] -- minuswRemovesOpts should be every warning option @@ -1663,6 +1669,8 @@ fFlags = [ ( "warn-unrecognised-pragmas", Opt_WarnUnrecognisedPragmas, const Supported ), ( "warn-lazy-unlifted-bindings", Opt_WarnLazyUnliftedBindings, const $ Deprecated "lazy unlifted bindings will be an error in GHC 6.14, and this flag will no longer exist"), + ( "warn-unused-do-bind", Opt_WarnUnusedDoBind, const Supported ), + ( "warn-wrong-do-bind", Opt_WarnWrongDoBind, const Supported ), ( "print-explicit-foralls", Opt_PrintExplicitForalls, const Supported ), ( "strictness", Opt_Strictness, const Supported ), ( "static-argument-transformation", Opt_StaticArgumentTransformation, const Supported ), @@ -1733,6 +1741,7 @@ fFlags = [ deprecatedForLanguage "IncoherentInstances" ), ( "gen-manifest", Opt_GenManifest, const Supported ), ( "embed-manifest", Opt_EmbedManifest, const Supported ), + ( "ext-core", Opt_EmitExternalCore, const Supported ), ( "implicit-import-qualified", Opt_ImplicitImportQualified, const Supported ) ] @@ -1759,6 +1768,7 @@ xFlags = [ ( "TransformListComp", Opt_TransformListComp, const Supported ), ( "ForeignFunctionInterface", Opt_ForeignFunctionInterface, const Supported ), ( "UnliftedFFITypes", Opt_UnliftedFFITypes, const Supported ), + ( "GHCForeignImportPrim", Opt_GHCForeignImportPrim, const Supported ), ( "LiberalTypeSynonyms", Opt_LiberalTypeSynonyms, const Supported ), ( "Rank2Types", Opt_Rank2Types, const Supported ), ( "RankNTypes", Opt_RankNTypes, const Supported ),