[Haskell-cafe] Can't install Leksah

2010-11-27 Thread Paul Johnson
I installed gtk2hs-buildtools as per the Leksah page, and then tried to install Leksah itself. I got: [r...@eiffel download]# cabal install leksah Resolving dependencies... cabal: cannot configure leksah-server-0.8.0.8. It requires ghc=6.10.1 6.13 There is no available version of ghc that

[Haskell-cafe] Re: Template Haskell: exchanging information between 'splicers'

2010-11-27 Thread oleg
Jean-Christophe Mincke wrote: Does anyone know a clean solution to pass information between 2 executions of splicers. $(splicer ) -- first invocation gather and store some data $(splicer ...) -- second one use the data gathered above. Just the other day I wrote such code; I'm

Re: [Haskell-cafe] Can't install Leksah

2010-11-27 Thread Christopher Done
On 27 November 2010 10:41, Paul Johnson p...@cogito.org.uk wrote: I installed gtk2hs-buildtools as per the Leksah page, and then tried to install Leksah itself. I got: [r...@eiffel download]# cabal install leksah Resolving dependencies... cabal: cannot configure leksah-server-0.8.0.8. It

[Haskell-cafe] Is EclipseFP alive?

2010-11-27 Thread Dušan Kolář
Hello, I tried to install EclipseFP using instructions on http://eclipsefp.sourceforge.net/, nevertheless, without any success - after downloading scion I cannot build it cabal install Resolving dependencies... cabal: dependencies conflict: ghc-6.12.3 requires Cabal ==1.8.0.6 however

Re: [Haskell-cafe] Can't install Leksah

2010-11-27 Thread Paul Johnson
On 27/11/10 11:25, Christopher Done wrote: Interesting. Perhaps Cabal isn't looking at the same GHC version. If you run cabal install with --version passed to GHC, GHC will just output the version instead of doing any compiling and the install will stop. You can see what version Cabal actually

[Haskell-cafe] Re: Can't install Leksah

2010-11-27 Thread jutaro
Hi Paul, ghc is a package, which exposes Ghc-Api as a library. It gets usually installed, when you install Ghc or Haskell platform. As I remeber , it is usually in a hidden state, but ghc-pkg list should show it. Jürgen Paul Johnson-2 wrote: On 27/11/10 11:25, Christopher Done wrote:

[Haskell-cafe] Language.C++ ?

2010-11-27 Thread Jacques Carette
Is anyone working on a Language.C++ module, similar to the wonderful Language.C ? Right now just the syntax and a pretty-printer would be really nice to have... Jacques ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Can't install Leksah

2010-11-27 Thread Albert Y. C. Lai
On 10-11-27 09:20 AM, jutaro wrote: ghc is a package, which exposes Ghc-Api as a library. It gets usually installed, when you install Ghc or Haskell platform. As I remeber , it is usually in a hidden state, but ghc-pkg list should show it. Except that Fedora's GHC really doesn't come with the

Re: [Haskell-cafe] Is EclipseFP alive?

2010-11-27 Thread JP Moresmau
Yes, EclipseFP is alive, and I'm the maintainer. Yes, there are sometimes issues with installing scion due to the numerous dependencies. No, don't give up!! You don't need to build scion yourself, usually. The Java plugins include the scion sources and build it internally, setting the proper

[Haskell-cafe] Conditional compilation for different versions of GHC?

2010-11-27 Thread Jinjing Wang
Dear list, From ghc 7.0.1 release notes: The Language.Haskell.TH.Quote.QuasiQuoter type has two new fields: quoteType and quoteDec. Some of my code needs to be conditionally compiled to support both version 6 and 7, what is the recommended way to do it? ref: *

Re: [Haskell-cafe] Conditional compilation for different versions of GHC?

2010-11-27 Thread Michael Snoyman
On Sat, Nov 27, 2010 at 6:59 PM, Jinjing Wang nfjinj...@gmail.com wrote: Dear list, From ghc 7.0.1 release notes: The Language.Haskell.TH.Quote.QuasiQuoter type has two new fields: quoteType and quoteDec. Some of my code needs to be conditionally compiled to support both version 6 and 7,

Re: [Haskell-cafe] Conditional compilation for different versions of GHC?

2010-11-27 Thread Jinjing Wang
Thanks Michael, So the user should use `cabal install --flags -ghc7 package-name` to install the package, if I'm not mistaken? Will it work if the package is installed as a dependency? Will the flag environment be passed down from the root package? Is there a way to detect GHC version

Re: [Haskell-cafe] Conditional compilation for different versions of GHC?

2010-11-27 Thread Jinjing Wang
Sorry, should be `cabal install --flags=ghc7 package-name`. On Sun, Nov 28, 2010 at 1:59 AM, Jinjing Wang nfjinj...@gmail.com wrote: Thanks Michael, So the user should use `cabal install --flags -ghc7 package-name` to install the package, if I'm not mistaken? Will it work if the package is

[Haskell-cafe] Unable to install packages

2010-11-27 Thread Roland Senn
I learned a little bit Haskell with Hugs on Windows and now I want to develop on Linux. I installed the Haskell Platform on Unbunto 10.10. There were no problems. Then I tried to install Leksah with sudo cabal install leksah --global It failed with: Resolving dependencies...

Re: [Haskell-cafe] Unable to install packages

2010-11-27 Thread Joachim Breitner
Hi, Am Samstag, den 27.11.2010, 19:13 +0100 schrieb Roland Senn: I installed the Haskell Platform on Unbunto 10.10. There were no problems. Then I tried to install Leksah on Debian and Ubuntu it works generally to install as much as possible from the Debian (Ubuntu) repositories. There is,

