comp.lang.ada
 help / color / mirror / Atom feed
From: mjames@spectra.net (Mitchell E. James)
Subject: Measurements components(need language lawyer input)
Date: 1996/03/20
Date: 1996-03-20T00:00:00+00:00	[thread overview]
Message-ID: <4inncp$cr2@host-3.cyberhighway.net> (raw)

The following message from Ed Falis suggests a need for input on the
legality of a construct that I am using in Measurement Types.  It took
several iterations of gnat and a few very confusing email messages
with Team Ada to get gnat to compile generic children.  The basic part
of Measurement Types compiles fine under the latest version of gnat.
Though I think that there is a gnat related problem with one of the
next layers as noted in the readme file.  I am not a language lawyer,
so those that feel so inclined go ahead and comment.
-------------------------------------------------
Mitchell James
mjames@cyberhighway.net

Fleming's discovery of penicillin was made by accident when a speck of

dust happened to land on an uncovered culture plate.  Touring a modern
research laboratory some years later, he observed with interest the 
sterile, dust-free, air-conditioned environment in which the
scientists
worked.  "What a pity you did not have a place like this to work in,"
said his guide.  "Who can tell what you might have discovered in such
surroundings!"
"Not penicillin," remarked Fleming with a smile.
-------------------------------------------------
Mitchell,

I downloaded your components today, and tried compiling them with the
beta version of our ObjectAda compiler.

I immediately ran into a problem with the compilation of Unit.M1.

The compiler stated that Unit was not recognized as a generic for the 
purposes of providing the formal package to Unit.M1.

I suspect that the compiler is correct, because M1 is supposed to be 
logically nested within Unit, and therefore Unit isn't fully defined
to be provided as a formal package parameter.  Note that I'm not sure
of this.   Perhaps you want to throw it out to some of the language
lawyers?

Here's a simpler example that yields the same problem:

generic
   type t is private;
package p is
   x:t;
end;

-- This one gets the error:
generic
   with package other is new p(<>);
package p.child is
   y: other.t;
end p.child;

-- this one doesn't:
with p;
generic
   with package other is new p(<>);
package q is
   y: other.t;
end q;

- Ed

Ed Falis	
Thomson Software   falis@thomsoft.com	(617) 221-7341
========================================================
Ideological disarmament: a koan for the 21st century
========================================================







             reply	other threads:[~1996-03-20  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-03-20  0:00 Mitchell E. James [this message]
1996-03-20  0:00 ` Measurements components(need language lawyer input) Robert A Duff
1996-03-20  0:00 ` Jonas Nygren
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox