Apologies for net getting this. Even as a parameter 'keean' will be used
somewhere in the module where we can get the type of 'f' passed, or the
type will be declared when 'keean' is exported.

In any case, I think I can type this without any information about 'f', by
inferring arity-abstract types with inferred concrete arrows.

On 31 Mar 2015 23:59, "Jonathan S. Shapiro" <[email protected]> wrote:

> def keean f a b c d  tst {
>   if tst
>     f a b
>   else
>     f a b c d
> }

Note, I have changed the inferred types from earlier, as the previous scene
had a problem if you inferred purely arity-abstract types. The solution
appears to always infer arity-mixed types with concrete arrows where
necessary.

First use of f:

a -> b => c

Second use of f:

e -> f -> g -> h => j

Unifying these:

e -> f => g -> h => j

Overall type of 'keean':

(e -> f => g -> h => j) -> e -> f -> g -> h -> Bool => g -> h => j

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

Reply via email to