mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 09:23:44 +00:00
More minor fixes for samples.
samples/c_interface/short_example.m:
Do not output two trailing newlines.
samples/concurrency/midimon/concurrent_stream.m:
Module qualify some calls.
samples/java_interface/short_example.m:
s/JAva/Java/
samples/muz/muz.m:
Fix some spelling errors.
This commit is contained in:
@@ -24,4 +24,4 @@
|
||||
").
|
||||
|
||||
main(!IO) :-
|
||||
puts("Hello, world\n", !IO).
|
||||
puts("Hello, world", !IO).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
% vim: ft=mercury ts=4 sw=4 et
|
||||
%-----------------------------------------------------------------------------%
|
||||
% Copyright (C) 2000, 2006, 2010 The University of Melbourne.
|
||||
% Copyright (C) 2016, 2018 The Mercury team.
|
||||
% Copyright (C) 2016, 2018, 2026 The Mercury team.
|
||||
% This file is distributed under the terms specified in COPYING.LIB.
|
||||
%-----------------------------------------------------------------------------%
|
||||
%
|
||||
@@ -90,12 +90,12 @@ new(Stream, !IO) :-
|
||||
|
||||
put(Stream, Thing, !IO) :-
|
||||
Stream = concurrent_stream(Lock, QueueRef, Semaphore),
|
||||
wait(Lock, !IO),
|
||||
sempahore.wait(Lock, !IO),
|
||||
store.get_mutvar(QueueRef, Queue0, !IO),
|
||||
queue.put(ok(Thing), Queue0, Queue),
|
||||
store.set_mutvar(QueueRef, Queue, !IO),
|
||||
signal(Lock, !IO),
|
||||
signal(Semaphore, !IO).
|
||||
semaphore.signal(Lock, !IO),
|
||||
semaphore.signal(Semaphore, !IO).
|
||||
|
||||
end(Stream, !IO) :-
|
||||
Stream = concurrent_stream(Lock, QueueRef, Semaphore),
|
||||
|
||||
@@ -15,7 +15,7 @@ main(!IO) :-
|
||||
java_write_line("Hello, world", !IO).
|
||||
|
||||
:- pred java_write_line(string::in, io::di, io::uo) is det.
|
||||
:- pragma foreign_proc("JAva",
|
||||
:- pragma foreign_proc("Java",
|
||||
java_write_line(S::in, _IO0::di, _IO::uo),
|
||||
[promise_pure, will_not_call_mercury],
|
||||
"
|
||||
|
||||
@@ -206,7 +206,7 @@ processFiles([zinput(Stream, Flags0) | Rest], Abbrev, ZPragma0, ZPragma,
|
||||
|
||||
:- type zphase0 == pair(zphase, schema_table).
|
||||
|
||||
% Used to indicate the earliest phase in which errors have occured.
|
||||
% Used to indicate the earliest phase in which errors have occurred.
|
||||
:- type zphase
|
||||
---> lexical
|
||||
; syntax
|
||||
@@ -296,7 +296,7 @@ usage(!IO) :-
|
||||
"-a-, --no-abbreviate",
|
||||
"\tTurn off use of type abbreviations.",
|
||||
"-t <toolkit>, --toolkit <toolkit>",
|
||||
"\tTypecheck with the specified toolkit, overiding the",
|
||||
"\tTypecheck with the specified toolkit, overriding the",
|
||||
"\tbuiltin default and MUZ_TOOLKIT environment variable",
|
||||
"\t(-t- for typechecking without a toolkit).",
|
||||
"-?, -h, --help",
|
||||
|
||||
Reference in New Issue
Block a user