Re: [Haskell-cafe] IO (Either a Error) question

2010-05-08 Thread David Menendez
On Sat, May 8, 2010 at 1:16 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: David Menendez d...@zednenem.com writes: On Sat, May 8, 2010 at 12:15 AM, Ivan Lazar Miljenovic Well, any time you have a do-block like this you're using failable patterns: maybeAdd       :: Maybe Int -

Re: [Haskell-cafe] IO (Either a Error) question

2010-05-08 Thread Ivan Lazar Miljenovic
David Menendez d...@zednenem.com writes: That does not invoke fail. Let's take a simpler example: do { x - Nothing; stmt }. This translates to let ok x = do { stmt } ok _ = fail ... in Nothing = ok By the definition of (=) for Maybe, 'ok' is never called. As I said in another

Re: [Haskell-cafe] IO (Either a Error) question

2010-05-08 Thread Brandon S. Allbery KF8NH
On May 8, 2010, at 02:16 , Ivan Lazar Miljenovic wrote: David Menendez d...@zednenem.com writes: That does not invoke fail. Let's take a simpler example: do { x - Nothing; stmt }. This translates to let ok x = do { stmt } ok _ = fail ... in Nothing = ok By the definition of (=) for

Re: [Haskell-cafe] installing haskell platform on 64-bit ubuntu 10.04 (Lucid)

2010-05-08 Thread Magnus Therning
On 08/05/10 04:20, Andy Lee wrote: Has anyone had problems getting Haskell Platform installed on Ubuntu 10.04? I've got GHC 6.12.1 installed via apt-get, and I've downloaded/untarred haskell-platform-2010.1.0.0.tar.gz. But when I run ./configure, it fails fairly quickly, with an error

Re: [Haskell-cafe] Shorthand method of enumerating a list a gotcha ... or is it just me?

2010-05-08 Thread Malcolm Wallace
Hugs [3,7..22] [3,7,11,15,19] - OK Hugs map (* 1.0) [3,7..22] - same spec as first but !!! when mapped to with a (*1.0) to coerce them to reals: [3.0,7.0,11.0,15.0,19.0,23.0] - went one

Re: [Haskell-cafe] ANN: test-framework 0.3.0

2010-05-08 Thread Max Bolingbroke
On 8 May 2010 02:31, Gregory Collins g...@gregorycollins.net wrote: I don't see this one, although the junit option is there: Argh! I made the release from the wrong branch. I've uploaded v0.3.1 and double-checked that it contains the right functionality. Thanks for the heads-up! Max

Re: [Haskell-cafe] Shorthand method of enumerating a list a gotcha ... or is it just me?

2010-05-08 Thread Jonas Almström Duregård
An easier way of demonstrating this issue: Prelude [3,7..22]::[Int] [3,7,11,15,19] Prelude [3,7..22]::[Double] [3.0,7.0,11.0,15.0,19.0,23.0] /Jonas On 8 May 2010 09:47, Malcolm Wallace malcolm.wall...@cs.york.ac.uk wrote: Hugs [3,7..22] [3,7,11,15,19]     - OK Hugs map (* 1.0) [3,7..22]  

Re: [Haskell-cafe] IO (Either a Error) question

2010-05-08 Thread Ben Millwood
On Sat, May 8, 2010 at 3:26 AM, John Meacham j...@repetae.net wrote: What counts as unfailable? (x,y) probably,  but what about data Foo = Foo x y If we don't allow it, we add 'magic' to tuples, which is a bad thing, if we do allow it, there are some odd consequences. adding another

[Haskell-cafe] Ideas for better network IO in Combinatorrent?

2010-05-08 Thread Jesper Louis Andersen
Hi, Cafe! (This post got rather long, and in writing it, I probably answered some of my own questions. I'll still post it because it might be interesting to read for somebody). This post concerns the currently central problem in Combinatorrent. But the problem is interesting from another angle.

Re: [Haskell-cafe] GHC 6.12 on OS X 10.5

2010-05-08 Thread Thomas Schilling
Building from source alone didn't help, but building from source together with the following extra lines to .cabal/config worked: extra-lib-dirs: /usr/lib extra-lib-dirs: /opt/local/lib This is not an ideal solution because this means that any OS X library will shadow the corresponding Macports

[Haskell-cafe] tweak vacuum-* output

2010-05-08 Thread Ozgur Akgun
Hi all, I am using vacuum-opengl and vacuum-ubigraph to visualise and analyse some of my data structures. They are quite helpful most of the time, however sometimes I feel the need to tweak the generated output -- such as removing the auto-generted identifiers from constrcutor names, pack some

[Haskell-cafe] ANNOUNCE: hamlet 0.2.0

2010-05-08 Thread Michael Snoyman
Hi all, I'm happy to announce the second major release of Hamlet[1]. Hamlet is a HTML templating library which works via quasi-quoting, giving you compile-time assurances, type safety and very efficient HTML generation. I wrote a blog post[2] describing the changes in this version of Hamlet. The

Re: [Haskell-cafe] installing haskell platform on 64-bit ubuntu 10.04 (Lucid)

2010-05-08 Thread Andy Lee
On 05/08/2010 03:38 AM, Magnus Therning wrote: On 08/05/10 04:20, Andy Lee wrote: Has anyone had problems getting Haskell Platform installed on Ubuntu 10.04? I've got GHC 6.12.1 installed via apt-get, and I've downloaded/untarred haskell-platform-2010.1.0.0.tar.gz. But when I run ./configure,

Re: [Haskell-cafe] installing haskell platform on 64-bit ubuntu 10.04 (Lucid)

2010-05-08 Thread Andy Lee
On 05/08/2010 08:27 PM, Andy Lee wrote: On 05/08/2010 03:38 AM, Magnus Therning wrote: On 08/05/10 04:20, Andy Lee wrote: Has anyone had problems getting Haskell Platform installed on Ubuntu 10.04? I've got GHC 6.12.1 installed via apt-get, and I've downloaded/untarred

[Haskell-cafe] How efficient is read?

2010-05-08 Thread Tom Hawkins
I have a lot of structured data in a program written in a different language, which I would like to read in and analyze with Haskell. And I'm free to format this data in any shape or form from the other language. Could I define a Haskell type for this data that derives the default Read, then

Re: [Haskell-cafe] How efficient is read?

2010-05-08 Thread Don Stewart
tomahawkins: I have a lot of structured data in a program written in a different language, which I would like to read in and analyze with Haskell. And I'm free to format this data in any shape or form from the other language. Could I define a Haskell type for this data that derives the

Re: [Haskell-cafe] How efficient is read?

2010-05-08 Thread Pierre-Etienne Meunier
In fact, the time you'd spend writing read instances would not compare to the half hour required to learn parsec. And your parser will be efficient (at least, according to the guys from the parser team ;-) Cheers, PE El 08/05/2010, a las 23:32, Tom Hawkins escribió: I have a lot of

Re: [Haskell-cafe] How efficient is read?

2010-05-08 Thread Daniel Gorín
On May 9, 2010, at 12:32 AM, Tom Hawkins wrote: I have a lot of structured data in a program written in a different language, which I would like to read in and analyze with Haskell. And I'm free to format this data in any shape or form from the other language. Could I define a Haskell type for