projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some refactoring and simplification in TcInteract.occurCheck
[ghc-hetmet.git]
/
compiler
/
deSugar
/
Coverage.lhs
diff --git
a/compiler/deSugar/Coverage.lhs
b/compiler/deSugar/Coverage.lhs
index
f32ce93
..
21ce13d
100644
(file)
--- a/
compiler/deSugar/Coverage.lhs
+++ b/
compiler/deSugar/Coverage.lhs
@@
-23,7
+23,6
@@
import FastString
import HscTypes
import StaticFlags
import TyCon
import HscTypes
import StaticFlags
import TyCon
-import FiniteMap
import MonadUtils
import Maybes
import MonadUtils
import Maybes
@@
-35,6
+34,8
@@
import Trace.Hpc.Util
import BreakArray
import Data.HashTable ( hashString )
import BreakArray
import Data.HashTable ( hashString )
+import Data.Map (Map)
+import qualified Data.Map as Map
\end{code}
\end{code}
@@
-76,8
+77,8
@@
addCoverageTicksToBinds dflags mod mod_loc tyCons binds =
{ fileName = mkFastString orig_file2
, declPath = []
, inScope = emptyVarSet
{ fileName = mkFastString orig_file2
, declPath = []
, inScope = emptyVarSet
- , blackList = listToFM [ (getSrcSpan (tyConName tyCon),())
- | tyCon <- tyCons ]
+ , blackList = Map.fromList [ (getSrcSpan (tyConName tyCon),())
+ | tyCon <- tyCons ]
})
(TT
{ tickBoxCount = 0
})
(TT
{ tickBoxCount = 0
@@
-574,7
+575,7
@@
data TickTransState = TT { tickBoxCount:: Int
data TickTransEnv = TTE { fileName :: FastString
, declPath :: [String]
, inScope :: VarSet
data TickTransEnv = TTE { fileName :: FastString
, declPath :: [String]
, inScope :: VarSet
- , blackList :: FiniteMap SrcSpan ()
+ , blackList :: Map SrcSpan ()
}
-- deriving Show
}
-- deriving Show
@@
-658,7
+659,7
@@
bindLocals new_ids (TM m)
isBlackListed :: SrcSpan -> TM Bool
isBlackListed pos = TM $ \ env st ->
isBlackListed :: SrcSpan -> TM Bool
isBlackListed pos = TM $ \ env st ->
- case lookupFM (blackList env) pos of
+ case Map.lookup pos (blackList env) of
Nothing -> (False,noFVs,st)
Just () -> (True,noFVs,st)
Nothing -> (False,noFVs,st)
Just () -> (True,noFVs,st)