diff: new test case for higher-order funcs

Fergus Henderson fjh at cs.mu.oz.au
Sat Aug 16 01:36:29 AEST 1997


tests/hard_coded/nullary_ho_func.m:
tests/hard_coded/nullary_ho_func.exp:
	Test the output of type_name/1 for nullary higher-order function
	types.

Index: nullary_ho_func.m
===================================================================
RCS file: /home/staff/zs/imp/tests/hard_coded/nullary_ho_func.m,v
retrieving revision 1.1
diff -u -r1.1 nullary_ho_func.m
--- nullary_ho_func.m	1997/07/23 15:29:16	1.1
+++ nullary_ho_func.m	1997/07/24 07:38:07
@@ -43,5 +43,7 @@
 		print("Z = "), print(Z), nl
 	;
 		print("Y = apply(G) failed"), nl
-	).
+	),
+	print("type_of(F) = "), print(type_of(F)), nl,
+	print("type_name(type_of(F)) = "), print(type_name(type_of(F))), nl.
 
Index: nullary_ho_func.exp
===================================================================
RCS file: /home/staff/zs/imp/tests/hard_coded/nullary_ho_func.exp,v
retrieving revision 1.1
diff -u -r1.1 nullary_ho_func.exp
--- nullary_ho_func.exp	1997/07/23 15:29:14	1.1
+++ nullary_ho_func.exp	1997/07/24 07:36:45
@@ -4,3 +4,5 @@
 apply_nullary_func(F) = 42
 Y = apply(G) failed
 Z = 42
+type_of(Z) = ((func) = int)
+type_name(type_of(Z)) = ((func) = int)

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list