[Haskell-cafe] Cabal: top level dependency base -any

2011-05-23 Thread Jacek Generowicz
Hi, Could anyone shed light on the meaning of this error message? cabal: cannot configure xmonad-0.9.1 It requires base ==3.* For the dependency on base ==3.* there are these packages: base-3.0.3.1 and base-3.0.3.2. However none of them are available. base-3.0.3.1 was excluded because of the

Re: [Haskell-cafe] *GROUP HUG*

2011-05-23 Thread Tony Morris
Just laugh mate. It's the best possible outcomes sometimes. On 24/05/11 15:10, Gregory Crosswhite wrote: > Hey everyone, > > Okay, this will sound silly, but I ventured into the Scala mailing > list recently and asked an ignorant question on it, and I was shocked > when people reacted not by enlig

Re: [Haskell-cafe] Imports in complex Setup.hs -- should we encourage/require PackageImports?

2011-05-23 Thread Rogan Creswick
On Mon, May 23, 2011 at 3:08 PM, John Millikin wrote: > > Any ideas/comments? Has anyone by chance found a good solution to this? > I suggested a SoC project to implement a dependencies section for Setup.hs: http://hackage.haskell.org/trac/summer-of-code/ticket/1602 I wasn't aware of PackageIm

Re: [Haskell-cafe] code review?

2011-05-23 Thread Evan Laforge
On Mon, May 23, 2011 at 12:02 PM, Neil Mitchell wrote: >> 'if all == False then return False else return True' is a pretty >> confusing way to say 'return all'.  In fact, any time you see 'x == >> True' you can just remove the '== True'.  The whole postAll thing >> would be clearer as > > Before d

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
On 2011 May 23, at 16:02, Johannes Waldmann wrote: I just did this (in a pristine virtual machine): * install ubuntu-11.04-desktop-amd64.iso * sudo apt-get install libgmp3-dev zlib1g-dev libglut3-dev * install from binary ghc-7.0.3-x86_64-unknown-linux.tar.bz2 * install from source haskell-pla

Re: [Haskell-cafe] *GROUP HUG*

2011-05-23 Thread max ulidtko
2011-05-23 22:10 -0700, Gregory Crosswhite: > Hey everyone, > > Okay, this will sound silly, but I ventured into the Scala mailing list > recently and asked an ignorant question on it, and I was shocked when > people reacted not by enlightening me but by jumping on me and reacting > with hostil

Re: [Haskell-cafe] *GROUP HUG*

2011-05-23 Thread Michael Litchard
The community plays a large part of why I am using Haskell professionally. The Haskell ecosystem is first-rate all by itself, but I would have been dead in the water months ago without the community. On Mon, May 23, 2011 at 10:10 PM, Gregory Crosswhite wrote: > Hey everyone, > > Okay, this will s

[Haskell-cafe] *GROUP HUG*

2011-05-23 Thread Gregory Crosswhite
Hey everyone, Okay, this will sound silly, but I ventured into the Scala mailing list recently and asked an ignorant question on it, and I was shocked when people reacted not by enlightening me but by jumping on me and reacting with hostility. I bring this up not to badmouth the Scala communi

Re: [Haskell-cafe] Status of Haskell + Mac + GUIs & graphics

2011-05-23 Thread Conal Elliott
Last I tried, there wasn't native support for OpenGL with gtk, and I need OpenGL. Then more recently, I heard of some progress in that area, but requiring lots of hacking to get it all compiling. Any recent news? - Conal On Mon, May 23, 2011 at 2:33 AM, John Lato wrote: > Message: 17 >> Date: F

Re: [Haskell-cafe] Cabal: wrapping namespace of a package into top-level module

2011-05-23 Thread Brandon Allbery
On Tue, May 24, 2011 at 00:38, max ulidtko wrote: > I have a package which builds with cabal pretty fine, but there is > namespace issue which disturbs me. The problem is that the package > exports (to the toplevel namespace!) some modules with fairly general > names, like Tests, Basics, Applicat

