diff options
Diffstat (limited to 'testdata/language-features')
47 files changed, 602 insertions, 190 deletions
diff --git a/testdata/language-features/adt/adt02.out b/testdata/language-features/adt/adt02.out index 84ef7d80..992c314e 100644 --- a/testdata/language-features/adt/adt02.out +++ b/testdata/language-features/adt/adt02.out | |||
@@ -126,19 +126,19 @@ one2 :: Data2 -> Bool | |||
126 | one2 = \a -> case'Data2 (\_ -> 'Bool) (\b _ _ -> _rhs b) a | 126 | one2 = \a -> case'Data2 (\_ -> 'Bool) (\b _ _ -> _rhs b) a |
127 | 127 | ||
128 | one3 :: forall a b c . Data3 a b c -> a | 128 | one3 :: forall a b c . Data3 a b c -> a |
129 | one3 = \a _ _ b -> case'Data3 (\_ -> a) (\c _ _ -> _rhs c) b | 129 | one3 = \a b c d -> case'Data3 (\_ -> a) (\e _ _ -> _rhs e) d |
130 | 130 | ||
131 | thr2 :: Data2 -> Bool | 131 | thr2 :: Data2 -> Bool |
132 | thr2 = \a -> case'Data2 (\_ -> 'Bool) (\_ _ b -> _rhs b) a | 132 | thr2 = \a -> case'Data2 (\_ -> 'Bool) (\_ _ b -> _rhs b) a |
133 | 133 | ||
134 | thr3 :: forall a b c . Data3 a b c -> c | 134 | thr3 :: forall a b c . Data3 a b c -> c |
135 | thr3 = \_ _ a b -> case'Data3 (\_ -> a) (\_ _ c -> _rhs c) b | 135 | thr3 = \a b c d -> case'Data3 (\_ -> c) (\_ _ e -> _rhs e) d |
136 | 136 | ||
137 | two2 :: Data2 -> String | 137 | two2 :: Data2 -> String |
138 | two2 = \a -> case'Data2 (\_ -> 'String) (\_ b _ -> _rhs b) a | 138 | two2 = \a -> case'Data2 (\_ -> 'String) (\_ b _ -> _rhs b) a |
139 | 139 | ||
140 | two3 :: forall a b c . Data3 a b c -> b | 140 | two3 :: forall a b c . Data3 a b c -> b |
141 | two3 = \_ a _ b -> case'Data3 (\_ -> a) (\_ c _ -> _rhs c) b | 141 | two3 = \a b c d -> case'Data3 (\_ -> b) (\_ e _ -> _rhs e) d |
142 | 142 | ||
143 | value1 :: Data1 | 143 | value1 :: Data1 |
144 | value1 = _rhs (Data1 True) | 144 | value1 = _rhs (Data1 True) |
diff --git a/testdata/language-features/adt/adt05.out b/testdata/language-features/adt/adt05.out index c44d22b9..aed76869 100644 --- a/testdata/language-features/adt/adt05.out +++ b/testdata/language-features/adt/adt05.out | |||
@@ -1,5 +1,5 @@ | |||
1 | main :: @Type -> forall a . Num a => Bool | 1 | main :: @Type -> forall a . Num a => Bool |
2 | main = main | 2 | main = \_ _ _ -> True |
3 | ------------ desugared source code | 3 | ------------ desugared source code |
4 | data TList (_ :: Type) :: Type where | 4 | data TList (_ :: Type) :: Type where |
5 | TEmpty :: forall a . TList a | 5 | TEmpty :: forall a . TList a |
@@ -47,10 +47,10 @@ case'TList | |||
47 | case'TList = \_ a b c d -> <<case function of a type with 1 parameters>> | 47 | case'TList = \_ a b c d -> <<case function of a type with 1 parameters>> |
48 | 48 | ||
49 | isCons :: forall a . TList a -> Bool | 49 | isCons :: forall a . TList a -> Bool |
50 | isCons = \_ a -> case'TList (\_ -> 'Bool) (_rhs False) (\_ _ -> _rhs True) a | 50 | isCons = \a b -> case'TList (\_ -> 'Bool) (_rhs False) (\_ _ -> _rhs True) b |
51 | 51 | ||
52 | isEmpty :: forall a . TList a -> Bool | 52 | isEmpty :: forall a . TList a -> Bool |
53 | isEmpty = \_ a -> case'TList (\_ -> 'Bool) (_rhs True) (\_ _ -> _rhs False) a | 53 | isEmpty = \a b -> case'TList (\_ -> 'Bool) (_rhs True) (\_ _ -> _rhs False) b |
54 | 54 | ||
55 | main :: @Type -> forall a . Num a => Bool | 55 | main :: @Type -> forall a . Num a => Bool |
56 | main = \_ _ _ -> _rhs True | 56 | main = \_ _ _ -> _rhs True |
diff --git a/testdata/language-features/as-pattern/as-pattern01.out b/testdata/language-features/as-pattern/as-pattern01.out index 5b9c82cd..3e2c4116 100644 --- a/testdata/language-features/as-pattern/as-pattern01.out +++ b/testdata/language-features/as-pattern/as-pattern01.out | |||
@@ -1,5 +1,6 @@ | |||
1 | main :: forall a . (Eq a, Num (MatVecScalarElem a), Eq a, Num a) => Bool | 1 | main :: forall a . (Eq a, Num (MatVecScalarElem a), Eq a, Num a) => Bool |
2 | main = main | 2 | main |
3 | = \b c d e f -> (b == c) (g (fromInt b f 3) (fromInt b f 1)) (fromInt b f 5) | ||
3 | ------------ desugared source code | 4 | ------------ desugared source code |
4 | f | 5 | f |
5 | = _lhs | 6 | = _lhs |
@@ -37,7 +38,7 @@ g | |||
37 | main :: forall a . (Eq a, Num (MatVecScalarElem a), Eq a, Num a) => Bool | 38 | main :: forall a . (Eq a, Num (MatVecScalarElem a), Eq a, Num a) => Bool |
38 | main | 39 | main |
39 | = \a b c d e -> _rhs | 40 | = \a b c d e -> _rhs |
40 | ((a == b) (g a c d e (fromInt a e 3) (fromInt a e 1)) (fromInt a e 5)) | 41 | ((a == b) (g (fromInt a e 3) (fromInt a e 1)) (fromInt a e 5)) |
41 | ------------ tooltips | 42 | ------------ tooltips |
42 | testdata/language-features/as-pattern/as-pattern01.lc 1:1-1:2 | 43 | testdata/language-features/as-pattern/as-pattern01.lc 1:1-1:2 |
43 | forall a . [a] -> [a] | 44 | forall a . [a] -> [a] |
diff --git a/testdata/language-features/as-pattern/as-pattern02.out b/testdata/language-features/as-pattern/as-pattern02.out index 8a9f96bc..8b4ba9d5 100644 --- a/testdata/language-features/as-pattern/as-pattern02.out +++ b/testdata/language-features/as-pattern/as-pattern02.out | |||
@@ -4,7 +4,24 @@ main | |||
4 | => forall b | 4 | => forall b |
5 | . (a ~ [b], Eq b, Num b) | 5 | . (a ~ [b], Eq b, Num b) |
6 | => forall c . Eq c => forall d . (c ~ [d], Eq d, Num d) => Bool | 6 | => forall c . Eq c => forall d . (c ~ [d], Eq d, Num d) => Bool |
7 | main = main | 7 | main |
8 | = \_ _ e _ f g _ _ h _ i j -> PrimAnd | ||
9 | (undefined | ||
10 | ([e] -> [e] -> 'Bool) | ||
11 | (primIfThenElse | ||
12 | [e] | ||
13 | ((e == f) (fromInt e g 0) (fromInt e g 0)) | ||
14 | [fromInt e g 1] | ||
15 | [fromInt e g 0, fromInt e g 1]) | ||
16 | [fromInt e g 1]) | ||
17 | (undefined | ||
18 | ([h] -> [h] -> 'Bool) | ||
19 | (primIfThenElse | ||
20 | [h] | ||
21 | ((h == i) (fromInt h j 1) (fromInt h j 0)) | ||
22 | [] | ||
23 | [fromInt h j 1]) | ||
24 | [fromInt h j 1]) | ||
8 | ------------ desugared source code | 25 | ------------ desugared source code |
9 | f | 26 | f |
10 | = _lhs | 27 | = _lhs |
@@ -43,20 +60,9 @@ main | |||
43 | (PrimAnd | 60 | (PrimAnd |
44 | (undefined | 61 | (undefined |
45 | ([a] -> [a] -> 'Bool) | 62 | ([a] -> [a] -> 'Bool) |
46 | (primIfThenElse | 63 | (f [fromInt a c 0, fromInt a c 1]) |
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]) | 64 | [fromInt a c 1]) |
52 | (undefined | 65 | (undefined ([d] -> [d] -> 'Bool) (f [fromInt d f 1]) [fromInt d f 1])) |
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 | 66 | ------------ tooltips |
61 | testdata/language-features/as-pattern/as-pattern02.lc 3:1-3:2 | 67 | testdata/language-features/as-pattern/as-pattern02.lc 3:1-3:2 |
62 | forall a . (Eq a, Num a) => [a] -> [a] | 68 | forall a . (Eq a, Num a) => [a] -> [a] |
diff --git a/testdata/language-features/basic-list/dotdot01.out b/testdata/language-features/basic-list/dotdot01.out index 9b85b6a5..c564f228 100644 --- a/testdata/language-features/basic-list/dotdot01.out +++ b/testdata/language-features/basic-list/dotdot01.out | |||
@@ -4,7 +4,7 @@ main = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0] | |||
4 | main = _lhs main (_rhs (fromTo (fromInt 1) (fromInt 10))) | 4 | main = _lhs main (_rhs (fromTo (fromInt 1) (fromInt 10))) |
5 | ------------ core code | 5 | ------------ core code |
6 | main :: [Float] | 6 | main :: [Float] |
7 | main = _rhs [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0] | 7 | main = _rhs (1.0 : fromTo (1.0 + 1.0) 10.0) |
8 | ------------ tooltips | 8 | ------------ tooltips |
9 | testdata/language-features/basic-list/dotdot01.lc 2:1-2:5 | 9 | testdata/language-features/basic-list/dotdot01.lc 2:1-2:5 |
10 | [Float] | 10 | [Float] |
diff --git a/testdata/language-features/basic-list/listcomp01.out b/testdata/language-features/basic-list/listcomp01.out index ace40823..0c20b420 100644 --- a/testdata/language-features/basic-list/listcomp01.out +++ b/testdata/language-features/basic-list/listcomp01.out | |||
@@ -3,7 +3,7 @@ main is not found | |||
3 | value = _lhs value (_rhs (concatMap (\(_ :: _) -> [()]) [(), (), (), ()])) | 3 | value = _lhs value (_rhs (concatMap (\(_ :: _) -> [()]) [(), (), (), ()])) |
4 | ------------ core code | 4 | ------------ core code |
5 | value :: [()] | 5 | value :: [()] |
6 | value = _rhs [(), (), (), ()] | 6 | value = _rhs (() : [] ++ foldr (++) [] (map (\_ -> [()]) [(), (), ()])) |
7 | ------------ tooltips | 7 | ------------ tooltips |
8 | testdata/language-features/basic-list/listcomp01.lc 1:1-1:6 | 8 | testdata/language-features/basic-list/listcomp01.lc 1:1-1:6 |
9 | [()] | 9 | [()] |
diff --git a/testdata/language-features/basic-list/listcomp02.out b/testdata/language-features/basic-list/listcomp02.out index 18619ff6..528fef4a 100644 --- a/testdata/language-features/basic-list/listcomp02.out +++ b/testdata/language-features/basic-list/listcomp02.out | |||
@@ -8,7 +8,7 @@ l :: [()] | |||
8 | l = _rhs [(), (), (), ()] | 8 | l = _rhs [(), (), (), ()] |
9 | 9 | ||
10 | value :: [()] | 10 | value :: [()] |
11 | value = _rhs [(), (), (), ()] | 11 | value = _rhs (() : [] ++ foldr (++) [] (map (\a -> [a]) [(), (), ()])) |
12 | ------------ tooltips | 12 | ------------ tooltips |
13 | testdata/language-features/basic-list/listcomp02.lc 1:1-1:2 | 13 | testdata/language-features/basic-list/listcomp02.lc 1:1-1:2 |
14 | [()] | 14 | [()] |
diff --git a/testdata/language-features/basic-list/listcomp04.out b/testdata/language-features/basic-list/listcomp04.out index 4d43ac94..dfd8bd3c 100644 --- a/testdata/language-features/basic-list/listcomp04.out +++ b/testdata/language-features/basic-list/listcomp04.out | |||
@@ -9,7 +9,11 @@ l :: [()] | |||
9 | l = _rhs [(), (), (), ()] | 9 | l = _rhs [(), (), (), ()] |
10 | 10 | ||
11 | value :: [()] | 11 | value :: [()] |
12 | value = _rhs [(), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ()] | 12 | value |
13 | = _rhs | ||
14 | (() | ||
15 | : [] ++ foldr (++) [] (map (\_ -> [()]) [(), (), ()]) | ||
16 | ++ foldr (++) [] (map (\_ -> concatMap ' () ' () (\_ -> [()]) l) [(), (), ()])) | ||
13 | ------------ tooltips | 17 | ------------ tooltips |
14 | testdata/language-features/basic-list/listcomp04.lc 1:1-1:2 | 18 | testdata/language-features/basic-list/listcomp04.lc 1:1-1:2 |
15 | [()] | 19 | [()] |
diff --git a/testdata/language-features/basic-list/listcomp05.out b/testdata/language-features/basic-list/listcomp05.out index c9e56736..46e18270 100644 --- a/testdata/language-features/basic-list/listcomp05.out +++ b/testdata/language-features/basic-list/listcomp05.out | |||
@@ -11,7 +11,7 @@ value | |||
11 | [(), ()])) | 11 | [(), ()])) |
12 | ------------ core code | 12 | ------------ core code |
13 | value :: [()] | 13 | value :: [()] |
14 | value = _rhs [(), ()] | 14 | value = _rhs (u : [] ++ foldr (++) [] (map (\_ -> [u]) [()])) |
15 | ------------ tooltips | 15 | ------------ tooltips |
16 | testdata/language-features/basic-list/listcomp05.lc 1:1-1:6 | 16 | testdata/language-features/basic-list/listcomp05.lc 1:1-1:6 |
17 | [()] | 17 | [()] |
diff --git a/testdata/language-features/basic-list/listcomp06.out b/testdata/language-features/basic-list/listcomp06.out index cf4e2b31..b0e13efb 100644 --- a/testdata/language-features/basic-list/listcomp06.out +++ b/testdata/language-features/basic-list/listcomp06.out | |||
@@ -22,10 +22,14 @@ value2 | |||
22 | [(), ()])) | 22 | [(), ()])) |
23 | ------------ core code | 23 | ------------ core code |
24 | value1 :: [()] | 24 | value1 :: [()] |
25 | value1 = _rhs [(), ()] | 25 | value1 |
26 | = _rhs | ||
27 | (u : [] ++ foldr (++) [] (map (\_ -> primIfThenElse [' ()] True [u] []) [()])) | ||
26 | 28 | ||
27 | value2 :: [()] | 29 | value2 :: [()] |
28 | value2 = _rhs [(), ()] | 30 | value2 |
31 | = _rhs | ||
32 | (u : [] ++ foldr (++) [] (map (\_ -> primIfThenElse [' ()] True [u] []) [()])) | ||
29 | ------------ tooltips | 33 | ------------ tooltips |
30 | testdata/language-features/basic-list/listcomp06.lc 1:1-1:7 | 34 | testdata/language-features/basic-list/listcomp06.lc 1:1-1:7 |
31 | [()] | 35 | [()] |
diff --git a/testdata/language-features/basic-list/listcomp07.out b/testdata/language-features/basic-list/listcomp07.out index 2f4d633a..cbabbc48 100644 --- a/testdata/language-features/basic-list/listcomp07.out +++ b/testdata/language-features/basic-list/listcomp07.out | |||
@@ -40,13 +40,19 @@ value3 | |||
40 | [(), ()])) | 40 | [(), ()])) |
41 | ------------ core code | 41 | ------------ core code |
42 | value1 :: [()] | 42 | value1 :: [()] |
43 | value1 = _rhs [(), ()] | 43 | value1 |
44 | = _rhs | ||
45 | (u : [] ++ foldr (++) [] (map (\_ -> primIfThenElse [' ()] True [u] []) [()])) | ||
44 | 46 | ||
45 | value2 :: [()] | 47 | value2 :: [()] |
46 | value2 = _rhs [(), ()] | 48 | value2 |
49 | = _rhs | ||
50 | (u : [] ++ foldr (++) [] (map (\_ -> primIfThenElse [' ()] True [u] []) [()])) | ||
47 | 51 | ||
48 | value3 :: [()] | 52 | value3 :: [()] |
49 | value3 = _rhs [(), ()] | 53 | value3 |
54 | = _rhs | ||
55 | (u : [] ++ foldr (++) [] (map (\_ -> primIfThenElse [' ()] True [u] []) [()])) | ||
50 | ------------ tooltips | 56 | ------------ tooltips |
51 | testdata/language-features/basic-list/listcomp07.lc 1:1-1:7 | 57 | testdata/language-features/basic-list/listcomp07.lc 1:1-1:7 |
52 | [()] | 58 | [()] |
diff --git a/testdata/language-features/basic-values/def01.out b/testdata/language-features/basic-values/def01.out index 6564e1b8..eba795a8 100644 --- a/testdata/language-features/basic-values/def01.out +++ b/testdata/language-features/basic-values/def01.out | |||
@@ -7,10 +7,10 @@ fun1 = _lhs fun1 \(_ :: _) -> _rhs (fromInt 1) | |||
7 | fun2 = _lhs fun2 \(_ :: _) (_ :: _) (_ :: _) (_ :: _) (_ :: _) -> _rhs 'c' | 7 | fun2 = _lhs fun2 \(_ :: _) (_ :: _) (_ :: _) (_ :: _) (_ :: _) -> _rhs 'c' |
8 | ------------ core code | 8 | ------------ core code |
9 | fun1 :: forall a b . Num b => a -> b | 9 | fun1 :: forall a b . Num b => a -> b |
10 | fun1 = \_ a b _ -> _rhs (fromInt a b 1) | 10 | fun1 = \a b c _ -> _rhs (fromInt b c 1) |
11 | 11 | ||
12 | fun2 :: forall a b c d e . a -> b -> c -> d -> e -> Char | 12 | fun2 :: forall a b c d e . a -> b -> c -> d -> e -> Char |
13 | fun2 = \_ _ _ _ _ _ _ _ _ _ -> _rhs 'c' | 13 | fun2 = \a b c d e _ _ _ _ _ -> _rhs 'c' |
14 | 14 | ||
15 | unit :: () | 15 | unit :: () |
16 | unit = _rhs () | 16 | unit = _rhs () |
diff --git a/testdata/language-features/basic-values/def04.out b/testdata/language-features/basic-values/def04.out index 127129e9..d4fbfa4e 100644 --- a/testdata/language-features/basic-values/def04.out +++ b/testdata/language-features/basic-values/def04.out | |||
@@ -28,11 +28,11 @@ fun | |||
28 | 28 | ||
29 | fun2 :: forall a b . (Eq a, Num a, Eq a, Num a) => a -> b -> Char | 29 | fun2 :: forall a b . (Eq a, Num a, Eq a, Num a) => a -> b -> Char |
30 | fun2 | 30 | fun2 |
31 | = \a _ b c d e f _ -> case'Bool | 31 | = \a b c d e f g _ -> case'Bool |
32 | (\_ -> 'Char) | 32 | (\_ -> 'Char) |
33 | (case'Bool (\_ -> 'Char) (_rhs '_') (_rhs '2') ((a == b) (fromInt a c 2) f)) | 33 | (case'Bool (\_ -> 'Char) (_rhs '_') (_rhs '2') ((a == c) (fromInt a d 2) g)) |
34 | (_rhs '1') | 34 | (_rhs '1') |
35 | ((a == d) (fromInt a e 1) f) | 35 | ((a == e) (fromInt a f 1) g) |
36 | ------------ tooltips | 36 | ------------ tooltips |
37 | testdata/language-features/basic-values/def04.lc 1:1-1:4 | 37 | testdata/language-features/basic-values/def04.lc 1:1-1:4 |
38 | forall a . (Eq a, Num a, Eq a, Num a) => a -> Char | 38 | forall a . (Eq a, Num a, Eq a, Num a) => a -> Char |
diff --git a/testdata/language-features/basic-values/deforder03.out b/testdata/language-features/basic-values/deforder03.out index cf40c23e..66cb3c71 100644 --- a/testdata/language-features/basic-values/deforder03.out +++ b/testdata/language-features/basic-values/deforder03.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | 1 | main is not found |
2 | ------------ desugared source code | 2 | ------------ desugared source code |
3 | value = _lhs value (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs a) in '1') | 3 | value = _lhs value (_rhs let a = (); b = a in '1') |
4 | ------------ core code | 4 | ------------ core code |
5 | value :: Char | 5 | value :: Char |
6 | value = _rhs '1' | 6 | value = _rhs '1' |
diff --git a/testdata/language-features/basic-values/deforder04.out b/testdata/language-features/basic-values/deforder04.out index 767b8a9b..17a9a408 100644 --- a/testdata/language-features/basic-values/deforder04.out +++ b/testdata/language-features/basic-values/deforder04.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | 1 | main is not found |
2 | ------------ desugared source code | 2 | ------------ desugared source code |
3 | value = _lhs value (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs a) in '1') | 3 | value = _lhs value (_rhs let a = (); b = a in '1') |
4 | ------------ core code | 4 | ------------ core code |
5 | value :: Char | 5 | value :: Char |
6 | value = _rhs '1' | 6 | value = _rhs '1' |
diff --git a/testdata/language-features/basic-values/deforder05.out b/testdata/language-features/basic-values/deforder05.out index 7345785e..abc83591 100644 --- a/testdata/language-features/basic-values/deforder05.out +++ b/testdata/language-features/basic-values/deforder05.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | 1 | main is not found |
2 | ------------ desugared source code | 2 | ------------ desugared source code |
3 | value = _lhs value (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs a) in '1') | 3 | value = _lhs value (_rhs let a = (); b = a in '1') |
4 | ------------ core code | 4 | ------------ core code |
5 | value :: Char | 5 | value :: Char |
6 | value = _rhs '1' | 6 | value = _rhs '1' |
diff --git a/testdata/language-features/basic-values/deforder06.out b/testdata/language-features/basic-values/deforder06.out index 2a0ead81..c44eec77 100644 --- a/testdata/language-features/basic-values/deforder06.out +++ b/testdata/language-features/basic-values/deforder06.out | |||
@@ -1,6 +1,6 @@ | |||
1 | main is not found | 1 | main is not found |
2 | ------------ desugared source code | 2 | ------------ desugared source code |
3 | value = _lhs value (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs a) in '1') | 3 | value = _lhs value (_rhs let a = (); b = a in '1') |
4 | ------------ core code | 4 | ------------ core code |
5 | value :: Char | 5 | value :: Char |
6 | value = _rhs '1' | 6 | value = _rhs '1' |
diff --git a/testdata/language-features/basic-values/fixity01.out b/testdata/language-features/basic-values/fixity01.out index f4f17b40..689c921a 100644 --- a/testdata/language-features/basic-values/fixity01.out +++ b/testdata/language-features/basic-values/fixity01.out | |||
@@ -17,16 +17,16 @@ infixr 6 >>>> | |||
17 | infixr 6 funR | 17 | infixr 6 funR |
18 | ------------ core code | 18 | ------------ core code |
19 | <<<< :: forall a b . a -> b -> a | 19 | <<<< :: forall a b . a -> b -> a |
20 | <<<< = \_ _ a _ -> _rhs a | 20 | <<<< = \a b c _ -> _rhs c |
21 | 21 | ||
22 | >>>> :: forall a b . a -> b -> b | 22 | >>>> :: forall a b . a -> b -> b |
23 | >>>> = \_ _ _ a -> _rhs a | 23 | >>>> = \a b _ c -> _rhs c |
24 | 24 | ||
25 | funL :: forall a b . a -> b -> a | 25 | funL :: forall a b . a -> b -> a |
26 | funL = \_ _ a _ -> _rhs a | 26 | funL = \a b c _ -> _rhs c |
27 | 27 | ||
28 | funR :: forall a b . a -> b -> a | 28 | funR :: forall a b . a -> b -> a |
29 | funR = \_ _ a _ -> _rhs a | 29 | funR = \a b c _ -> _rhs c |
30 | ------------ tooltips | 30 | ------------ tooltips |
31 | testdata/language-features/basic-values/fixity01.lc 1:1-1:5 | 31 | testdata/language-features/basic-values/fixity01.lc 1:1-1:5 |
32 | forall a b . a -> b -> a | 32 | forall a b . a -> b -> a |
diff --git a/testdata/language-features/basic-values/fixity02.out b/testdata/language-features/basic-values/fixity02.out index b07707af..1dbf5728 100644 --- a/testdata/language-features/basic-values/fixity02.out +++ b/testdata/language-features/basic-values/fixity02.out | |||
@@ -55,16 +55,16 @@ funValue7 | |||
55 | funValue8 = _lhs funValue8 (_rhs (() `funL` 'c' `funL` "hi" `funL` 1.2 :: ())) | 55 | funValue8 = _lhs funValue8 (_rhs (() `funL` 'c' `funL` "hi" `funL` 1.2 :: ())) |
56 | ------------ core code | 56 | ------------ core code |
57 | <@ :: forall a b . a -> b -> a | 57 | <@ :: forall a b . a -> b -> a |
58 | <@ = \_ _ a _ -> _rhs a | 58 | <@ = \a b c _ -> _rhs c |
59 | 59 | ||
60 | @> :: forall a b . a -> b -> b | 60 | @> :: forall a b . a -> b -> b |
61 | @> = \_ _ _ a -> _rhs a | 61 | @> = \a b _ c -> _rhs c |
62 | 62 | ||
63 | funL :: forall a b . a -> b -> a | 63 | funL :: forall a b . a -> b -> a |
64 | funL = \_ _ a _ -> _rhs a | 64 | funL = \a b c _ -> _rhs c |
65 | 65 | ||
66 | funR :: forall a b . a -> b -> b | 66 | funR :: forall a b . a -> b -> b |
67 | funR = \_ _ _ a -> _rhs a | 67 | funR = \a b _ c -> _rhs c |
68 | 68 | ||
69 | funValue1 :: Float | 69 | funValue1 :: Float |
70 | funValue1 = _rhs 1.2 | 70 | funValue1 = _rhs 1.2 |
diff --git a/testdata/language-features/basic-values/infix01.out b/testdata/language-features/basic-values/infix01.out index ced45621..55d5dad5 100644 --- a/testdata/language-features/basic-values/infix01.out +++ b/testdata/language-features/basic-values/infix01.out | |||
@@ -5,10 +5,10 @@ fun = _lhs fun \(_ :: _) (_ :: _) -> _rhs () | |||
5 | value = _lhs value \(a :: _) (b :: _) -> _rhs (a `fun` b) | 5 | value = _lhs value \(a :: _) (b :: _) -> _rhs (a `fun` b) |
6 | ------------ core code | 6 | ------------ core code |
7 | fun :: forall a b . a -> b -> () | 7 | fun :: forall a b . a -> b -> () |
8 | fun = \_ _ _ _ -> _rhs () | 8 | fun = \a b _ _ -> _rhs () |
9 | 9 | ||
10 | value :: forall a b . a -> b -> () | 10 | value :: forall a b . a -> b -> () |
11 | value = \_ _ _ _ -> _rhs () | 11 | value = \a b _ _ -> _rhs () |
12 | ------------ tooltips | 12 | ------------ tooltips |
13 | testdata/language-features/basic-values/infix01.lc 1:1-1:4 | 13 | testdata/language-features/basic-values/infix01.lc 1:1-1:4 |
14 | forall a b . a -> b -> () | 14 | forall a b . a -> b -> () |
diff --git a/testdata/language-features/basic-values/infix02.out b/testdata/language-features/basic-values/infix02.out index 888f4d9f..c32a0ce7 100644 --- a/testdata/language-features/basic-values/infix02.out +++ b/testdata/language-features/basic-values/infix02.out | |||
@@ -5,10 +5,10 @@ fun = _lhs fun \(_ :: _) (_ :: _) (_ :: _) -> _rhs () | |||
5 | value = _lhs value \(a :: _) (b :: _) -> _rhs (a `fun` b) | 5 | value = _lhs value \(a :: _) (b :: _) -> _rhs (a `fun` b) |
6 | ------------ core code | 6 | ------------ core code |
7 | fun :: forall a b c . a -> b -> c -> () | 7 | fun :: forall a b c . a -> b -> c -> () |
8 | fun = \_ _ _ _ _ _ -> _rhs () | 8 | fun = \a b c _ _ _ -> _rhs () |
9 | 9 | ||
10 | value :: forall a b c . a -> b -> c -> () | 10 | value :: forall a b c . a -> b -> c -> () |
11 | value = \a b c d e -> _rhs (fun a b c d e) | 11 | value = \a b c d e -> _rhs (fun d e) |
12 | ------------ tooltips | 12 | ------------ tooltips |
13 | testdata/language-features/basic-values/infix02.lc 1:1-1:4 | 13 | testdata/language-features/basic-values/infix02.lc 1:1-1:4 |
14 | forall a b c . a -> b -> c -> () | 14 | forall a b c . a -> b -> c -> () |
diff --git a/testdata/language-features/basic-values/lambda01.out b/testdata/language-features/basic-values/lambda01.out index 0a07171f..1476c47f 100644 --- a/testdata/language-features/basic-values/lambda01.out +++ b/testdata/language-features/basic-values/lambda01.out | |||
@@ -15,17 +15,17 @@ fun4 | |||
15 | -> ()) | 15 | -> ()) |
16 | ------------ core code | 16 | ------------ core code |
17 | fun1 :: forall a . a -> () | 17 | fun1 :: forall a . a -> () |
18 | fun1 = \_ -> _rhs \_ -> () | 18 | fun1 = \a -> _rhs \_ -> () |
19 | 19 | ||
20 | fun2 :: forall a . a -> () | 20 | fun2 :: forall a . a -> () |
21 | fun2 = \_ -> _rhs \_ -> () | 21 | fun2 = \a -> _rhs \_ -> () |
22 | 22 | ||
23 | fun3 :: forall a . a -> () | 23 | fun3 :: forall a . a -> () |
24 | fun3 = \_ -> _rhs \_ -> () | 24 | fun3 = \a -> _rhs \_ -> () |
25 | 25 | ||
26 | fun4 | 26 | fun4 |
27 | :: forall a b c d e f g h i . a -> b -> c -> d -> e -> f -> g -> h -> i -> () | 27 | :: forall a b c d e f g h i . a -> b -> c -> d -> e -> f -> g -> h -> i -> () |
28 | fun4 = \_ _ _ _ _ _ _ _ _ -> _rhs \_ _ _ _ _ _ _ _ _ -> () | 28 | fun4 = \a b c d e f g h i -> _rhs \_ _ _ _ _ _ _ _ _ -> () |
29 | ------------ tooltips | 29 | ------------ tooltips |
30 | testdata/language-features/basic-values/lambda01.lc 1:1-1:5 | 30 | testdata/language-features/basic-values/lambda01.lc 1:1-1:5 |
31 | forall a . a -> () | 31 | forall a . a -> () |
diff --git a/testdata/language-features/basic-values/lambda03.out b/testdata/language-features/basic-values/lambda03.out index f9ddcaa4..50af2ae5 100644 --- a/testdata/language-features/basic-values/lambda03.out +++ b/testdata/language-features/basic-values/lambda03.out | |||
@@ -5,10 +5,10 @@ fun1 = _lhs fun1 (_rhs \(_ :: _) (a :: _) (_ :: _) -> a) | |||
5 | fun2 = _lhs fun2 \(a :: _) -> _rhs \(_ :: _) (_ :: _) (_ :: _) -> a | 5 | fun2 = _lhs fun2 \(a :: _) -> _rhs \(_ :: _) (_ :: _) (_ :: _) -> a |
6 | ------------ core code | 6 | ------------ core code |
7 | fun1 :: forall a b c . a -> b -> c -> b | 7 | fun1 :: forall a b c . a -> b -> c -> b |
8 | fun1 = \_ _ _ -> _rhs \_ a _ -> a | 8 | fun1 = \a b c -> _rhs \_ d _ -> d |
9 | 9 | ||
10 | fun2 :: forall a b c d . a -> b -> c -> d -> a | 10 | fun2 :: forall a b c d . a -> b -> c -> d -> a |
11 | fun2 = \_ _ _ _ a -> _rhs \_ _ _ -> a | 11 | fun2 = \a b c d e -> _rhs \_ _ _ -> e |
12 | ------------ tooltips | 12 | ------------ tooltips |
13 | testdata/language-features/basic-values/lambda03.lc 1:1-1:5 | 13 | testdata/language-features/basic-values/lambda03.lc 1:1-1:5 |
14 | forall a b c . a -> b -> c -> b | 14 | forall a b c . a -> b -> c -> b |
diff --git a/testdata/language-features/basic-values/let01.out b/testdata/language-features/basic-values/let01.out index 7d40e348..bd59a558 100644 --- a/testdata/language-features/basic-values/let01.out +++ b/testdata/language-features/basic-values/let01.out | |||
@@ -1,21 +1,14 @@ | |||
1 | main is not found | 1 | main is not found |
2 | ------------ desugared source code | 2 | ------------ desugared source code |
3 | value1 = _lhs value1 (_rhs let a = _lhs x (_rhs (fromInt 1)) in fromInt 1) | 3 | value1 = _lhs value1 (_rhs let a = fromInt 1 in fromInt 1) |
4 | 4 | ||
5 | value2 = _lhs value2 (_rhs let a = _lhs x (_rhs (fromInt 1)) in fromInt 1) | 5 | value2 = _lhs value2 (_rhs let a = fromInt 1 in fromInt 1) |
6 | 6 | ||
7 | value3 | 7 | value3 = _lhs value3 (_rhs let a = fromInt 1; b = 'c' in fromInt 1) |
8 | = _lhs | ||
9 | value3 | ||
10 | (_rhs let a = _lhs x (_rhs (fromInt 1)); b = _lhs y (_rhs 'c') in fromInt 1) | ||
11 | 8 | ||
12 | value4 = _lhs value4 (_rhs let a = _lhs x (_rhs (fromInt 1)) in fromInt 1) | 9 | value4 = _lhs value4 (_rhs let a = fromInt 1 in fromInt 1) |
13 | 10 | ||
14 | value5 | 11 | value5 = _lhs value5 (_rhs let a = fromInt 1; b = fromInt 2 in fromInt 1) |
15 | = _lhs | ||
16 | value5 | ||
17 | (_rhs | ||
18 | let a = _lhs x (_rhs (fromInt 1)); b = _lhs y (_rhs (fromInt 2)) in fromInt 1) | ||
19 | ------------ core code | 12 | ------------ core code |
20 | value1 :: forall a . Num a => a | 13 | value1 :: forall a . Num a => a |
21 | value1 = \a b -> _rhs (fromInt a b 1) | 14 | value1 = \a b -> _rhs (fromInt a b 1) |
diff --git a/testdata/language-features/basic-values/let02.out b/testdata/language-features/basic-values/let02.out index f9de03b4..574a8d36 100644 --- a/testdata/language-features/basic-values/let02.out +++ b/testdata/language-features/basic-values/let02.out | |||
@@ -5,15 +5,7 @@ value | |||
5 | value | 5 | value |
6 | (_rhs | 6 | (_rhs |
7 | let | 7 | let |
8 | a = _lhs x (_rhs ()); | 8 | a = (); b = let d = 'A' in (); c = let e = (); f = fromInt 1; g = "hello" in 'B' |
9 | b = _lhs y (_rhs let d = _lhs c (_rhs 'A') in ()); | ||
10 | c | ||
11 | = _lhs | ||
12 | z | ||
13 | (_rhs | ||
14 | let | ||
15 | e = _lhs a (_rhs ()); f = _lhs b (_rhs (fromInt 1)); g = _lhs c (_rhs "hello") | ||
16 | in 'B') | ||
17 | in ()) | 9 | in ()) |
18 | ------------ core code | 10 | ------------ core code |
19 | value :: () | 11 | value :: () |
diff --git a/testdata/language-features/basic-values/operator01.out b/testdata/language-features/basic-values/operator01.out index 3b6dd323..817d1b5f 100644 --- a/testdata/language-features/basic-values/operator01.out +++ b/testdata/language-features/basic-values/operator01.out | |||
@@ -9,16 +9,16 @@ main is not found | |||
9 | ($$$) = _lhs ($$$) \(_ :: _) (_ :: _) -> _rhs () | 9 | ($$$) = _lhs ($$$) \(_ :: _) (_ :: _) -> _rhs () |
10 | ------------ core code | 10 | ------------ core code |
11 | #$# :: forall a b . a -> b -> () | 11 | #$# :: forall a b . a -> b -> () |
12 | #$# = \_ _ _ _ -> _rhs () | 12 | #$# = \a b _ _ -> _rhs () |
13 | 13 | ||
14 | $$# :: forall a b . a -> b -> () | 14 | $$# :: forall a b . a -> b -> () |
15 | $$# = \_ _ _ _ -> _rhs () | 15 | $$# = \a b _ _ -> _rhs () |
16 | 16 | ||
17 | $$$ :: forall a b . a -> b -> () | 17 | $$$ :: forall a b . a -> b -> () |
18 | $$$ = \_ _ _ _ -> _rhs () | 18 | $$$ = \a b _ _ -> _rhs () |
19 | 19 | ||
20 | $$$# :: forall a b . a -> b -> () | 20 | $$$# :: forall a b . a -> b -> () |
21 | $$$# = \_ _ _ _ -> _rhs () | 21 | $$$# = \a b _ _ -> _rhs () |
22 | ------------ tooltips | 22 | ------------ tooltips |
23 | testdata/language-features/basic-values/operator01.lc 1:3-1:6 | 23 | testdata/language-features/basic-values/operator01.lc 1:3-1:6 |
24 | forall a b . a -> b -> () | 24 | forall a b . a -> b -> () |
diff --git a/testdata/language-features/basic-values/shadowing01.out b/testdata/language-features/basic-values/shadowing01.out index b1288270..502ad96f 100644 --- a/testdata/language-features/basic-values/shadowing01.out +++ b/testdata/language-features/basic-values/shadowing01.out | |||
@@ -5,23 +5,12 @@ value | |||
5 | value | 5 | value |
6 | (_rhs | 6 | (_rhs |
7 | let | 7 | let |
8 | a = _lhs x (_rhs 'A'); | 8 | a = 'A'; |
9 | b = _lhs y (_rhs "hello"); | 9 | b = "hello"; |
10 | c | 10 | c |
11 | = _lhs | 11 | = let |
12 | c | 12 | d = fromInt 1; e = 2.12; f = let g = (); h = 'C'; i = 3.12 in "world" |
13 | (_rhs | 13 | in () |
14 | let | ||
15 | d = _lhs x (_rhs (fromInt 1)); | ||
16 | e = _lhs y (_rhs 2.12); | ||
17 | f | ||
18 | = _lhs | ||
19 | c | ||
20 | (_rhs | ||
21 | let | ||
22 | g = _lhs x (_rhs ()); h = _lhs y (_rhs 'C'); i = _lhs c (_rhs 3.12) | ||
23 | in "world") | ||
24 | in ()) | ||
25 | in '7') | 14 | in '7') |
26 | ------------ core code | 15 | ------------ core code |
27 | value :: Char | 16 | value :: Char |
diff --git a/testdata/language-features/basic-values/shadowing02.out b/testdata/language-features/basic-values/shadowing02.out index 7edd4cef..aa0b9af2 100644 --- a/testdata/language-features/basic-values/shadowing02.out +++ b/testdata/language-features/basic-values/shadowing02.out | |||
@@ -9,27 +9,13 @@ value2 | |||
9 | value2 | 9 | value2 |
10 | (_rhs | 10 | (_rhs |
11 | let | 11 | let |
12 | a = _lhs x (_rhs 'A'); | 12 | a = 'A'; |
13 | b = _lhs y (_rhs "hello"); | 13 | b = "hello"; |
14 | c = _lhs w (_rhs (fromInt 123)); | 14 | c = fromInt 123; |
15 | d | 15 | d |
16 | = _lhs | 16 | = let |
17 | c | 17 | e = fromInt 1; f = 2.12; g = let h = (); i = 'C'; j = 3.12; k = c in world |
18 | (_rhs | 18 | in () |
19 | let | ||
20 | e = _lhs x (_rhs (fromInt 1)); | ||
21 | f = _lhs y (_rhs 2.12); | ||
22 | g | ||
23 | = _lhs | ||
24 | c | ||
25 | (_rhs | ||
26 | let | ||
27 | h = _lhs x (_rhs ()); | ||
28 | i = _lhs y (_rhs 'C'); | ||
29 | j = _lhs c (_rhs 3.12); | ||
30 | k = _lhs d (_rhs c) | ||
31 | in world) | ||
32 | in ()) | ||
33 | in '7') | 19 | in '7') |
34 | ------------ core code | 20 | ------------ core code |
35 | c :: forall a . Num a => a | 21 | c :: forall a . Num a => a |
diff --git a/testdata/language-features/basic-values/shadowing03.out b/testdata/language-features/basic-values/shadowing03.out index f796c908..cb7d1050 100644 --- a/testdata/language-features/basic-values/shadowing03.out +++ b/testdata/language-features/basic-values/shadowing03.out | |||
@@ -3,7 +3,7 @@ main is not found | |||
3 | x = _lhs x \(_ :: _) (_ :: _) -> _rhs () | 3 | x = _lhs x \(_ :: _) (_ :: _) -> _rhs () |
4 | ------------ core code | 4 | ------------ core code |
5 | x :: forall a b . a -> b -> () | 5 | x :: forall a b . a -> b -> () |
6 | x = \_ _ _ _ -> _rhs () | 6 | x = \a b _ _ -> _rhs () |
7 | ------------ tooltips | 7 | ------------ tooltips |
8 | testdata/language-features/basic-values/shadowing03.lc 1:1-1:2 | 8 | testdata/language-features/basic-values/shadowing03.lc 1:1-1:2 |
9 | forall a b . a -> b -> () | 9 | forall a b . a -> b -> () |
diff --git a/testdata/language-features/basic-values/shadowing04.out b/testdata/language-features/basic-values/shadowing04.out index 59d10c41..042c221d 100644 --- a/testdata/language-features/basic-values/shadowing04.out +++ b/testdata/language-features/basic-values/shadowing04.out | |||
@@ -3,7 +3,7 @@ main is not found | |||
3 | __ = _lhs __ \(_ :: _) (_ :: _) -> _rhs () | 3 | __ = _lhs __ \(_ :: _) (_ :: _) -> _rhs () |
4 | ------------ core code | 4 | ------------ core code |
5 | __ :: forall a b . a -> b -> () | 5 | __ :: forall a b . a -> b -> () |
6 | __ = \_ _ _ _ -> _rhs () | 6 | __ = \a b _ _ -> _rhs () |
7 | ------------ tooltips | 7 | ------------ tooltips |
8 | testdata/language-features/basic-values/shadowing04.lc 1:1-1:3 | 8 | testdata/language-features/basic-values/shadowing04.lc 1:1-1:3 |
9 | forall a b . a -> b -> () | 9 | forall a b . a -> b -> () |
diff --git a/testdata/language-features/basic-values/typesig05.out b/testdata/language-features/basic-values/typesig05.out index 7ca5e11a..fc1da409 100644 --- a/testdata/language-features/basic-values/typesig05.out +++ b/testdata/language-features/basic-values/typesig05.out | |||
@@ -15,10 +15,10 @@ value4 :: String | |||
15 | value4 = _lhs value4 (_rhs (funR 'a' "b")) | 15 | value4 = _lhs value4 (_rhs (funR 'a' "b")) |
16 | ------------ core code | 16 | ------------ core code |
17 | funL :: forall a b . a -> b -> a | 17 | funL :: forall a b . a -> b -> a |
18 | funL = \_ _ a _ -> _rhs a | 18 | funL = \a b c _ -> _rhs c |
19 | 19 | ||
20 | funR :: forall a b . a -> b -> b | 20 | funR :: forall a b . a -> b -> b |
21 | funR = \_ _ _ a -> _rhs a | 21 | funR = \a b _ c -> _rhs c |
22 | 22 | ||
23 | value1 :: Char | 23 | value1 :: Char |
24 | value1 = _rhs 'a' | 24 | value1 = _rhs 'a' |
diff --git a/testdata/language-features/basic-values/typesig06.out b/testdata/language-features/basic-values/typesig06.out index 6cc32fea..04783c47 100644 --- a/testdata/language-features/basic-values/typesig06.out +++ b/testdata/language-features/basic-values/typesig06.out | |||
@@ -9,10 +9,10 @@ value1 = _lhs value1 (_rhs ("hi" <@ 1.2 :: String)) | |||
9 | value2 = _lhs value2 (_rhs ("hi" `funL` 1.2 :: String)) | 9 | value2 = _lhs value2 (_rhs ("hi" `funL` 1.2 :: String)) |
10 | ------------ core code | 10 | ------------ core code |
11 | <@ :: forall a b . a -> b -> a | 11 | <@ :: forall a b . a -> b -> a |
12 | <@ = \_ _ a _ -> _rhs a | 12 | <@ = \a b c _ -> _rhs c |
13 | 13 | ||
14 | funL :: forall a b . a -> b -> a | 14 | funL :: forall a b . a -> b -> a |
15 | funL = \_ _ a _ -> _rhs a | 15 | funL = \a b c _ -> _rhs c |
16 | 16 | ||
17 | value1 :: String | 17 | value1 :: String |
18 | value1 = _rhs "hi" | 18 | value1 = _rhs "hi" |
diff --git a/testdata/language-features/basic-values/where01.out b/testdata/language-features/basic-values/where01.out index 3b56a3c4..45cdab5f 100644 --- a/testdata/language-features/basic-values/where01.out +++ b/testdata/language-features/basic-values/where01.out | |||
@@ -1,14 +1,14 @@ | |||
1 | main is not found | 1 | main is not found |
2 | ------------ desugared source code | 2 | ------------ desugared source code |
3 | value1 = _lhs value1 (_rhs let a = _lhs x (_rhs ()) in ()) | 3 | value1 = _lhs value1 (_rhs let a = () in ()) |
4 | 4 | ||
5 | value2 = _lhs value2 (_rhs let a = _lhs x (_rhs ()) in a) | 5 | value2 = _lhs value2 (_rhs let a = () in a) |
6 | 6 | ||
7 | value3 = _lhs value3 (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs ()) in a) | 7 | value3 = _lhs value3 (_rhs let a = (); b = () in a) |
8 | 8 | ||
9 | value4 = _lhs value4 (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs ()) in b) | 9 | value4 = _lhs value4 (_rhs let a = (); b = () in b) |
10 | 10 | ||
11 | value5 = _lhs value5 (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs ()) in a) | 11 | value5 = _lhs value5 (_rhs let a = (); b = () in a) |
12 | 12 | ||
13 | value6 = _lhs value6 (_rhs ()) | 13 | value6 = _lhs value6 (_rhs ()) |
14 | 14 | ||
@@ -16,13 +16,11 @@ value7 = _lhs value7 (_rhs ()) | |||
16 | 16 | ||
17 | value8 = _lhs value8 (_rhs ()) | 17 | value8 = _lhs value8 (_rhs ()) |
18 | 18 | ||
19 | value9 = _lhs value9 (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs ()) in a) | 19 | value9 = _lhs value9 (_rhs let a = (); b = () in a) |
20 | 20 | ||
21 | value10 | 21 | value10 = _lhs value10 (_rhs let a = (); b = () in a) |
22 | = _lhs value10 (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs ()) in a) | ||
23 | 22 | ||
24 | value11 | 23 | value11 = _lhs value11 (_rhs let a = (); b = () in a) |
25 | = _lhs value11 (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs ()) in a) | ||
26 | ------------ core code | 24 | ------------ core code |
27 | value1 :: () | 25 | value1 :: () |
28 | value1 = _rhs () | 26 | value1 = _rhs () |
diff --git a/testdata/language-features/basic-values/where04.out b/testdata/language-features/basic-values/where04.out index 3095e9d3..0c247314 100644 --- a/testdata/language-features/basic-values/where04.out +++ b/testdata/language-features/basic-values/where04.out | |||
@@ -1,13 +1,10 @@ | |||
1 | main is not found | 1 | main is not found |
2 | ------------ desugared source code | 2 | ------------ desugared source code |
3 | value1 | 3 | value1 = _lhs value1 (_rhs let a = let b = () in b in a) |
4 | = _lhs value1 (_rhs let a = _lhs x (_rhs let b = _lhs y (_rhs ()) in b) in a) | ||
5 | 4 | ||
6 | value2 | 5 | value2 = _lhs value2 (_rhs let a = let b = () in b in a) |
7 | = _lhs value2 (_rhs let a = _lhs x (_rhs let b = _lhs y (_rhs ()) in b) in a) | ||
8 | 6 | ||
9 | value3 | 7 | value3 = _lhs value3 (_rhs let a = let b = () in b in a) |
10 | = _lhs value3 (_rhs let a = _lhs x (_rhs let b = _lhs y (_rhs ()) in b) in a) | ||
11 | ------------ core code | 8 | ------------ core code |
12 | value1 :: () | 9 | value1 :: () |
13 | value1 = _rhs () | 10 | value1 = _rhs () |
diff --git a/testdata/language-features/basic-values/where05.out b/testdata/language-features/basic-values/where05.out index 0dc19f61..768de934 100644 --- a/testdata/language-features/basic-values/where05.out +++ b/testdata/language-features/basic-values/where05.out | |||
@@ -4,44 +4,28 @@ value1 | |||
4 | = _lhs | 4 | = _lhs |
5 | value1 | 5 | value1 |
6 | (_rhs | 6 | (_rhs |
7 | ((\(a :: _) -> case'Bool | 7 | ((\(a :: _) -> case'Bool (\(_ :: _) -> _) () (let b = () in b) (fromInt 1 == a)) |
8 | (\(_ :: _) -> _) | ||
9 | () | ||
10 | (let b = _lhs x (_rhs ()) in b) | ||
11 | (fromInt 1 == a)) | ||
12 | (fromInt 1))) | 8 | (fromInt 1))) |
13 | 9 | ||
14 | value2 | 10 | value2 |
15 | = _lhs | 11 | = _lhs |
16 | value2 | 12 | value2 |
17 | (_rhs | 13 | (_rhs |
18 | ((\(a :: _) -> case'Bool | 14 | ((\(a :: _) -> case'Bool (\(_ :: _) -> _) () (let b = () in b) (fromInt 1 == a)) |
19 | (\(_ :: _) -> _) | ||
20 | () | ||
21 | (let b = _lhs x (_rhs ()) in b) | ||
22 | (fromInt 1 == a)) | ||
23 | (fromInt 1))) | 15 | (fromInt 1))) |
24 | 16 | ||
25 | value3 | 17 | value3 |
26 | = _lhs | 18 | = _lhs |
27 | value3 | 19 | value3 |
28 | (_rhs | 20 | (_rhs |
29 | ((\(a :: _) -> case'Bool | 21 | ((\(a :: _) -> case'Bool (\(_ :: _) -> _) () (let b = () in b) (fromInt 1 == a)) |
30 | (\(_ :: _) -> _) | ||
31 | () | ||
32 | (let b = _lhs x (_rhs ()) in b) | ||
33 | (fromInt 1 == a)) | ||
34 | (fromInt 1))) | 22 | (fromInt 1))) |
35 | 23 | ||
36 | value4 | 24 | value4 |
37 | = _lhs | 25 | = _lhs |
38 | value4 | 26 | value4 |
39 | (_rhs | 27 | (_rhs |
40 | let a = _lhs x (_rhs ()) in (\(b :: _) -> case'Bool | 28 | let a = () in (\(b :: _) -> case'Bool (\(_ :: _) -> _) () a (fromInt 1 == b)) |
41 | (\(_ :: _) -> _) | ||
42 | () | ||
43 | a | ||
44 | (fromInt 1 == b)) | ||
45 | (fromInt 1)) | 29 | (fromInt 1)) |
46 | ------------ core code | 30 | ------------ core code |
47 | value1 :: forall a . (Eq a, Num a) => () | 31 | value1 :: forall a . (Eq a, Num a) => () |
diff --git a/testdata/language-features/basic-values/wildcard01.out b/testdata/language-features/basic-values/wildcard01.out index b462aac7..4f954c87 100644 --- a/testdata/language-features/basic-values/wildcard01.out +++ b/testdata/language-features/basic-values/wildcard01.out | |||
@@ -3,7 +3,7 @@ main is not found | |||
3 | funUnit = _lhs funUnit \(_ :: _) -> _rhs () | 3 | funUnit = _lhs funUnit \(_ :: _) -> _rhs () |
4 | ------------ core code | 4 | ------------ core code |
5 | funUnit :: forall a . a -> () | 5 | funUnit :: forall a . a -> () |
6 | funUnit = \_ _ -> _rhs () | 6 | funUnit = \a _ -> _rhs () |
7 | ------------ tooltips | 7 | ------------ tooltips |
8 | testdata/language-features/basic-values/wildcard01.lc 1:1-1:8 | 8 | testdata/language-features/basic-values/wildcard01.lc 1:1-1:8 |
9 | forall a . a -> () | 9 | forall a . a -> () |
diff --git a/testdata/language-features/pattern/caseWhere.out b/testdata/language-features/pattern/caseWhere.out index 3c090334..0a5e69c4 100644 --- a/testdata/language-features/pattern/caseWhere.out +++ b/testdata/language-features/pattern/caseWhere.out | |||
@@ -5,12 +5,7 @@ main | |||
5 | = _lhs | 5 | = _lhs |
6 | main | 6 | main |
7 | (_rhs | 7 | (_rhs |
8 | ((\(a :: _) -> let b = _lhs c (_rhs a) in case'Bool | 8 | ((\(a :: _) -> let b = a in case'Bool (\(_ :: _) -> _) undefined a b) True)) |
9 | (\(_ :: _) -> _) | ||
10 | undefined | ||
11 | a | ||
12 | b) | ||
13 | True)) | ||
14 | ------------ core code | 9 | ------------ core code |
15 | main :: Bool | 10 | main :: Bool |
16 | main = _rhs True | 11 | main = _rhs True |
diff --git a/testdata/language-features/pattern/unreachable.out b/testdata/language-features/pattern/unreachable.out index 7b7df75d..8eb5d0db 100644 --- a/testdata/language-features/pattern/unreachable.out +++ b/testdata/language-features/pattern/unreachable.out | |||
@@ -3,7 +3,7 @@ main is not found | |||
3 | f = _lhs f \(_ :: _) -> _rhs "hello" | 3 | f = _lhs f \(_ :: _) -> _rhs "hello" |
4 | ------------ core code | 4 | ------------ core code |
5 | f :: forall a . a -> String | 5 | f :: forall a . a -> String |
6 | f = \_ _ -> _rhs "hello" | 6 | f = \a _ -> _rhs "hello" |
7 | ------------ tooltips | 7 | ------------ tooltips |
8 | testdata/language-features/pattern/unreachable.lc 4:1-4:2 | 8 | testdata/language-features/pattern/unreachable.lc 4:1-4:2 |
9 | forall a . a -> String | 9 | forall a . a -> String |
diff --git a/testdata/language-features/pattern/viewPattern.out b/testdata/language-features/pattern/viewPattern.out index f8fdb6d9..654f8467 100644 --- a/testdata/language-features/pattern/viewPattern.out +++ b/testdata/language-features/pattern/viewPattern.out | |||
@@ -9,7 +9,7 @@ main | |||
9 | (_rhs ((\(a :: _) -> case'Bool (\(_ :: _) -> _) undefined True (id a)) True)) | 9 | (_rhs ((\(a :: _) -> case'Bool (\(_ :: _) -> _) undefined True (id a)) True)) |
10 | ------------ core code | 10 | ------------ core code |
11 | id :: forall a . a -> a | 11 | id :: forall a . a -> a |
12 | id = \_ a -> _rhs a | 12 | id = \a b -> _rhs b |
13 | 13 | ||
14 | main :: Bool | 14 | main :: Bool |
15 | main = _rhs True | 15 | main = _rhs True |
diff --git a/testdata/language-features/recursion/mutualConst.lc b/testdata/language-features/recursion/mutualConst.lc index c7f83f18..526a14a7 100644 --- a/testdata/language-features/recursion/mutualConst.lc +++ b/testdata/language-features/recursion/mutualConst.lc | |||
@@ -1,9 +1,14 @@ | |||
1 | {-# LANGUAGE NoImplicitPrelude #-} | ||
2 | import Internals | ||
1 | 3 | ||
2 | xy = (\x y -> ((1 :: Int): y, 1: x)) (fst xy) (snd xy) | 4 | fst (x, y) = x |
5 | snd (x, y) = y | ||
6 | |||
7 | xy = (\x y -> (False: y, True: x)) (fst xy) (snd xy) | ||
3 | 8 | ||
4 | (x, y) = xy | 9 | (x, y) = xy |
5 | 10 | ||
6 | main = case x of | 11 | main = case x of |
7 | 1: 1: 1: _ -> True | 12 | False: True: False: _ -> True |
8 | 13 | ||
9 | 14 | ||
diff --git a/testdata/language-features/recursion/mutualConst.out b/testdata/language-features/recursion/mutualConst.out index 4791ed55..34d37bc7 100644 --- a/testdata/language-features/recursion/mutualConst.out +++ b/testdata/language-features/recursion/mutualConst.out | |||
@@ -1 +1,194 @@ | |||
1 | True \ No newline at end of file | 1 | main :: Bool |
2 | main = True | ||
3 | ------------ desugared source code | ||
4 | fst | ||
5 | = _lhs | ||
6 | fst | ||
7 | \(a :: _) -> hlistConsCase | ||
8 | _ | ||
9 | (\(b :: _) (c :: _) -> hlistConsCase | ||
10 | _ | ||
11 | (\(_ :: _) (d :: _) -> hlistNilCase _ (_rhs b) d) | ||
12 | c) | ||
13 | a | ||
14 | |||
15 | snd | ||
16 | = _lhs | ||
17 | snd | ||
18 | \(a :: _) -> hlistConsCase | ||
19 | _ | ||
20 | (\(_ :: _) (b :: _) -> hlistConsCase | ||
21 | _ | ||
22 | (\(c :: _) (d :: _) -> hlistNilCase _ (_rhs c) d) | ||
23 | b) | ||
24 | a | ||
25 | |||
26 | xy | ||
27 | = primFix | ||
28 | \(a :: _) -> _lhs | ||
29 | xy | ||
30 | (_rhs ((\(b :: _) (c :: _) -> (False : c, True : b)) (fst a) (snd a))) | ||
31 | |||
32 | _y_x = _lhs _y_x (_rhs xy) | ||
33 | |||
34 | y | ||
35 | = _lhs | ||
36 | y | ||
37 | (_rhs | ||
38 | ((\(a :: _) -> hlistConsCase | ||
39 | _ | ||
40 | (\(_ :: _) (b :: _) -> hlistConsCase | ||
41 | _ | ||
42 | (\(c :: _) (d :: _) -> hlistNilCase _ c d) | ||
43 | b) | ||
44 | a) | ||
45 | _y_x)) | ||
46 | |||
47 | x | ||
48 | = _lhs | ||
49 | x | ||
50 | (_rhs | ||
51 | ((\(a :: _) -> hlistConsCase | ||
52 | _ | ||
53 | (\(b :: _) (c :: _) -> hlistConsCase | ||
54 | _ | ||
55 | (\(_ :: _) (d :: _) -> hlistNilCase _ b d) | ||
56 | c) | ||
57 | a) | ||
58 | _y_x)) | ||
59 | |||
60 | main | ||
61 | = _lhs | ||
62 | main | ||
63 | (_rhs | ||
64 | ((\(a :: _) -> case'List | ||
65 | (\(_ :: _) -> _) | ||
66 | undefined | ||
67 | (\(b :: _) (c :: _) -> case'Bool | ||
68 | (\(_ :: _) -> _) | ||
69 | (case'List | ||
70 | (\(_ :: _) -> _) | ||
71 | undefined | ||
72 | (\(d :: _) (e :: _) -> case'Bool | ||
73 | (\(_ :: _) -> _) | ||
74 | undefined | ||
75 | (case'List | ||
76 | (\(_ :: _) -> _) | ||
77 | undefined | ||
78 | (\(f :: _) (_ :: _) -> case'Bool (\(_ :: _) -> _) True undefined f) | ||
79 | e) | ||
80 | d) | ||
81 | c) | ||
82 | undefined | ||
83 | b) | ||
84 | a) | ||
85 | x)) | ||
86 | ------------ core code | ||
87 | _y_x :: ([Bool], [Bool]) | ||
88 | _y_x = _rhs (False : snd xy, True : fst xy) | ||
89 | |||
90 | fst :: forall a b . (a, b) -> a | ||
91 | fst | ||
92 | = \a b c -> hlistConsCase | ||
93 | a | ||
94 | [b] | ||
95 | a | ||
96 | (\d e -> hlistConsCase b [] a (\_ f -> hlistNilCase a (_rhs d) f) e) | ||
97 | c | ||
98 | |||
99 | main :: Bool | ||
100 | main = _rhs True | ||
101 | |||
102 | snd :: forall a b . (a, b) -> b | ||
103 | snd | ||
104 | = \a b c -> hlistConsCase | ||
105 | a | ||
106 | [b] | ||
107 | b | ||
108 | (\_ d -> hlistConsCase b [] b (\e f -> hlistNilCase b (_rhs e) f) d) | ||
109 | c | ||
110 | |||
111 | x :: [Bool] | ||
112 | x = _rhs (False : snd xy) | ||
113 | |||
114 | xy :: ([Bool], [Bool]) | ||
115 | xy = primFix _ \a -> _rhs (False : snd a, True : fst a) | ||
116 | |||
117 | y :: [Bool] | ||
118 | y = _rhs (True : fst xy) | ||
119 | ------------ tooltips | ||
120 | testdata/language-features/recursion/mutualConst.lc 4:1-4:4 | ||
121 | forall a b . (a, b) -> a | ||
122 | testdata/language-features/recursion/mutualConst.lc 4:14-4:15 | ||
123 | _k | _h | _d | ||
124 | testdata/language-features/recursion/mutualConst.lc 5:1-5:4 | ||
125 | forall a b . (a, b) -> b | ||
126 | testdata/language-features/recursion/mutualConst.lc 5:14-5:15 | ||
127 | _f | _c | _c | ||
128 | testdata/language-features/recursion/mutualConst.lc 7:1-7:3 | ||
129 | ([Bool], [Bool]) | ||
130 | testdata/language-features/recursion/mutualConst.lc 7:6-7:44 | ||
131 | [Bool] -> ([Bool], [Bool]) | ||
132 | testdata/language-features/recursion/mutualConst.lc 7:6-7:53 | ||
133 | ([Bool], [Bool]) | ||
134 | testdata/language-features/recursion/mutualConst.lc 7:15-7:34 | ||
135 | ([Bool], [Bool]) | ||
136 | testdata/language-features/recursion/mutualConst.lc 7:16-7:21 | ||
137 | Bool | ||
138 | testdata/language-features/recursion/mutualConst.lc 7:16-7:22 | ||
139 | [Bool] -> [Bool] | ||
140 | testdata/language-features/recursion/mutualConst.lc 7:16-7:24 | ||
141 | [Bool] | ||
142 | testdata/language-features/recursion/mutualConst.lc 7:21-7:22 | ||
143 | forall a . a -> [a] -> [a] | ||
144 | testdata/language-features/recursion/mutualConst.lc 7:23-7:24 | ||
145 | _c | ||
146 | testdata/language-features/recursion/mutualConst.lc 7:26-7:30 | ||
147 | Bool | ||
148 | testdata/language-features/recursion/mutualConst.lc 7:26-7:31 | ||
149 | [Bool] -> [Bool] | ||
150 | testdata/language-features/recursion/mutualConst.lc 7:26-7:33 | ||
151 | [Bool] | (([Bool])) | ||
152 | testdata/language-features/recursion/mutualConst.lc 7:30-7:31 | ||
153 | forall a . a -> [a] -> [a] | ||
154 | testdata/language-features/recursion/mutualConst.lc 7:32-7:33 | ||
155 | _e | ||
156 | testdata/language-features/recursion/mutualConst.lc 7:37-7:40 | ||
157 | forall a b . (a, b) -> a | ||
158 | testdata/language-features/recursion/mutualConst.lc 7:37-7:43 | ||
159 | _b | ||
160 | testdata/language-features/recursion/mutualConst.lc 7:41-7:43 | ||
161 | _d | ||
162 | testdata/language-features/recursion/mutualConst.lc 7:46-7:49 | ||
163 | forall a b . (a, b) -> b | ||
164 | testdata/language-features/recursion/mutualConst.lc 7:46-7:52 | ||
165 | [Bool] | ||
166 | testdata/language-features/recursion/mutualConst.lc 7:50-7:52 | ||
167 | ([Bool], [Bool]) | ||
168 | testdata/language-features/recursion/mutualConst.lc 9:2-9:3 | ||
169 | _k | _h | _d | [Bool] | ||
170 | testdata/language-features/recursion/mutualConst.lc 9:2-9:6 | ||
171 | ([Bool], [Bool]) | ([Bool], [Bool]) | ([Bool], [Bool]) | ||
172 | testdata/language-features/recursion/mutualConst.lc 9:5-9:6 | ||
173 | _f | _c | _c | [Bool] | ||
174 | testdata/language-features/recursion/mutualConst.lc 9:10-9:12 | ||
175 | ([Bool], [Bool]) | ||
176 | testdata/language-features/recursion/mutualConst.lc 11:1-11:5 | ||
177 | Bool | ||
178 | testdata/language-features/recursion/mutualConst.lc 11:8-12:34 | ||
179 | Bool | ||
180 | testdata/language-features/recursion/mutualConst.lc 11:13-11:14 | ||
181 | [Bool] | ||
182 | testdata/language-features/recursion/mutualConst.lc 12:30-12:34 | ||
183 | Bool | Bool | Bool | Bool | Bool | Bool | ||
184 | ------------ warnings | ||
185 | Uncovered pattern(s) at testdata/language-features/recursion/mutualConst.lc:11:13: | ||
186 | main = case x of | ||
187 | ^ | ||
188 | Missing case(s): | ||
189 | [] | ||
190 | [False] | ||
191 | (False : False : _) | ||
192 | [False, True] | ||
193 | (False : True : True : _) | ||
194 | (True : _) \ No newline at end of file | ||
diff --git a/testdata/language-features/recursion/mutualFunc.lc b/testdata/language-features/recursion/mutualFunc.lc new file mode 100644 index 00000000..2f3a524e --- /dev/null +++ b/testdata/language-features/recursion/mutualFunc.lc | |||
@@ -0,0 +1,11 @@ | |||
1 | {-# LANGUAGE NoImplicitPrelude #-} | ||
2 | import Internals | ||
3 | |||
4 | f True = g False | ||
5 | f False = g True | ||
6 | |||
7 | g True = True | ||
8 | g x = f x | ||
9 | |||
10 | main = f True | ||
11 | |||
diff --git a/testdata/language-features/recursion/mutualFunc.out b/testdata/language-features/recursion/mutualFunc.out new file mode 100644 index 00000000..6dd3f158 --- /dev/null +++ b/testdata/language-features/recursion/mutualFunc.out | |||
@@ -0,0 +1,107 @@ | |||
1 | main :: Bool | ||
2 | main = True | ||
3 | ------------ desugared source code | ||
4 | _g_f | ||
5 | = primFix | ||
6 | \(a :: _) -> let | ||
7 | b = a; | ||
8 | c | ||
9 | = (\(e :: _) -> hlistConsCase | ||
10 | _ | ||
11 | (\(_ :: _) (f :: _) -> hlistConsCase | ||
12 | _ | ||
13 | (\(g :: _) (h :: _) -> hlistNilCase _ g h) | ||
14 | f) | ||
15 | e) | ||
16 | b; | ||
17 | d | ||
18 | = (\(i :: _) -> hlistConsCase | ||
19 | _ | ||
20 | (\(j :: _) (k :: _) -> hlistConsCase | ||
21 | _ | ||
22 | (\(_ :: _) (l :: _) -> hlistNilCase _ j l) | ||
23 | k) | ||
24 | i) | ||
25 | b | ||
26 | in (_lhs g \(m :: _) -> case'Bool (\(_ :: _) -> _) (_rhs (c m)) (_rhs True) m | ||
27 | , _lhs | ||
28 | f | ||
29 | \(n :: _) -> case'Bool (\(_ :: _) -> _) (_rhs (d True)) (_rhs (d False)) n) | ||
30 | |||
31 | _f_g = _g_f | ||
32 | |||
33 | f | ||
34 | = (\(a :: _) -> hlistConsCase | ||
35 | _ | ||
36 | (\(_ :: _) (b :: _) -> hlistConsCase | ||
37 | _ | ||
38 | (\(c :: _) (d :: _) -> hlistNilCase _ c d) | ||
39 | b) | ||
40 | a) | ||
41 | _f_g | ||
42 | |||
43 | g | ||
44 | = (\(a :: _) -> hlistConsCase | ||
45 | _ | ||
46 | (\(b :: _) (c :: _) -> hlistConsCase | ||
47 | _ | ||
48 | (\(_ :: _) (d :: _) -> hlistNilCase _ b d) | ||
49 | c) | ||
50 | a) | ||
51 | _f_g | ||
52 | |||
53 | main = _lhs main (_rhs (f True)) | ||
54 | ------------ core code | ||
55 | _f_g :: (Bool -> Bool, Bool -> Bool) | ||
56 | _f_g = primFix _ \a -> <<1st constructor of 'HList>> | ||
57 | |||
58 | _g_f :: (Bool -> Bool, Bool -> Bool) | ||
59 | _g_f = primFix _ \a -> <<1st constructor of 'HList>> | ||
60 | |||
61 | f :: Bool -> Bool | ||
62 | f = \a -> case'Bool (\_ -> 'Bool) (_rhs True) (_rhs True) a | ||
63 | |||
64 | g :: Bool -> Bool | ||
65 | g = \a -> case'Bool (\_ -> 'Bool) (_rhs (f a)) (_rhs True) a | ||
66 | |||
67 | main :: Bool | ||
68 | main = _rhs True | ||
69 | ------------ tooltips | ||
70 | testdata/language-features/recursion/mutualFunc.lc 4:1-4:2 | ||
71 | _f | _c | _c | _f | _c | _c | Bool -> Bool | ||
72 | testdata/language-features/recursion/mutualFunc.lc 4:1-7:2 | ||
73 | _b | _e | (_e, _d) | (Bool -> Bool, Bool -> Bool) | (Bool -> Bool | ||
74 | , Bool -> Bool) | (Bool -> Bool, Bool -> Bool) | (Bool -> Bool | ||
75 | , Bool -> Bool) | (Bool -> Bool, Bool -> Bool) | ||
76 | testdata/language-features/recursion/mutualFunc.lc 4:10-4:11 | ||
77 | Bool -> _a | ||
78 | testdata/language-features/recursion/mutualFunc.lc 4:10-4:17 | ||
79 | _a | ||
80 | testdata/language-features/recursion/mutualFunc.lc 4:10-5:17 | ||
81 | Bool -> _a | ((Bool -> _a)) | ||
82 | testdata/language-features/recursion/mutualFunc.lc 4:10-8:10 | ||
83 | (Bool -> Bool, Bool -> _a) | ||
84 | testdata/language-features/recursion/mutualFunc.lc 4:12-4:17 | ||
85 | Bool | ||
86 | testdata/language-features/recursion/mutualFunc.lc 5:11-5:12 | ||
87 | _i | ||
88 | testdata/language-features/recursion/mutualFunc.lc 5:13-5:17 | ||
89 | Bool | ||
90 | testdata/language-features/recursion/mutualFunc.lc 7:1-7:2 | ||
91 | _k | _h | _d | _k | _h | _d | Bool -> Bool | ||
92 | testdata/language-features/recursion/mutualFunc.lc 7:10-7:14 | ||
93 | Bool | ||
94 | testdata/language-features/recursion/mutualFunc.lc 7:10-8:10 | ||
95 | Bool -> Bool | ||
96 | testdata/language-features/recursion/mutualFunc.lc 8:7-8:8 | ||
97 | _h | ||
98 | testdata/language-features/recursion/mutualFunc.lc 8:9-8:10 | ||
99 | _f | ||
100 | testdata/language-features/recursion/mutualFunc.lc 10:1-10:5 | ||
101 | Bool | ||
102 | testdata/language-features/recursion/mutualFunc.lc 10:8-10:9 | ||
103 | Bool -> Bool | ||
104 | testdata/language-features/recursion/mutualFunc.lc 10:8-10:14 | ||
105 | Bool | ||
106 | testdata/language-features/recursion/mutualFunc.lc 10:10-10:14 | ||
107 | Bool \ No newline at end of file | ||
diff --git a/testdata/language-features/recursion/mutualRec.lc b/testdata/language-features/recursion/mutualRec.lc index c9ae6135..9a9422de 100644 --- a/testdata/language-features/recursion/mutualRec.lc +++ b/testdata/language-features/recursion/mutualRec.lc | |||
@@ -1,8 +1,10 @@ | |||
1 | {-# LANGUAGE NoImplicitPrelude #-} | ||
2 | import Internals | ||
1 | 3 | ||
2 | x = 2: y | 4 | x = False: y |
3 | y = 1: x | 5 | y = True: x |
4 | 6 | ||
5 | main = case (x :: [Int]) of | 7 | main = case x of |
6 | 2: 1: 2: _ -> True | 8 | False: True: False: _ -> True |
7 | 9 | ||
8 | 10 | ||
diff --git a/testdata/language-features/recursion/mutualRec.out b/testdata/language-features/recursion/mutualRec.out index 4791ed55..885bd1ba 100644 --- a/testdata/language-features/recursion/mutualRec.out +++ b/testdata/language-features/recursion/mutualRec.out | |||
@@ -1 +1,139 @@ | |||
1 | True \ No newline at end of file | 1 | main :: Bool |
2 | main = True | ||
3 | ------------ desugared source code | ||
4 | _y_x | ||
5 | = primFix | ||
6 | \(a :: _) -> let | ||
7 | b = a; | ||
8 | c | ||
9 | = (\(e :: _) -> hlistConsCase | ||
10 | _ | ||
11 | (\(_ :: _) (f :: _) -> hlistConsCase | ||
12 | _ | ||
13 | (\(g :: _) (h :: _) -> hlistNilCase _ g h) | ||
14 | f) | ||
15 | e) | ||
16 | b; | ||
17 | d | ||
18 | = (\(i :: _) -> hlistConsCase | ||
19 | _ | ||
20 | (\(j :: _) (k :: _) -> hlistConsCase | ||
21 | _ | ||
22 | (\(_ :: _) (l :: _) -> hlistNilCase _ j l) | ||
23 | k) | ||
24 | i) | ||
25 | b | ||
26 | in (_lhs y (_rhs (True : c)), _lhs x (_rhs (False : d))) | ||
27 | |||
28 | _x_y = _y_x | ||
29 | |||
30 | x | ||
31 | = (\(a :: _) -> hlistConsCase | ||
32 | _ | ||
33 | (\(_ :: _) (b :: _) -> hlistConsCase | ||
34 | _ | ||
35 | (\(c :: _) (d :: _) -> hlistNilCase _ c d) | ||
36 | b) | ||
37 | a) | ||
38 | _x_y | ||
39 | |||
40 | y | ||
41 | = (\(a :: _) -> hlistConsCase | ||
42 | _ | ||
43 | (\(b :: _) (c :: _) -> hlistConsCase | ||
44 | _ | ||
45 | (\(_ :: _) (d :: _) -> hlistNilCase _ b d) | ||
46 | c) | ||
47 | a) | ||
48 | _x_y | ||
49 | |||
50 | main | ||
51 | = _lhs | ||
52 | main | ||
53 | (_rhs | ||
54 | ((\(a :: _) -> case'List | ||
55 | (\(_ :: _) -> _) | ||
56 | undefined | ||
57 | (\(b :: _) (c :: _) -> case'Bool | ||
58 | (\(_ :: _) -> _) | ||
59 | (case'List | ||
60 | (\(_ :: _) -> _) | ||
61 | undefined | ||
62 | (\(d :: _) (e :: _) -> case'Bool | ||
63 | (\(_ :: _) -> _) | ||
64 | undefined | ||
65 | (case'List | ||
66 | (\(_ :: _) -> _) | ||
67 | undefined | ||
68 | (\(f :: _) (_ :: _) -> case'Bool (\(_ :: _) -> _) True undefined f) | ||
69 | e) | ||
70 | d) | ||
71 | c) | ||
72 | undefined | ||
73 | b) | ||
74 | a) | ||
75 | x)) | ||
76 | ------------ core code | ||
77 | _x_y :: ([Bool], [Bool]) | ||
78 | _x_y = primFix _ \a -> <<1st constructor of 'HList>> | ||
79 | |||
80 | _y_x :: ([Bool], [Bool]) | ||
81 | _y_x = primFix _ \a -> <<1st constructor of 'HList>> | ||
82 | |||
83 | main :: Bool | ||
84 | main = _rhs True | ||
85 | |||
86 | x :: [Bool] | ||
87 | x = _rhs (False : y) | ||
88 | |||
89 | y :: [Bool] | ||
90 | y = _rhs (True : x) | ||
91 | ------------ tooltips | ||
92 | testdata/language-features/recursion/mutualRec.lc 4:1-4:2 | ||
93 | _f | _c | _c | _f | _c | _c | [Bool] | ||
94 | testdata/language-features/recursion/mutualRec.lc 4:1-5:2 | ||
95 | _b | _e | (_e, _d) | ([Bool], [Bool]) | ([Bool], [Bool]) | ([Bool] | ||
96 | , [Bool]) | ([Bool], [Bool]) | ([Bool], [Bool]) | ||
97 | testdata/language-features/recursion/mutualRec.lc 4:5-4:10 | ||
98 | Bool | ||
99 | testdata/language-features/recursion/mutualRec.lc 4:5-4:11 | ||
100 | [Bool] -> [Bool] | ||
101 | testdata/language-features/recursion/mutualRec.lc 4:5-4:13 | ||
102 | [Bool] | (([Bool])) | ||
103 | testdata/language-features/recursion/mutualRec.lc 4:5-5:12 | ||
104 | ([Bool], [Bool]) | ||
105 | testdata/language-features/recursion/mutualRec.lc 4:10-4:11 | ||
106 | forall a . a -> [a] -> [a] | ||
107 | testdata/language-features/recursion/mutualRec.lc 4:12-4:13 | ||
108 | _e | ||
109 | testdata/language-features/recursion/mutualRec.lc 5:1-5:2 | ||
110 | _k | _h | _d | _k | _h | _d | [Bool] | ||
111 | testdata/language-features/recursion/mutualRec.lc 5:5-5:9 | ||
112 | Bool | ||
113 | testdata/language-features/recursion/mutualRec.lc 5:5-5:10 | ||
114 | [Bool] -> [Bool] | ||
115 | testdata/language-features/recursion/mutualRec.lc 5:5-5:12 | ||
116 | [Bool] | ||
117 | testdata/language-features/recursion/mutualRec.lc 5:9-5:10 | ||
118 | forall a . a -> [a] -> [a] | ||
119 | testdata/language-features/recursion/mutualRec.lc 5:11-5:12 | ||
120 | _d | ||
121 | testdata/language-features/recursion/mutualRec.lc 7:1-7:5 | ||
122 | Bool | ||
123 | testdata/language-features/recursion/mutualRec.lc 7:8-8:34 | ||
124 | Bool | ||
125 | testdata/language-features/recursion/mutualRec.lc 7:13-7:14 | ||
126 | [Bool] | ||
127 | testdata/language-features/recursion/mutualRec.lc 8:30-8:34 | ||
128 | Bool | Bool | Bool | Bool | Bool | Bool | ||
129 | ------------ warnings | ||
130 | Uncovered pattern(s) at testdata/language-features/recursion/mutualRec.lc:7:13: | ||
131 | main = case x of | ||
132 | ^ | ||
133 | Missing case(s): | ||
134 | [] | ||
135 | [False] | ||
136 | (False : False : _) | ||
137 | [False, True] | ||
138 | (False : True : True : _) | ||
139 | (True : _) \ No newline at end of file | ||
diff --git a/testdata/language-features/recursion/simplerec01.out b/testdata/language-features/recursion/simplerec01.out index 736caa77..823d544e 100644 --- a/testdata/language-features/recursion/simplerec01.out +++ b/testdata/language-features/recursion/simplerec01.out | |||
@@ -1,18 +1,19 @@ | |||
1 | main is not found | 1 | main is not found |
2 | ------------ desugared source code | 2 | ------------ desugared source code |
3 | fun | 3 | fun |
4 | = _lhs | 4 | = primFix |
5 | fun | 5 | \(a :: _) -> _lhs |
6 | \(a :: _) -> case'Bool | 6 | fun |
7 | (\(_ :: _) -> _) | 7 | \(b :: _) -> case'Bool |
8 | (_rhs (fun (fromInt 0))) | 8 | (\(_ :: _) -> _) |
9 | (_rhs 'a') | 9 | (_rhs (a (fromInt 0))) |
10 | (fromInt 0 == a) | 10 | (_rhs 'a') |
11 | (fromInt 0 == b) | ||
11 | ------------ core code | 12 | ------------ core code |
12 | fun :: forall a . (Num a, Eq a, Num a) => a -> Char | 13 | fun :: forall a . (Num a, Eq a, Num a) => a -> Char |
13 | fun | 14 | fun |
14 | = \a b c d -> primFix | 15 | = \a b c d -> primFix |
15 | (a -> 'Char) | 16 | _ |
16 | \e f -> case'Bool | 17 | \e f -> case'Bool |
17 | (\_ -> 'Char) | 18 | (\_ -> 'Char) |
18 | (_rhs (e (fromInt a b 0))) | 19 | (_rhs (e (fromInt a b 0))) |
diff --git a/testdata/language-features/section/section01.out b/testdata/language-features/section/section01.out index a06769e3..0252cce5 100644 --- a/testdata/language-features/section/section01.out +++ b/testdata/language-features/section/section01.out | |||
@@ -7,13 +7,13 @@ value1 = _lhs value1 \(a :: _) -> _rhs \(b :: _) -> a !@! b | |||
7 | value2 = _lhs value2 \(a :: _) -> _rhs \(b :: _) -> b !@! a | 7 | value2 = _lhs value2 \(a :: _) -> _rhs \(b :: _) -> b !@! a |
8 | ------------ core code | 8 | ------------ core code |
9 | !@! :: forall a b . a -> b -> () | 9 | !@! :: forall a b . a -> b -> () |
10 | !@! = \_ _ _ _ -> _rhs () | 10 | !@! = \a b _ _ -> _rhs () |
11 | 11 | ||
12 | value1 :: forall a b . a -> b -> () | 12 | value1 :: forall a b . a -> b -> () |
13 | value1 = \a b c -> _rhs \d -> () | 13 | value1 = \a b c -> _rhs \d -> c !@! d |
14 | 14 | ||
15 | value2 :: forall a b . a -> b -> () | 15 | value2 :: forall a b . a -> b -> () |
16 | value2 = \a b c -> _rhs \d -> () | 16 | value2 = \a b c -> _rhs \d -> d !@! c |
17 | ------------ tooltips | 17 | ------------ tooltips |
18 | testdata/language-features/section/section01.lc 1:3-1:6 | 18 | testdata/language-features/section/section01.lc 1:3-1:6 |
19 | forall a b . a -> b -> () | 19 | forall a b . a -> b -> () |