Commits

Alessandro Vermeulen committed d6d01ff

Used lists instead of the SNMap I couldn't find... :(

Comments (0)

Files changed (1)

code/Memo/SNMap/SNMap.hs

 {-# LANGUAGE StandaloneDeriving #-}
 module Memo.SNMap.SNMap ( memo ) where
 
-import Data.HashMap as M
+-- import Data.HashMap as M
 
 import System.Mem.Weak
 import System.Mem.StableName
 
 -------------------------------------------------------------------------------- 
 -- SNMap Implementation
-type SNMap k v = HashMap (StableName k) v
-
-deriving instance Ord (StableName k)
+type SNMap k v = [(StableName k, v)]
 
 newSNMap :: IO (SNMap k v)
-newSNMap = return empty
+newSNMap = return []
 
 lookupSNMap :: SNMap k v -> StableName k -> IO (Maybe v)
-lookupSNMap map sn = return (M.lookup sn map)
+lookupSNMap map sn = return (lookup sn map)
 
 insertSNMap :: SNMap k v -> StableName k -> v -> IO ()
 insertSNMap = undefined