September 27th, 2008

beartato phd

(no subject)

Trying to understand this tech report on Arrowlets that I saw a poster about at ICFP. I wish they had given their code in a functional language first and then shown how it came out in javascript. I only really see how useful types are for understanding code when I don't have them!

The arrow they're using in figure 5 seems to be (written infix as A)

α A β = ∀ γ δ . α * γ * (β * γ → δ) → δ

γ being the type of "progress arrows".

Injection of ordinary functions α → β is pretty much determined by the type:

inj (f : α → β) : α A β = λ (x, p, k) . k (f(x), p)

>>> is also pretty straightforward:

(f : α A β) >>> (g : β A γ) : α A γ = λ (x, p, k) . f (x, p, λ (y, q) . g (y, q, k))

I'm having difficulty understanding what "progress arrows" are or how they function. Already arrows depart from the slightly nicer mathematical world of monads, and this paper seems to add yet more behavior without any intuition or framework for it to exist in.