Re: [Haskell-cafe] Cabal: wrapping namespace of a package into top-level module

2011-05-23 Thread Ivan Lazar Miljenovic
On 24 May 2011 14:38, max ulidtko wrote: > Hi haskell-cafe. > > I have a package which builds with cabal pretty fine, but there is > namespace issue which disturbs me. The problem is that the package > exports (to the toplevel namespace!) some modules with fairly general > names, like Tests, Basic

[Haskell-cafe] Cabal: wrapping namespace of a package into top-level module

2011-05-23 Thread max ulidtko
Hi haskell-cafe. I have a package which builds with cabal pretty fine, but there is namespace issue which disturbs me. The problem is that the package exports (to the toplevel namespace!) some modules with fairly general names, like Tests, Basics, Applications. This is probably an oversight of the

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Richard O'Keefe
On 24/05/2011, at 5:49 AM, Alexander Solla wrote: > There's a library function for it, but also: > > > filter ((/=) Nothing) The problem with that in general is that it only applies to [Maybe t] if Eq t, but you don't actually _need_ t to support equality. filter isJust will do the job, where is

[Haskell-cafe] Imports in complex Setup.hs -- should we encourage/require PackageImports?

2011-05-23 Thread John Millikin
Several libraries (notably Pandoc and Gtk2hs) have very complex Setup.hs scripts, which import several external libraries. In my experience, these imports are very fragile, because Cabal does not enforce package visibility in Setup.hs. For example, a Setup.hs that imports Control.Monad.Trans wil

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Ertugrul Soeylemez
Gregory Crosswhite wrote: > Or even better, > > filter isJust To make it worse again the original function can be generalized in a few ways. Here is a generalization from the inner Maybe type: import Data.Foldable as F catFoldables :: Foldable t => [t a] -> [a] catFoldables =

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Henning Thielemann
Brent Yorgey schrieb: > On Mon, May 23, 2011 at 10:49:55AM -0700, Alexander Solla wrote: >> There's a library function for it, but also: >> >>> filter ((/=) Nothing) >> is readable enough. > > Just a minor quibble: note that > >> filter (not . isNothing) > > is slightly preferable since it does

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Gregory Crosswhite
On 05/23/2011 12:08 PM, Brent Yorgey wrote: Just a minor quibble: note that > filter (not . isNothing) is slightly preferable since it does not introduce a frivolous equality constraint on the type wrapped by the Maybe. Or even better, filter isJust :-) Cheers, Greg

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Brent Yorgey
On Mon, May 23, 2011 at 10:49:55AM -0700, Alexander Solla wrote: > On Mon, May 23, 2011 at 9:20 AM, michael rice wrote: > > > What's the best way to end up with a list composed of only the Just values, > > no Nothings? > > > > Michael > > > > == > > > > import Control.Mona

Re: [Haskell-cafe] code review?

2011-05-23 Thread Neil Mitchell
> 'if all == False then return False else return True' is a pretty > confusing way to say 'return all'.  In fact, any time you see 'x == > True' you can just remove the '== True'.  The whole postAll thing > would be clearer as Before doing a code review I always demand that the author runs over th

Re: [Haskell-cafe] Building Haskell Platform natively for 64bit Windows

2011-05-23 Thread Jason Dagit
On Mon, May 23, 2011 at 4:32 AM, Simon Marlow wrote: > On 18/05/2011 19:22, Jason Dagit wrote: >> >> On Wed, May 18, 2011 at 2:50 AM, John Sneer >>  wrote: >>> >>> Hello all, >>> >>>  I know it is not probably good question to this list, but anyway, >>>  could anyone point me to some more detailed

Re: [Haskell-cafe] Further installation adventures

