comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Sledgehammer Indexing Tools
Date: Tue, 07 Aug 2012 18:16:54 +0100
Date: 2012-08-07T18:16:54+01:00	[thread overview]
Message-ID: <m28vdq1v21.fsf@nidhoggr.home> (raw)
In-Reply-To: 37c0bb91-956f-4f82-a52f-b269748c0201@googlegroups.com

Marius Amado-Alves <amado.alves@gmail.com> writes:

>> > In - for example - external_lookup.ads, you've "use"d several of your
>> > own packages. I'd think that you can reasonably expect readers to know
>> > the standard library (for example, Indefinite_Vectors), but how can they
>> > know where Occurrences is defined?
>
>> That I don't understand.They are defined in the respective source packages.
>
> In WHICH one? That's the problem. Don't use "use". Use full
> qualification
>
>    ... The_Package_Where.Occurrences_Is_Defined.Occurrences ...
>
> or renaming
>
>    package TPWOID renames The_Package_Where.Occurrences_Is_Defined;
>    ...
>    ... TPWOIS.Occurrences
>
> or a single "use" in a block
>
>    declare
>       use The_Package_Where.Occurrences_Is_Defined;
>    begin
>       ... Occurences ...
>
> or only "use type" (also in a block) if you only need some operators.
> (I have not looked at the specific code.)

In this case, external_lookup.ads might say

   package Occurrences_Vector is new Indefinite_Vectors (
      Natural,
      Token_Maps.Occurrences.Map,
      Token_Maps.Occurrences."=");



  reply	other threads:[~2012-08-13  9:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-06 18:36 Sledgehammer Indexing Tools 3-toed Sloth
2012-08-06 21:28 ` Patrick
2012-08-07 10:55 ` Simon Wright
2012-08-07 11:41   ` john
2012-08-07 11:55     ` Marius Amado-Alves
2012-08-07 17:16       ` Simon Wright [this message]
2012-08-07 20:24         ` Marius Amado-Alves
2012-08-07 21:14           ` Simon Wright
replies disabled

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