Export lists in modules
waldmann at imn.htwk-leipzig.de
Wed Feb 22 07:31:21 EST 2006
Malcolm Wallace wrote:
> ... but that if there are thus two signatures for an entity, they
> must be identical. This is to prevent the case where one modifies the
> definition of the function, making it more general, but forgets to
> modify the corresponding export.
Sounds like the perfect example to illustrate the point
that information shouldn't be doubled in the first place.
Can you say why you want the type in the export list?
Or really, why you want an export list at all?
Presumably because it constitutes the module's "interface",
but it is an ad-hoc thing (one interface per module).
We already have the concept of "type class"
which gives us re-usable interfaces. Isn't that much better?
I was discussing that in (the second paragraph of):
-- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 --
---- http://www.imn.htwk-leipzig.de/~waldmann/ -------
More information about the Haskell-prime