Proposal: Slim base-5 API package
Henning Thielemann
lemming at henning-thielemann.de
Mon Jul 15 20:28:17 CEST 2013
On Mon, 15 Jul 2013, Bardur Arantsson wrote:
> 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?
I think this can be achieved by writing things like:
module Data.List (map) where
import qualified Base.List as List
map :: (a -> b) -> [a] -> [b]
map = List.map
However it means, that the implementing package must use other module
names than 'base'. And you lose the Haddock comment. But maybe the Haddock
comment should be attached to Data.List anyway, instead of GHC.List? I
don't know.
More information about the Libraries
mailing list