diff options
Diffstat (limited to 'testdata/language-features/as-pattern/as-pattern02.out')
-rw-r--r-- | testdata/language-features/as-pattern/as-pattern02.out | 145 |
1 files changed, 142 insertions, 3 deletions
diff --git a/testdata/language-features/as-pattern/as-pattern02.out b/testdata/language-features/as-pattern/as-pattern02.out index cb9cee50..8a9f96bc 100644 --- a/testdata/language-features/as-pattern/as-pattern02.out +++ b/testdata/language-features/as-pattern/as-pattern02.out | |||
@@ -1,3 +1,142 @@ | |||
1 | testdata/language-features/as-pattern/as-pattern02.lc:7:1: | 1 | main |
2 | main = f [0,1] == [1] && f [1] == [1] | 2 | :: forall a |
3 | ^^^^ \ No newline at end of file | 3 | . Eq a |
4 | => forall b | ||
5 | . (a ~ [b], Eq b, Num b) | ||
6 | => forall c . Eq c => forall d . (c ~ [d], Eq d, Num d) => Bool | ||
7 | main = main | ||
8 | ------------ desugared source code | ||
9 | f | ||
10 | = _lhs | ||
11 | f | ||
12 | \(a :: _) -> _rhs | ||
13 | ((\(b :: _) -> case'List | ||
14 | (\(_ :: _) -> _) | ||
15 | undefined | ||
16 | (\(c :: _) (d :: _) -> primIfThenElse (c == fromInt 0) d b) | ||
17 | b) | ||
18 | a) | ||
19 | |||
20 | main :: Bool | ||
21 | main | ||
22 | = _lhs | ||
23 | main | ||
24 | (_rhs (f [fromInt 0, fromInt 1] == [fromInt 1] && f [fromInt 1] == [fromInt 1])) | ||
25 | ------------ core code | ||
26 | f :: forall a . (Eq a, Num a) => [a] -> [a] | ||
27 | f | ||
28 | = \a b c d -> _rhs | ||
29 | (case'List | ||
30 | (\_ -> [a]) | ||
31 | (undefined [a]) | ||
32 | (\e f -> primIfThenElse [a] ((a == b) e (fromInt a c 0)) f d) | ||
33 | d) | ||
34 | |||
35 | main | ||
36 | :: forall a | ||
37 | . Eq a | ||
38 | => forall b | ||
39 | . (a ~ [b], Eq b, Num b) | ||
40 | => forall c . Eq c => forall d . (c ~ [d], Eq d, Num d) => Bool | ||
41 | main | ||
42 | = \_ _ a _ b c _ _ d _ e f -> _rhs | ||
43 | (PrimAnd | ||
44 | (undefined | ||
45 | ([a] -> [a] -> 'Bool) | ||
46 | (primIfThenElse | ||
47 | [a] | ||
48 | ((a == b) (fromInt a c 0) (fromInt a c 0)) | ||
49 | [fromInt a c 1] | ||
50 | [fromInt a c 0, fromInt a c 1]) | ||
51 | [fromInt a c 1]) | ||
52 | (undefined | ||
53 | ([d] -> [d] -> 'Bool) | ||
54 | (primIfThenElse | ||
55 | [d] | ||
56 | ((d == e) (fromInt d f 1) (fromInt d f 0)) | ||
57 | [] | ||
58 | [fromInt d f 1]) | ||
59 | [fromInt d f 1])) | ||
60 | ------------ tooltips | ||
61 | testdata/language-features/as-pattern/as-pattern02.lc 3:1-3:2 | ||
62 | forall a . (Eq a, Num a) => [a] -> [a] | ||
63 | testdata/language-features/as-pattern/as-pattern02.lc 3:7-4:49 | ||
64 | [_c] | ||
65 | testdata/language-features/as-pattern/as-pattern02.lc 3:12-3:13 | ||
66 | _e | ||
67 | testdata/language-features/as-pattern/as-pattern02.lc 4:24-4:49 | ||
68 | [_e] | ||
69 | testdata/language-features/as-pattern/as-pattern02.lc 4:27-4:28 | ||
70 | _g | ||
71 | testdata/language-features/as-pattern/as-pattern02.lc 4:27-4:30 | ||
72 | _f -> Bool | ||
73 | testdata/language-features/as-pattern/as-pattern02.lc 4:27-4:31 | ||
74 | Bool | ||
75 | testdata/language-features/as-pattern/as-pattern02.lc 4:27-4:41 | ||
76 | [_f] -> [_f] | ||
77 | testdata/language-features/as-pattern/as-pattern02.lc 4:28-4:30 | ||
78 | forall a . Eq a => a -> a -> Bool | ||
79 | testdata/language-features/as-pattern/as-pattern02.lc 4:30-4:31 | ||
80 | _b | ||
81 | testdata/language-features/as-pattern/as-pattern02.lc 4:37-4:41 | ||
82 | [_g] | ||
83 | testdata/language-features/as-pattern/as-pattern02.lc 4:47-4:49 | ||
84 | _g | ||
85 | testdata/language-features/as-pattern/as-pattern02.lc 6:9-6:13 | ||
86 | Type | ||
87 | testdata/language-features/as-pattern/as-pattern02.lc 7:1-7:5 | ||
88 | forall a | ||
89 | . Eq a | ||
90 | => forall b | ||
91 | . (a ~ [b], Eq b, Num b) | ||
92 | => forall c . Eq c => forall d . (c ~ [d], Eq d, Num d) => Bool | ||
93 | testdata/language-features/as-pattern/as-pattern02.lc 7:8-7:9 | ||
94 | forall a . (Eq a, Num a) => [a] -> [a] | ||
95 | testdata/language-features/as-pattern/as-pattern02.lc 7:8-7:15 | ||
96 | [_d] | ||
97 | testdata/language-features/as-pattern/as-pattern02.lc 7:8-7:18 | ||
98 | [_c] -> Bool | ||
99 | testdata/language-features/as-pattern/as-pattern02.lc 7:8-7:22 | ||
100 | Bool | ||
101 | testdata/language-features/as-pattern/as-pattern02.lc 7:8-7:25 | ||
102 | Bool -> Bool | ||
103 | testdata/language-features/as-pattern/as-pattern02.lc 7:8-7:38 | ||
104 | Bool | ||
105 | testdata/language-features/as-pattern/as-pattern02.lc 7:10-7:15 | ||
106 | [_e] | ||
107 | testdata/language-features/as-pattern/as-pattern02.lc 7:11-7:12 | ||
108 | _b | ||
109 | testdata/language-features/as-pattern/as-pattern02.lc 7:13-7:14 | ||
110 | _b | [_e] | ||
111 | testdata/language-features/as-pattern/as-pattern02.lc 7:16-7:18 | ||
112 | forall a . Eq a => a -> a -> Bool | ||
113 | testdata/language-features/as-pattern/as-pattern02.lc 7:19-7:22 | ||
114 | [_d] | ||
115 | testdata/language-features/as-pattern/as-pattern02.lc 7:20-7:21 | ||
116 | _b | ||
117 | testdata/language-features/as-pattern/as-pattern02.lc 7:23-7:25 | ||
118 | Bool -> Bool -> Bool | ||
119 | testdata/language-features/as-pattern/as-pattern02.lc 7:26-7:27 | ||
120 | forall a . (Eq a, Num a) => [a] -> [a] | ||
121 | testdata/language-features/as-pattern/as-pattern02.lc 7:26-7:31 | ||
122 | [_d] | ||
123 | testdata/language-features/as-pattern/as-pattern02.lc 7:26-7:34 | ||
124 | [_c] -> Bool | ||
125 | testdata/language-features/as-pattern/as-pattern02.lc 7:26-7:38 | ||
126 | Bool | ||
127 | testdata/language-features/as-pattern/as-pattern02.lc 7:28-7:31 | ||
128 | [_d] | ||
129 | testdata/language-features/as-pattern/as-pattern02.lc 7:29-7:30 | ||
130 | _b | ||
131 | testdata/language-features/as-pattern/as-pattern02.lc 7:32-7:34 | ||
132 | forall a . Eq a => a -> a -> Bool | ||
133 | testdata/language-features/as-pattern/as-pattern02.lc 7:35-7:38 | ||
134 | [_d] | ||
135 | testdata/language-features/as-pattern/as-pattern02.lc 7:36-7:37 | ||
136 | _b | ||
137 | ------------ warnings | ||
138 | Uncovered pattern(s) at testdata/language-features/as-pattern/as-pattern02.lc:3:12: | ||
139 | f e = case e of | ||
140 | ^ | ||
141 | Missing case(s): | ||
142 | _ | [] <- _a \ No newline at end of file | ||