[mercury-users] 'Char' type problem
Peter Phelan
peter.phelan at anite-systems.lu
Wed Mar 18 23:12:31 AEDT 1998
Thanks everyone for assistance so far, BUT ...
> As Fergus said, except that char/1 isn't declared in the library, but
> char/0 is.
>
> Your program should read:
>
> <<
> :- module foo1.
> :- import_module char.
>
> :- pred foo1(char, char).
> :- mode foo1(in, out) is semidet.
>
> foo1(A, B):-
> A = B.
> >>
>
> For the builtin types (int, float, char, string), the compiler doesn't
> complain if you import the corresponding module but don't use it. It's
> therefore not a bad idea to do it anyway.
Fine.
Well I changed the program as suggested, but problems persist. First a
suggestion that the mode could be tighter (declared 'semidet;' inferred
det').
More importantly, afterwards compilation stops with:
gcc: Internal compiler error: program ld got fatal signal 1.
Either my program is wrong (entirely likely), or there's something wrong in
the installation (also entirely likely).
I was also unable to get Bart Demoen's program to work; although I was able
to compile & link it. Calling the .exe just yields 'no.'
Once again, TIA
Cheers
Peter
More information about the users
mailing list