diff options
Diffstat (limited to 'compiler/main')
-rw-r--r-- | compiler/main/DynFlags.hs | 9 | ||||
-rw-r--r-- | compiler/main/HscTypes.hs | 1 | ||||
-rw-r--r-- | compiler/main/InteractiveEval.hs | 9 |
3 files changed, 12 insertions, 7 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 41f7235ea3..bcd5a25836 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -564,6 +564,10 @@ data GeneralFlag -- displayed. If a warning isn't controlled by a flag, this is made -- explicit at the point of use. data WarnReason = NoReason | Reason !WarningFlag + deriving Show + +instance Outputable WarnReason where + ppr = text . show data WarningFlag = -- See Note [Updating flag description in the User's Guide] @@ -631,6 +635,7 @@ data WarningFlag = | Opt_WarnUnrecognisedWarningFlags -- since 8.0 | Opt_WarnSimplifiableClassConstraints -- Since 8.2 | Opt_WarnCPPUndef -- Since 8.2 + | Opt_WarnUnbangedStrictPatterns -- Since 8.2 deriving (Eq, Show, Enum) data Language = Haskell98 | Haskell2010 @@ -3363,6 +3368,7 @@ wWarningFlagsDeps = [ depFlagSpec "auto-orphans" Opt_WarnAutoOrphans "it has no effect", flagSpec "cpp-undef" Opt_WarnCPPUndef, + flagSpec "unbanged-strict-patterns" Opt_WarnUnbangedStrictPatterns, flagSpec "deferred-type-errors" Opt_WarnDeferredTypeErrors, flagSpec "deferred-out-of-scope-variables" Opt_WarnDeferredOutOfScopeVariables, @@ -4062,7 +4068,8 @@ minusWOpts Opt_WarnUnusedImports, Opt_WarnIncompletePatterns, Opt_WarnDodgyExports, - Opt_WarnDodgyImports + Opt_WarnDodgyImports, + Opt_WarnUnbangedStrictPatterns ] -- | Things you get with -Wall diff --git a/compiler/main/HscTypes.hs b/compiler/main/HscTypes.hs index 5b3c058d35..3b44bb1fda 100644 --- a/compiler/main/HscTypes.hs +++ b/compiler/main/HscTypes.hs @@ -2964,4 +2964,3 @@ nameOfObject other = pprPanic "nameOfObject" (ppr other) byteCodeOfObject :: Unlinked -> CompiledByteCode byteCodeOfObject (BCOs bc) = bc byteCodeOfObject other = pprPanic "byteCodeOfObject" (ppr other) - diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs index 3c2973d23e..93abb07ec0 100644 --- a/compiler/main/InteractiveEval.hs +++ b/compiler/main/InteractiveEval.hs @@ -63,7 +63,6 @@ import Name hiding ( varName ) import NameSet import Avail import RdrName -import VarSet import VarEnv import ByteCodeTypes import Linker @@ -481,9 +480,9 @@ bindLocalsAtBreakpoint hsc_env apStack_fhv (Just BreakInfo{..}) = do -- Filter out any unboxed ids; -- we can't bind these at the prompt pointers = filter (\(id,_) -> isPointer id) vars - isPointer id | UnaryRep ty <- repType (idType id) - , PtrRep <- typePrimRep ty = True - | otherwise = False + isPointer id | [rep] <- typePrimRep (idType id) + , isGcPtrRep rep = True + | otherwise = False (ids, offsets) = unzip pointers @@ -551,7 +550,7 @@ rttiEnvironment hsc_env@HscEnv{hsc_IC=ic} = do hsc_env' <- foldM improveTypes hsc_env (map idName incompletelyTypedIds) return hsc_env' where - noSkolems = isEmptyVarSet . tyCoVarsOfType . idType + noSkolems = noFreeVarsOfType . idType improveTypes hsc_env@HscEnv{hsc_IC=ic} name = do let tmp_ids = [id | AnId id <- ic_tythings ic] Just id = find (\i -> idName i == name) tmp_ids |