Closed jackfirth closed 6 years ago
I haven’t looked into this, but my guess is that the issue is there are two instances in scope, the local one from the Base a
instance constraint and the global one from the Middle a
instance declaration. Both instances match, but Hackett appears to currently be picking the global one, which means it attempts to solve the Top a
subgoal. I think it should prefer the one from the constraint, since it doesn’t have any subgoals.
The following program fails to typecheck:
The type checker throws the error
typechecker: could not deduce (Top a18) in: (case* (_27) ((_) middle))
with(λ [_] middle)
as the error's source location. I think this is supposed to work, since this equivalent Haskell program typechecks successfully: