showsPrec: cui bono?

2002-11-12 Thread Jerzy Karczmarczuk
A simple, primitive question: has anybody here used in a non-trivial way the showsPrec anti-parser? My students asked me what is it for, it is never used in the Hugs Prelude, OK, once: possible parentheses around fractions n%d. I explained that it is a good contraption to make one own pretty-

Re: showsPrec: cui bono?

2002-11-12 Thread C.Reinke
has anybody here used in a non-trivial way the showsPrec anti-parser? Isn't the idea to make things trivial while avoiding performance penalties? Perhaps: simple pretty-printing of abstract syntax trees? I often use it to get simple debugging output for complex internal data structures (first,

Calling Haskell from Python / C++

2002-11-12 Thread Jonathan Holt
Hi, I've just recently learned about Haskell, and I'm impressed by the abstractions and expressiveness that it affords. I'm particularly interested in it for a small parser project that I'm planning. However, my main programming languages are Python and C++, and for various reasons switching

Haskell98 Report copyright

2002-11-12 Thread Christopher Milton
I hope we don't have a repeat of the MathWorld website shutdown.* I also can't find a webpage with the definition of Standard ML... only avaible in print from MIT Press? Chris * http://mathworld.wolfram.com/erics_commentary.html = Christopher Milton [EMAIL PROTECTED]

1 line simple cat in Haskell

2002-11-12 Thread Ahn Ki-yung
If you are steaming with compicated codes, then how about taking a break. Let's play with a simple cat. \begin{code} main = mapM (=putChar) getCharS where getCharS = getChar:getCharS \end{code} Tested with ghc. Works good except that you get some messages on stderror because eof is not