
24 Jun
2009
24 Jun
'09
4:15 p.m.
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? Wolfram