RE: Exceptions

2006-09-04 Thread Simon Marlow
On 02 September 2006 06:29, Ashley Yakeley wrote: > I'd also like to query O'Haskell here. Simon writes in the paper: > >> O'Haskell extends Haskell with object-oriented subtyping. >> As such, it would be entirely possible to implement extensible >> exceptions using inheritance in O'Haskell. > >

Re: Exceptions

2006-09-01 Thread Ashley Yakeley
In article <[EMAIL PROTECTED]>, Andres Loeh <[EMAIL PROTECTED]> wrote: > I think the stress here is on *new* extensions. I agree that an open > type of type representations might be a more beautiful solution to the > problem that Typeable solves. Nevertheless, the fact is that Simon's > solution

Re: Exceptions

2006-09-01 Thread Andres Loeh
Hi Ashley. Thanks for your interest in open data types. As one of the authors of the "open data types" paper, I'd like to comment on the current discussion. You comment Simon's upcoming HW paper on extensible exceptions: > You write: > > > Compared to our approach, theirs requires new extension

Re: Exceptions

2006-08-31 Thread Ashley Yakeley
In article <[EMAIL PROTECTED] ft.com>, "Simon Marlow" <[EMAIL PROTECTED]> wrote: > I don't think we need more extensions to do a reasonable job of > extensible exceptions: > > http://www.haskell.org/~simonmar/papers/ext-exceptions.pdf You write: > Compared to our approach, theirs requires n

RE: Exceptions

2006-08-31 Thread Simon Marlow
On 30 August 2006 20:20, Ashley Yakeley wrote: > John Goerzen wrote: > >> One thing that bugs me about Haskell is that exceptions are not >> extensible. >> >> I don't know how to craft a good solution, but perhaps if I explain >> the problem well, someone would come up with one. > > Open datat

Re: Exceptions

2006-08-30 Thread Ashley Yakeley
John Goerzen wrote: One thing that bugs me about Haskell is that exceptions are not extensible. I don't know how to craft a good solution, but perhaps if I explain the problem well, someone would come up with one. Open datatypes would be the best solution, I think. http://www.informatik.uni

RE: Exceptions

2006-04-11 Thread Simon Marlow
On 11 April 2006 13:54, John Meacham wrote: > On Tue, Apr 11, 2006 at 01:43:18PM +0100, Simon Marlow wrote: >> yes, when I say "one throw" I was referring to the argument type, not >> the return type. We should still have ioError - although it would >> probably be better named throwIO: > > Ah, I

Re: Exceptions

2006-04-11 Thread John Meacham
On Tue, Apr 11, 2006 at 01:43:18PM +0100, Simon Marlow wrote: > yes, when I say "one throw" I was referring to the argument type, not > the return type. We should still have ioError - although it would > probably be better named throwIO: Ah, I see what you mean now. would it be possible to use T

RE: Exceptions

2006-04-11 Thread Simon Marlow
On 11 April 2006 13:35, John Meacham wrote: > On Tue, Apr 11, 2006 at 01:24:07PM +0100, Simon Marlow wrote: >> Attached is another variant of the extensible exceptions idea, it >> improves on the previous designs in a couple of ways: there's only >> one catch & throw, regardless of what type you'

Re: Exceptions

2006-04-11 Thread John Meacham
On Tue, Apr 11, 2006 at 05:35:12AM -0700, John Meacham wrote: > throw x >> return () -> _|_ hmm.. actually is this true? hmm.. seq and IO always mixed oddly. John -- John Meacham - ⑆repetae.net⑆john⑈ ___ Haskell-prime mailing list Haskell-prim

Re: Exceptions

2006-04-11 Thread John Meacham
On Tue, Apr 11, 2006 at 01:24:07PM +0100, Simon Marlow wrote: > Attached is another variant of the extensible exceptions idea, it > improves on the previous designs in a couple of ways: there's only one > catch & throw, regardless of what type you're throwing or catching. > There is an extensible

RE: Exceptions

2006-04-11 Thread Simon Marlow
Attached is another variant of the extensible exceptions idea, it improves on the previous designs in a couple of ways: there's only one catch & throw, regardless of what type you're throwing or catching. There is an extensible hierarchy of exceptions, and you can catch and re-throw subclasses of

RE: Exceptions

2006-04-10 Thread Simon Marlow
[oops, sent by accident...] On 08 April 2006 10:18, John Meacham wrote: > On Sat, Apr 08, 2006 at 12:11:51AM -0400, David Menendez wrote: >>> newtype ArithException a = ArithException a >>> >>> data DivideByZero >>> >>> throw (ArithException DivideByZero) >>> >>> your code: >>> >>> data Multi

RE: Exceptions

2006-04-10 Thread Simon Marlow
On 08 April 2006 10:18, John Meacham wrote: > On Sat, Apr 08, 2006 at 12:11:51AM -0400, David Menendez wrote: >>> newtype ArithException a = ArithException a >>> >>> data DivideByZero >>> >>> throw (ArithException DivideByZero) >>> >>> your code: >>> >>> data MultiplyByZero >>> throw (ArithExc

Re: Exceptions

2006-04-08 Thread John Meacham
On Sat, Apr 08, 2006 at 12:11:51AM -0400, David Menendez wrote: > > newtype ArithException a = ArithException a > > > > data DivideByZero > > > > throw (ArithException DivideByZero) > > > > your code: > > > > data MultiplyByZero > > throw (ArithException MultiplyByZero) > > How would you use t

Re: Exceptions

2006-04-08 Thread Dave Menendez
John Meacham writes: > On Fri, Apr 07, 2006 at 10:00:21AM -0500, John Goerzen wrote: > > But here's my concern. Let's say that I wanted to, for some > > reason, create a MultiplyByZero exception. It should be broadly > > considered an ArithException, and any code that catches an > > ArithExcepti

Re: Exceptions

2006-04-07 Thread John Meacham
On Fri, Apr 07, 2006 at 10:00:21AM -0500, John Goerzen wrote: > But here's my concern. Let's say that I wanted to, for some reason, > create a MultiplyByZero exception. It should be broadly considered an > ArithException, and any code that catches an ArithException should be > able to catch my Mu

Re: Exceptions

2006-04-07 Thread John Goerzen
On Fri, Apr 07, 2006 at 03:49:40PM +0100, Simon Marlow wrote: > John, have you seen this? > > http://haskell.galois.com/cgi-bin/haskell-prime/trac.cgi/wiki/Extensible > Exceptions Yes, and maybe I'm missing something, but I don't think it quite helps. I followed the link to the example page at:

RE: Exceptions

2006-04-07 Thread Simon Marlow
John, have you seen this? http://haskell.galois.com/cgi-bin/haskell-prime/trac.cgi/wiki/Extensible Exceptions Cheers, Simon On 07 April 2006 15:34, John Goerzen wrote: > Hello, > > One thing that bugs me about Haskell is that exceptions are not > extensible. > > I don't know how to cr