Re: [Haskell-cafe] Arrows for invertible programming: Notation, question
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 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Arrows for invertible programming: Notation question
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. 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 Thanks, Joel -- http://wagerlabs.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Arrows for invertible programming: Notation question
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 It's Generic Haskell source code, see http://www.generic-haskell.org/ Generic Haskell is an extension of Haskell that supports generic programming. Cheers, Ralf ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Arrows for invertible programming: Notation question
Is this something that can be compiled with GHC right now? I noticed - fgenerics but I think it does something else entirely. On Dec 23, 2005, at 8:52 AM, Ralf Hinze wrote: It's Generic Haskell source code, see http://www.generic-haskell.org/ Generic Haskell is an extension of Haskell that supports generic programming. -- http://wagerlabs.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Arrows for invertible programming: Notation question
Is this something that can be compiled with GHC right now? I noticed - fgenerics but I think it does something else entirely. GH is a pre-compiler that takes GH code to Haskell code, so this is a two-step process. -fgenerics turns derivable type classes on (see Derivable type classes, Ralf Hinze and Simon Peyton Jones, Haskell Workshop 2000, pp94-105). The two are different but related ... Cheers, Ralf ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
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 -- http://wagerlabs.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe