[m-rev.] bug fix: deconstructing closures in hlc grades

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon Feb 25 17:58:16 AEDT 2002


This diff is still being bootchecked, but I am reasonably confident it will
pass bootcheck.

Fix a bug: closures do not contain valid layout information in hlc grades,
so in those grades closures cannot be deconstructed.

runtime/mercury_ml_expand_body.h:
	Do not deconstruct closures in hlc grades.

library/deconstruct.m:
	Document this behavior.

tests/hard_coded/deconstruct_arg.exp2:
	Add a second expected output file with the output appropriate for hlc
	grades.

cvs diff: Diffing .
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing java
cvs diff: Diffing java/library
cvs diff: Diffing java/runtime
cvs diff: Diffing library
Index: library/deconstruct.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/deconstruct.m,v
retrieving revision 1.5
diff -u -b -r1.5 deconstruct.m
--- library/deconstruct.m	24 Feb 2002 11:53:29 -0000	1.5
+++ library/deconstruct.m	25 Feb 2002 06:53:25 -0000
@@ -64,10 +64,12 @@
 	%	- for strings, the string, inside double quotation marks
 	%	- for characters, the character inside single quotation marks
 	%	- for predicates, the string <<predicate>>, and for functions,
-	%	  the string <<function>>, except with include_details_cc,
-	%	  in which case it will be the predicate or function name.
-	%	  (The predicate or function name will be artificial for
-	%	  predicate and function values created by lambda expressions.)
+	%	  the string <<function>>, except with include_details_cc
+	%	  in low-level C grades (those starting with none, reg, jump,
+	%	  fast, asm_jump or asm_fast), in which case it will be the
+	%	  predicate or function name. (The predicate or function name
+	%	  will be artificial for predicate and function values created
+	%	  by lambda expressions.)
 	%	- for tuples, the string {}.
 	%	- for arrays, the string <<array>>.
 	%
@@ -83,8 +85,8 @@
 	%	- for strings, zero.
 	%	- for characters, zero.
 	%	- for predicates and functions, zero, except with
-	%	  include_details_cc, in which case it will be the number of
-	%	  arguments hidden in the closure.
+	%	  include_details_cc in low-level C grades, in which case
+	%	  it will be the number of arguments hidden in the closure.
 	%	- for tuples, the number of elements in the tuple.
 	%	- for arrays, the number of elements in the array.
 
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
Index: runtime/mercury_ml_expand_body.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_ml_expand_body.h,v
retrieving revision 1.16
diff -u -b -r1.16 mercury_ml_expand_body.h
--- runtime/mercury_ml_expand_body.h	24 Feb 2002 11:53:33 -0000	1.16
+++ runtime/mercury_ml_expand_body.h	25 Feb 2002 06:48:25 -0000
@@ -206,6 +206,19 @@
                 handle_zero_arity_one_arg();                            \
             } while (0)
 
+/*
+** In hlc grades, closures have a closure_layout field but it is not filled in.
+** Since deconstructing closures is not possible without the information in
+** this field, we must canonicalize all closures in hlc grades. We do this by
+** overriding the test for canonicalization, so it always succeeds.
+*/
+
+#ifdef  MR_HIGHLEVEL_CODE
+  #define   higher_order_test(test)   (MR_TRUE)
+#else
+  #define   higher_order_test(test)   (test)
+#endif
+
 /***********************************************************************/
 
 void
@@ -692,7 +705,7 @@
                 MR_fatal_error(MR_STRINGIFY(EXPAND_FUNCTION_NAME)
                     ": attempt to deconstruct noncanonical term");
                 break;
-            } else if (noncanon == MR_NONCANON_ALLOW) {
+            } else if (higher_order_test(noncanon == MR_NONCANON_ALLOW)) {
                 handle_functor_name("<<function>>");
                 handle_zero_arity_args();
                 break;
@@ -706,7 +719,7 @@
                 MR_fatal_error(MR_STRINGIFY(EXPAND_FUNCTION_NAME)
                     ": attempt to deconstruct noncanonical term");
                 break;
-            } else if (noncanon == MR_NONCANON_ALLOW) {
+            } else if (higher_order_test(noncanon == MR_NONCANON_ALLOW)) {
                 handle_functor_name("<<predicate>>");
                 handle_zero_arity_args();
                 break;
@@ -1135,3 +1148,4 @@
 #undef  handle_zero_arity_args
 #undef  handle_zero_arity_all_args
 #undef  handle_zero_arity_one_arg
+#undef  higher_order_test
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/hard_coded
Index: tests/hard_coded/deconstruct_arg.exp2
===================================================================
RCS file: tests/hard_coded/deconstruct_arg.exp2
diff -N tests/hard_coded/deconstruct_arg.exp2
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/hard_coded/deconstruct_arg.exp2	25 Feb 2002 06:44:39 -0000
@@ -0,0 +1,340 @@
+std_util    functor: apple/1
+deconstruct functor: apple/1
+std_util    argument 0 of apple([]) is []
+deconstruct argument 0 of apple([]) is []
+std_util    argument 1 of apple([]) doesn't exist
+deconstruct argument 1 of apple([]) doesn't exist
+std_util    argument 2 of apple([]) doesn't exist
+deconstruct argument 2 of apple([]) doesn't exist
+std_util    deconstruct: functor apple arity 1
+[[]]
+deconstruct deconstruct: functor apple arity 1
+[[]]
+std_util    limited deconstruct 3 of apple([])
+functor apple arity 1 [[]]
+deconstruct limited deconstruct 3 of apple([])
+functor apple arity 1 [[]]
+
+std_util    functor: apple/1
+deconstruct functor: apple/1
+std_util    argument 0 of apple([9, 5, 1]) is [9, 5, 1]
+deconstruct argument 0 of apple([9, 5, 1]) is [9, 5, 1]
+std_util    argument 1 of apple([9, 5, 1]) doesn't exist
+deconstruct argument 1 of apple([9, 5, 1]) doesn't exist
+std_util    argument 2 of apple([9, 5, 1]) doesn't exist
+deconstruct argument 2 of apple([9, 5, 1]) doesn't exist
+std_util    deconstruct: functor apple arity 1
+[[9, 5, 1]]
+deconstruct deconstruct: functor apple arity 1
+[[9, 5, 1]]
+std_util    limited deconstruct 3 of apple([9, 5, 1])
+functor apple arity 1 [[9, 5, 1]]
+deconstruct limited deconstruct 3 of apple([9, 5, 1])
+functor apple arity 1 [[9, 5, 1]]
+
+std_util    functor: zop/2
+deconstruct functor: zop/2
+std_util    argument 0 of zop(3.30000000000000, 2.03000000000000) is 3.30000000000000
+deconstruct argument 0 of zop(3.30000000000000, 2.03000000000000) is 3.30000000000000
+std_util    argument 1 of zop(3.30000000000000, 2.03000000000000) is 2.03000000000000
+deconstruct argument 1 of zop(3.30000000000000, 2.03000000000000) is 2.03000000000000
+std_util    argument 2 of zop(3.30000000000000, 2.03000000000000) doesn't exist
+deconstruct argument 2 of zop(3.30000000000000, 2.03000000000000) doesn't exist
+std_util    deconstruct: functor zop arity 2
+[3.30000000000000, 2.03000000000000]
+deconstruct deconstruct: functor zop arity 2
+[3.30000000000000, 2.03000000000000]
+std_util    limited deconstruct 3 of zop(3.30000000000000, 2.03000000000000)
+functor zop arity 2 [3.30000000000000, 2.03000000000000]
+deconstruct limited deconstruct 3 of zop(3.30000000000000, 2.03000000000000)
+functor zop arity 2 [3.30000000000000, 2.03000000000000]
+
+std_util    functor: zap/3
+deconstruct functor: zap/3
+std_util    argument 0 of zap(50, 51.0000000000000, 52) is 50
+deconstruct argument 0 of zap(50, 51.0000000000000, 52) is 50
+std_util    argument 1 of zap(50, 51.0000000000000, 52) is 51.0000000000000
+deconstruct argument 1 of zap(50, 51.0000000000000, 52) is 51.0000000000000
+std_util    argument 2 of zap(50, 51.0000000000000, 52) is 52
+deconstruct argument 2 of zap(50, 51.0000000000000, 52) is 52
+std_util    deconstruct: functor zap arity 3
+[50, 51.0000000000000, 52]
+deconstruct deconstruct: functor zap arity 3
+[50, 51.0000000000000, 52]
+std_util    limited deconstruct 3 of zap(50, 51.0000000000000, 52)
+functor zap arity 3 [50, 51.0000000000000, 52]
+deconstruct limited deconstruct 3 of zap(50, 51.0000000000000, 52)
+functor zap arity 3 [50, 51.0000000000000, 52]
+
+std_util    functor: zip/4
+deconstruct functor: zip/4
+std_util    argument 0 of zip(50, 51, 52, 53) is 50
+deconstruct argument 0 of zip(50, 51, 52, 53) is 50
+std_util    argument 1 of zip(50, 51, 52, 53) is 51
+deconstruct argument 1 of zip(50, 51, 52, 53) is 51
+std_util    argument 2 of zip(50, 51, 52, 53) is 52
+deconstruct argument 2 of zip(50, 51, 52, 53) is 52
+std_util    deconstruct: functor zip arity 4
+[50, 51, 52, 53]
+deconstruct deconstruct: functor zip arity 4
+[50, 51, 52, 53]
+std_util    limited deconstruct 3 of zip(50, 51, 52, 53)
+failed
+deconstruct limited deconstruct 3 of zip(50, 51, 52, 53)
+failed
+
+std_util    functor: wombat/0
+deconstruct functor: wombat/0
+std_util    argument 0 of wombat doesn't exist
+deconstruct argument 0 of wombat doesn't exist
+std_util    argument 1 of wombat doesn't exist
+deconstruct argument 1 of wombat doesn't exist
+std_util    argument 2 of wombat doesn't exist
+deconstruct argument 2 of wombat doesn't exist
+std_util    deconstruct: functor wombat arity 0
+[]
+deconstruct deconstruct: functor wombat arity 0
+[]
+std_util    limited deconstruct 3 of wombat
+functor wombat arity 0 []
+deconstruct limited deconstruct 3 of wombat
+functor wombat arity 0 []
+
+std_util    functor: qwerty/1
+deconstruct functor: qwerty/1
+std_util    argument 0 of qwerty(5) is 5
+deconstruct argument 0 of qwerty(5) is 5
+std_util    argument 1 of qwerty(5) doesn't exist
+deconstruct argument 1 of qwerty(5) doesn't exist
+std_util    argument 2 of qwerty(5) doesn't exist
+deconstruct argument 2 of qwerty(5) doesn't exist
+std_util    deconstruct: functor qwerty arity 1
+[5]
+deconstruct deconstruct: functor qwerty arity 1
+[5]
+std_util    limited deconstruct 3 of qwerty(5)
+functor qwerty arity 1 [5]
+deconstruct limited deconstruct 3 of qwerty(5)
+functor qwerty arity 1 [5]
+
+std_util    functor: 'a'/0
+deconstruct functor: 'a'/0
+std_util    argument 0 of a doesn't exist
+deconstruct argument 0 of a doesn't exist
+std_util    argument 1 of a doesn't exist
+deconstruct argument 1 of a doesn't exist
+std_util    argument 2 of a doesn't exist
+deconstruct argument 2 of a doesn't exist
+std_util    deconstruct: functor 'a' arity 0
+[]
+deconstruct deconstruct: functor 'a' arity 0
+[]
+std_util    limited deconstruct 3 of a
+functor 'a' arity 0 []
+deconstruct limited deconstruct 3 of a
+functor 'a' arity 0 []
+
+std_util    functor: 3.14159000000000/0
+deconstruct functor: 3.14159000000000/0
+std_util    argument 0 of 3.14159000000000 doesn't exist
+deconstruct argument 0 of 3.14159000000000 doesn't exist
+std_util    argument 1 of 3.14159000000000 doesn't exist
+deconstruct argument 1 of 3.14159000000000 doesn't exist
+std_util    argument 2 of 3.14159000000000 doesn't exist
+deconstruct argument 2 of 3.14159000000000 doesn't exist
+std_util    deconstruct: functor 3.14159000000000 arity 0
+[]
+deconstruct deconstruct: functor 3.14159000000000 arity 0
+[]
+std_util    limited deconstruct 3 of 3.14159000000000
+functor 3.14159000000000 arity 0 []
+deconstruct limited deconstruct 3 of 3.14159000000000
+functor 3.14159000000000 arity 0 []
+
+std_util    functor: 4/0
+deconstruct functor: 4/0
+std_util    argument 0 of 4 doesn't exist
+deconstruct argument 0 of 4 doesn't exist
+std_util    argument 1 of 4 doesn't exist
+deconstruct argument 1 of 4 doesn't exist
+std_util    argument 2 of 4 doesn't exist
+deconstruct argument 2 of 4 doesn't exist
+std_util    deconstruct: functor 4 arity 0
+[]
+deconstruct deconstruct: functor 4 arity 0
+[]
+std_util    limited deconstruct 3 of 4
+functor 4 arity 0 []
+deconstruct limited deconstruct 3 of 4
+functor 4 arity 0 []
+
+std_util    functor: univ_cons/1
+deconstruct functor: univ_cons/1
+std_util    argument 0 of ["hi! I\'m a univ!"] is ["hi! I\'m a univ!"]
+deconstruct argument 0 of ["hi! I\'m a univ!"] is ["hi! I\'m a univ!"]
+std_util    argument 1 of ["hi! I\'m a univ!"] doesn't exist
+deconstruct argument 1 of ["hi! I\'m a univ!"] doesn't exist
+std_util    argument 2 of ["hi! I\'m a univ!"] doesn't exist
+deconstruct argument 2 of ["hi! I\'m a univ!"] doesn't exist
+std_util    deconstruct: functor univ_cons arity 1
+[["hi! I\'m a univ!"]]
+deconstruct deconstruct: functor univ_cons arity 1
+[["hi! I\'m a univ!"]]
+std_util    limited deconstruct 3 of ["hi! I\'m a univ!"]
+functor univ_cons arity 1 [["hi! I\'m a univ!"]]
+deconstruct limited deconstruct 3 of ["hi! I\'m a univ!"]
+functor univ_cons arity 1 [["hi! I\'m a univ!"]]
+
+std_util    functor: <<deconstruct_arg:set/1>>/0
+deconstruct functor: set_rep/1
+std_util    argument 0 of '<<deconstruct_arg:set/1>>' doesn't exist
+deconstruct argument 0 of '<<deconstruct_arg:set/1>>' is [1, 2, 3, 3]
+std_util    argument 1 of '<<deconstruct_arg:set/1>>' doesn't exist
+deconstruct argument 1 of '<<deconstruct_arg:set/1>>' doesn't exist
+std_util    argument 2 of '<<deconstruct_arg:set/1>>' doesn't exist
+deconstruct argument 2 of '<<deconstruct_arg:set/1>>' doesn't exist
+std_util    deconstruct: functor <<deconstruct_arg:set/1>> arity 0
+[]
+deconstruct deconstruct: functor set_rep arity 1
+[[1, 2, 3, 3]]
+std_util    limited deconstruct 3 of '<<deconstruct_arg:set/1>>'
+functor <<deconstruct_arg:set/1>> arity 0 []
+deconstruct limited deconstruct 3 of '<<deconstruct_arg:set/1>>'
+functor set_rep arity 1 [[1, 2, 3, 3]]
+
+std_util    functor: <<predicate>>/0
+deconstruct functor: <<predicate>>/0
+std_util    argument 0 of '<<predicate>>' doesn't exist
+deconstruct argument 0 of '<<predicate>>' doesn't exist
+std_util    argument 1 of '<<predicate>>' doesn't exist
+deconstruct argument 1 of '<<predicate>>' doesn't exist
+std_util    argument 2 of '<<predicate>>' doesn't exist
+deconstruct argument 2 of '<<predicate>>' doesn't exist
+std_util    deconstruct: functor <<predicate>> arity 0
+[]
+deconstruct deconstruct: functor <<predicate>> arity 0
+[]
+std_util    limited deconstruct 3 of '<<predicate>>'
+functor <<predicate>> arity 0 []
+deconstruct limited deconstruct 3 of '<<predicate>>'
+functor <<predicate>> arity 0 []
+
+std_util    functor: <<predicate>>/0
+deconstruct functor: <<predicate>>/0
+std_util    argument 0 of '<<predicate>>' doesn't exist
+deconstruct argument 0 of '<<predicate>>' doesn't exist
+std_util    argument 1 of '<<predicate>>' doesn't exist
+deconstruct argument 1 of '<<predicate>>' doesn't exist
+std_util    argument 2 of '<<predicate>>' doesn't exist
+deconstruct argument 2 of '<<predicate>>' doesn't exist
+std_util    deconstruct: functor <<predicate>> arity 0
+[]
+deconstruct deconstruct: functor <<predicate>> arity 0
+[]
+std_util    limited deconstruct 3 of '<<predicate>>'
+functor <<predicate>> arity 0 []
+deconstruct limited deconstruct 3 of '<<predicate>>'
+functor <<predicate>> arity 0 []
+
+std_util    functor: {}/2
+deconstruct functor: {}/2
+std_util    argument 0 of {1, 'b'} is 1
+deconstruct argument 0 of {1, 'b'} is 1
+std_util    argument 1 of {1, 'b'} is 'b'
+deconstruct argument 1 of {1, 'b'} is 'b'
+std_util    argument 2 of {1, 'b'} doesn't exist
+deconstruct argument 2 of {1, 'b'} doesn't exist
+std_util    deconstruct: functor {} arity 2
+[1, 'b']
+deconstruct deconstruct: functor {} arity 2
+[1, 'b']
+std_util    limited deconstruct 3 of {1, 'b'}
+functor {} arity 2 [1, 'b']
+deconstruct limited deconstruct 3 of {1, 'b'}
+functor {} arity 2 [1, 'b']
+
+std_util    functor: {}/3
+deconstruct functor: {}/3
+std_util    argument 0 of {1, 'b', "third"} is 1
+deconstruct argument 0 of {1, 'b', "third"} is 1
+std_util    argument 1 of {1, 'b', "third"} is 'b'
+deconstruct argument 1 of {1, 'b', "third"} is 'b'
+std_util    argument 2 of {1, 'b', "third"} is "third"
+deconstruct argument 2 of {1, 'b', "third"} is "third"
+std_util    deconstruct: functor {} arity 3
+[1, 'b', "third"]
+deconstruct deconstruct: functor {} arity 3
+[1, 'b', "third"]
+std_util    limited deconstruct 3 of {1, 'b', "third"}
+functor {} arity 3 [1, 'b', "third"]
+deconstruct limited deconstruct 3 of {1, 'b', "third"}
+functor {} arity 3 [1, 'b', "third"]
+
+std_util    functor: {}/4
+deconstruct functor: {}/4
+std_util    argument 0 of {1, 'b', "third", {1, 2, 3, 4}} is 1
+deconstruct argument 0 of {1, 'b', "third", {1, 2, 3, 4}} is 1
+std_util    argument 1 of {1, 'b', "third", {1, 2, 3, 4}} is 'b'
+deconstruct argument 1 of {1, 'b', "third", {1, 2, 3, 4}} is 'b'
+std_util    argument 2 of {1, 'b', "third", {1, 2, 3, 4}} is "third"
+deconstruct argument 2 of {1, 'b', "third", {1, 2, 3, 4}} is "third"
+std_util    deconstruct: functor {} arity 4
+[1, 'b', "third", {1, 2, 3, 4}]
+deconstruct deconstruct: functor {} arity 4
+[1, 'b', "third", {1, 2, 3, 4}]
+std_util    limited deconstruct 3 of {1, 'b', "third", {1, 2, 3, 4}}
+failed
+deconstruct limited deconstruct 3 of {1, 'b', "third", {1, 2, 3, 4}}
+failed
+
+std_util    functor: <<array>>/2
+deconstruct functor: <<array>>/2
+std_util    argument 0 of array([1000, 2000]) is 1000
+deconstruct argument 0 of array([1000, 2000]) is 1000
+std_util    argument 1 of array([1000, 2000]) is 2000
+deconstruct argument 1 of array([1000, 2000]) is 2000
+std_util    argument 2 of array([1000, 2000]) doesn't exist
+deconstruct argument 2 of array([1000, 2000]) doesn't exist
+std_util    deconstruct: functor <<array>> arity 2
+[1000, 2000]
+deconstruct deconstruct: functor <<array>> arity 2
+[1000, 2000]
+std_util    limited deconstruct 3 of array([1000, 2000])
+functor <<array>> arity 2 [1000, 2000]
+deconstruct limited deconstruct 3 of array([1000, 2000])
+functor <<array>> arity 2 [1000, 2000]
+
+std_util    functor: <<array>>/3
+deconstruct functor: <<array>>/3
+std_util    argument 0 of array([100, 200, 300]) is 100
+deconstruct argument 0 of array([100, 200, 300]) is 100
+std_util    argument 1 of array([100, 200, 300]) is 200
+deconstruct argument 1 of array([100, 200, 300]) is 200
+std_util    argument 2 of array([100, 200, 300]) is 300
+deconstruct argument 2 of array([100, 200, 300]) is 300
+std_util    deconstruct: functor <<array>> arity 3
+[100, 200, 300]
+deconstruct deconstruct: functor <<array>> arity 3
+[100, 200, 300]
+std_util    limited deconstruct 3 of array([100, 200, 300])
+functor <<array>> arity 3 [100, 200, 300]
+deconstruct limited deconstruct 3 of array([100, 200, 300])
+functor <<array>> arity 3 [100, 200, 300]
+
+std_util    functor: <<array>>/4
+deconstruct functor: <<array>>/4
+std_util    argument 0 of array([10, 20, 30, 40]) is 10
+deconstruct argument 0 of array([10, 20, 30, 40]) is 10
+std_util    argument 1 of array([10, 20, 30, 40]) is 20
+deconstruct argument 1 of array([10, 20, 30, 40]) is 20
+std_util    argument 2 of array([10, 20, 30, 40]) is 30
+deconstruct argument 2 of array([10, 20, 30, 40]) is 30
+std_util    deconstruct: functor <<array>> arity 4
+[10, 20, 30, 40]
+deconstruct deconstruct: functor <<array>> arity 4
+[10, 20, 30, 40]
+std_util    limited deconstruct 3 of array([10, 20, 30, 40])
+failed
+deconstruct limited deconstruct 3 of array([10, 20, 30, 40])
+failed
+
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list