[mercury-users] 'Char' type problem

Andrew Bromage bromage at cs.mu.OZ.AU
Thu Mar 19 13:34:47 AEDT 1998


G'day all.

That program again...

> > :- module foo1.
> > :- import_module char.
> >
> > :- pred foo1(char, char).
> > :- mode foo1(in, out) is semidet.
> >
> > foo1(A, B):-
> >  A = B.

Peter Phelan wrote:

> Well I changed the program as suggested, but problems persist.  First a
> suggestion that the mode could be tighter (declared 'semidet;' inferred
> det').

Silly me.  Yes, of course it's det.

The mode of argument 1 is `in' and the mode of argument 2 is `out'.
This means that on calling foo/2, A must be ground and B must be
free, making the unification a simple assignment which is very much
deterministic.

> More importantly, afterwards compilation stops with:
> gcc: Internal compiler error: program ld got fatal signal 1.

What version and platform of gcc are you using?

Cheers,
Andrew Bromage



More information about the users mailing list