Revamping the module hierarchy (was: ANNOUNCE: OpenGLRaw

Don Stewart dons at
Wed Jun 24 16:15:46 EDT 2009

> Simon Marlow wrote:
>  > 
>  > A package conflates lots of things - perhaps too many things.  But one 
>  > thing a package is useful for is to behave like an interface;
>  > a package is an API.
> I would say: A package has an API.
>                        ^^^
> Just like an OCaml module has a module type,
> and different OCaml modules can have the same module type.
> The difference is that the OCaml module type can be defined and referred to
> independently from the OCaml module,
> while the Haskell package API is not a similarly independent entity.
> The Haskell module system still needs to catch up here,
> and perhaps there is a chance to achive something even better than in OCaml
> by doing it at the level of packages?

Type checking of package interfaces would make Cabal's versioning
constraint solver (how it picks what packages work) less ad hoc....

Great research problem, lots of upside if you solve it. Time to get the
language research community interested in packages!!

-- Don

More information about the Libraries mailing list