projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make consIORef atomic.
[ghc-hetmet.git]
/
compiler
/
utils
/
LazyUniqFM.lhs
diff --git
a/compiler/utils/LazyUniqFM.lhs
b/compiler/utils/LazyUniqFM.lhs
index
55b438f
..
97451b0
100644
(file)
--- a/
compiler/utils/LazyUniqFM.lhs
+++ b/
compiler/utils/LazyUniqFM.lhs
@@
-11,11
+11,11
@@
Basically, the things need to be in class @Uniquable@, and we use the
@getUnique@ method to grab their @Uniques@.
\begin{code}
@getUnique@ method to grab their @Uniques@.
\begin{code}
-{-# OPTIONS -Wall -fno-warn-name-shadowing -Werror #-}
-{-# LANGUAGE UndecidableInstances #-}
module LazyUniqFM (
module LazyUniqFM (
+ -- * Lazy unique-keyed mappings
UniqFM, -- abstract type
UniqFM, -- abstract type
+ -- ** Manipulating those mappings
emptyUFM,
unitUFM,
unitDirectlyUFM,
emptyUFM,
unitUFM,
unitDirectlyUFM,
@@
-178,9
+178,10
@@
ufmToList :: UniqFM elt -> [(Unique, elt)]
\begin{code}
data Lazy a = Lazy { fromLazy :: a }
\begin{code}
data Lazy a = Lazy { fromLazy :: a }
+-- | @UniqFM a@ is a mapping from Unique to @a@ where the element @a@ is evaluated lazily.
newtype UniqFM ele = MkUniqFM (S.UniqFM (Lazy ele))
newtype UniqFM ele = MkUniqFM (S.UniqFM (Lazy ele))
-instance Outputable (S.UniqFM (Lazy a)) => Outputable (UniqFM a) where
+instance Outputable a => Outputable (UniqFM a) where
ppr (MkUniqFM fm) = ppr fm
instance Outputable a => Outputable (Lazy a) where
ppr (MkUniqFM fm) = ppr fm
instance Outputable a => Outputable (Lazy a) where