Re: [Haskell-cafe] Parse text difficulty

2004-12-15 Thread Thomas Johnsson
printastable :: [([Int],Word)] - String printastable l = concat $ map (\(xs,w) - (show xs) ++ ++ w ++ \n) l I'd use [ c | (xs,w) - l, c - (show xs) ++ ++ w ++ \n ] instead -- after all, list comprehensions provide a much nicer syntax for map, filter and concat. I try to stay

Re: interact behaves oddly if used interactively

2003-10-02 Thread Thomas Johnsson
Nicholas Nethercote wrote: Also, I'm not convinced that laziness does make users' lives easier -- witness a lot of the traffic on this list. Witness the subject of this thread. In which case the extra difficulty heaped upon compiler writers is of questionable value. I'm convinced that if

ghc 5.04 bug

2003-09-03 Thread Thomas Johnsson
ghc -c Ghcbug.hs c:\ghc\ghc-5.04\bin\ghc.exe: panic! (the `impossible' happened, GHC version 5.04): expectJust tyConDataCons Please report it as a compiler bug to [EMAIL PROTECTED], or http://sourceforge.net/projects/ghc/. Ghcbug.hs: -- module O where type O a = Ord a

Re: Hiring and porting

2002-03-12 Thread Thomas Johnsson
Mark Carroll writes: [..] However, I do fear that Ashley's correct in suggesting that you'd probably need to rewrite everything to sensibly translate the Haskell to C or Java or whatever, and it is both reasonable and plausible that some larger clients will demand use of a more

Re: Haskell in Space

2002-02-28 Thread Thomas Johnsson
Cool! Speaking of Haskell and games, has anyone interfaced DirectX with Haskell? -- Thomas Christoph Lueth writes: Dear Haskell people, as the last exercise of a second-year undergraduate Haskell course I had the students write an asteroids-type game (older readers may remember

Re: Happy and Macros (was Re: ANNOUNCE: Happy 1.10 released)

2001-05-11 Thread Thomas Johnsson
S. Alexander Jacobson writes: I am not a parsing expert, but given the recent discussion on macros, I have to ask: why use happy rather than monadic parsing? Monadic parsing allows you to avoid a whole additional language/compilation step and work in Hugs (where you don't have a

Re: Library conventions

2000-06-27 Thread johnsson
Lennart Augustsson writes: Using `Left' and `Right' for such cases is fundamentally confusing since it is not clear what the meaning of `Left' and `Right' is. Well, I don't totally agree. Anyone using Right for Wrong deserves to have his/her head examined. :) Unless you're

RE: Haskell - Java bytecode?

2000-05-24 Thread johnsson
To those of you who are working on implementations: How do you implement 1) tail recursion 2) polymorphism 3) closures eval (i.e., laziness) Thanks, --Thomas Johnsson

Re: Graph reduction and lambda lifting

1999-12-07 Thread johnsson
Matthias Kilian writes: Where can I find papers on the topics "graph reduction", "lambda lifting", "g-machine", "TIM", etc. in the web? My old papers on the G-machine and lambda lifting is available at www.cs.chalmers.se/~johnsson . --Thomas

Haskell equiv of ML-Lex/ML-Yacc ?

1997-11-24 Thread Thomas Johnsson
-Yacc, etc. -- Thomas Johnsson

1.3 cleanup: symbol characters

1993-10-13 Thread Thomas Johnsson
I propose that we do the following cleanup in the lexical syntax for operator symbols: Allow - and ~ inside operator symbols (and not just as first characters in them). Currently, e.g. -+ and ~= are allowed, but +- and =~ are not. This seems a bit arbitrary to me. -- Thomas

Re: re. Arrays and Assoc

1993-10-06 Thread Thomas Johnsson
Thomas Johnsson says: If I recall correctly, the := to be used in array comprehensions was a consession to the FORTRAN/Id/Sisal community, so that array comprehensions would look more like they were used to. Both Arvind and I think this is notation is awful, and I don't

Re: Arrays and Assoc

1993-10-06 Thread Thomas Johnsson
Let me just remind people what the LML arrays does: example: lmlarray 1 3 f list = array [ 1:= f [ x | (1,x) - list], 2:= f [ x | (2,x) - list], 3:= f [ x | (3,x) - list] ] where array is

Re: Arrays and Assoc

1993-10-06 Thread Thomas Johnsson
I agree, but I also agree with Lennart that both sorts of arrays are needed. Yes, I agree on that; language design is, as always, a compromise between the desirable semantics (in this case, as lazy as possible), and desirable efficency, and we don't know yet how to make lazy arrays a la LML

Re: Arrays and Assoc

1993-10-05 Thread Thomas Johnsson
John Launchbury says: 1. We should get rid of Assoc. When explaining my programs to other people I find this is a point of confusion. Imagine exaplaining array construction, "When I define an array, the comprehension produces a list of index/value pairs, only they are not written as

Invitation to visit the fp group at Chalmers

1992-11-23 Thread Thomas Johnsson
of Lennart Augustsson, John Hughes, Thomas Johnsson, Mikael Rittri, Mary Sheeran, and about a dozen others. Current research includes: * Efficient implementation of lazy functional languages. * Parallel graph reduction. * Programming environments for functional languages