Implement -fwarn-dodgy-imports
[ghc-hetmet.git] / compiler / main / DynFlags.hs
index 59391ef..28943ab 100644 (file)
@@ -176,8 +176,6 @@ data DynFlag
    | Opt_ImplicitPrelude 
    | Opt_ScopedTypeVariables
    | Opt_UnboxedTuples
-   | Opt_ExpressionSignaturesUnboxedTuples
-   | Opt_TypeSynonymUnboxedTuples
    | Opt_BangPatterns
    | Opt_TypeFamilies
    | Opt_OverloadedStrings
@@ -678,6 +676,7 @@ data CoreToDo               -- These are diff core-to-core passes,
   | CoreCSE
   | CoreDoRuleCheck Int{-CompilerPhase-} String        -- Check for non-application of rules 
                                                -- matching this string
+  | CoreDoVectorisation
   | CoreDoNothing               -- Useful when building up 
   | CoreDoPasses [CoreToDo]     -- lists of these things
 
@@ -713,6 +712,7 @@ getCoreToDo dflags
     spec_constr   = dopt Opt_SpecConstr dflags
     liberate_case = dopt Opt_LiberateCase dflags
     rule_check    = ruleCheck dflags
+    vectorisation = dopt Opt_Vectorise dflags
 
     core_todo = 
      if opt_level == 0 then
@@ -740,6 +740,15 @@ getCoreToDo dflags
            MaxSimplifierIterations max_iter
        ],
 
+
+        -- We run vectorisation here for now, but we might also try to run
+        -- it later
+        runWhen vectorisation (CoreDoPasses [
+                  CoreDoVectorisation,
+                  CoreDoSimplify SimplGently
+                                  [NoCaseOfCase,
+                                   MaxSimplifierIterations max_iter]]),
+
        -- Specialisation is best done before full laziness
        -- so that overloaded functions have all their dictionary lambdas manifest
        CoreDoSpecialising,
@@ -1073,6 +1082,7 @@ dynamic_flags = [
 -- these -f<blah> flags can all be reversed with -fno-<blah>
 
 fFlags = [
+  ( "warn-dodgy-imports",              Opt_WarnDodgyImports ),
   ( "warn-duplicate-exports",          Opt_WarnDuplicateExports ),
   ( "warn-hi-shadowing",               Opt_WarnHiShadows ),
   ( "warn-implicit-prelude",            Opt_WarnImplicitPrelude ),
@@ -1166,8 +1176,6 @@ xFlags = [
   ( "ImplicitParams",                  Opt_ImplicitParams ),
   ( "ScopedTypeVariables",             Opt_ScopedTypeVariables ),
   ( "UnboxedTuples",                Opt_UnboxedTuples ),
-  ( "ExpressionSignaturesUnboxedTuples", Opt_ExpressionSignaturesUnboxedTuples ),
-  ( "TypeSynonymUnboxedTuples",     Opt_TypeSynonymUnboxedTuples ),
   ( "StandaloneDeriving",           Opt_StandaloneDeriving ),
   ( "DeriveDataTypeable",           Opt_DeriveDataTypeable ),
   ( "TypeSynonymInstances",         Opt_TypeSynonymInstances ),
@@ -1195,8 +1203,6 @@ glasgowExtsFlags = [
                   , Opt_ImplicitParams 
                   , Opt_ScopedTypeVariables
            , Opt_UnboxedTuples
-           , Opt_ExpressionSignaturesUnboxedTuples
-           , Opt_TypeSynonymUnboxedTuples
            , Opt_TypeSynonymInstances
            , Opt_StandaloneDeriving
            , Opt_DeriveDataTypeable