You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The key has no run-time representation. If two Map values can be used as arguments to ==, they must have the same type so their keys (KnownSymbol) must be the same. Consequently, the k == k' in the Eq instance seems unnecessary. Another way to put it is that for any k, Var k has only one value (Var), so equality is always trivially true. Am I missing something?
The text was updated successfully, but these errors were encountered:
Looks like in the latest version on hackage (0.8.9.0) the instance no longer relies on comparing Var for equality, which as you correctly point out is unnecessary.
instanceEq (Map '[]) whereEmpty==Empty=Trueinstance (Eqv, Eq (Maps)) =>Eq (Map ((k:->v) ':s)) where
(ExtVar v m) == (ExtVar v' m') = v == v' && m == m'
-- could also be-- (Ext _ v m) == (Ext _ v' m') = ...
The key has no run-time representation. If two
Map
values can be used as arguments to==
, they must have the same type so their keys (KnownSymbol
) must be the same. Consequently, thek == k'
in theEq
instance seems unnecessary. Another way to put it is that for anyk
,Var k
has only one value (Var
), so equality is always trivially true. Am I missing something?The text was updated successfully, but these errors were encountered: