Permalink
Browse files

strictness

  • Loading branch information...
1 parent 7167331 commit e22b872d33b6108f217da83f0349367952299043 @ekmett committed Aug 5, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 Data/Interned/Internal.hs
View
4 Data/Interned/Internal.hs
@@ -60,7 +60,7 @@ class Interned t => Uninternable t where
intern :: Interned t => Uninterned t -> t
intern !bt = unsafeDupablePerformIO $ modifyAdvice $ modifyMVar (getCache cache) go
where
- dt = describe bt
+ !dt = describe bt
go (CacheState i m) = case HashMap.lookup dt m of
Nothing -> k i m
Just wt -> do
@@ -76,7 +76,7 @@ intern !bt = unsafeDupablePerformIO $ modifyAdvice $ modifyMVar (getCache cache)
-- given a description, go hunting for an entry in the cache
recover :: Interned t => Description t -> IO (Maybe t)
-recover dt = do
+recover !dt = do
CacheState _ m <- readMVar $ getCache cache
case HashMap.lookup dt m of
Nothing -> return Nothing

0 comments on commit e22b872

Please sign in to comment.