[Haskell-cafe] Re: nhc vs ghc

2007-11-24 Thread apfelmus
brad clawsie wrote: can anyone provide a concise list of the major differences between nhc98 and ghc? for example, can i build a cabal package with nhc98? i get that ghc and nhc98 are not interchangeable, otherwise i am not sure The major difference is that nhc98 is pretty much Haskell98 only,

Re: [Haskell-cafe] Call external program and get stdout

2007-11-24 Thread Allan Clark
Roberto Zunino wrote: Allan Clark wrote: -- Create the process do (_pIn, pOut, pErr, handle) - runInteractiveCommand command -- Wait for the process to finish and store its exit code exitCode - waitForProcess handle Warning: this will get stuck if the command output is so

[Haskell-cafe] Re: An interesting monad: Prompt

2007-11-24 Thread apfelmus
Derek Elkins wrote: Ryan Ingram wrote: apfelmus wrote: A context passing implementation (yielding the ContT monad transformer) will remedy this. Wait, are you saying that if you apply ContT to any monad that has the left recursion on = takes quadratic time problem,

Re: [Haskell-cafe] Re: nhc vs ghc

2007-11-24 Thread Neil Mitchell
Hi can anyone provide a concise list of the major differences between nhc98 and ghc? for example, can i build a cabal package with nhc98? i get that ghc and nhc98 are not interchangeable, otherwise i am not sure The other major differences: * nhc is unavailable on Windows * nhc programs

Re: [Haskell-cafe] Re: nhc vs ghc

2007-11-24 Thread Neil Mitchell
Hi 1. It IS available on Windows. Not without Mingw/Cygwin - which in my mind makes it not Windows native. I also know that the release is made without testing on Windows, and that certain related tools like hmake rely on shell scripts. If there is someone using nhc seriously on Windows, it

[Haskell-cafe] Re: Re: Best Linux for Haskell?

2007-11-24 Thread Ben Franksen
Martin DeMello wrote: On 11/6/07, Maurí­cio [EMAIL PROTECTED] wrote: Maybe (and only maybe), before choosing a distribution, you should choose a package system, since that's what you are going to use to install software. Look for RPM and APT, and see what you think. With my package system

Re: [Haskell-cafe] Call external program and get stdout

2007-11-24 Thread Thomas Hartman
dons did a blog post about a shell monad which I think does what you ask. http://cgi.cse.unsw.edu.au/~dons/blog/2007/03 very nice, I use it myself. t. 2007/11/22, Maurí­cio [EMAIL PROTECTED]: Hi, How can I call a program (like, for instance, 'grep text *') and get the standard output? All

[Haskell-cafe] is there a more concise way to generate helper functions for a datatype built on records?

2007-11-24 Thread Thomas Hartman
I think I'm running into more or less the same issue discussed at http://bloggablea.wordpress.com/2007/04/24/haskell-records-considered-grungy/ Just wondering if I missed anything, or if any of the ideas considering better records setter/getters have been implemented in the meantime. t.

Re: [Haskell-cafe] is there a more concise way to generate helper functions for a datatype built on records?

2007-11-24 Thread Neil Mitchell
Hi Some of these can be automatically derived by the Data.Derive tool. If you want any more, then submit a patch and they can all be derived. http://www-users.cs.york.ac.uk/~ndm/derive/ The derivations Set, Is, From, Has, LazySet all look useful. A bit more documentation on what each one does

Re: [Haskell-cafe] Re: nhc vs ghc

2007-11-24 Thread Stefan O'Rear
On Sat, Nov 24, 2007 at 10:44:45AM +, Neil Mitchell wrote: Hi can anyone provide a concise list of the major differences between nhc98 and ghc? for example, can i build a cabal package with nhc98? i get that ghc and nhc98 are not interchangeable, otherwise i am not sure The

Re: [Haskell-cafe] An interesting monad: Prompt

2007-11-24 Thread Thomas Hartman
Looks very cool. So I tried playing with this code, unfortunately couldn't get it to compile. Could you double check that what you posted compiles, and if it does, any idea what I'm doing wrong? This is with {-# OPTIONS -fglasgow-exts -fallow-undecidable-instances #-} thanks, t. Prelude :r

Re: [Haskell-cafe] An interesting monad: Prompt

2007-11-24 Thread Thomas Hartman
fwiw, if I comment those two lines around 141 out, it compiles. t. 2007/11/24, Thomas Hartman [EMAIL PROTECTED]: Looks very cool. So I tried playing with this code, unfortunately couldn't get it to compile. Could you double check that what you posted compiles, and if it does, any idea what

Re: [Haskell-cafe] An interesting monad: Prompt

2007-11-24 Thread Brent Yorgey
-- Just for fun, make it work with StateT as well -- (needs -fallow-undecidable-instances) instance (Monad (t m), MonadTrans t, MonadPrompt p m) = MonadPrompt p (tm) where prompt = lift . prompt Looks like that should be MonadPrompt p (t m) rather than (tm). Note the space. -Brent

Re: [Haskell-cafe] An interesting monad: Prompt

2007-11-24 Thread Thomas Hartman
that did it, thanks. 2007/11/24, Brent Yorgey [EMAIL PROTECTED]: -- Just for fun, make it work with StateT as well -- (needs -fallow-undecidable-instances) instance (Monad (t m), MonadTrans t, MonadPrompt p m) = MonadPrompt p (tm) where prompt = lift . prompt Looks like

Re: [Haskell-cafe] Re: An interesting monad: Prompt

2007-11-24 Thread Derek Elkins
On Sat, 2007-11-24 at 11:10 +0100, apfelmus wrote: Derek Elkins wrote: Ryan Ingram wrote: apfelmus wrote: A context passing implementation (yielding the ContT monad transformer) will remedy this. Wait, are you saying that if you apply ContT to any monad

Re: [Yhc] Re: [Haskell-cafe] yhc install fails

2007-11-24 Thread Thomas Hartman
Thanks, that worked. I think there's some weird issue with the way the build happens that requires you to do rm -rf yhc; darccs get http://...yhc for a truly fair build to take place. I saw something in a bug report about how things get cached. That means that an ok from a buildbot doesn't

[Haskell-cafe] problems building ycr2js

2007-11-24 Thread Thomas Hartman
OK, I struggled through the instructions at http://haskell.org/haskellwiki/Yhc/Javascript/Users_guide#Downloading and am getting tripped up at (cd src/translator/js; make all install) any advice? ... blah blah blah ghc --make -i../../../depends/filepath splitter.hs -o

Re: [Haskell-cafe] nhc vs ghc

2007-11-24 Thread Duncan Coutts
On Fri, 2007-11-23 at 23:33 -0800, brad clawsie wrote: for example, can i build a cabal package with nhc98? As of yesterday the answer is yes! (probably) :-) I'm glad you asked about building and not installing since the answer to that question would be no. Support in Cabal for building with

[Haskell-cafe] been scouring through the Haskell prelude to no avail ...

2007-11-24 Thread Galchin Vasili
Hello, Is there any predefined datatype that can be used to represent a two byte value? Kind regards, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] been scouring through the Haskell prelude to no avail ...

2007-11-24 Thread Luke Palmer
Word16 from the Data.Word module. Luke On Nov 24, 2007 11:47 PM, Galchin Vasili [EMAIL PROTECTED] wrote: Hello, Is there any predefined datatype that can be used to represent a two byte value? Kind regards, Vasili ___ Haskell-Cafe mailing

Re: [Haskell-cafe] is there a more concise way to generate helper functions for a datatype built on records?

2007-11-24 Thread Alex Jacobson
There is a simplified version of HList style functionality inside HAppS-Data because I found Oleg's repo too hard to understand. -Alex- Stuart Cook wrote: On 11/25/07, Thomas Hartman [EMAIL PROTECTED] wrote: I think I'm running into more or less the same issue discussed at

Re: [Haskell-cafe] emacs haskellers: r-stripping files becomes popular

2007-11-24 Thread Conal Elliott
why care about trailing whitespace? On Nov 16, 2007 8:14 AM, Valery V. Vorotyntsev [EMAIL PROTECTED] wrote: Add the following lines to your ~/.emacs: --- BEGIN OF ELISP CODE --- ;(global-set-key (kbd f9 s) 'delete-trailing-whitespace) (defun delete-trailing-whitespace-if-confirmed

Re: [Haskell-cafe] emacs haskellers: r-stripping files becomes popular

2007-11-24 Thread Brent Yorgey
On Nov 24, 2007 10:55 PM, Conal Elliott [EMAIL PROTECTED] wrote: why care about trailing whitespace? Probably because it looks bad in darcs patch summaries (trailing whitespace -- little red dollar signs). Unless there's another reason I don't know about. -Brent

Re: [Haskell-cafe] emacs haskellers: r-stripping files becomes popular

2007-11-24 Thread Jonathan Cast
On 24 Nov 2007, at 9:09 PM, Brent Yorgey wrote: On Nov 24, 2007 10:55 PM, Conal Elliott [EMAIL PROTECTED] wrote: why care about trailing whitespace? Probably because it looks bad in darcs patch summaries (trailing whitespace -- little red dollar signs). Unless there's another reason I

[Haskell-cafe] Pretty-printing peg solitaire boards

2007-11-24 Thread Maurí­cio
Hi, I'm trying to pretty-print (with Text . PrettyPrint . HughesPJ) a set of peg solitaire boards. No matter what I try, I always get this: 00# 00# #00 000 000 000 000 : 00# 00# 000 000 000 000

Re: [Haskell-cafe] Pretty-printing peg solitaire boards

2007-11-24 Thread Stefan O'Rear
On Sun, Nov 25, 2007 at 03:40:26AM -0200, Maurí­cio wrote: Hi, I'm trying to pretty-print (with Text . PrettyPrint . HughesPJ) a set of peg solitaire boards. No matter what I try, I always get this: 00# 00# #00 000 000 000 000 : 00# 00#

Re: [Haskell-cafe] Pretty-printing peg solitaire boards

2007-11-24 Thread Vimal
On 25/11/2007, Maurí­cio [EMAIL PROTECTED] wrote: Hi, I'm trying to pretty-print (with Text . PrettyPrint . HughesPJ) a set of peg solitaire boards. No matter what I try, I always get this: 00# 00# #00 000 000 000 000 : 00# 00#