Lang. (was Re: Alternative hierarchy proposal)

Malcolm Wallace Malcolm.Wallace@cs.york.ac.uk
Tue, 13 Mar 2001 15:00:27 +0000


> I'll try an alternative.  How about this:
> 
> 	- Foreign moves to the top level,
> 
> 	- Array moves to Data.Structures.Array (Lang was the wrong
>         place for it, on reflection).
> 
> I'm not sure where to put the rest of the contents of Lang, it seems to
> me that we need somewhere to put libraries that provide access to, or
> support for, language features that don't belong in Data.  For example:
> Exceptions, Monads, Dynamic, etc.  Where do these go in your proposal?

Right.  I'm reasonably happy for Foreign to move to the top level.
Array always did belong in Data.Structures - now you see why I was
confused about Lang!

I've had a hard think about what remains in Lang now.  For these:

    Monad
    Exception
    Generics
    Dynamic
    Unique

and also the following that aren't in Lang:

    Concurrent
    Parallel

as far as I can see, the common unifying concept is that of "Control
Structure" - or the closest that functional languages get to it.
It isn't quite data structures (although Monads might be that),
but it is more correctly the idea of structuring computations.
I don't think there is really a simple term for the concept, since
it covers such a wide range of structuring mechanisms, but "control
structure" is the best I can come up with for now.  How does the
"Control." hierarchy sound?

    Control
        Monad
        Exception
        Generics
        Dynamic
        Unique
        Concurrent
        Parallel

That just leaves Memo and ShowFunctions in Lang.  I would guess
Memo really ought to be in Data.Structures.Memo.  And perhaps
Prelude.ShowFunctions is the right place for that one - in the sense
that it is something missing from the standard prelude that one might
expect to be there?

Ok, now I've de-populated Lang, I want to re-use it for real
language-related things.  :-)

    Language
        C
        Python
        Java
        ML
        Haskell
            Parse
            TypeCheck

And maybe Foreign really does belong under this /new/ Language
hierarchy....

Regards,
    Malcolm