Re: [Haskell-cafe] Wanted: composoable parsers from haskell-src-exts

2011-03-15 Thread Niklas Broberg
Hi Johannes, The answer is: A) You can't, the way haskell-src-exts is built. You need to specify the %partial directives in the happy grammar, so without editing haskell-src-exts there's no way you could tack on partiality to the existing parsing primitives. B) It's a great feature request (to

Re: [Haskell-cafe] Install GTK on Windows

2011-03-15 Thread José Pedro Magalhães
Hi all, I'd just like to add that I succeeded in building gtk2hs in Windows XP 64bit with GHC 7.0.2, using the 2.16 bundle from [1] and following the instructions in [2]. However, running the test program of [2] still fails at runtime with The procedure entry point g_assertion_message_expr could

Re: [Haskell-cafe] Wanted: composoable parsers from haskell-src-exts

2011-03-15 Thread Johannes Waldmann
Thanks for supporting the idea. I already export a partial parser for top-of-file pragmas, I see. What I don't see is how such a parser would return the rest of input. J.W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Question on a common pattern

2011-03-15 Thread Achim Schneider
tsuraan tsur...@gmail.com wrote: Is there a more concise way to do this? I use someIO = f where f Opt1 = ... If it's a common pattern, you can even do opts f _ _ (Opt1 x) = f x opts _ g _ (Opt2 x) = g x opts _ _ h (Opt3 x) = h x . Functions are easier to mess around with than case

Re: [Haskell-cafe] Question on a common pattern

2011-03-15 Thread Maciej Marcin Piechotka
On Mon, 2011-03-14 at 17:56 +0100, Yves Parès wrote: If you have only one alternative, then you can simply do: Opt1 - someIO E.g., if you are _sure_ that foo returns always a 'Just' within a monad you can perfectly do : Just x - foo Please beware - it is not exactly the same as with

Re: [Haskell-cafe] Install GTK on Windows

2011-03-15 Thread Ryan Yates
Hi Pedro, Perhaps the libglib-2.0.0.dll that is getting loaded is not the one you want. You should be able to use a tool like process explorer [1] to see which specific dlls are getting loaded when you run. Ryan [1] http://technet.microsoft.com/en-us/sysinternals/bb896653 2011/3/15 José Pedro

Re: [Haskell-cafe] Question on a common pattern

2011-03-15 Thread Donn Cave
Quoth Achim Schneider bars...@web.de, ... I use someIO = f where f Opt1 = ... If it's a common pattern, you can even do opts f _ _ (Opt1 x) = f x opts _ g _ (Opt2 x) = g x opts _ _ h (Opt3 x) = h x . Functions are easier to mess around with than case expressions. I like

Re: [Haskell-cafe] Question on a common pattern

2011-03-15 Thread Ertugrul Soeylemez
Hello tsuraan, Most often, when we multi-pattern-match on the return value of a monadic computation, we talk about Maybe or Either or [], and I often find myself doing this: someIO1 :: IO (Maybe A) someIO2 :: IO (Either A B) result1 - someIO1 = maybe ... result2 - someIO2 =

Re: [Haskell-cafe] Question on a common pattern

2011-03-15 Thread Tillmann Rendel
Hi, Donn Cave wrote: someIO= f where f Opt1 = ... I like this ... or, I would like it, if I could make it work! I get The last statement in a 'do' construct must be an expression, Where-clauses can only be used on equations, not on expressions or statements, so you would need

Re: [Haskell-cafe] Question on a common pattern

2011-03-15 Thread Donn Cave
Quoth Tillmann Rendel ren...@informatik.uni-marburg.de, ... Where-clauses can only be used on equations, not on expressions or statements, so you would need to float the where clause outwards: So ... not to put too fine a point on it, but ... as useful as function notation could be for the

[Haskell-cafe] unix-compat and GHC 7.0.2

2011-03-15 Thread Michael Snoyman
Hi all, I'm having trouble compiling unix-compat with GHC 7.0.2. I'm fairly certain that other users are not running into this, but I'm not sure what would be wrong on my system. Here's the error I'm getting: Resolving dependencies... Configuring unix-compat-0.2.1.1... cabal: Missing dependency

Re: [Haskell-cafe] unix-compat and GHC 7.0.2

2011-03-15 Thread Pieter Laeremans
I've got the same problem. I don't have acces to the computer where I've go the problem (my home mac). But if I remember correctly cabal install unix-compat -V3 yielded more output, the problem was due to lbutil.h, that was not present. I've experienced the same problem on an EC2, with a

Re: [Haskell-cafe] unix-compat and GHC 7.0.2

2011-03-15 Thread Paulo Tanimoto
On Tue, Mar 15, 2011 at 1:34 PM, Pieter Laeremans pie...@laeremans.org wrote: I've got the same problem. I don't have acces to the computer where I've go the  problem (my home mac). But if I remember correctly cabal install unix-compat -V3  yielded more output, the problem was due to

Re: [Haskell-cafe] unix-compat and GHC 7.0.2

2011-03-15 Thread Michael Snoyman
Thanks Pieter and Paulo, that solved the problem perfectly. And I'm not surprised you stumbled upon this while installing Yesod, that's what I was doing too ;). Michael On Tue, Mar 15, 2011 at 8:41 PM, Paulo Tanimoto ptanim...@gmail.com wrote: On Tue, Mar 15, 2011 at 1:34 PM, Pieter Laeremans

[Haskell-cafe] Static linking problem // CentOS 5.5 - GHC 6.12.3

2011-03-15 Thread frode k
I've installed GHC version 6.12.3 on CentOS 5.5 x86_64. I'm trying to run a very simple Haskell program as CGI following the guide at: http://www.haskell.org/haskellwiki/Practical_web_programming_in_Haskell My .hs file I'm trying to use looks like this:

[Haskell-cafe] ANN: Monad.Reader special Poetry and Fiction Edition

2011-03-15 Thread Brent Yorgey
I am pleased to announce that the special Poetry and Fiction Edition of The Monad.Reader is now available [1]. Enjoy! Also, the submission deadline for Issue 18 has been extended one week, to Friday, April 8. Please get in touch if you would like to submit something! -Brent [1]

Re: [Haskell-cafe] haskell mailing lists followup?

2011-03-15 Thread wren ng thornton
On 3/14/11 2:01 AM, pt...@acanac.net wrote: Hi Wren; I CC'ed you on email I sent Thu, 10 Mar after seeing your post on haskell-cafe Thu Mar 10 07:24:45 CET Haskell mail server fail?. Did you see that email? I didn't see it; though it looks like it just showed up in my inbox. The only other

Re: [Haskell-cafe] haskell mailing lists followup?

2011-03-15 Thread Jeff Wheeler
On Tue, Mar 15, 2011 at 6:44 PM, wren ng thornton w...@freegeek.org wrote: Earlier today I got messages from the three lists I'm on (libraries@, haskell-cafe@, glasgow-haskell-users@) about delivery being disabled due to excessive bounces. The re-enabling codes in those emails were expired

[Haskell-cafe] X11 package bug: XClientMessageEvent long data

2011-03-15 Thread Dylan Alex Simon
Does anyone know the current maintenance status of the X11 package? I emailed Spencer Janssen a number of months ago and never heard back. So, I'll put this here in case any one else runs into it or can get it to the right place. This is a proposed bug fix for a problem I ran into using xmonad