File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -445,12 +445,22 @@ unifyVar ex tv lrtau = do
445445 Right tau -> unified ex ty tau
446446 Nothing -> either unbound unbound lrtau
447447 where
448- unbound (Meta tv2)
448+ unbound (t2@ Meta tv2)
449+ | Just tau1 ← (Meta tv). bounds, Just tau2 ← t2. bounds = do
450+ u ← unified ex tau1 tau2
451+ when (u) do
452+ writeTv tv t2
453+ g <- getST
454+ E. logmsg TRACET (getpos ex) (text (" unifyVar: "
455+ ++ show tv. uid ++ " "
456+ ++ tv. nice g
457+ ++ " :: " ++ show tv. kind))
458+ pure u
449459 | Nothing ← KI. unifyKind tv. kind tv2. kind = do
450460 g ← getST
451461 E. error (getpos ex) (text " Kind error in unification of "
452- </> (text (tv. nicer g) <+> text " ::" <+> text (show tv. kind) <+> text " with" )
453- </> (text (tv2. nicer g) <+> text " ::" <+> text (show tv2. kind)))
462+ </> (text (tv. nicer g) <+> text " ::" <+> text (tv. kind. nicer g ) <+> text " with" )
463+ </> (text (tv2. nicer g) <+> text " ::" <+> text (tv2. kind. nicer g )))
454464 pure false
455465 unbound tau = do -- unifyUnboundVar
456466 g <- getST
You can’t perform that action at this time.
0 commit comments