Can't install Happy 1.5 binary on Solaris

1998-06-10 Thread Antony Bowers
Help me, please! I'm trying to install the binary distribution of happy 1.5 on SunOS 5.5.1. I've done: ./configure --prefix=/usr/local/ghc-3.02 and it seems OK. Now I do: make install SHELL=/usr/local/bin/bash and make outputs a string of commands that look perfectly reasonable. However,

Exceptions and return

1998-06-10 Thread Hans Aberg
I have noted that C++ exceptions (Exception(a), where a is any piece of data) can be used to implement dynamic versions of C++ constructs such as ``return'' and ``break'' (because I have done it). So exceptions are certainly more general than function returns, at least in this context.

FW: Exceptions are too return values!

1998-06-10 Thread Karlsson Kent - keka
x= 1/0 - NaN (I guess the - is supposed to be a --) Actually, IEC 559 (a.k.a. IEEE 754, commonly referred to as 'IEEE floating point') specifies that 1 floating point divided by (positive) 0 shall have the 'continuation value' of *positive infinity*, and (if trapping is off) one shall record

Re: Exceptions are too return values!

1998-06-10 Thread Dave Tweed
On Tue, 9 Jun 1998, Mariano Suarez Alvarez wrote: In a typed language, a function *cannot* be applied to something outside its domain. That's the whole point! That represents a certain degree of idealisation though? E.g., sqrt _as a (single valued) mathematical function_ has domain R^{=0}.

Re: Exceptions and return

1998-06-10 Thread Jerzy Karczmarczuk
Hans Aberg writes: I have noted that C++ exceptions (Exception(a), where a is any piece of data) can be used to implement dynamic versions of C++ constructs such as ``return'' and ``break'' (because I have done it). So exceptions are certainly more general than function returns, at

Re: FW: Exceptions are too return values!

1998-06-10 Thread Simon L Peyton Jones
Alastair Reid has been very quiet, so I'll pipe up for him. Here's a reasonable design for exceptions in Haskell: * A value of Haskell type T can be EITHER one of the values we know and love (bottom, or constructor, or function, depending on T),

Re: FW: Exceptions are too return values!

1998-06-10 Thread Lennart Augustsson
* raise :: String - a * handle :: (String - IO a) - IO a - IO a I'd be interested to know what people think of this. I like the trick of handle being in the IO monad to avoid problems with evaluation order. As usual though, it can be a high price to pay if all you wanted was a little local

Re: FW: Exceptions are too return values!

1998-06-10 Thread Ralf Hinze
I'd be interested to know what people think of this. Here's a reasonable design for exceptions in Haskell: ... The neat thing about this is that the exceptions can be *raised* in arbitrary purely functional code, without violating referential transparency. The question of which exception

Re: FW: Exceptions are too return values!

1998-06-10 Thread Tommy Thorn
Thats a wonderful idea. With that it will be so much easier to write robust code without bloating the code with error checks. I've always been annoyed that I couldn't trap arbitrary errors, say to close down the application cleanly. Now, we only need extendible data types, and then we have an

Exceptions and return

1998-06-10 Thread Patrick Logan
I have noted that C++ exceptions (Exception(a), where a is any piece of data) can be used to implement dynamic versions of C++ constructs such as ``return'' and ``break'' (because I have done it). So exceptions are certainly more general than function returns, at least in this

Re: FW: Exceptions are too return values!

1998-06-10 Thread S. Alexander Jacobson
Simon and Alastair, This sounds like what I wanted. Just a few questions: * A value of Haskell type T can be EITHER one of the values we know and love (bottom, or constructor, or function, depending on T), OR it can be a set of exceptional values.

Re: Exceptions and return

1998-06-10 Thread Hans Aberg
At 01:09 +1000 98/06/11, Fergus Henderson wrote: There's little point trying to implement C++-like so-called "zero-overhead" exceptions in any language with garbage collection. It would probably result in a performance loss. This is good indeed. But I think the C++ exceptions have another

Re: FW: Exceptions are too return values!

1998-06-10 Thread Koen Claessen
On Wed, 10 Jun 1998, Simon L Peyton Jones wrote: | We're implementing an experimental version of this | in GHC, integrated with the IO monad exceptions, so that | | handle :: (IOError - IO a) - IO a - IO a | | and we add an extra constructor (UserError String) to the | IOError type

RE: Exceptions are too return values!

1998-06-10 Thread Karlsson Kent - keka
It's nice to have SOME way of handling exceptions, but... The implementation does not keep sets of exceptional values, of course. It simply propagates the first one it trips over to the nearest enclosing handler. One argument that can be made in favour of a generalised more IEEE-like

Re: FW: Exceptions are too return values!

1998-06-10 Thread Kevin Hammond
At 2:40 pm 10/6/98, Simon L Peyton Jones wrote: Here's a reasonable design for exceptions in Haskell: * A value of Haskell type T can be EITHER one of the values we know and love (bottom, or constructor, or function, depending on T), OR it can be a

Re: FW: Exceptions are too return values!

1998-06-10 Thread S. Alexander Jacobson
On Thu, 11 Jun 1998, Fergus Henderson wrote: It would make debugging easier if the exception picked was consistent accross implementations. It doesn't matter which one, but it does matter that it is the same. (maybe you require that Exceptions implement Ord, or sort based on the