2011-05-23 Thread Jacek Generowicz
On 2011 May 23, at 19:31, Marc Weber wrote: Excerpts from Jacek Generowicz's message of Mon May 23 19:15:53 +0200 2011: Where should I be looking for the relevant config.log? Maybe you're missing header files? I checked whether the -dev packages were installed, and they were present ...

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread michael rice
Thanks, all. Earlier, I was going to ask how to break out of a sequence op prematurely, i.e., you give it some replication number but want to break early if you get an end-flag value. While I was composing the post I thought of using Maybe for the good values and Nothing for the end value. Ergo,

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Alexander Solla
On Mon, May 23, 2011 at 9:20 AM, michael rice wrote: > What's the best way to end up with a list composed of only the Just values, > no Nothings? > > Michael > > == > > import Control.Monad.State > import Data.Maybe > > > type GeneratorState = State Int > > tick :: Generat

Re: [Haskell-cafe] Further installation adventures

2011-05-23 Thread Marc Weber
Excerpts from Jacek Generowicz's message of Mon May 23 19:15:53 +0200 2011: > Where should I be looking for the relevant config.log? Maybe you're missing header files? is there a readline-dev package for your distro? also open the cabal file and watch for include or library directorie settings. M

[Haskell-cafe] Further installation adventures

2011-05-23 Thread Jacek Generowicz
I'm trying to cabal install lambdabot. This depends on a squillion other libraries, which cabal tries to install, among which is readline, which fails to configure as follows. Configuring readline-1.0.1.0... checking for gcc... gcc checking for C compiler default output file name... a.out che

Re: [Haskell-cafe] The Lisp Curse

