[Haskell-cafe] Arrows for invertible programming: Notation,
question
Arjen
A.vanWeelden at cs.ru.nl
Fri Dec 23 05:53:00 EST 2005
On Fri, 23 Dec 2005, Joel Reymont wrote:
> Folks,
>
> I have been looking at the code for the "Arrows for invertible
> programming" paper (http://www.cs.ru.nl/A.vanWeelden/bi-arrows/) and
> I have a question about syntax. ghci surely does not like it.
>
I've updated the web page to say that is does not work with Hugs, GHCi
or GHC -fgenerics, sorry for the confusion.
It really requires Generic Haskell (GH) 1.42. I never got GH working
with GHC 6.4, so you also really need GHC 6.2.2. I think you can run the
result of the GH preprocessor (using the right command line options) in
GHCi or Hugs, but I'm not sure.
If anyone got GH working with GHC 6.4(+), please tell me how you did it.
> What does this mean and how do I make it compile?
>
> mapl{|a, b|arr|} :: (mapl{|a, b|arr|}, ArrowChoice arr, BiArrow arr)
> => arr a b
>
In GH this means: mapl is a polytypic (type-indexed in a and b) function
that yields an arr(ow) from a to b. It is overloaded in ArrowChoice and
BiArrow on the arr(ow). Because it is polytypic, it is also overloaded
`in itself'. Most of the time GH does not require the last part
explicitly, but sometimes it triggers a bug if you don't specify it.
The semantics of mapl can be found in the paper.
regards,
Arjen
> Thanks, Joel
>
> --
> http://wagerlabs.com/
>
More information about the Haskell-Cafe
mailing list