Re: [Haskell-cafe] Arrows for invertible programming: Notation, question

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

On Dec 23, 2005, at 11:53, Arjen wrote:
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.
Once you have compiled your GH program (.ghs) into a haskell program (.hs), you can load it into ghci using the wrapper provided in build/bin/gh-ghci .
If anyone got GH working with GHC 6.4(+), please tell me how you did it.
To build GH with the 6.4 series of GHC you need to check out the sources from the subversion repository: svn co https://svn.cs.uu.nl:12443/repos/Generic-Haskell/trunk/Generic-Haskell/ Cheers, Alexey
participants (2)
-
Alexey Rodriguez Yakushev
-
Arjen