Re: [Haskell-cafe] Unable to install packages

2010-11-27 Thread Roland Senn
Am 27.11.2010 19:36, schrieb Joachim Breitner: Hi, And there is even a leksah package on Debian, and in Ubuntu since natty. Greetings, Joachim I tried: sudo apt-get install leksah and got: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to

Re: [Haskell-cafe] Conditional compilation for different versions of GHC?

2010-11-27 Thread Michael Snoyman
No, the user doesn't need to do anything. By splitting up the base range into pre-7 and post-7, cabal automatically applies the ghc7 flag (and thus adds the GHC7 CPP declaration) as appropriate. Michael On Sat, Nov 27, 2010 at 7:59 PM, Jinjing Wang nfjinj...@gmail.com wrote: Thanks Michael,

[Haskell-cafe] Reduceron: reduced to numbers.

2010-11-27 Thread Serguey Zefirov
I decided to calculate Reduceron's number of transistors (I had to, we have some argument here;). Reduceron allocate 14% of 17300 slices of Virtex-5 FPGA. If we assume that each slice correspond to 8 4-input NAND-NOT elements, we will get 2 4-input NAND. Each 4-input NAND contains 8

Re: [Haskell-cafe] Conditional compilation for different versions of GHC?

2010-11-27 Thread Antoine Latter
On Sat, Nov 27, 2010 at 10:59 AM, Jinjing Wang nfjinj...@gmail.com wrote: Dear list, From ghc 7.0.1 release notes: The Language.Haskell.TH.Quote.QuasiQuoter type has two new fields: quoteType and quoteDec. Some of my code needs to be conditionally compiled to support both version 6 and

Re: [Haskell-cafe] Conditional compilation for different versions of GHC?

2010-11-27 Thread Michael Snoyman
On Sat, Nov 27, 2010 at 9:41 PM, Antoine Latter aslat...@gmail.com wrote: On Sat, Nov 27, 2010 at 10:59 AM, Jinjing Wang nfjinj...@gmail.com wrote: Dear list, From ghc 7.0.1 release notes: The Language.Haskell.TH.Quote.QuasiQuoter type has two new fields: quoteType and quoteDec. Some of

[Haskell-cafe] qtHaskell signal and slots

2010-11-27 Thread c8h10n4o2
I have the following code that tries to resize window after a click. But nothing happens. If I use a builtin slot that does not need a function, such as close, quit it works, however for any other slot it seems my function is ignored. Which slot/signal should I use and how? module Main where

Re: [Haskell-cafe] Unable to install packages

2010-11-27 Thread Joachim Breitner
Hi, Am Samstag, den 27.11.2010, 19:55 +0100 schrieb Roland Senn: Am 27.11.2010 19:36, schrieb Joachim Breitner: Hi, And there is even a leksah package on Debian, and in Ubuntu since natty. Greetings, Joachim I tried: sudo apt-get install leksah and got: Reading package lists...

Re: [Haskell-cafe] Conditional compilation for different versions of GHC?

2010-11-27 Thread Jinjing Wang
Hi Michael, you are absolutely correct, cabal did set the flags automatically. To sum up, here's what needs to be done: * add `flag ghc7` as a field in cabal * add: if flag(ghc7) build-depends: base = 4.35 cpp-options: -DGHC7 else

Re: [Haskell-cafe] Conditional compilation for different versions of GHC?

2010-11-27 Thread Antoine Latter
On Sat, Nov 27, 2010 at 8:38 PM, Jinjing Wang nfjinj...@gmail.com wrote: Hi Michael, you are absolutely correct, cabal did set the flags automatically. To sum up, here's what needs to be done: * add `flag ghc7` as a field in cabal * add:    if flag(ghc7)        build-depends:   base      

Re: [Haskell-cafe] Conditional compilation for different versions of GHC?

2010-11-27 Thread Jinjing Wang
Hi Antoine, Thanks for pointing out, it did work. By using a record style constructor, the code can be made to support both version, something like here = QuasiQuoter { quoteExp = (litE . stringL) , quotePat = (litP . stringL) } in GHC7 there's a warning:

Re: [Haskell-cafe] Conditional compilation for different versions of GHC?

2010-11-27 Thread Jinjing Wang
Thanks for explaining, it's a nice trick. On Sun, Nov 28, 2010 at 11:16 AM, Antoine Latter aslat...@gmail.com wrote: On Sat, Nov 27, 2010 at 8:38 PM, Jinjing Wang nfjinj...@gmail.com wrote: Hi Michael, you are absolutely correct, cabal did set the flags automatically. To sum up, here's what

Re: [Haskell-cafe] Safer common subexpression elimination

2010-11-27 Thread John Meacham
On Thu, Nov 25, 2010 at 2:32 AM, Joachim Breitner m...@joachim-breitner.dewrote: So I wonder: * Is sharing values of type Int (and Bool and similar small values) always safe? * If so: does GHC already do that? * Would it be technically possible? * Is there an established theory that can

[Haskell-cafe] Re: Unable to install packages

2010-11-27 Thread Moisei
At the Leksah website there are instructions for installing it on Ubuntu. 1. sudo apt-get install cabal-install 2. sudo apt-get install libghc6-zlib-dev 3. cabal update 4. sudo cabal install cabal-install --global 5. sudo apt-get install libgtk2.0-dev 6. sudo apt-get install