[clean-list] About abstract synonym types...

Fergus Henderson fjh@cs.mu.oz.au
Fri, 6 Feb 2004 02:06:53 +1100


On 05-Feb-2004, John van Groningen <johnvg@cs.kun.nl> wrote:
> Yes, an abstract type is a type whose name is exported, but not the
> definition. This has always been possible in Clean for types and synonym types.
> Because the implementation of the type is hidden, values of this type are
> always boxed outside the module in which they are defined.

What happens for e.g.

	definition module M

	:: Foo

	aplist :: [Foo -> Foo] Foo -> Foo

	implementation module M
	
	:: Foo :== Bar

	aplist :: [Foo -> Foo] Foo -> Foo
	aplist [] x = x
	aplist [f:fs] x = aplist fs (f x)

Which calling convention will be used for the call to "f x" --
the calling convention for passing boxed values, or the
calling convention for passing values of type Bar?

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.