Re: [Haskell-cafe] Precedence and associativity in a pretty-printer

2008-01-22 Thread Allan Clark
Edsko de Vries wrote: Hi, Is there a nice way to pretty-print such an expression with the minimal number of brackets? I can come up with something, but I'm sure somebody thought hard about this problem before and came up with a really nice solution :) Any hints or pointers would be appreciated,

Re: [Haskell-cafe] Am I blind?

2008-01-06 Thread Allan Clark
I've searched all over the place, and I can't find this information actually "announced" anywhere except on the GHC homepage itself. And yet, I've seen emails bouncing around that appear to be replies to the announcement email. But I can't find the actual announcement email anywhere. Am I g

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 out

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

2007-11-22 Thread Allan Clark
Jules Bean wrote: Maurí­cio wrote: Hi, How can I call a program (like, for instance, 'grep text *') and get the standard output? All actions I found (executeFile, system) do not give me the output of the program. http://haskell.org/ghc/docs/latest/html/libraries/process-1.0.0.0/System-Process

Re: [Haskell-cafe] How you can help improve Haskell implementations!

2007-02-26 Thread Allan Clark
Donald Bruce Stewart wrote: Just a quick note to say that the Haskell implementation shootout is progressing, now supporting jhc, fixing a range of bugs, and providing more benchmark programs. Nice average numbers are also reported for the relative performance of each compiler or interpreter. On

Re: [Haskell-cafe] Re: Is lazyness make big difference?

2007-02-15 Thread Allan Clark
i.e. to use Monad.Writer in stead of Monad.State. The point is that for example 'typedProgram' does not really depend on the contents of 'log', but the dependencies in your code don't express this. One should switch from Log -> (a, Log) to (a, Log -> Log) or even (a, Log) if Log alre

Re: [Haskell-cafe] Is lazyness make big difference?

2007-02-15 Thread Allan Clark
Nick wrote: Hi all, (Another topic stolen from a Russian forum discussion). As everyone know, there are lot of strict languages, that have possibilities to "switch on" lazy evaluation when needed. But the examples that I saw on Haskell, there was not much use of lazy evaluation, often there

Re: [Haskell-cafe] Command line prompt templates

2006-11-24 Thread Allan Clark
Dougal Stanton wrote: I was trying to write my own equivalent to Don Stewart's mkcabal but ended up getting sidetracked. I made some generalised prompts for use at the command line and wanted to get some feedback on them. The full code can be found at [1] but the basic summary is like this: