[Haskell-cafe] Question about arrows

J. Garrett Morris trevion at gmail.com
Fri Aug 3 13:32:07 EDT 2007


On 8/3/07, Lewis-Sandy, Darrell <darrelll at amgen.com> wrote:
>
> Is there a class property of the Control.Arrow class that represents the
> evaluatation of an arrow:
>
> eval :: (Arrow a)=>a b c->b->c
>

There isn't because that type signature isn't valid in general.
Consider the Kleisli arrows, for instance: how would you write eval ::
Kleisli (State Int) Int Int -> Int -> Int?  You need to get the
initial state from somewhere... similar problems would exist for
Kleisli IO Int Int.

 /g


-- 
The man who'd introduced them didn't much like either of them, though
he acted as if he did, anxious as he was to preserve good relations at
all times. One never knew, after all, now did one now did one now did
one.


More information about the Haskell-Cafe mailing list