2011-05-23 Thread Eric Rasmussen
In terms of making the interface more friendly to beginners, I wonder if this is partially an issue of how to search and how to format the results. I just searched several places for "xml rpc" and found: Hackage: the first few links from the google search are different versions of haxr Hayoo: 0 pa

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Gregory Crosswhite
On 5/23/11 9:29 AM, Max Bolingbroke wrote: On 23 May 2011 17:20, michael rice > wrote: What's the best way to end up with a list composed of only the Just values, no Nothings? http://haskell.org/hoogle/?hoogle=%3A%3A+%5BMaybe+a%5D+-%3E+%5Ba%5D Data.Maybe.c

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Malcolm Wallace
On 23 May 2011, at 17:20, michael rice wrote: > What's the best way to end up with a list composed of only the Just values, > no Nothings? Alternatively, [ x | Just x <- originals ] It also occurs to me that perhaps you still want the Just constructors. [ Just x | Just x <- origi

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Max Bolingbroke
On 23 May 2011 17:20, michael rice wrote: > What's the best way to end up with a list composed of only the Just values, > no Nothings? > > http://haskell.org/hoogle/?hoogle=%3A%3A+%5BMaybe+a%5D+-%3E+%5Ba%5D Data.Maybe.catMaybes is what you want :-) Cheers, Max __

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Gregory Crosswhite
On 5/23/11 9:20 AM, michael rice wrote: What's the best way to end up with a list composed of only the Just values, no Nothings? Try catMaybes in Data.Maybe. Cheers, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.o

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Malcolm Wallace
On 23 May 2011, at 17:20, michael rice wrote: > What's the best way to end up with a list composed of only the Just values, > no Nothings? Go to haskell.org/hoogle Type in "[Maybe a] -> [a]" Click on first result. ___ Haskell-Cafe mailing list Haskell-

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Evan Laforge
>>> Cabal-1.8.0.2 will be downloaded and installed. >> >> That's a bad sign. >> Have you downoaded the bundle from the cabal-install page? > > Ermmm, ys [sudden pangs of guilt] was that not the right thing to do? > >> That's not the right thing to do > > Darn! > >> (yeah, somebody should tell u

[Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread michael rice
What's the best way to end up with a list composed of only the Just values,no Nothings? Michael ==  import Control.Monad.Stateimport Data.Maybe type GeneratorState = State Int tick :: GeneratorState (Maybe Int)tick = do n <- get          if ((n `mod` 7) == 0)            t

Re: [Haskell-cafe] blaze-builder and FlexibleInstances in code that aims to become part of the Haskell platform

2011-05-23 Thread Johan Tibell
On Fri, May 20, 2011 at 11:12 PM, Simon Meier wrote: > There, seems to be a historical artefact here. The new Write > abstraction in system-io-write is different from the one used in > blaze-builder. It's type is > >  data Write a = Write Int (a -> Ptr Word8 -> IO (Ptr Word8)) > > This definition

Re: [Haskell-cafe] The Lisp Curse

2011-05-23 Thread KC
Librarians have been struggling for years with classifying topics; I don't imagine classifying coding libraries as any easier. :) -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskel

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
Summarizing, by answering my own question on the basis of the help I have received elsewhere in the thread. On 2011 May 23, at 11:17, Jacek Generowicz wrote: a) Am I right in concluding that GHC 7.0.3 will not run on OS X 10.5 (without unreasonable effort)? It takes little effort on the pa

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Johannes Waldmann
The thing that's usually failing is "cabal install unix-compat", which requires "sudo apt-get install libbsd-dev". - J.W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] [Haskell] ANNOUNCE: time-recurrence-0.1

2011-05-23 Thread Chris Heller
Thanks for the feed back. > Very nice. Please put it up on hackage so we can see the > haddocks, try it out easily, etc. I've registered for an account, and will have it up on Hackage just as soon as I can. For now you can see the Haddock docs for the library at: http://hellertime.github.com/time

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Johannes Waldmann
> b) On Ubuntu Natty I installed the generic linux GHC 7.0.3 binary. > Downloaded Haskell Platform 2011.2.0.1 source distribution. ./ I just did this (in a pristine virtual machine): * install ubuntu-11.04-desktop-amd64.iso * sudo apt-get install libgmp3-dev zlib1g-dev libglut3-dev * install

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
On 2011 May 23, at 15:22, Daniel Fischer wrote: On Monday 23 May 2011 15:08:41, Jacek Generowicz wrote: Cabal-1.8.0.2 will be downloaded and installed. That's a bad sign. Have you downoaded the bundle from the cabal-install page? Ermmm, ys [sudden pangs of guilt] was that not the rig

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
On 2011 May 23, at 15:08, Jacek Generowicz wrote: On 2011 May 23, at 14:42, Daniel Fischer wrote: $ ./bootstrap.sh in that directory should work. Configuring Cabal-1.8.0.2... Setup: At least the following dependencies are missing: base >=4 && <3 && >=1 && <5, filepath >=1 && <1.2 How

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Daniel Fischer
On Monday 23 May 2011 15:08:41, Jacek Generowicz wrote: > On 2011 May 23, at 14:42, Daniel Fischer wrote: > > On Monday 23 May 2011 14:16:43, Jacek Generowicz wrote: > >> If by "cabal install" you mean use the command "cabal" ... yeah, that > >> would be great, if only I could install cabal-install

Re: [Haskell-cafe] The Lisp Curse

