[m-dev.] Re: your mail
Mark Brown
mark at csse.unimelb.edu.au
Tue Nov 21 22:55:06 AEDT 2006
I've just committed a fix for this.
On 17-Nov-2006, Peter Ross <pro at missioncriticalit.com> wrote:
> The code causes the compiler the abort, note the XXX
> which allows the code to compile.
>
> Software Error: map.lookup: key not found
> Key Type: term.var(parse_tree.prog_data.prog_var_type)
> Key Value: var(6)
> Value Type: parse_tree.prog_data.mer_type
>
> :- import_module stream.
>
> :- pred test_stream(S::in, B::di, B::uo, io::di, io::uo) is det
> <= (reader(S, int, B, E), writer(S, int, B)).
> % XXX add these two lines and the program compiles
> % reader(S, float, B, E), writer(S, float, B)).
>
> test_stream(S, !Buffer, !IO) :-
> stream.put(S, 10, !Buffer),
> stream.put(S, 3.14, !Buffer),
> stream.get(S, ResultA : stream.result(int, E), !Buffer),
> stream.get(S, ResultB : stream.result(float, E), !Buffer),
> stream.get(S, ResultC : stream.result(float, E), !Buffer),
Unsatisfiable constraints from the above method calls are now correctly
reported as an error.
Cheers,
Mark.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions: mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the developers
mailing list