I'm not entirely sure how to answer this, except to say that SML got
this dreadfully wrong. A type that is an internal part of an
implementation definitely should NOT be exported.
My sense is that if I export a symbol, I need to be exporting the types
associated with its signature. If the symbol is a function, this is the
argument and return types, but not anything that it has closed over.
I am unclear why your proposed
(export ident:type ident:type ident:type ... )
should ever be necessary. Can you explain?
Does this answer your question?
On Thu, 2005-06-09 at 21:39 -0400, Swaroop Sridhar wrote:
> Are BitC's modules transparent or Opaque?
>
> That is, if a module exports a particular interface, if it is not opaque
> (think SML), then all of the types used in the implementation will "show
> through" even though they are not intentionally exported.
>
> Otherwise, the implementation types can be made opaque to the world at
> the cost of limiting the inference. The situation can be ameliorated by
> using Ocaml style manifest types [1]. In this case, we will need to add
> syntactic support as in:
>
> (export ident:type ident:type ident:type ... )
>
> [1] http://caml.inria.fr/pub/papers/xleroy-manifest_types-popl94.pdf
>
> _______________________________________________
> bitc-dev mailing list
> [email protected]
> http://www.coyotos.org/mailman/listinfo/bitc-dev
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev