
6 Aug
2010
6 Aug
'10
10:46 a.m.
On 06/08/10 15:59, Johan Tibell wrote:
There are a few functions on Maps that could be implemented on IntMaps but aren't: [...]
Isn't it time to seriously think about defining maps as a type family to avoid this sort of incompatibility once and for all and to enable GHC to automatically use IntMap wherever appropriate? class Map k where data Map k :: * -> * empty ... insert ... instance Map Int where data Map Int v = Data.IntMap.IntMap v ... instance (Ord k) => Map k where data Map k v = Data.Map.Map k v ... Or something similar? Just my 2 cents... //Stephan