[Haskell-cafe] Re: Flipping *->*->* kinds,
or monadic finally-tagless madness
Ahn, Ki Yung
kyagrd at gmail.com
Thu Jul 2 20:22:10 EDT 2009
Edward Kmett 쓴 글:
> Actually the problem lies in your definition of fz, it has the wrong
> type to be used in lam.
>
> The Z you get out of fz as type Z b String, but you need it to have Z (a
> -> b) String so that when you strip off the Z you have a Y String (a ->
> b) matching the result type of lam.
>
> To get there replace your definition of fz with:
>
> > fz :: Z a String -> Z (a -> b) String
> > fz = Z . Y . unY . f . unZ
I think this seems to be the Yeoh wanted.
Mine was just blinded hack just to make it type check without looking at
what program means.
More information about the Haskell-Cafe
mailing list