[m-dev.] Bug with solver types and submodules
Julien Fischer
juliensf at cs.mu.OZ.AU
Wed Sep 7 18:11:48 AEST 2005
On Tue, 6 Sep 2005, Peter Hawkins wrote:
> Hi...
>
> This two-module test case exposes some sort of solver type bug.
>
>
>
> File: ts.m
> :- module ts.
> :- interface.
> :- include_module tsub.
> :- import_module io.
> :- pred main(io.state::di, io.state::uo) is det.
> :- implementation.
>
> :- import_module int, exception.
> :- solver type st where representation is int,
> initialisation is init_int.
>
> :- pred init_int(st::oa) is erroneous.
> init_int(_A) :- throw("stop").
>
> main(!IO) :- print("hello", !IO).
>
> File: ts.tsub.m
> :- module tsub.
> :- interface.
> :- pred foo(st::ia) is det.
> :- implementation.
>
The problem here is that when the solver type definitions are being
read from the parent's private interface by the child, the child
then attempts to add foreign procs for the initialisation functions.
I have a fix for this that I'm just bootstrapping.
Cheers,
Julien.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list