Closed mbenke closed 4 months ago
Actually the core is wrong: we have two different case results, so join should be:
function join$Int (mmx : (unit + (unit + int))) -> (unit + int) {
let _caseresult1 : (unit + int)
match mmx with
{ inl left => _caseresult1 := inl(())
inr right => { let _caseresult2 : (unit + int)
match right with
{ inl left => _caseresult2 := inl(())
inr right => _caseresult2 := inr(right)
}
_caseresult1 := _caseresult2
}
}
return _caseresult1
}
examples/mona/03join.fun
Expected: 42, actual: 7
Core:
(seems correct except for superfluous
_caseresult := _caseresult
)