[Haskell-cafe] Existential question

Felipe Almeida Lessa felipe.lessa at gmail.com
Sun Aug 21 05:33:10 CEST 2011


On Sat, Aug 20, 2011 at 6:26 PM, Tom Schouten <tom at zwizwa.be> wrote:
> data Kl i o = forall s. Kl s (i ->  s ->  (s, o))
>
> This is an Arrow.  At first I wondered if there was also an associated
> Monad, hence the iso function.

Given

  data Kl i o = forall s. Kl s (i ->  s ->  (s, o))

  instance ArrrowApply KI where
    ...

then 'ArrowMonad KI' [1] is a monad isomorphic to

  data KIM o = forall s. KIM s (s -> (s, o))

Is this what you are looking for?

Cheers! =)

[1] http://hackage.haskell.org/packages/archive/base/4.3.1.0/doc/html/Control-Arrow.html#t:ArrowMonad

-- 
Felipe.



More information about the Haskell-Cafe mailing list