X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Futils%2FLazyUniqFM.lhs;h=97451b0eea6afdc265408acde125e6adb12bf17f;hp=d8132e3cd5b11887a1efc0f20ef50347c2df7128;hb=4fa44a3ae9c36222ccb460ba3ed24e46bf7c70ae;hpb=68bc57c179fe4f1d739a435766bced7236b36261 diff --git a/compiler/utils/LazyUniqFM.lhs b/compiler/utils/LazyUniqFM.lhs index d8132e3..97451b0 100644 --- a/compiler/utils/LazyUniqFM.lhs +++ b/compiler/utils/LazyUniqFM.lhs @@ -11,10 +11,11 @@ Basically, the things need to be in class @Uniquable@, and we use the @getUnique@ method to grab their @Uniques@. \begin{code} -{-# OPTIONS -Wall -fno-warn-name-shadowing -Werror -fallow-undecidable-instances #-} module LazyUniqFM ( + -- * Lazy unique-keyed mappings UniqFM, -- abstract type + -- ** Manipulating those mappings emptyUFM, unitUFM, unitDirectlyUFM, @@ -177,9 +178,10 @@ ufmToList :: UniqFM elt -> [(Unique, elt)] \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)) -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