Closed AshleyYakeley closed 1 year ago
Consider:
datatype P of MkP of r1: Unit; r2: Unit; end; end; test = fn f1, a1, f2, a2 => let r1 = f1 a1; r2 = f2 a2; in MkP;
Inferred: test: (a -> Unit) -> a -> (a -> Unit) -> a -> P Correct: test: (a -> Unit) -> a -> (b -> Unit) -> b -> P
test: (a -> Unit) -> a -> (a -> Unit) -> a -> P
test: (a -> Unit) -> a -> (b -> Unit) -> b -> P
This doesn't happen with e.g. Unit *: Unit instead of P.
Unit *: Unit
P
Fixed.
Consider:
Inferred:
test: (a -> Unit) -> a -> (a -> Unit) -> a -> P
Correct:test: (a -> Unit) -> a -> (b -> Unit) -> b -> P
This doesn't happen with e.g.
Unit *: Unit
instead ofP
.