From: fred@cs.utexas.edu (Fred Hosch)
Subject: Re: Limited types and generic parameters
Date: 22 Feb 89 14:58:49 GMT [thread overview]
Message-ID: <4837@cs.utexas.edu> (raw)
In-Reply-To: 890222132712.21a009c0@elcc.epfl.ch
Without careful scrutiny of the LRM (always a mistake), the only reasonable
semantics seem to be the following.
The generic "entity" is interpreted in its defining environment;
thus, any free variables occuring in the generic are bound in the
context of the generic definition.
The generic instantiation "returns" an entity that is bound in
the instantiating environment; any generic formals are bound to
actuals interpreted in the instantiating environment.
Thus in the example
generic
type T is limited private;
package GP is
type R is
record
F : T;
end record;
end GP;
package P is new GP(T => INTEGER);
P.R.F is of type INTEGER in the instantiating environment.
(At least, that's my state-educated guess.)
Fred Hosch
fred@cs.utexas.edu
next prev parent reply other threads:[~1989-02-22 14:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1989-02-22 12:27 Limited types and generic parameters Mats Weber
1989-02-22 14:58 ` Fred Hosch [this message]
-- strict thread matches above, loose matches on Subject: below --
1989-02-23 5:51 Karl Nyberg
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox