Core libs summary

Malcolm Wallace malcolm@abbess.demon.co.uk
Fri, 29 Jun 2001 22:26:37 +0100


> The original runST implementation (i.e., hardwire it into the
> typechecker) really is pretty simple.  I think even I could do it
> (to Hugs).

Well there's a recommendation indeed.  Perhaps I'll take a look.

> instance Bits Integer
>
> 1) Transform the Integer arguments into infinite streams of bits (sign
>    extending as necessary)

Are these streams chunked into words, or are they of uneven lengths?
Wait, that's a dumb question.  Of course conceptually they can be
of any length, but in practice they can be implemented any way you
like that preserves the semantics, yes?  Ok, I think I understand now.

> > As a point of interest, is there
> > a good reason why the Exception type needs to be in the Prelude?

> because you want to define error by something like:
>       error msg = Exception.raise (Exception.Error msg)

I'm still not entirely sure I understand why a qualified import
into the Prelude implementation (as you have illustrated here) is not
sufficient.  Does Exception need to be hardwired into the Prelude?
For a comparable example, think of type Prelude.Rational which is
defined as (Ratio.Ratio Prelude.Integer).  The Ratio type is not in
the prelude, just used by it.

> >                       NHC vs Nhc
> 
> Is NHC/Nhc (used as) an acronym?

No, it has never stood for anything in particular.  Or only
light-heartedly.

Regards,
    Malcolm