mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-22 04:43:53 +00:00
library/mercury_term_lexer.m:
library/mercury_term_parser.m:
As above.
NEWS:
Announce the change.
browser/interactive_query.m:
compiler/analysis.file.m:
compiler/fact_table.m:
compiler/make.module_dep_file.m:
compiler/parse_module.m:
compiler/parse_tree_out_term.m:
compiler/recompilation.used_file.m:
library/MODULES_DOC:
library/char.m:
library/integer.m:
library/io.m:
library/library.m:
library/ops.m:
library/term.m:
library/term_io.m:
mdbcomp/trace_counts.m:
tests/hard_coded/impl_def_lex.m:
tests/hard_coded/impl_def_lex_string.m:
tests/hard_coded/lco_pack_args_3.m:
tests/hard_coded/lexer_bigint.m:
tests/hard_coded/lexer_ints.m:
tests/hard_coded/lexer_zero.m:
tests/hard_coded/parse_number_from_string.m:
tests/valid_seq/nested_module_bug.m:
Conform to the change.
43 lines
993 B
Mathematica
43 lines
993 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
% Test whether lco works when taking the address of a float, and when
|
|
% taking the address of more than one word of a memory cell.
|
|
%
|
|
|
|
:- module lco_pack_args_3.
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred main(io::di, io::uo) is det.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- implementation.
|
|
|
|
:- import_module list.
|
|
|
|
:- type thing
|
|
---> thing(enum, enum, float, thing, enum, enum)
|
|
; nil.
|
|
|
|
:- type enum
|
|
---> enum1
|
|
; enum2
|
|
; enum3
|
|
; enum4
|
|
; enum5.
|
|
|
|
:- pred gen(list(enum)::in, float::out, thing::out) is det.
|
|
|
|
gen([], 42.0, nil).
|
|
gen([E | Es], 42.5, T) :-
|
|
gen(Es, FTail, Tail),
|
|
T = thing(E, E, FTail, Tail, E, E).
|
|
|
|
main(!IO) :-
|
|
gen([enum1, enum2, enum3], _, T),
|
|
io.write_line(T, !IO).
|