diff options
Diffstat (limited to 'compiler/cmm/Debug.hs')
-rw-r--r-- | compiler/cmm/Debug.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/cmm/Debug.hs b/compiler/cmm/Debug.hs index c6aae691e1..044a00009c 100644 --- a/compiler/cmm/Debug.hs +++ b/compiler/cmm/Debug.hs @@ -35,7 +35,7 @@ import Outputable import PprCore () import PprCmmExpr ( pprExpr ) import SrcLoc -import Util +import Util ( seqList ) import Hoopl.Block import Hoopl.Collections @@ -46,6 +46,7 @@ import Data.Maybe import Data.List ( minimumBy, nubBy ) import Data.Ord ( comparing ) import qualified Data.Map as Map +import Data.Either ( partitionEithers ) -- | Debug information about a block of code. Ticks scope over nested -- blocks. @@ -100,7 +101,7 @@ cmmDebugGen modLoc decls = map (blocksForScope Nothing) topScopes -- Analyse tick scope structure: Each one is either a top-level -- tick scope, or the child of another. (topScopes, childScopes) - = splitEithers $ map (\a -> findP a a) $ Map.keys blockCtxs + = partitionEithers $ map (\a -> findP a a) $ Map.keys blockCtxs findP tsc GlobalScope = Left tsc -- top scope findP tsc scp | scp' `Map.member` blockCtxs = Right (scp', tsc) | otherwise = findP tsc scp' |