Is there a way to use Data.Map so that the type of value depends on the type of key? I need to make sure that I never insert the wrong printed value on the map.
for example: Let's say I have types KeyType aand ValType a
then the Map should have a type similar to
Map (KeyType a) (ValType a)
But this clearly does not work, because it is anot connected.
source
share