2011-05-23 Thread Henning Thielemann
On Thu, 19 May 2011, Andrew Coppin wrote: To all the people who look at Hackage, see that there are 6 different libraries for processing Unicode text files, and claim that this is somehow a *good* thing, I offer the above essay as a counter-example. Recently I searched for an advanced way of

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
On 2011 May 23, at 14:42, Daniel Fischer wrote: On Monday 23 May 2011 14:16:43, Jacek Generowicz wrote: If by "cabal install" you mean use the command "cabal" ... yeah, that would be great, if only I could install cabal-install, which fails. With what error? Downloading and unpacking the .

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Brandon Moore
> From: Jacek Generowicz > Sent: Monday, May 23, 2011 4:17 AM > > [TL;DR: there's a concrete question at the bottom.] > > Once again I find myself in the pleasant situation where the slings and > arrows > of life in general are slightly less intense, and I manage to find a few > spare > minu

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Daniel Fischer
On Monday 23 May 2011 14:16:43, Jacek Generowicz wrote: > > > From this, you should be able to build 7.0.3 yourself. > > That's interesting. I won't try that *right* now. > It's easy, assuming you have installed alex and happy (and preferably hscolour), just download and unpack the source bund

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
On 2011 May 23, at 14:16, Jacek Generowicz wrote: On 2011 May 23, at 13:45, Anthony Cowley wrote: On Mon, May 23, 2011 at 5:17 AM, Jacek Generowicz wrote: I think your strategy of nuking everything Haskell through your package manager (if available), then manually (not forgetting ~/.gh

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
On 2011 May 23, at 14:29, Anthony Cowley wrote: On Mon, May 23, 2011 at 8:16 AM, Jacek Generowicz wrote: On 2011 May 23, at 13:45, Anthony Cowley wrote: As for the platform, if it is giving you trouble, don't shy away from just using GHC and cabal as normal! After you've cabal installed a

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Anthony Cowley
On Mon, May 23, 2011 at 8:16 AM, Jacek Generowicz wrote: > > On 2011 May 23, at 13:45, Anthony Cowley wrote: >> As for the platform, if it is giving you trouble, don't shy away from >> just using GHC and cabal as normal! After you've cabal installed a few >> big packages, you will find that you've

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
On 2011 May 23, at 13:45, Anthony Cowley wrote: On Mon, May 23, 2011 at 5:17 AM, Jacek Generowicz wrote: a) Am I right in concluding that GHC 7.0.3 will not run on OS X 10.5 (without unreasonable effort)? This is a frustrating situation. Note that there is a binary for 7.0.1 that supports 1

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Anthony Cowley
On Mon, May 23, 2011 at 5:17 AM, Jacek Generowicz wrote: > So, after this tale of agony, here are two concrete questions: > > a) Am I right in concluding that GHC 7.0.3 will not run on OS X 10.5 > (without unreasonable effort)? This is a frustrating situation. Note that there is a binary for 7.0.

Re: [Haskell-cafe] Building Haskell Platform natively for 64bit Windows

2011-05-23 Thread Simon Marlow
On 18/05/2011 19:22, Jason Dagit wrote: On Wed, May 18, 2011 at 2:50 AM, John Sneer wrote: Hello all, I know it is not probably good question to this list, but anyway, could anyone point me to some more detailed "how to" where is described building of Haskell Platform natively to 64bit W

Re: [Haskell-cafe] Status of Haskell + Mac + GUIs & graphics

2011-05-23 Thread John Lato
> > Message: 17 > Date: Fri, 20 May 2011 15:59:51 -0700 > From: Evan Laforge > Subject: Re: [Haskell-cafe] Status of Haskell + Mac + GUIs & graphics > To: Erik Hesselink > Cc: haskell-cafe@haskell.org > Message-ID: > Content-Type: text/plain; charset=ISO-8859-1 > > > Note that it is supposed to

[Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
[TL;DR: there's a concrete question at the bottom.] Once again I find myself in the pleasant situation where the slings and arrows of life in general are slightly less intense, and I manage to find a few spare minutes and some free brain cycles to dedicate to Haskell. Why not try GHC 7.0.

Re: [Haskell-cafe] Handling a large database (of ngrams)

2011-05-23 Thread wren ng thornton
On 5/22/11 8:40 AM, Aleksandar Dimitrov wrote: If you have too much trouble trying to get SRILM to work, there's also the Berkeley LM which is easier to install. I'm not familiar with its inner workings, but it should offer pretty much the same sorts of operations. Do you know how BerkeleyLM co

Re: [Haskell-cafe] SIGSEGV in yieldCapability ()

2011-05-23 Thread Erik Hesselink
On Sun, May 22, 2011 at 15:03, Johannes Waldmann wrote: >>  I think you should file a bug report with a test case >> on GHC. > > I am willing to work on this, but I thought I'd go fishing for some > advice first. My program uses: forkIO, STM, and FFI. I've seen something like this, using only for