[m-rev.] diff: improve error checking for instance decls

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Oct 26 00:04:15 AEST 2006


On Wed, 25 Oct 2006, Mark Brown wrote:

> On 25-Oct-2006, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>> Emit an error if abstract instances in the implementation of a module do
>> not have a corresponding concrete instance.
>
> Why do we even allow abstract instances in the implementation?  (Likewise
> for abstract types.)


For the former I'm not sure - I was planning to disallow it when I
implemented the concrete instance check which is why the original version
never checked for it.  (The lack of such a check was the cause of
Sebastian's problem this afternoon.)  I'm planning to implement the
'--allow-instance-stubs' option at some point so abstract instances in
the implementation will then have a use.

For the latter, if you have a foreign type you need an abstract type
to declare it, i.e. the foreign_type pragma doesn't act as a type
declaration.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list