Re: ghc5.04.1 deriving Read/Show broken

2002-09-17 Thread George Russell
Manuel M T Chakravarty wrote: [snip] Luckily, there is a workaround (discovered by Tom Moertel on #haskell). If you include field names in the data definition for which you derive Show and Read, it seems to work fine. [snip] Thanks. I may try this, if I get time.

RE: ghc5.04.1 deriving Read/Show broken

2002-09-17 Thread Simon Marlow
Luckily, there is a workaround (discovered by Tom Moertel on #haskell). If you include field names in the data definition for which you derive Show and Read, it seems to work fine. So, in George's example module GHCBug where data Command = NewLocation | Commit

RE: Posix.executeFile having problems with unevaluated argumnets

2002-09-17 Thread Simon Marlow
Sorry, I haven't got time to narrow this down to a test case, but here are what I hope are the key factors: (1) We start up applications in a child process (forked with Posix.forkProcess) by calling Posix.executeFile, wrapped in an Exception.catch handler (to detect errors). (2) Both

[ ghc-Bugs-610569 ] typo: %lt; should be lt;

2002-09-17 Thread noreply
Bugs item #610569, was opened at 2002-09-17 07:20 You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=108032aid=610569group_id=8032 Category: Documentation Group: 5.04.1 Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to:

Division by 0 exits ghci

2002-09-17 Thread George Russell
On Solaris: # /home/ger/ghc-5.04.1.install/bin/ghci ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 5.04.1, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \/\/ /_/\/|_| Type :? for help. Loading package base ...

Re: Division by 0 exits ghci

2002-09-17 Thread George Russell
In fact the problem is more drastic than I mentioned in my last message; division by 0 doesn't seem to be catchable at all. From this program --- cut here --- import Exception main = do excep - Exception.try (seq (1 `div` 0) (return ())) putStrLn

Re: Division by 0 exits ghci

2002-09-17 Thread Manuel M T Chakravarty
George Russell [EMAIL PROTECTED] wrote, In fact the problem is more drastic than I mentioned in my last message; division by 0 doesn't seem to be catchable at all. From this program --- cut here --- import Exception main = do excep - Exception.try

Re: ANN: C-Haskell 0.10.16 Altocumulus Stratiformis Perlucidus Undulatus

2002-09-17 Thread Manuel M T Chakravarty
Manuel M T Chakravarty [EMAIL PROTECTED] wrote, I am pleased to announce version 0.10.16 Altocumulus Stratiformis Perlucidus Undulatus of the C interface generator C-Haskell. The web site http://www.cse.unsw.edu.au/~chak/haskell/c2hs/ now also has a binary rpm that is compiled

RE: Problem to compile -parallel

2002-09-17 Thread Simon Peyton-Jones
For parallel Haskell you need the GPH mailing list, not Glasgow-haskell-users. You can find details of that list at http://www.cee.hw.ac.uk/~dsg/gph/ Meanwhile, you're suffering from a compiler version shift: the new compiler can't read the old compiler's Foo.hi files. Just rm *.hi

RE: meta-haskell-branch

2002-09-17 Thread Saswat Anand
Thanks for the pointer. I still get the following error, when I do gmake. echo '#!/bin/sh' ghc-inplace echo exec /root/fptools/ghc/compiler/ghc-5.05 '-B/root/fptools' '$@' ghc-inplace chmod 755 ghc-inplace

RE: IO-System

2002-09-17 Thread Simon Marlow
I'd settle for that kind of indiscriminate flushing -- as is, trivial I/O examples such as main = do putStr What is your name? ls - getLine putStrLn (Hello ++ ls ++ !) fail to behave as expected. That depends on what you expect... :-) The Haskell report says nothing about

RE: meta-haskell-branch

2002-09-17 Thread Simon Peyton-Jones
I have seen this before and it puzzled the hell out of me too. To be honest I have forgotten the exact cause, but it's something to do with the fact that you haven't done a new 'autoconf' or a new 'configure' or something. Much the easiest thing is to start from scratch. Check out an entirely

Re: IO-System

2002-09-17 Thread MR K P SCHUPKE
I agree, I certainly don't want inefficency introduced by unecessary flushes, and I would expect to control where the flushes happen. I think the query originally assumed a sequencing ambiguity in the IO monad... but in my experiance (all be it limited) the IO monad is there to ensure strict

ObjectIO

2002-09-17 Thread Serguey Zefirov
Hello glasgow-haskell-users, First, it would be good to have examples somewhere around ObjectIO main page. I've figured out how to download source code for examples only after third or fourth try. I know, that the question about examples and source code should be directed to the

Re: IO-System

2002-09-17 Thread Sigbjorn Finne
Simon Marlow [EMAIL PROTECTED] writes: I'd settle for that kind of indiscriminate flushing -- as is, trivial I/O examples such as main = do putStr What is your name? ls - getLine putStrLn (Hello ++ ls ++ !) fail to behave as expected. That depends on what you

RE: IO-System

2002-09-17 Thread Simon Marlow
The previous impl had facilities for controlling this - you could label handles as being connected (i.e., read() on one caused flushes on the other.) By default, stdin was connected to stdout and stderr. If that turned out to be troublesome, the connection could be broken (I could be

RE: IO-System

2002-09-17 Thread Glynn Clements
Simon Marlow wrote: I'd settle for that kind of indiscriminate flushing -- as is, trivial I/O examples such as main = do putStr What is your name? ls - getLine putStrLn (Hello ++ ls ++ !) fail to behave as expected. That depends on what you expect... :-) The

Re: where block local to a guard?

2002-09-17 Thread Brian Boutel
Dr Mark H Phillips wrote: Hi, Suppose you have some function functn :: Int - Int functn i | i5 = t * i | i0 = t_ * i | otherwise = 1 where t = functn (i-2) t_ = functn (i-1) Notice that t and t_ are really local to a guard, rather than to

RE: Haskell 98: Behaviour of hClose

2002-09-17 Thread Simon Peyton-Jones
Sigbjorn writes: | Re: your request to have a final look through the report | for any wibbles that might remain -- Section 11.3.2 of the | lib report isn't clear on what the expected behaviour of | (hClose h hClose h) ought to be, i.e., will the second | hClose fail or not? | | Both GHC and

Re: where block local to a guard?

2002-09-17 Thread Hamilton Richards
At 3:07 PM +0930 9/17/02, Dr Mark H Phillips wrote: Suppose you have some function functn :: Int - Int functn i | i5 = t * i | i0 = t_ * i | otherwise = 1 where t = functn (i-2) t_ = functn (i-1) Notice that t and t_ are really local to a guard,

RE: Haskell 98: Behaviour of hClose

2002-09-17 Thread Glynn Clements
Simon Peyton-Jones wrote: | Re: your request to have a final look through the report | for any wibbles that might remain -- Section 11.3.2 of the | lib report isn't clear on what the expected behaviour of | (hClose h hClose h) ought to be, i.e., will the second | hClose fail or not? |

Re: Q: Forcing repeated evaluation

2002-09-17 Thread Jan Kybic
collection. I want to try to force l to be generated on-the-fly every time it is needed, to see if it improves performance. What is a good way to do it? Would something like ... The easiest way is to make it a function l _ = [ i*i*i | i - [0..n] ] -- for very large n I

Re: where block local to a guard?

2002-09-17 Thread Dr Mark H Phillips
Thanks for the explanation! On Tue, 2002-09-17 at 19:07, Brian Boutel wrote: You can't do this because where clauses are not part of the expression syntax. If they were, expressions like let a=b in c where d=e or if a then b else c where d=e whould be ambiguous, unless you

Good layout style? (was: Re: where block local to a guard?)

2002-09-17 Thread Dr Mark H Phillips
On Wed, 2002-09-18 at 01:26, Hamilton Richards wrote: You can get the effect you're after by using let-expressions: functn :: Int - Int functn i | i5 = let t = functn (i-2) in t * i | i0 = let t = functn (i-1) in t * i | otherwise = 1 'where' is part

Re: where block local to a guard?

2002-09-17 Thread Brian Boutel
Dr Mark H Phillips wrote: Thanks for the explanation! On Tue, 2002-09-17 at 19:07, Brian Boutel wrote: You can't do this because where clauses are not part of the expression syntax. If they were, expressions like let a=b in c where d=e or if a then b else c where d=e whould

Re: Good layout style? (was: Re: where block local to a guard?)

2002-09-17 Thread Hal Daume III
I think this is purely a personal taste kind of thing. First off, though, only 'where', 'let', 'of' and 'do' induce layout. I've seen many layout styles; the most common seem to be: let x = ... y = ... z = ... in e which is probably a carryover from ML like languages where