Personal tools

Talk:GHC/Type families

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
m (GMapInt or GMAp Int)
 
m
Line 1: Line 1:
I believe the instance declaration:
 
  
instance GMapKey Int where
 
  data GMap Int v        = GMapInt (Data.Map.Map Int v)
 
  empty                  = GMapInt Data.Map.empty
 
  lookup k (GMapInt m)  = Data.Map.lookup k m
 
  insert k v (GMapInt m) = GMapInt (Data.Map.insert k v m)
 
should be:
 
 
instance GMapKey Int where
 
  data GMap Int v        = GMap Int (Data.Map.Map Int v)
 
  empty                  = GMap Int Data.Map.empty
 
  lookup k (GMapInt m)  = Data.Map.lookup k m
 
  insert k v (GMapInt m) = GMap Int (Data.Map.insert k v m)
 

Revision as of 10:20, 13 July 2007