Proposal: Slim base-5 API package

Bardur Arantsson spam at scientician.net
Mon Jul 15 19:36:29 CEST 2013


On 2013-07-15 09:56, Joachim Breitner wrote:

[--snip--]
> The suggestion
> ==============
> 
> So I’d like to suggest that we turn the base package into a pure API
> package. This means that there will be no code in the package at all,
> only re-exports from other packages. The current code can then go into a
> base-ghc-impl package (or even many packages).

A question related to this:

Is it possible for such an "API package" to actually explicitly specify
type signatures of its re-exports, perhaps using abstract types where no
particular implementation would be dictated?

It seems to me that this would be highly valuable to provide a)
documentation which could be shared across all implementations, b) a
contract such that a given implementation can tell whether it really is
conforming to expected type signatures, and c) a contract such that
*users* of base can be certain that they're not unwittingly relying on
implementation details in a given implementation of base.

Without such checks I fear that things may end up in a bit of a mess
type-wise if there *were* actually to be multiple implementations at
some point. (Though it would certainly improve on the curren situtation).

Overall, the proposal sounds like a great idea to start to get a handle
on the mess that is base ;).

Regards,






More information about the Libraries mailing list