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 Substitutable instance for Type is currently defined as follows:
instanceSubstitutableTypewhere
apply _ (TCon a) =TCon a
apply s t@(TVar a) =Map.findWithDefault t a s
apply s (t1 `TArr` t2) = apply s t1 `TArr` apply s t2
I believe the TVar case is incomplete. Consider the following substitution:
x <- y
y <- Int
If we apply this substitution to type variable x, we obtain y, when we should obtain Int. I think this case should instead recursively apply the substitution to the type found in the map.
The text was updated successfully, but these errors were encountered:
The
Substitutable
instance forType
is currently defined as follows:I believe the
TVar
case is incomplete. Consider the following substitution:If we apply this substitution to type variable
x
, we obtainy
, when we should obtainInt
. I think this case should instead recursively apply the substitution to the type found in the map.The text was updated successfully, but these errors were encountered: