On 31 March 2015 at 17:52, Matt Oliveri <[email protected]> wrote:

> None of the above comments address the need for some kind of variable
> to handle choose_one correctly. You're probably going to need that
> too. Shap originally proposed a shallow arity variable. I proposed a
> deep arity variable and argued that shallow arity wouldn't work. At
> some point Shap abandoned shallow arity for some reason I don't know.
> (I never recognized a point where I convinced him to.) To handle
> apply2, Shap came up with the mixed arrow notation with call arrows.
> Although I didn't realize it at first, each abstract arrow in the
> notation has a "callvar", which is used to handle choose_one. Finally,
> I convinced Shap that something like ('a->'b) in mixed arrow notation
> doesn't make much sense, so we're considering various hybrid notations
> between my afns and mixed arrow.


choose_one :: a -> a -> Bool -> a
choose_one x y b = if b then x else y

Lets try an example:

(x :: a => b c => d)
(y :: a -> b -> c -> d)

so the type of 'a' must be:

(a => b c => d) U (a -> b -> c -> d) = (a => b c => d)

I don't see the problem, the types of the arguments to choose_one must
unify to something that can be unified with the call.


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

Reply via email to