On Tue, Mar 31, 2015 at 10:40 PM, Matt Oliveri <[email protected]> wrote:


> Oh wait, that _is_ weird. Doesn't that violate the "occurs check" or
> whatever? Because it asks for ('rtn = afn 'c 'd->'rtn)? Anyway, the
> problem isn't the two applications of the same function themselves,
> it's that they have the same type.


I'm not sure if it's the occurs check or not, but i agree that the example
cannot be correctly typed as written. It was a hasty, contrived example
solely for the purpose of investigating how call-arrows get inserted. If
the two result types unify (as they do in my over-simplified example), then
the procedure cannot be typed.

But that doesn't change the need to deal with the call-arrow issue. If we
care about fixing the example, here's a corrected version:

def keean2 f a b c d  tst {
  if tst
    f a b
    return 1
  else
    f a b c d
    return 1
}


shap
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to