Import Upstream version 20180207
[hcoop/debian/mlton.git] / regression / fail / infix.2.sml
... / ...
CommitLineData
1infix 1 <! <@
2infix 2 <!! <@@
3infixr 1 !> @>
4infixr 2 !!> @@>
5
6infix 0 &
7infix 9 &&
8
9datatype ('a, 'b) t1 = & of 'a * 'b
10datatype ('a, 'b) t2 = && of 'a * 'b
11
12(* error *)
13local
14 fun fst x && y = x
15in
16end
17
18(* defines fst *)
19local
20 fun fst (x && y) = x
21in
22 val _ = fst
23end
24
25(* error *)
26local
27 fun fst x <! y = x
28in
29end
30
31(* error *)
32local
33 fun fst (x <! y) = x
34in
35end
36
37(* error *)
38local
39 fun f = ()
40in
41end
42
43(* defines f *)
44local
45 fun f _ = ()
46in
47 val _ = f
48end
49
50(* defines f *)
51local
52 fun f _ _ = ()
53in
54 val _ = f
55end
56
57(* defines f *)
58local
59 fun f _ _ _ = ()
60in
61 val _ = f
62end
63
64(* defines f *)
65local
66 fun f _ _ _ _ = ()
67in
68 val _ = f
69end
70
71(* defines f *)
72local
73 fun f _ _ _ _ _ = ()
74in
75 val _ = f
76end
77
78(* error *)
79local
80 fun _ = ()
81in
82end
83
84(* error *)
85local
86 fun _ _ = ()
87in
88end
89
90(* error *)
91local
92 fun _ _ _ = ()
93in
94end
95
96(* error *)
97local
98 fun _ _ _ _ = ()
99in
100end