diff options
Diffstat (limited to 'compiler/GHC.hs')
-rw-r--r-- | compiler/GHC.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC.hs b/compiler/GHC.hs index 26f870a5bc..16c02dcadb 100644 --- a/compiler/GHC.hs +++ b/compiler/GHC.hs @@ -1607,7 +1607,7 @@ addSourceToTokens _ _ [] = [] addSourceToTokens loc buf (t@(L span _) : ts) = case span of UnhelpfulSpan _ -> (t,"") : addSourceToTokens loc buf ts - RealSrcSpan s _ -> (t,str) : addSourceToTokens newLoc newBuf ts + RealSrcSpan s -> (t,str) : addSourceToTokens newLoc newBuf ts where (newLoc, newBuf, str) = go "" loc buf start = realSrcSpanStart s @@ -1627,13 +1627,13 @@ showRichTokenStream ts = go startLoc ts "" where sourceFile = getFile $ map (getLoc . fst) ts getFile [] = panic "showRichTokenStream: No source file found" getFile (UnhelpfulSpan _ : xs) = getFile xs - getFile (RealSrcSpan s _ : _) = srcSpanFile s + getFile (RealSrcSpan s : _) = srcSpanFile s startLoc = mkRealSrcLoc sourceFile 1 1 go _ [] = id go loc ((L span _, str):ts) = case span of UnhelpfulSpan _ -> go loc ts - RealSrcSpan s _ + RealSrcSpan s | locLine == tokLine -> ((replicate (tokCol - locCol) ' ') ++) . (str ++) . go tokEnd ts |