Numeric literals

Alastair David Reid
29 Aug 2001 12:37:43 -0600

Simon Marlow writes (of Exception handling a la GHC/Hugs):
> Well, we'd like it to become standard :-) The exception stuff is
> really very easy to implement - you just use the standard
> stack-unwinding implementation of throw, and catch has to push a
> special stack frame.  GHC's asynchronous exceptions are slightly
> harder, but I don't think it was more than a day or two's work.

I can see synchronous exceptions being standardised in the near term.
The Exception library probably needs a little more time to stabilise
since it just recently got a redesign.

OTOH, asynchronous exceptions seem further off.

1) I doubt may people have experience using them - so the
   current design probably hasn't been tested hard enough.

2) We need to standardise threads first.

3) I have no idea how I would add asynchronous exceptions to Hugs.

   Some of the basic problems are:

   1) Hugs doesn't maintain anything like a Thread Control Block
      or anything else that would provide a natural definition of

   2) Hugs doesn't maintain a separate stack per thread so the standard
      stack trimming implementation doesn't really work.

   3) Hugs doesn't provide preemptive scheduling of threads so
      asynchronous exceptions are less useful.

   [I suspect that NHC is in a similar position]

   All this could be worked on but it's certainly not a day or two's 

Alastair Reid