Re: GHC, GCC 2.95 on Sparc Solaris, and PrelList.hi

1999-08-26 Thread Michael Weber
On Wed, Aug 25, 1999 at 11:04:27 +0200, George Russell wrote: I am trying to get GHC, with the latest PrimOps.h fix, to compile with gcc 2.95 on Sparc Solaris. I now have an hsc but it doesn't get very far with compiling the standard library because when it gets to PrelEnum.lhs, it

threadWaitRead etc.

1999-08-26 Thread Simon Marlow
Hi Folks, I committed the changes to implement threadWaitRead, threadWaitWrite and threadDelay yesterday[1]. We're seriously considering pulling these over into 4.04 (for patchlevel 1), but this is dependent on the changes getting enough testing in the next week or so. Please try it out!

Re: Q: hugs behavior...

1999-08-26 Thread Kwanghoon Choi
D.Tweed wrote: Marko Schuetz wrote: What I would like to know is: wouldn't it make sense to have the transformation f x = e where e does not mention x -- f x = f' f' = e in hugs? Did I miss anything? What if e if huge (maybe an infinte list of primes) and f x

Re: As- and irrefutable- patterns

1999-08-26 Thread Fergus Henderson
On 25-Aug-1999, Keith Wansbrough [EMAIL PROTECTED] wrote: According to the Haskell 98 report, patterns have the following grammar: apat ::= var [ @ apat ] | ~ apat | ...etc... Thus the following program should be legal (IMHO): main = let foo@~(x,y) = (1,2) in

Re: Units of measure

1999-08-26 Thread Andreas Rossberg
Tom Pledger wrote: Where do units of measure fit into a type system? In Haskell this should be quite easy. Off my head I would suggest something like class Unit a where unit :: Float - a value :: a - Float newtype Metres = Metres Float

Re: Units of measure

1999-08-26 Thread Anatoli Tubman
I once wrote a C++ template library that did exactly that. Arbitrary units, rational exponents -- you can have (m^(3/2)/kg^(5/16)) dimensioned value. All at compile time, without runtime checking whatsoever. Too bad it took eternity to compile a simplest program. Things like that should be

Q: how to redirect stdio from within hugs?

1999-08-26 Thread Marko Schuetz
I'd like to redirect stdout and stderr to a file from a haskell program, i.e. I'd like to bracket an IO action with output to stdout with redirecting stdout to a file before the action and redirecting it back at where it was after that action. I've taken a look at Hsh, but it uses Posix which

Re: Units of measure

1999-08-26 Thread Herbert Graeber
Good idea. Andrew Kennedy wrote a whole thesis about this, and a paper or two besides. http://research.microsoft.com/~akenn/ Unfortunalty this work concentrates on extending a programming language with units. It would be better to extend Haskell with more universal features that makes the

RE: Q: hugs behavior...

1999-08-26 Thread Simon Marlow
I think that the transformation is exactly fully laziness. Sometimes, it helps to improve space/time performance, but it needs to be tunned up due to the reasons including one given by Tweed. GHC does full laziness(*). As far as I know, no-one ever complained :) Simon (*) Well, actually

RE: Q: hugs behavior...

1999-08-26 Thread Simon Marlow
IIRC, GHC does the tuning, i.e. CAFs are garbage collected in a clever way (describe in SPJ's book, I think), e.g. if there is only one reference into the "middle" of a CAF left, only that part is kept alive. and not the wohle CAF. Comments from Mr. GC? :-) True, but this doesn't solve

Re: Units of measure

1999-08-26 Thread Andreas Rossberg
"D. Tweed" wrote: Isn't the issue a bit weirder than this in that you've also got pure numbers which ought be usable with the same operators (*$,etc) You are right, I overlooked that. But this is not even the most serious problem, overloading the operators accordingly might be possible with

Re: Units of measure

1999-08-26 Thread Anatoli Tubman
Not sure it will work... how do you handle Quot (Prod Metres Metres) (Prod Seconds Metres) or make sure that Prod Metres Seconds is the same as Prod Seconds Metres ??? On Aug 26, 10:36, Andreas Rossberg wrote: Subject: Re: Units of measure Tom Pledger wrote:

Haskell HTTP lib?

1999-08-26 Thread S. Alexander Jacobson
After all the discussion of FFIs for Haskell... Has anyone implemented an HTTP client library that works with Hugs GHC on both windows and unix? I suppose, if the haskell-jni stuff is done, that would count, but I am not sure of its status. -Alex- PS. I am really tired of using PHP for web

Re: Units of measure

1999-08-26 Thread Lennart Augustsson
Christian Sievers wrote: Anatoli Tubman wrote: I once wrote a C++ template library that did exactly that. Arbitrary units, rational exponents -- you can have (m^(3/2)/kg^(5/16)) dimensioned value. All at compile time, without runtime checking whatsoever. Is there any sense physically

Re: Units of measure

1999-08-26 Thread Christian Sievers
Anatoli Tubman wrote: I once wrote a C++ template library that did exactly that. Arbitrary units, rational exponents -- you can have (m^(3/2)/kg^(5/16)) dimensioned value. All at compile time, without runtime checking whatsoever. Is there any sense physically in rational exponents? If not,

RE: Units of measure

1999-08-26 Thread Simon Peyton-Jones
Good idea. Andrew Kennedy wrote a whole thesis about this, and a paper or two besides. http://research.microsoft.com/~akenn/ -Original Message- From: Tom Pledger Sent: Thursday, August 26, 1999 7:56 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Units of measure

Units of measure

1999-08-26 Thread Tom Pledger
Hi. Here's a short question which has been bothering me, and a longer discussion of why. Apologies if it's a rote. Where do units of measure fit into a type system? Expressions along these lines should ideally be legal: (x :: Metres) / (y :: Seconds) (x ::

Re: Haskell HTTP lib?

1999-08-26 Thread S. Alexander Jacobson
On Thu, 26 Aug 1999, Erik Meijer wrote: Has anyone implemented an HTTP client library that works with Hugs GHC on both windows and unix? I know that Sigbjorn has a binding for the W3C libraries, but I think that only works for GHC. There is that consistent FFI problem again. I guess

Re: Units of measure

1999-08-26 Thread Christian Sievers
(Cayenne doesn't happen to have c*n-patterns?) [ ;-) forgotten.] `c*n' and `n+k' are equally abominable. Cayenne has neither. I thought they might be nice to express the type of sqrt. When we have the type as Unit (mass::Int) (length::Int) (time::Int) = Double it should be s.th. like

Re: Units of measure

1999-08-26 Thread Jonathan King
On Thu, 26 Aug 1999, Christian Sievers wrote: Anatoli Tubman wrote: I once wrote a C++ template library that did exactly that. Arbitrary units, rational exponents -- you can have (m^(3/2)/kg^(5/16)) dimensioned value. All at compile time, without runtime checking whatsoever.