[mercury-users] replace_in_goal_expr compiler exception

Peter Hawkins hawkinsp at cs.stanford.edu
Sat Jul 1 10:18:23 AEST 2006


Hi...

The following code causes the Mercury compiler ROTD 2006-06-26 to throw 
an exception:

$ mmc --make test
Making Mercury/int3s/test.int3
Making Mercury/cs/test.c
Uncaught Mercury exception:
Software Error: equiv_type_hlds.m: Unexpected: replace_in_goal_expr: 
info not found
Stack dump not available in this grade.
** Error making `Mercury/cs/test.c'.

It seems to be something to do with the nested disjunctions. Please fix?

:- module test.
:- interface.

:- import_module int.
:- import_module map.
:- import_module set.

:- type kind ---> a ; b ; c.
:- pred foo(kind::in, map(int, set(int))::in) is det.

:- implementation.

foo(Kind, B) :-
    (
        Kind = a
    ;
        (
            Kind = b
        ;
            Kind = c
        ),
        ( if map.search(B, 0, PDeps0) then
            _PDeps = PDeps0
          else
            _PDeps = set.init : set(int)
        )
    ).


Thanks,
Peter
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list