Fixed the instances generated for Maps

This commit is contained in:
Neil Brown 2008-12-14 15:38:01 +00:00
parent 263dfd6fd3
commit cdcbebd2ae

View File

@ -100,7 +100,7 @@ genMapInstance k v
findTypesIn (k, v) -- This does types in k and v, and their pairing
tk <- liftIO $ typeKey m
modify (Map.insert tk (show $ typeOf m,
Detailed (DataBox m) [DataBox k, DataBox v]
Detailed (DataBox m) [DataBox (k, v), DataBox k, DataBox v]
(\(funcSameType, funcNewType) ->
[funcSameType ++ " () ops v = do"
," keys <- mapM (" ++ funcNewType ++ " ops () . fst) (Map.toList v)"