diff options
author | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2019-02-16 03:38:21 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-02-17 20:04:33 -0500 |
commit | 1ffee940a011fc75f40514696a747dd1f3d4f342 (patch) | |
tree | 967a656c0aa5aeadc584bb457e7e5cb7c9b4e007 /compiler/cmm | |
parent | 1f1b9e356a873ec7da84cdac2a7850ecb2b32ea9 (diff) | |
download | haskell-1ffee940a011fc75f40514696a747dd1f3d4f342.tar.gz |
Fix warnings and fatal parsing errors
Diffstat (limited to 'compiler/cmm')
-rw-r--r-- | compiler/cmm/CmmMonad.hs | 2 | ||||
-rw-r--r-- | compiler/cmm/CmmParse.y | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/compiler/cmm/CmmMonad.hs b/compiler/cmm/CmmMonad.hs index 821c0a6504..a04c4ad49b 100644 --- a/compiler/cmm/CmmMonad.hs +++ b/compiler/cmm/CmmMonad.hs @@ -50,7 +50,7 @@ thenPD :: PD a -> (a -> PD b) -> PD b (PD m) `thenPD` k = PD $ \d s -> case m d s of POk s1 a -> unPD (k a) d s1 - PFailed warnFn span err -> PFailed warnFn span err + PFailed s1 -> PFailed s1 failPD :: String -> PD a failPD = liftP . fail diff --git a/compiler/cmm/CmmParse.y b/compiler/cmm/CmmParse.y index e5803682ad..bb389d17ae 100644 --- a/compiler/cmm/CmmParse.y +++ b/compiler/cmm/CmmParse.y @@ -1424,11 +1424,8 @@ parseCmmFile dflags filename = withTiming (pure dflags) (text "ParseCmm"<+>brack -- reset the lex_state: the Lexer monad leaves some stuff -- in there we don't want. case unPD cmmParse dflags init_state of - PFailed warnFn span err -> do - let msg = mkPlainErrMsg dflags span err - errMsgs = (emptyBag, unitBag msg) - warnMsgs = warnFn dflags - return (unionMessages warnMsgs errMsgs, Nothing) + PFailed pst -> + return (getMessages pst dflags, Nothing) POk pst code -> do st <- initC let fcode = getCmm $ unEC code "global" (initEnv dflags) [] >> return () |