[Haskell-cafe] Continuable and serializable parsers.
Edward Kmett
ekmett at gmail.com
Sun Dec 27 08:20:53 EST 2009
On Fri, Dec 25, 2009 at 8:31 PM, Felipe Lessa <felipe.lessa at gmail.com>wrote:
>
> However you're right in a sense, you can't use this scheme to
> serialize any functions taking functions, like
>
> something :: (a -> Parser a) -> a -> Parser a
>
> because
>
> data MyParser = FunSomething (a -> MyParser) a
>
> wouldn't be serializable. Well, maybe if your parsers were
> arrows... :)
>
>
You can't use full arrows because you need to be able to lift an arbitrary
function into an arrow type, which precludes meeting the serialization
criterion.
You CAN use a CCC, but they are a bit harder to work with. =)
http://hackage.haskell.org/packages/archive/category-extras/0.53.5/doc/html/Control-Category-Cartesian-Closed.html
-Edward Kmett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091227/45e5f050/attachment.html
More information about the Haskell-Cafe
mailing list