summaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-05-10 23:19:47 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-05-10 23:20:23 +0200
commit95e006bf5afa8d3473e3fe4401f4c9316186a428 (patch)
tree7635fda3305339173988296051acc5a77dbb746f /testdata
parent6ecef8f577432ffcaee07f09b2a73d4ea5eb5de2 (diff)
include info in more .out files; fix parsing of as-patterns
Diffstat (limited to 'testdata')
-rw-r--r--testdata/concatmap01.out67
-rw-r--r--testdata/dotdot01.out65
-rw-r--r--testdata/dotdot02.out39
-rw-r--r--testdata/fromto.out69
-rw-r--r--testdata/ifThenElse01.out28
-rw-r--r--testdata/instantiate2.out54
-rw-r--r--testdata/it.out102
-rw-r--r--testdata/language-features/adt/adt01.out188
-rw-r--r--testdata/language-features/adt/adt02.out290
-rw-r--r--testdata/language-features/adt/adt05.out145
-rw-r--r--testdata/language-features/adt/gadt01.out377
-rw-r--r--testdata/language-features/as-pattern/as-pattern01.lc2
-rw-r--r--testdata/language-features/as-pattern/as-pattern01.out101
-rw-r--r--testdata/language-features/as-pattern/as-pattern02.out145
-rw-r--r--testdata/language-features/basic-list/dotdot01.out17
-rw-r--r--testdata/language-features/pattern/caseWhere.out32
-rw-r--r--testdata/language-features/pattern/patternGuard.out50
-rw-r--r--testdata/language-features/pattern/viewPattern.out39
-rw-r--r--testdata/listcompr01.out94
-rw-r--r--testdata/listcompr02.out206
-rw-r--r--testdata/listcompr03.out216
-rw-r--r--testdata/listcompr04.out91
-rw-r--r--testdata/listcompr05.out129
-rw-r--r--testdata/localfun.out62
-rw-r--r--testdata/record02.out386
-rw-r--r--testdata/reduce06.out34
-rw-r--r--testdata/swizzling.out90
-rw-r--r--testdata/typeclass0.out28
-rw-r--r--testdata/typesyn.out69
29 files changed, 3180 insertions, 35 deletions
diff --git a/testdata/concatmap01.out b/testdata/concatmap01.out
index 4791ed55..907c0397 100644
--- a/testdata/concatmap01.out
+++ b/testdata/concatmap01.out
@@ -1 +1,66 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4a :: [Float]
5a = _lhs a (_rhs (concatMap (\(a :: _) -> [a]) [1.0]))
6
7main :: Bool
8main
9 = _lhs
10 main
11 (_rhs
12 ((\(a :: _) -> case'List
13 (\(_ :: _) -> _)
14 undefined
15 (\(b :: _) (c :: _) -> case'Bool
16 (\(_ :: _) -> _)
17 undefined
18 (case'List (\(_ :: _) -> _) True (\(_ :: _) (_ :: _) -> undefined) c)
19 (1.0 == b))
20 a)
21 a))
22------------ core code
23a :: [Float]
24a = _rhs [1.0]
25
26main :: Bool
27main = _rhs True
28------------ tooltips
29testdata/concatmap01.lc 1:6-1:13
30 Type
31testdata/concatmap01.lc 1:7-1:12
32 Type
33testdata/concatmap01.lc 2:1-2:2
34 [Float]
35testdata/concatmap01.lc 2:5-2:14
36 forall a b . (a -> [b]) -> [a] -> [b]
37testdata/concatmap01.lc 2:5-2:26
38 [_a] -> [_a]
39testdata/concatmap01.lc 2:5-2:32
40 [Float]
41testdata/concatmap01.lc 2:22-2:25
42 [_b]
43testdata/concatmap01.lc 2:23-2:24
44 _d
45testdata/concatmap01.lc 2:27-2:32
46 [Float]
47testdata/concatmap01.lc 2:28-2:31
48 Float
49testdata/concatmap01.lc 4:9-4:13
50 Type
51testdata/concatmap01.lc 5:1-5:5
52 Bool
53testdata/concatmap01.lc 5:8-6:23
54 Bool
55testdata/concatmap01.lc 5:13-5:14
56 [Float]
57testdata/concatmap01.lc 6:19-6:23
58 Bool | Bool | Bool
59------------ warnings
60Uncovered pattern(s) at testdata/concatmap01.lc:5:13:
61main = case a of
62 ^
63Missing case(s):
64 []
65 (_ : _) | False <- 1.0 == _b
66 (_ : _ : _) | True <- 1.0 == _b \ No newline at end of file
diff --git a/testdata/dotdot01.out b/testdata/dotdot01.out
index 4791ed55..0ce6f980 100644
--- a/testdata/dotdot01.out
+++ b/testdata/dotdot01.out
@@ -1 +1,64 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4main :: Bool
5main
6 = _lhs
7 main
8 (_rhs
9 ((\(a :: _) -> case'List
10 (\(_ :: _) -> _)
11 undefined
12 (\(b :: _) (c :: _) -> case'Bool
13 (\(_ :: _) -> _)
14 undefined
15 (case'List
16 (\(_ :: _) -> _)
17 undefined
18 (\(d :: _) (e :: _) -> case'Bool
19 (\(_ :: _) -> _)
20 undefined
21 (case'List
22 (\(_ :: _) -> _)
23 undefined
24 (\(f :: _) (g :: _) -> case'Bool
25 (\(_ :: _) -> _)
26 undefined
27 (case'List (\(_ :: _) -> _) True (\(_ :: _) (_ :: _) -> undefined) g)
28 (3.0 == f))
29 e)
30 (2.0 == d))
31 c)
32 (1.0 == b))
33 a)
34 (fromTo 1.0 3.0)))
35------------ core code
36main :: Bool
37main = _rhs True
38------------ tooltips
39testdata/dotdot01.lc 1:9-1:13
40 Type
41testdata/dotdot01.lc 2:1-2:5
42 Bool
43testdata/dotdot01.lc 2:8-3:33
44 Bool
45testdata/dotdot01.lc 2:13-2:23
46 [Float]
47testdata/dotdot01.lc 2:14-2:17
48 Float
49testdata/dotdot01.lc 2:19-2:22
50 Float
51testdata/dotdot01.lc 3:29-3:33
52 Bool | Bool | Bool | Bool | Bool | Bool | Bool
53------------ warnings
54Uncovered pattern(s) at testdata/dotdot01.lc:2:13:
55main = case [1.0..3.0] of
56 ^^^^^^^^^^
57Missing case(s):
58 []
59 (_ : _) | False <- 1.0 == _b
60 [_] | True <- 1.0 == _b
61 (_ : _ : _) | True <- 1.0 == _b, False <- 2.0 == _b
62 [_, _] | True <- 1.0 == _b, True <- 2.0 == _b
63 (_ : _ : _ : _) | True <- 1.0 == _b, True <- 2.0 == _b, False <- 3.0 == _b
64 (_ : _ : _ : _ : _) | True <- 1.0 == _b, True <- 2.0 == _b, True <- 3.0 == _b \ No newline at end of file
diff --git a/testdata/dotdot02.out b/testdata/dotdot02.out
index 4791ed55..74a7d6cc 100644
--- a/testdata/dotdot02.out
+++ b/testdata/dotdot02.out
@@ -1 +1,38 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4main :: Bool
5main
6 = _lhs
7 main
8 (_rhs
9 ((\(a :: _) -> case'List
10 (\(_ :: _) -> _)
11 True
12 (\(_ :: _) (_ :: _) -> undefined)
13 a)
14 (fromTo 3.0 1.0)))
15------------ core code
16main :: Bool
17main = _rhs True
18------------ tooltips
19testdata/dotdot02.lc 1:9-1:13
20 Type
21testdata/dotdot02.lc 2:1-2:5
22 Bool
23testdata/dotdot02.lc 2:8-3:20
24 Bool
25testdata/dotdot02.lc 2:13-2:23
26 [Float]
27testdata/dotdot02.lc 2:14-2:17
28 Float
29testdata/dotdot02.lc 2:19-2:22
30 Float
31testdata/dotdot02.lc 3:16-3:20
32 Bool
33------------ warnings
34Uncovered pattern(s) at testdata/dotdot02.lc:2:13:
35main = case [3.0..1.0] of
36 ^^^^^^^^^^
37Missing case(s):
38 (_ : _) \ No newline at end of file
diff --git a/testdata/fromto.out b/testdata/fromto.out
index 4791ed55..eee2d5b9 100644
--- a/testdata/fromto.out
+++ b/testdata/fromto.out
@@ -1 +1,68 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4main :: Bool
5main
6 = _lhs
7 main
8 (_rhs
9 ((\(a :: _) -> case'List
10 (\(_ :: _) -> _)
11 undefined
12 (\(b :: _) (c :: _) -> case'Bool
13 (\(_ :: _) -> _)
14 undefined
15 (case'List
16 (\(_ :: _) -> _)
17 undefined
18 (\(d :: _) (e :: _) -> case'Bool
19 (\(_ :: _) -> _)
20 undefined
21 (case'List
22 (\(_ :: _) -> _)
23 undefined
24 (\(f :: _) (g :: _) -> case'Bool
25 (\(_ :: _) -> _)
26 undefined
27 (case'List (\(_ :: _) -> _) True (\(_ :: _) (_ :: _) -> undefined) g)
28 (3.0 == f))
29 e)
30 (2.0 == d))
31 c)
32 (1.0 == b))
33 a)
34 (fromTo 1.0 3.0)))
35------------ core code
36main :: Bool
37main = _rhs True
38------------ tooltips
39testdata/fromto.lc 1:9-1:13
40 Type
41testdata/fromto.lc 2:1-2:5
42 Bool
43testdata/fromto.lc 2:8-3:33
44 Bool
45testdata/fromto.lc 2:14-2:20
46 Float -> Float -> [Float]
47testdata/fromto.lc 2:14-2:24
48 Float -> [Float]
49testdata/fromto.lc 2:14-2:28
50 [Float]
51testdata/fromto.lc 2:21-2:24
52 Float
53testdata/fromto.lc 2:25-2:28
54 Float
55testdata/fromto.lc 3:29-3:33
56 Bool | Bool | Bool | Bool | Bool | Bool | Bool
57------------ warnings
58Uncovered pattern(s) at testdata/fromto.lc:2:13:
59main = case (fromTo 1.0 3.0) of
60 ^^^^^^^^^^^^^^^^
61Missing case(s):
62 []
63 (_ : _) | False <- 1.0 == _b
64 [_] | True <- 1.0 == _b
65 (_ : _ : _) | True <- 1.0 == _b, False <- 2.0 == _b
66 [_, _] | True <- 1.0 == _b, True <- 2.0 == _b
67 (_ : _ : _ : _) | True <- 1.0 == _b, True <- 2.0 == _b, False <- 3.0 == _b
68 (_ : _ : _ : _ : _) | True <- 1.0 == _b, True <- 2.0 == _b, True <- 3.0 == _b \ No newline at end of file
diff --git a/testdata/ifThenElse01.out b/testdata/ifThenElse01.out
index 4791ed55..c9190f84 100644
--- a/testdata/ifThenElse01.out
+++ b/testdata/ifThenElse01.out
@@ -1 +1,27 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4main :: Bool
5main = _lhs main (_rhs ((\(a :: _) -> primIfThenElse a a a) True))
6------------ core code
7main :: Bool
8main = _rhs True
9------------ tooltips
10testdata/ifThenElse01.lc 1:9-1:13
11 Type
12testdata/ifThenElse01.lc 2:1-2:5
13 Bool
14testdata/ifThenElse01.lc 2:8-2:39
15 Bool
16testdata/ifThenElse01.lc 2:15-2:33
17 Bool
18testdata/ifThenElse01.lc 2:18-2:19
19 _c
20testdata/ifThenElse01.lc 2:18-2:26
21 Bool -> Bool
22testdata/ifThenElse01.lc 2:25-2:26
23 Bool
24testdata/ifThenElse01.lc 2:32-2:33
25 Bool
26testdata/ifThenElse01.lc 2:35-2:39
27 Bool \ No newline at end of file
diff --git a/testdata/instantiate2.out b/testdata/instantiate2.out
index 94306cec..bd3f4135 100644
--- a/testdata/instantiate2.out
+++ b/testdata/instantiate2.out
@@ -1 +1,53 @@
1(PrimAdd ('VecS 'Float 2) TT (V2 1.0 2.0) (V2 2.3 3.4), 3.0) \ No newline at end of file 1main :: (VecS Float 2, Float)
2main = (PrimAdd ('VecS 'Float 2) TT (V2 1.0 2.0) (V2 2.3 3.4), 3.0)
3------------ desugared source code
4main
5 = _lhs
6 main
7 (_rhs let a = _lhs f (_rhs (+)) in (a (V2 1.0 2.0) (V2 2.3 3.4), a 1.0 2.0))
8------------ core code
9main :: (VecS Float 2, Float)
10main = _rhs (PrimAdd ('VecS 'Float 2) TT (V2 1.0 2.0) (V2 2.3 3.4), 3.0)
11------------ tooltips
12testdata/instantiate2.lc 1:1-1:5
13 (VecS Float 2, Float)
14testdata/instantiate2.lc 1:16-1:19
15 forall a . Num (MatVecScalarElem a) => a -> a -> a
16testdata/instantiate2.lc 1:23-1:63
17 (VecS Float 2, Float)
18testdata/instantiate2.lc 1:24-1:25
19 forall a . Num (MatVecScalarElem a) => a -> a -> a
20testdata/instantiate2.lc 1:24-1:38
21 VecS Float 2 -> VecS Float 2
22testdata/instantiate2.lc 1:24-1:51
23 VecS Float 2
24testdata/instantiate2.lc 1:27-1:29
25 forall a . a -> a -> VecS a 2
26testdata/instantiate2.lc 1:27-1:33
27 Float -> VecS Float 2
28testdata/instantiate2.lc 1:27-1:37
29 VecS Float 2
30testdata/instantiate2.lc 1:30-1:33
31 Float
32testdata/instantiate2.lc 1:34-1:37
33 Float
34testdata/instantiate2.lc 1:40-1:42
35 forall a . a -> a -> VecS a 2
36testdata/instantiate2.lc 1:40-1:46
37 Float -> VecS Float 2
38testdata/instantiate2.lc 1:40-1:50
39 VecS Float 2
40testdata/instantiate2.lc 1:43-1:46
41 Float
42testdata/instantiate2.lc 1:47-1:50
43 Float
44testdata/instantiate2.lc 1:53-1:54
45 forall a . Num (MatVecScalarElem a) => a -> a -> a
46testdata/instantiate2.lc 1:53-1:58
47 Float -> Float
48testdata/instantiate2.lc 1:53-1:62
49 Float | ((Float))
50testdata/instantiate2.lc 1:55-1:58
51 Float
52testdata/instantiate2.lc 1:59-1:62
53 Float \ No newline at end of file
diff --git a/testdata/it.out b/testdata/it.out
index 4791ed55..0c3dce37 100644
--- a/testdata/it.out
+++ b/testdata/it.out
@@ -1 +1,101 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4from = _lhs from (_rhs \(a :: _) -> a : from (primAddInt (fromInt 1) a))
5
6main
7 = _lhs
8 main
9 (_rhs
10 ((\(a :: _) -> case'List
11 (\(_ :: _) -> _)
12 undefined
13 (\(_ :: _) (b :: _) -> case'List
14 (\(_ :: _) -> _)
15 undefined
16 (\(_ :: _) (c :: _) -> case'List
17 (\(_ :: _) -> _)
18 undefined
19 (\(_ :: _) (d :: _) -> case'List
20 (\(_ :: _) -> _)
21 undefined
22 (\(e :: _) (_ :: _) -> (\(f :: _) -> case'Ordering
23 (\(_ :: _) -> _)
24 undefined
25 True
26 undefined
27 f)
28 (primCompareInt e (fromInt 3)))
29 d)
30 c)
31 b)
32 a)
33 (from (fromInt 0))))
34------------ core code
35from :: Int -> [Int]
36from = primFix ('Int -> ['Int]) \a -> _rhs \b -> b : a (primAddInt 1 b)
37
38main :: Bool
39main = _rhs True
40------------ tooltips
41testdata/it.lc 4:1-4:5
42 Int -> [Int]
43testdata/it.lc 4:14-4:15
44 _c
45testdata/it.lc 4:14-4:16
46 [_b] -> [_b]
47testdata/it.lc 4:14-4:38
48 [Int]
49testdata/it.lc 4:15-4:16
50 forall a . a -> [a] -> [a]
51testdata/it.lc 4:17-4:21
52 _d
53testdata/it.lc 4:23-4:33
54 Int -> Int -> Int
55testdata/it.lc 4:23-4:35
56 Int -> Int
57testdata/it.lc 4:23-4:37
58 Int
59testdata/it.lc 4:34-4:35
60 _b
61testdata/it.lc 4:36-4:37
62 _e
63testdata/it.lc 6:1-6:5
64 Bool
65testdata/it.lc 6:8-7:57
66 Bool
67testdata/it.lc 6:13-6:17
68 Int -> [Int]
69testdata/it.lc 6:13-6:19
70 [Int]
71testdata/it.lc 6:18-6:19
72 _b
73testdata/it.lc 7:20-7:57
74 Bool | Bool | Bool | Bool
75testdata/it.lc 7:25-7:39
76 Int -> Int -> Ordering
77testdata/it.lc 7:25-7:41
78 Int -> Ordering
79testdata/it.lc 7:25-7:43
80 Ordering
81testdata/it.lc 7:40-7:41
82 _c
83testdata/it.lc 7:42-7:43
84 _b
85testdata/it.lc 7:53-7:57
86 Bool
87------------ warnings
88Uncovered pattern(s) at testdata/it.lc:7:25:
89 (_:_:_:i:_) -> case primCompareInt i 3 of EQ -> True
90 ^^^^^^^^^^^^^^^^^^
91Missing case(s):
92 LT
93 GT
94Uncovered pattern(s) at testdata/it.lc:6:13:
95main = case from 0 of
96 ^^^^^^
97Missing case(s):
98 []
99 [_]
100 [_, _]
101 [_, _, _] \ No newline at end of file
diff --git a/testdata/language-features/adt/adt01.out b/testdata/language-features/adt/adt01.out
index 4791ed55..bd69397e 100644
--- a/testdata/language-features/adt/adt01.out
+++ b/testdata/language-features/adt/adt01.out
@@ -1 +1,187 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4data Zero :: Type where
5
6
7data One1 (_ :: Type) :: Type where
8 One1 :: forall a . a -> One1 a
9
10data OneInt :: Type where
11 OneI :: Int -> OneInt
12
13data OneBool :: Type where
14 OneBool :: Bool -> OneBool
15
16data Two (_ :: Type) (_ :: Type) :: Type where
17 TwoA :: forall a b . a -> Two a b
18 TwoB :: forall c d . d -> Two c d
19
20value1 = _lhs value1 (_rhs (OneBool True))
21
22f = _lhs f \(a :: _) -> case'OneBool (\(_ :: _) -> _) (\(b :: _) -> _rhs b) a
23
24main = _lhs main (_rhs (f value1))
25------------ core code
26'One1 :: Type -> Type
27'One1 = <<type constructor with 0 indices; constructors: One1>>
28
29'OneBool :: Type
30'OneBool = <<type constructor with 0 indices; constructors: OneBool>>
31
32'OneInt :: Type
33'OneInt = <<type constructor with 0 indices; constructors: OneI>>
34
35'Two :: Type -> Type -> Type
36'Two = <<type constructor with 0 indices; constructors: TwoA, TwoB>>
37
38'Zero :: Type
39'Zero = <<type constructor with 0 indices; constructors: >>
40
41One1 :: forall a . a -> One1 a
42One1 = <<0th constructor of 'One1>>
43
44OneBool :: Bool -> OneBool
45OneBool = <<0th constructor of 'OneBool>>
46
47OneI :: Int -> OneInt
48OneI = <<0th constructor of 'OneInt>>
49
50TwoA :: forall a b . a -> Two a b
51TwoA = <<0th constructor of 'Two>>
52
53TwoB :: forall a b . b -> Two a b
54TwoB = <<1st constructor of 'Two>>
55
56case'One1
57 :: forall a
58 . forall (b :: One1 a -> Type)
59 -> (forall (c :: a) -> b ('One1 c)) -> forall (d :: One1 a) -> b d
60case'One1 = \_ a b c -> <<case function of a type with 1 parameters>>
61
62case'OneBool
63 :: forall (a :: OneBool -> Type)
64 -> (forall (b :: Bool) -> a ('OneBool b)) -> forall (c :: OneBool) -> a c
65case'OneBool = \a b c -> <<case function of a type with 0 parameters>>
66
67case'OneInt
68 :: forall (a :: OneInt -> Type)
69 -> (forall (b :: Int) -> a ('OneI b)) -> forall (c :: OneInt) -> a c
70case'OneInt = \a b c -> <<case function of a type with 0 parameters>>
71
72case'Two
73 :: forall a b
74 . forall (c :: Two a b -> Type)
75 -> (forall (d :: a) -> c ('TwoA d))
76 -> (forall (e :: b) -> c ('TwoB e)) -> forall (f :: Two a b) -> c f
77case'Two = \_ _ a b c d -> <<case function of a type with 2 parameters>>
78
79case'Zero :: forall (a :: Zero -> Type) (b :: Zero) -> a b
80case'Zero = \a b -> <<case function of a type with 0 parameters>>
81
82f :: OneBool -> Bool
83f = \a -> case'OneBool (\_ -> 'Bool) (\b -> _rhs b) a
84
85main :: Bool
86main = _rhs True
87
88match'One1
89 :: forall (a :: Type -> Type)
90 -> (forall b -> a (One1 b)) -> forall c -> a c -> a c
91match'One1 = \a b c d -> <<type case function>>
92
93match'OneBool
94 :: forall (a :: Type -> Type) -> a OneBool -> forall b -> a b -> a b
95match'OneBool = \a b c d -> <<type case function>>
96
97match'OneInt :: forall (a :: Type -> Type) -> a OneInt -> forall b -> a b -> a b
98match'OneInt = \a b c d -> <<type case function>>
99
100match'Two
101 :: forall (a :: Type -> Type)
102 -> (forall b c -> a (Two b c)) -> forall d -> a d -> a d
103match'Two = \a b c d -> <<type case function>>
104
105match'Zero :: forall (a :: Type -> Type) -> a Zero -> forall b -> a b -> a b
106match'Zero = \a b c d -> <<type case function>>
107
108value1 :: OneBool
109value1 = _rhs (OneBool True)
110------------ tooltips
111testdata/language-features/adt/adt01.lc 1:6-1:10
112 Type | Type | Type | Type
113testdata/language-features/adt/adt01.lc 3:6-3:10
114 Type -> Type | Type -> Type | Type -> Type | Type -> Type | Type
115testdata/language-features/adt/adt01.lc 3:6-3:12
116 Type | Type
117testdata/language-features/adt/adt01.lc 3:6-3:19
118 Type | Type
119testdata/language-features/adt/adt01.lc 3:6-3:21
120 Type
121testdata/language-features/adt/adt01.lc 3:11-3:12
122 Type
123testdata/language-features/adt/adt01.lc 3:15-3:19
124 forall a . a -> One1 a | One1 _c | Type | Type
125testdata/language-features/adt/adt01.lc 3:20-3:21
126 Type
127testdata/language-features/adt/adt01.lc 5:6-5:12
128 Type | Type | Type | Type | Type | Type
129testdata/language-features/adt/adt01.lc 5:6-5:19
130 Type
131testdata/language-features/adt/adt01.lc 5:15-5:19
132 Int -> OneInt | OneInt | Type | Type
133testdata/language-features/adt/adt01.lc 5:20-5:23
134 Type
135testdata/language-features/adt/adt01.lc 7:6-7:13
136 Type | Type | Type | Type | Type | Type
137testdata/language-features/adt/adt01.lc 7:6-7:23
138 Type
139testdata/language-features/adt/adt01.lc 7:16-7:23
140 Bool -> OneBool | OneBool | Type | Type
141testdata/language-features/adt/adt01.lc 7:24-7:28
142 Type
143testdata/language-features/adt/adt01.lc 9:6-9:9
144 Type -> Type -> Type | Type -> Type -> Type | Type -> Type -> Type | Type
145 -> Type -> Type | Type -> Type -> Type | Type
146testdata/language-features/adt/adt01.lc 9:6-9:11
147 Type -> Type | Type -> Type
148testdata/language-features/adt/adt01.lc 9:6-9:13
149 Type | Type | Type | Type
150testdata/language-features/adt/adt01.lc 9:6-10:11
151 Type | Type
152testdata/language-features/adt/adt01.lc 9:6-11:9
153 Type | Type | Type | Type
154testdata/language-features/adt/adt01.lc 9:6-11:11
155 Type | Type
156testdata/language-features/adt/adt01.lc 9:10-9:11
157 Type | Type
158testdata/language-features/adt/adt01.lc 9:12-9:13
159 Type | Type
160testdata/language-features/adt/adt01.lc 10:5-10:9
161 forall a b . a -> Two a b | Two _d _c | Type | Type
162testdata/language-features/adt/adt01.lc 10:10-10:11
163 Type
164testdata/language-features/adt/adt01.lc 11:5-11:9
165 forall a b . b -> Two a b | Two _e _d | Type | Type
166testdata/language-features/adt/adt01.lc 11:10-11:11
167 Type
168testdata/language-features/adt/adt01.lc 13:1-13:7
169 OneBool
170testdata/language-features/adt/adt01.lc 13:10-13:17
171 Bool -> OneBool
172testdata/language-features/adt/adt01.lc 13:10-13:22
173 OneBool
174testdata/language-features/adt/adt01.lc 13:18-13:22
175 Bool
176testdata/language-features/adt/adt01.lc 15:1-15:2
177 OneBool -> Bool
178testdata/language-features/adt/adt01.lc 15:17-15:18
179 Bool
180testdata/language-features/adt/adt01.lc 17:1-17:5
181 Bool
182testdata/language-features/adt/adt01.lc 17:8-17:9
183 OneBool -> Bool
184testdata/language-features/adt/adt01.lc 17:8-17:16
185 Bool
186testdata/language-features/adt/adt01.lc 17:10-17:16
187 OneBool \ No newline at end of file
diff --git a/testdata/language-features/adt/adt02.out b/testdata/language-features/adt/adt02.out
index 4791ed55..84ef7d80 100644
--- a/testdata/language-features/adt/adt02.out
+++ b/testdata/language-features/adt/adt02.out
@@ -1 +1,289 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4data Data1 :: Type where
5 Data1 :: Bool -> Data1
6
7one1
8 = _lhs one1 \(a :: _) -> case'Data1 (\(_ :: _) -> _) (\(b :: _) -> _rhs b) a
9
10data Data2 :: Type where
11 Data2 :: Bool -> String -> Bool -> Data2
12
13one2
14 = _lhs
15 one2
16 \(a :: _) -> case'Data2
17 (\(_ :: _) -> _)
18 (\(b :: _) (_ :: _) (_ :: _) -> _rhs b)
19 a
20
21two2
22 = _lhs
23 two2
24 \(a :: _) -> case'Data2
25 (\(_ :: _) -> _)
26 (\(_ :: _) (b :: _) (_ :: _) -> _rhs b)
27 a
28
29thr2
30 = _lhs
31 thr2
32 \(a :: _) -> case'Data2
33 (\(_ :: _) -> _)
34 (\(_ :: _) (_ :: _) (b :: _) -> _rhs b)
35 a
36
37value1 = _lhs value1 (_rhs (Data1 True))
38
39value2 = _lhs value2 (_rhs (Data2 True "friend" True))
40
41data Data3 (_ :: Type) (_ :: Type) (_ :: Type) :: Type where
42 Data3 :: forall a b c . a -> b -> c -> Data3 a b c
43
44one3
45 = _lhs
46 one3
47 \(a :: _) -> case'Data3
48 (\(_ :: _) -> _)
49 (\(b :: _) (_ :: _) (_ :: _) -> _rhs b)
50 a
51
52two3
53 = _lhs
54 two3
55 \(a :: _) -> case'Data3
56 (\(_ :: _) -> _)
57 (\(_ :: _) (b :: _) (_ :: _) -> _rhs b)
58 a
59
60thr3
61 = _lhs
62 thr3
63 \(a :: _) -> case'Data3
64 (\(_ :: _) -> _)
65 (\(_ :: _) (_ :: _) (b :: _) -> _rhs b)
66 a
67
68value3 = _lhs value3 (_rhs (Data3 True True True))
69
70main = _lhs main (_rhs (one2 value2 && thr2 value2 && one3 value3))
71------------ core code
72'Data1 :: Type
73'Data1 = <<type constructor with 0 indices; constructors: Data1>>
74
75'Data2 :: Type
76'Data2 = <<type constructor with 0 indices; constructors: Data2>>
77
78'Data3 :: Type -> Type -> Type -> Type
79'Data3 = <<type constructor with 0 indices; constructors: Data3>>
80
81Data1 :: Bool -> Data1
82Data1 = <<0th constructor of 'Data1>>
83
84Data2 :: Bool -> String -> Bool -> Data2
85Data2 = <<0th constructor of 'Data2>>
86
87Data3 :: forall a b c . a -> b -> c -> Data3 a b c
88Data3 = <<0th constructor of 'Data3>>
89
90case'Data1
91 :: forall (a :: Data1 -> Type)
92 -> (forall (b :: Bool) -> a ('Data1 b)) -> forall (c :: Data1) -> a c
93case'Data1 = \a b c -> <<case function of a type with 0 parameters>>
94
95case'Data2
96 :: forall (a :: Data2 -> Type)
97 -> (forall (b :: Bool) (c :: String) (d :: Bool) -> a ('Data2 b c d))
98 -> forall (e :: Data2) -> a e
99case'Data2 = \a b c -> <<case function of a type with 0 parameters>>
100
101case'Data3
102 :: forall a b c
103 . forall (d :: Data3 a b c -> Type)
104 -> (forall (e :: a) (f :: b) (g :: c) -> d ('Data3 e f g))
105 -> forall (h :: Data3 a b c) -> d h
106case'Data3 = \_ _ _ a b c -> <<case function of a type with 3 parameters>>
107
108main :: Bool
109main = _rhs True
110
111match'Data1 :: forall (a :: Type -> Type) -> a Data1 -> forall b -> a b -> a b
112match'Data1 = \a b c d -> <<type case function>>
113
114match'Data2 :: forall (a :: Type -> Type) -> a Data2 -> forall b -> a b -> a b
115match'Data2 = \a b c d -> <<type case function>>
116
117match'Data3
118 :: forall (a :: Type -> Type)
119 -> (forall b c d -> a (Data3 b c d)) -> forall e -> a e -> a e
120match'Data3 = \a b c d -> <<type case function>>
121
122one1 :: Data1 -> Bool
123one1 = \a -> case'Data1 (\_ -> 'Bool) (\b -> _rhs b) a
124
125one2 :: Data2 -> Bool
126one2 = \a -> case'Data2 (\_ -> 'Bool) (\b _ _ -> _rhs b) a
127
128one3 :: forall a b c . Data3 a b c -> a
129one3 = \a _ _ b -> case'Data3 (\_ -> a) (\c _ _ -> _rhs c) b
130
131thr2 :: Data2 -> Bool
132thr2 = \a -> case'Data2 (\_ -> 'Bool) (\_ _ b -> _rhs b) a
133
134thr3 :: forall a b c . Data3 a b c -> c
135thr3 = \_ _ a b -> case'Data3 (\_ -> a) (\_ _ c -> _rhs c) b
136
137two2 :: Data2 -> String
138two2 = \a -> case'Data2 (\_ -> 'String) (\_ b _ -> _rhs b) a
139
140two3 :: forall a b c . Data3 a b c -> b
141two3 = \_ a _ b -> case'Data3 (\_ -> a) (\_ c _ -> _rhs c) b
142
143value1 :: Data1
144value1 = _rhs (Data1 True)
145
146value2 :: Data2
147value2 = _rhs (Data2 True "friend" True)
148
149value3 :: Data3 Bool Bool Bool
150value3 = _rhs (Data3 True True True)
151------------ tooltips
152testdata/language-features/adt/adt02.lc 1:6-1:11
153 Type | Type | Type | Type | Type | Type
154testdata/language-features/adt/adt02.lc 1:6-1:19
155 Type
156testdata/language-features/adt/adt02.lc 1:14-1:19
157 Bool -> Data1 | Data1 | Type | Type
158testdata/language-features/adt/adt02.lc 1:22-1:26
159 Data1 -> Bool
160testdata/language-features/adt/adt02.lc 1:30-1:34
161 Type
162testdata/language-features/adt/adt02.lc 3:6-3:11
163 Type | Type | Type | Type | Type | Type
164testdata/language-features/adt/adt02.lc 3:6-3:19
165 Type
166testdata/language-features/adt/adt02.lc 3:6-6:17
167 Type | Type
168testdata/language-features/adt/adt02.lc 3:14-3:19
169 Bool -> String -> Bool -> Data2 | Data2 | Type | Type | Type | Type
170testdata/language-features/adt/adt02.lc 4:5-4:9
171 Data2 -> Bool
172testdata/language-features/adt/adt02.lc 4:13-4:17
173 Type
174testdata/language-features/adt/adt02.lc 5:5-5:9
175 Data2 -> String
176testdata/language-features/adt/adt02.lc 5:13-5:19
177 Type
178testdata/language-features/adt/adt02.lc 6:5-6:9
179 Data2 -> Bool
180testdata/language-features/adt/adt02.lc 6:13-6:17
181 Type
182testdata/language-features/adt/adt02.lc 9:1-9:7
183 Data1
184testdata/language-features/adt/adt02.lc 9:10-9:15
185 Bool -> Data1
186testdata/language-features/adt/adt02.lc 9:10-9:20
187 Data1
188testdata/language-features/adt/adt02.lc 9:16-9:20
189 Bool
190testdata/language-features/adt/adt02.lc 10:1-10:7
191 Data2
192testdata/language-features/adt/adt02.lc 10:10-10:15
193 Bool -> String -> Bool -> Data2
194testdata/language-features/adt/adt02.lc 10:10-10:20
195 String -> Bool -> Data2
196testdata/language-features/adt/adt02.lc 10:10-10:29
197 Bool -> Data2
198testdata/language-features/adt/adt02.lc 10:10-10:34
199 Data2
200testdata/language-features/adt/adt02.lc 10:16-10:20
201 Bool
202testdata/language-features/adt/adt02.lc 10:21-10:29
203 String
204testdata/language-features/adt/adt02.lc 10:30-10:34
205 Bool
206testdata/language-features/adt/adt02.lc 12:6-12:11
207 Type -> Type -> Type -> Type | Type -> Type -> Type -> Type | Type
208 -> Type -> Type -> Type | Type -> Type -> Type -> Type | Type
209testdata/language-features/adt/adt02.lc 12:6-12:13
210 Type -> Type -> Type
211testdata/language-features/adt/adt02.lc 12:6-12:15
212 Type -> Type
213testdata/language-features/adt/adt02.lc 12:6-12:17
214 Type | Type
215testdata/language-features/adt/adt02.lc 12:6-12:25
216 Type | Type | Type | Type
217testdata/language-features/adt/adt02.lc 12:6-15:14
218 Type | Type | Type | Type | Type
219testdata/language-features/adt/adt02.lc 12:12-12:13
220 Type
221testdata/language-features/adt/adt02.lc 12:14-12:15
222 Type
223testdata/language-features/adt/adt02.lc 12:16-12:17
224 Type
225testdata/language-features/adt/adt02.lc 12:20-12:25
226 forall a b c . a -> b -> c -> Data3 a b c | Data3
227 _g
228 _f
229 _e | Type | Type | Type | Type
230testdata/language-features/adt/adt02.lc 13:5-13:9
231 forall a b c . Data3 a b c -> a
232testdata/language-features/adt/adt02.lc 13:13-13:14
233 Type
234testdata/language-features/adt/adt02.lc 14:5-14:9
235 forall a b c . Data3 a b c -> b
236testdata/language-features/adt/adt02.lc 14:13-14:14
237 Type
238testdata/language-features/adt/adt02.lc 15:5-15:9
239 forall a b c . Data3 a b c -> c
240testdata/language-features/adt/adt02.lc 15:13-15:14
241 Type
242testdata/language-features/adt/adt02.lc 18:1-18:7
243 Data3 Bool Bool Bool
244testdata/language-features/adt/adt02.lc 18:10-18:15
245 forall a b c . a -> b -> c -> Data3 a b c
246testdata/language-features/adt/adt02.lc 18:10-18:20
247 _b -> _a -> Data3 Bool _b _a
248testdata/language-features/adt/adt02.lc 18:10-18:25
249 _a -> Data3 Bool Bool _a
250testdata/language-features/adt/adt02.lc 18:10-18:30
251 Data3 Bool Bool Bool
252testdata/language-features/adt/adt02.lc 18:16-18:20
253 Bool
254testdata/language-features/adt/adt02.lc 18:21-18:25
255 Bool
256testdata/language-features/adt/adt02.lc 18:26-18:30
257 Bool
258testdata/language-features/adt/adt02.lc 20:1-20:5
259 Bool
260testdata/language-features/adt/adt02.lc 20:8-20:12
261 Data2 -> Bool
262testdata/language-features/adt/adt02.lc 20:8-20:19
263 Bool
264testdata/language-features/adt/adt02.lc 20:8-20:22
265 Bool -> Bool
266testdata/language-features/adt/adt02.lc 20:8-20:49
267 Bool
268testdata/language-features/adt/adt02.lc 20:13-20:19
269 Data2
270testdata/language-features/adt/adt02.lc 20:20-20:22
271 Bool -> Bool -> Bool
272testdata/language-features/adt/adt02.lc 20:23-20:27
273 Data2 -> Bool
274testdata/language-features/adt/adt02.lc 20:23-20:34
275 Bool
276testdata/language-features/adt/adt02.lc 20:23-20:37
277 Bool -> Bool
278testdata/language-features/adt/adt02.lc 20:23-20:49
279 Bool
280testdata/language-features/adt/adt02.lc 20:28-20:34
281 Data2
282testdata/language-features/adt/adt02.lc 20:35-20:37
283 Bool -> Bool -> Bool
284testdata/language-features/adt/adt02.lc 20:38-20:42
285 forall a b c . Data3 a b c -> a
286testdata/language-features/adt/adt02.lc 20:38-20:49
287 Bool
288testdata/language-features/adt/adt02.lc 20:43-20:49
289 Data3 Bool Bool Bool \ No newline at end of file
diff --git a/testdata/language-features/adt/adt05.out b/testdata/language-features/adt/adt05.out
index 2f1af5ee..c44d22b9 100644
--- a/testdata/language-features/adt/adt05.out
+++ b/testdata/language-features/adt/adt05.out
@@ -1,3 +1,142 @@
1testdata/language-features/adt/adt05.lc:14:1: 1main :: @Type -> forall a . Num a => Bool
2main = isEmpty value1 && isCons value2 2main = main
3^^^^ \ No newline at end of file 3------------ desugared source code
4data TList (_ :: Type) :: Type where
5 TEmpty :: forall a . TList a
6 TCons :: forall b . b -> TList b -> TList b
7
8value1 = _lhs value1 (_rhs TEmpty)
9
10value2 = _lhs value2 (_rhs (TCons (fromInt 3) value1))
11
12isEmpty
13 = _lhs
14 isEmpty
15 \(a :: _) -> case'TList
16 (\(_ :: _) -> _)
17 (_rhs True)
18 (\(_ :: _) (_ :: _) -> _rhs False)
19 a
20
21isCons
22 = _lhs
23 isCons
24 \(a :: _) -> case'TList
25 (\(_ :: _) -> _)
26 (_rhs False)
27 (\(_ :: _) (_ :: _) -> _rhs True)
28 a
29
30main = _lhs main (_rhs (isEmpty value1 && isCons value2))
31------------ core code
32'TList :: Type -> Type
33'TList = <<type constructor with 0 indices; constructors: TEmpty, TCons>>
34
35TCons :: forall a . a -> TList a -> TList a
36TCons = <<1st constructor of 'TList>>
37
38TEmpty :: forall a . TList a
39TEmpty = <<0th constructor of 'TList>>
40
41case'TList
42 :: forall a
43 . forall (b :: TList a -> Type)
44 -> b 'TEmpty
45 -> (forall (c :: a) (d :: TList a) -> b ('TCons c d))
46 -> forall (e :: TList a) -> b e
47case'TList = \_ a b c d -> <<case function of a type with 1 parameters>>
48
49isCons :: forall a . TList a -> Bool
50isCons = \_ a -> case'TList (\_ -> 'Bool) (_rhs False) (\_ _ -> _rhs True) a
51
52isEmpty :: forall a . TList a -> Bool
53isEmpty = \_ a -> case'TList (\_ -> 'Bool) (_rhs True) (\_ _ -> _rhs False) a
54
55main :: @Type -> forall a . Num a => Bool
56main = \_ _ _ -> _rhs True
57
58match'TList
59 :: forall (a :: Type -> Type)
60 -> (forall b -> a (TList b)) -> forall c -> a c -> a c
61match'TList = \a b c d -> <<type case function>>
62
63value1 :: forall a . TList a
64value1 = _rhs TEmpty
65
66value2 :: forall a . Num a => TList a
67value2 = \a b -> _rhs (TCons (fromInt a b 3) TEmpty)
68------------ tooltips
69testdata/language-features/adt/adt05.lc 3:6-3:11
70 Type -> Type | Type -> Type | Type -> Type | Type -> Type | Type -> Type | Type
71testdata/language-features/adt/adt05.lc 3:6-3:13
72 Type | Type | Type | Type
73testdata/language-features/adt/adt05.lc 3:6-3:30
74 Type | Type | Type
75testdata/language-features/adt/adt05.lc 3:6-3:42
76 Type | Type
77testdata/language-features/adt/adt05.lc 3:12-3:13
78 Type | Type
79testdata/language-features/adt/adt05.lc 3:16-3:22
80 forall a . TList a | TList _b
81testdata/language-features/adt/adt05.lc 3:25-3:30
82 forall a . a -> TList a -> TList a | TList _e | Type | Type | Type
83testdata/language-features/adt/adt05.lc 3:31-3:32
84 Type
85testdata/language-features/adt/adt05.lc 3:34-3:39
86 Type -> Type
87testdata/language-features/adt/adt05.lc 3:34-3:41
88 Type
89testdata/language-features/adt/adt05.lc 3:40-3:41
90 Type
91testdata/language-features/adt/adt05.lc 5:1-5:7
92 forall a . TList a
93testdata/language-features/adt/adt05.lc 5:10-5:16
94 forall a . TList a
95testdata/language-features/adt/adt05.lc 6:1-6:7
96 forall a . Num a => TList a
97testdata/language-features/adt/adt05.lc 6:10-6:15
98 forall a . a -> TList a -> TList a
99testdata/language-features/adt/adt05.lc 6:10-6:17
100 TList _b -> TList _b
101testdata/language-features/adt/adt05.lc 6:10-6:24
102 TList _b
103testdata/language-features/adt/adt05.lc 6:16-6:17
104 _b
105testdata/language-features/adt/adt05.lc 6:18-6:24
106 forall a . TList a
107testdata/language-features/adt/adt05.lc 8:1-8:8
108 forall a . TList a -> Bool
109testdata/language-features/adt/adt05.lc 8:18-8:22
110 Bool
111testdata/language-features/adt/adt05.lc 8:18-9:23
112 TList _a -> Bool
113testdata/language-features/adt/adt05.lc 9:18-9:23
114 Bool
115testdata/language-features/adt/adt05.lc 11:1-11:7
116 forall a . TList a -> Bool
117testdata/language-features/adt/adt05.lc 11:22-11:26
118 Bool
119testdata/language-features/adt/adt05.lc 11:22-12:27
120 TList _a -> Bool
121testdata/language-features/adt/adt05.lc 12:22-12:27
122 Bool
123testdata/language-features/adt/adt05.lc 14:1-14:5
124 @Type -> forall a . Num a => Bool
125testdata/language-features/adt/adt05.lc 14:8-14:15
126 forall a . TList a -> Bool
127testdata/language-features/adt/adt05.lc 14:8-14:22
128 Bool
129testdata/language-features/adt/adt05.lc 14:8-14:25
130 Bool -> Bool
131testdata/language-features/adt/adt05.lc 14:8-14:39
132 Bool
133testdata/language-features/adt/adt05.lc 14:16-14:22
134 forall a . TList a
135testdata/language-features/adt/adt05.lc 14:23-14:25
136 Bool -> Bool -> Bool
137testdata/language-features/adt/adt05.lc 14:26-14:32
138 forall a . TList a -> Bool
139testdata/language-features/adt/adt05.lc 14:26-14:39
140 Bool
141testdata/language-features/adt/adt05.lc 14:33-14:39
142 forall a . Num a => TList a \ No newline at end of file
diff --git a/testdata/language-features/adt/gadt01.out b/testdata/language-features/adt/gadt01.out
index 4791ed55..5c850279 100644
--- a/testdata/language-features/adt/gadt01.out
+++ b/testdata/language-features/adt/gadt01.out
@@ -1 +1,376 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4data V :: Nat -> Type -> Type where
5 V1_ :: forall (a :: _) . a -> V (fromInt 1) a
6 V2_ :: forall (b :: _) . b -> b -> V (fromInt 2) b
7
8data M :: Type -> String -> Type where
9 Value :: forall (a :: _) . a -> forall (b :: _) . M a b
10
11data M2 (_ :: Type) :: String -> Type where
12 Value2 :: forall a . a -> forall (b :: _) . M2 a b
13
14data M3 (_ :: Type) :: String -> Type where
15 Value3 :: forall a (b :: _) . a -> M3 a b
16
17g
18 = _lhs
19 g
20 (_rhs (case'M2 (\(_ :: _) (_ :: _) -> _ :: _) \(a :: _) @(_ :: _) -> a))
21
22h
23 = _lhs h \(a :: _) -> case'M3 (\(_ :: _) (_ :: _) -> _) (\(b :: _) -> _rhs b) a
24
25value1 :: M Bool "m"
26value1 = _lhs value1 (_rhs (Value True))
27
28value2 :: M2 Bool "s"
29value2 = _lhs value2 (_rhs (Value2 True))
30
31value3 :: M3 Bool "t"
32value3 = _lhs value3 (_rhs (Value3 True))
33
34main = _lhs main (_rhs (g value2 && h value3))
35------------ core code
36'M :: Type -> String -> Type
37'M = <<type constructor with 2 indices; constructors: Value>>
38
39'M2 :: Type -> String -> Type
40'M2 = <<type constructor with 1 indices; constructors: Value2>>
41
42'M3 :: Type -> String -> Type
43'M3 = <<type constructor with 1 indices; constructors: Value3>>
44
45'V :: Nat -> Type -> Type
46'V = <<type constructor with 2 indices; constructors: V1_, V2_>>
47
48V1_ :: forall a . a -> V 1 a
49V1_ = <<0th constructor of 'V>>
50
51V2_ :: forall a . a -> a -> V 2 a
52V2_ = <<1st constructor of 'V>>
53
54Value :: forall a . a -> forall (b :: String) . M a b
55Value = <<0th constructor of 'M>>
56
57Value2 :: forall a . a -> forall (b :: String) . M2 a b
58Value2 = <<0th constructor of 'M2>>
59
60Value3 :: forall a (b :: String) . a -> M3 a b
61Value3 = <<0th constructor of 'M3>>
62
63case'M
64 :: forall (a :: forall b (c :: String) -> M b c -> Type)
65 -> (forall d . forall (e :: d) -> forall (f :: String) . a d f ('Value d e f))
66 -> forall g (h :: String) . forall (i :: M g h) -> a g h i
67case'M = \a b c d e -> <<case function of a type with 0 parameters>>
68
69case'M2
70 :: forall a
71 . forall (b :: forall (c :: String) -> M2 a c -> Type)
72 -> (forall (d :: a) -> forall (e :: String) . b e ('Value2 d e))
73 -> forall (f :: String) . forall (g :: M2 a f) -> b f g
74case'M2 = \_ a b c d -> <<case function of a type with 1 parameters>>
75
76case'M3
77 :: forall a
78 . forall (b :: forall (c :: String) -> M3 a c -> Type)
79 -> (forall (d :: String) . forall (e :: a) -> b d ('Value3 d e))
80 -> forall (f :: String) . forall (g :: M3 a f) -> b f g
81case'M3 = \_ a b c d -> <<case function of a type with 1 parameters>>
82
83case'V
84 :: forall (a :: forall (b :: Nat) c -> V b c -> Type)
85 -> (forall d . forall (e :: d) -> a 1 d ('V1_ d e))
86 -> (forall f . forall (g :: f) (h :: f) -> a 2 f ('V2_ f g h))
87 -> forall (i :: Nat) j . forall (k :: V i j) -> a i j k
88case'V = \a b c d e f -> <<case function of a type with 0 parameters>>
89
90g :: forall a (b :: String) . M2 a b -> a
91g = \a -> _rhs \b c -> case'M2 (\_ _ -> a) (\d _ -> d) b c
92
93h :: forall a (b :: String) . M3 a b -> a
94h = \a b c -> case'M3 (\_ _ -> a) (\_ d -> _rhs d) b c
95
96main :: Bool
97main = _rhs True
98
99match'M
100 :: forall (a :: Type -> Type)
101 -> (forall b (c :: String) -> a (M b c)) -> forall d -> a d -> a d
102match'M = \a b c d -> <<type case function>>
103
104match'M2
105 :: forall (a :: Type -> Type)
106 -> (forall b (c :: String) -> a (M2 b c)) -> forall d -> a d -> a d
107match'M2 = \a b c d -> <<type case function>>
108
109match'M3
110 :: forall (a :: Type -> Type)
111 -> (forall b (c :: String) -> a (M3 b c)) -> forall d -> a d -> a d
112match'M3 = \a b c d -> <<type case function>>
113
114match'V
115 :: forall (a :: Type -> Type)
116 -> (forall (b :: Nat) c -> a (V b c)) -> forall d -> a d -> a d
117match'V = \a b c d -> <<type case function>>
118
119value1 :: M Bool "m"
120value1 = _rhs (Value 'Bool True "m")
121
122value2 :: M2 Bool "s"
123value2 = _rhs (Value2 True "s")
124
125value3 :: M3 Bool "t"
126value3 = _rhs (Value3 "t" True)
127------------ tooltips
128testdata/language-features/adt/gadt01.lc 2:6-2:7
129 Nat -> Type -> Type | Nat -> Type -> Type | Type | Type | Nat
130 -> Type -> Type | Type | Type | Type
131testdata/language-features/adt/gadt01.lc 2:6-4:25
132 Type | Type
133testdata/language-features/adt/gadt01.lc 2:11-2:14
134 Type
135testdata/language-features/adt/gadt01.lc 2:18-2:22
136 Type
137testdata/language-features/adt/gadt01.lc 2:18-2:30
138 Type
139testdata/language-features/adt/gadt01.lc 2:26-2:30
140 Type | Type
141testdata/language-features/adt/gadt01.lc 3:3-3:6
142 forall a . a -> V 1 a | V 1 _b
143testdata/language-features/adt/gadt01.lc 3:3-3:20
144 Type | Type | Type
145testdata/language-features/adt/gadt01.lc 3:10-3:11
146 _b
147testdata/language-features/adt/gadt01.lc 3:10-3:20
148 Type
149testdata/language-features/adt/gadt01.lc 3:15-3:16
150 Nat -> Type -> Type
151testdata/language-features/adt/gadt01.lc 3:15-3:18
152 Type -> Type
153testdata/language-features/adt/gadt01.lc 3:15-3:20
154 Type | Type
155testdata/language-features/adt/gadt01.lc 3:17-3:18
156 _b | _b
157testdata/language-features/adt/gadt01.lc 3:17-3:20
158 V 1 _b -> Type
159testdata/language-features/adt/gadt01.lc 3:19-3:20
160 Type | Type
161testdata/language-features/adt/gadt01.lc 4:3-4:6
162 forall a . a -> a -> V 2 a | V 2 _c
163testdata/language-features/adt/gadt01.lc 4:3-4:25
164 Type | Type | Type | Type
165testdata/language-features/adt/gadt01.lc 4:10-4:11
166 _b
167testdata/language-features/adt/gadt01.lc 4:10-4:25
168 Type
169testdata/language-features/adt/gadt01.lc 4:15-4:16
170 Type
171testdata/language-features/adt/gadt01.lc 4:15-4:25
172 Type
173testdata/language-features/adt/gadt01.lc 4:20-4:21
174 Nat -> Type -> Type
175testdata/language-features/adt/gadt01.lc 4:20-4:23
176 Type -> Type
177testdata/language-features/adt/gadt01.lc 4:20-4:25
178 Type | Type
179testdata/language-features/adt/gadt01.lc 4:22-4:23
180 _b | _b
181testdata/language-features/adt/gadt01.lc 4:22-4:25
182 V 2 _c -> Type
183testdata/language-features/adt/gadt01.lc 4:24-4:25
184 Type | Type
185testdata/language-features/adt/gadt01.lc 6:6-6:7
186 Type -> String -> Type | Type -> String -> Type | Type | Type | Type
187 -> String -> Type | Type | Type | Type
188testdata/language-features/adt/gadt01.lc 6:6-7:33
189 Type
190testdata/language-features/adt/gadt01.lc 6:11-6:15
191 Type
192testdata/language-features/adt/gadt01.lc 6:19-6:25
193 Type
194testdata/language-features/adt/gadt01.lc 6:19-6:33
195 Type
196testdata/language-features/adt/gadt01.lc 6:29-6:33
197 Type | Type
198testdata/language-features/adt/gadt01.lc 7:3-7:8
199 forall a . a -> forall (b :: String) . M a b | M _c _a
200testdata/language-features/adt/gadt01.lc 7:3-7:33
201 Type | Type | Type | Type
202testdata/language-features/adt/gadt01.lc 7:12-7:13
203 _b
204testdata/language-features/adt/gadt01.lc 7:12-7:33
205 Type
206testdata/language-features/adt/gadt01.lc 7:17-7:33
207 Type
208testdata/language-features/adt/gadt01.lc 7:28-7:29
209 Type -> String -> Type
210testdata/language-features/adt/gadt01.lc 7:28-7:31
211 String -> Type
212testdata/language-features/adt/gadt01.lc 7:28-7:33
213 Type | Type
214testdata/language-features/adt/gadt01.lc 7:30-7:31
215 Type | Type
216testdata/language-features/adt/gadt01.lc 7:30-7:33
217 M _c _a -> Type
218testdata/language-features/adt/gadt01.lc 7:32-7:33
219 _b | String
220testdata/language-features/adt/gadt01.lc 9:6-9:8
221 Type -> String -> Type | Type -> String -> Type | Type | Type
222 -> String -> Type | Type | Type
223testdata/language-features/adt/gadt01.lc 9:6-10:35
224 Type | Type
225testdata/language-features/adt/gadt01.lc 9:15-9:19
226 Type | Type | Type
227testdata/language-features/adt/gadt01.lc 9:24-9:30
228 Type
229testdata/language-features/adt/gadt01.lc 9:24-9:38
230 Type
231testdata/language-features/adt/gadt01.lc 9:34-9:38
232 Type | Type
233testdata/language-features/adt/gadt01.lc 10:3-10:9
234 forall a . a -> forall (b :: String) . M2 a b | M2 _d _a
235testdata/language-features/adt/gadt01.lc 10:3-10:35
236 Type | Type | Type
237testdata/language-features/adt/gadt01.lc 10:13-10:14
238 Type
239testdata/language-features/adt/gadt01.lc 10:13-10:35
240 Type
241testdata/language-features/adt/gadt01.lc 10:18-10:35
242 Type
243testdata/language-features/adt/gadt01.lc 10:29-10:31
244 Type -> String -> Type
245testdata/language-features/adt/gadt01.lc 10:29-10:33
246 String -> Type
247testdata/language-features/adt/gadt01.lc 10:29-10:35
248 Type | Type
249testdata/language-features/adt/gadt01.lc 10:32-10:33
250 Type
251testdata/language-features/adt/gadt01.lc 10:34-10:35
252 _b | String
253testdata/language-features/adt/gadt01.lc 12:6-12:8
254 Type -> String -> Type | Type -> String -> Type | Type | Type
255 -> String -> Type | Type | Type
256testdata/language-features/adt/gadt01.lc 12:6-13:35
257 Type | Type
258testdata/language-features/adt/gadt01.lc 12:15-12:19
259 Type | Type | Type
260testdata/language-features/adt/gadt01.lc 12:24-12:30
261 Type
262testdata/language-features/adt/gadt01.lc 12:24-12:38
263 Type
264testdata/language-features/adt/gadt01.lc 12:34-12:38
265 Type | Type
266testdata/language-features/adt/gadt01.lc 13:3-13:9
267 forall a (b :: String) . a -> M3 a b | M3 _d _b
268testdata/language-features/adt/gadt01.lc 13:3-13:35
269 Type | Type | Type
270testdata/language-features/adt/gadt01.lc 13:13-13:35
271 Type
272testdata/language-features/adt/gadt01.lc 13:24-13:25
273 Type
274testdata/language-features/adt/gadt01.lc 13:24-13:35
275 Type
276testdata/language-features/adt/gadt01.lc 13:29-13:31
277 Type -> String -> Type
278testdata/language-features/adt/gadt01.lc 13:29-13:33
279 String -> Type
280testdata/language-features/adt/gadt01.lc 13:29-13:35
281 Type | Type
282testdata/language-features/adt/gadt01.lc 13:32-13:33
283 Type
284testdata/language-features/adt/gadt01.lc 13:34-13:35
285 _c | String
286testdata/language-features/adt/gadt01.lc 17:1-17:2
287 forall a (b :: String) . M2 a b -> a
288testdata/language-features/adt/gadt01.lc 17:5-17:12
289 forall a
290 . forall (b :: forall (c :: String) -> M2 a c -> Type)
291 -> (forall (d :: a) -> forall (e :: String) . b e ('Value2 d e))
292 -> forall (f :: String) . forall (g :: M2 a f) -> b f g
293testdata/language-features/adt/gadt01.lc 17:5-17:24
294 (forall (a :: _b) -> @String -> _a) -> forall (b :: String) . M2 _b b -> _a
295testdata/language-features/adt/gadt01.lc 17:5-17:37
296 forall (a :: String) . M2 _a a -> _a
297testdata/language-features/adt/gadt01.lc 17:35-17:36
298 _d
299testdata/language-features/adt/gadt01.lc 19:1-19:2
300 forall a (b :: String) . M3 a b -> a
301testdata/language-features/adt/gadt01.lc 19:16-19:17
302 _d
303testdata/language-features/adt/gadt01.lc 21:11-21:12
304 Type -> String -> Type
305testdata/language-features/adt/gadt01.lc 21:11-21:17
306 String -> Type
307testdata/language-features/adt/gadt01.lc 21:11-21:21
308 Type
309testdata/language-features/adt/gadt01.lc 21:13-21:17
310 Type
311testdata/language-features/adt/gadt01.lc 21:18-21:21
312 String
313testdata/language-features/adt/gadt01.lc 22:1-22:7
314 M Bool "m"
315testdata/language-features/adt/gadt01.lc 22:10-22:15
316 forall a . a -> forall (b :: String) . M a b
317testdata/language-features/adt/gadt01.lc 22:10-22:20
318 forall (a :: String) . M Bool a
319testdata/language-features/adt/gadt01.lc 22:16-22:20
320 Bool
321testdata/language-features/adt/gadt01.lc 24:11-24:13
322 Type -> String -> Type
323testdata/language-features/adt/gadt01.lc 24:11-24:18
324 String -> Type
325testdata/language-features/adt/gadt01.lc 24:11-24:22
326 Type
327testdata/language-features/adt/gadt01.lc 24:14-24:18
328 Type
329testdata/language-features/adt/gadt01.lc 24:19-24:22
330 String
331testdata/language-features/adt/gadt01.lc 25:1-25:7
332 M2 Bool "s"
333testdata/language-features/adt/gadt01.lc 25:10-25:16
334 forall a . a -> forall (b :: String) . M2 a b
335testdata/language-features/adt/gadt01.lc 25:10-25:21
336 forall (a :: String) . M2 Bool a
337testdata/language-features/adt/gadt01.lc 25:17-25:21
338 Bool
339testdata/language-features/adt/gadt01.lc 27:11-27:13
340 Type -> String -> Type
341testdata/language-features/adt/gadt01.lc 27:11-27:18
342 String -> Type
343testdata/language-features/adt/gadt01.lc 27:11-27:22
344 Type
345testdata/language-features/adt/gadt01.lc 27:14-27:18
346 Type
347testdata/language-features/adt/gadt01.lc 27:19-27:22
348 String
349testdata/language-features/adt/gadt01.lc 28:1-28:7
350 M3 Bool "t"
351testdata/language-features/adt/gadt01.lc 28:10-28:16
352 forall a (b :: String) . a -> M3 a b
353testdata/language-features/adt/gadt01.lc 28:10-28:21
354 M3 Bool _a
355testdata/language-features/adt/gadt01.lc 28:17-28:21
356 Bool
357testdata/language-features/adt/gadt01.lc 30:1-30:5
358 Bool
359testdata/language-features/adt/gadt01.lc 30:8-30:9
360 forall a (b :: String) . M2 a b -> a
361testdata/language-features/adt/gadt01.lc 30:8-30:16
362 Bool
363testdata/language-features/adt/gadt01.lc 30:8-30:19
364 Bool -> Bool
365testdata/language-features/adt/gadt01.lc 30:8-30:28
366 Bool
367testdata/language-features/adt/gadt01.lc 30:10-30:16
368 M2 Bool "s"
369testdata/language-features/adt/gadt01.lc 30:17-30:19
370 Bool -> Bool -> Bool
371testdata/language-features/adt/gadt01.lc 30:20-30:21
372 forall a (b :: String) . M3 a b -> a
373testdata/language-features/adt/gadt01.lc 30:20-30:28
374 Bool
375testdata/language-features/adt/gadt01.lc 30:22-30:28
376 M3 Bool "t" \ No newline at end of file
diff --git a/testdata/language-features/as-pattern/as-pattern01.lc b/testdata/language-features/as-pattern/as-pattern01.lc
index 5bb6c9b0..491a3d50 100644
--- a/testdata/language-features/as-pattern/as-pattern01.lc
+++ b/testdata/language-features/as-pattern/as-pattern01.lc
@@ -5,4 +5,4 @@ g x@3 y = x + y
5--main has different type as expected 5--main has different type as expected
6--main :: {a} -> {b : 'Num ('MatVecScalarElem a)} -> {c : 'Num a} -> {d:'Int} -> {e : 'Num a}->'Bool 6--main :: {a} -> {b : 'Num ('MatVecScalarElem a)} -> {c : 'Num a} -> {d:'Int} -> {e : 'Num a}->'Bool
7main :: Bool 7main :: Bool
8main = g 3 1 == 5 8main = g 3 1 == 5 -- TODO: (5 :: Int)
diff --git a/testdata/language-features/as-pattern/as-pattern01.out b/testdata/language-features/as-pattern/as-pattern01.out
index da679416..5b9c82cd 100644
--- a/testdata/language-features/as-pattern/as-pattern01.out
+++ b/testdata/language-features/as-pattern/as-pattern01.out
@@ -1,3 +1,98 @@
1testdata/language-features/as-pattern/as-pattern01.lc:8:1: 1main :: forall a . (Eq a, Num (MatVecScalarElem a), Eq a, Num a) => Bool
2main = g 3 1 == 5 2main = main
3^^^^ \ No newline at end of file 3------------ desugared source code
4f
5 = _lhs
6 f
7 \(a :: _) -> case'List
8 (\(_ :: _) -> _)
9 (_rhs undefined)
10 (\(b :: _) (_ :: _) -> _rhs (b : a))
11 a
12
13g
14 = _lhs
15 g
16 \(a :: _) (b :: _) -> case'Bool
17 (\(_ :: _) -> _)
18 (_rhs undefined)
19 (_rhs (a + b))
20 (fromInt 3 == b)
21
22main :: Bool
23main = _lhs main (_rhs (g (fromInt 3) (fromInt 1) == fromInt 5))
24------------ core code
25f :: forall a . [a] -> [a]
26f
27 = \a b -> case'List (\_ -> [a]) (_rhs (undefined [a])) (\c _ -> _rhs (c : b)) b
28
29g :: forall a . (Num (MatVecScalarElem a), Eq a, Num a) => a -> a -> a
30g
31 = \a b c d e f -> case'Bool
32 (\_ -> a)
33 (_rhs (undefined a))
34 (_rhs (PrimAdd a b e f))
35 ((a == c) (fromInt a d 3) f)
36
37main :: forall a . (Eq a, Num (MatVecScalarElem a), Eq a, Num a) => Bool
38main
39 = \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------------ tooltips
42testdata/language-features/as-pattern/as-pattern01.lc 1:1-1:2
43 forall a . [a] -> [a]
44testdata/language-features/as-pattern/as-pattern01.lc 1:14-1:15
45 _e
46testdata/language-features/as-pattern/as-pattern01.lc 1:14-1:16
47 [_d] -> [_d]
48testdata/language-features/as-pattern/as-pattern01.lc 1:14-1:17
49 [_c]
50testdata/language-features/as-pattern/as-pattern01.lc 1:15-1:16
51 forall a . a -> [a] -> [a]
52testdata/language-features/as-pattern/as-pattern01.lc 1:16-1:17
53 _e
54testdata/language-features/as-pattern/as-pattern01.lc 3:1-3:2
55 forall a . (Num (MatVecScalarElem a), Eq a, Num a) => a -> a -> a
56testdata/language-features/as-pattern/as-pattern01.lc 3:11-3:12
57 _g
58testdata/language-features/as-pattern/as-pattern01.lc 3:11-3:14
59 _f -> _f
60testdata/language-features/as-pattern/as-pattern01.lc 3:11-3:16
61 _d
62testdata/language-features/as-pattern/as-pattern01.lc 3:13-3:14
63 forall a . Num (MatVecScalarElem a) => a -> a -> a
64testdata/language-features/as-pattern/as-pattern01.lc 3:15-3:16
65 _c
66testdata/language-features/as-pattern/as-pattern01.lc 7:9-7:13
67 Type
68testdata/language-features/as-pattern/as-pattern01.lc 8:1-8:5
69 forall a . (Eq a, Num (MatVecScalarElem a), Eq a, Num a) => Bool
70testdata/language-features/as-pattern/as-pattern01.lc 8:8-8:9
71 forall a . (Num (MatVecScalarElem a), Eq a, Num a) => a -> a -> a
72testdata/language-features/as-pattern/as-pattern01.lc 8:8-8:11
73 _e -> _e
74testdata/language-features/as-pattern/as-pattern01.lc 8:8-8:13
75 _f
76testdata/language-features/as-pattern/as-pattern01.lc 8:8-8:16
77 _e -> Bool
78testdata/language-features/as-pattern/as-pattern01.lc 8:8-8:18
79 Bool
80testdata/language-features/as-pattern/as-pattern01.lc 8:10-8:11
81 _b
82testdata/language-features/as-pattern/as-pattern01.lc 8:12-8:13
83 _b
84testdata/language-features/as-pattern/as-pattern01.lc 8:14-8:16
85 forall a . Eq a => a -> a -> Bool
86testdata/language-features/as-pattern/as-pattern01.lc 8:17-8:18
87 _b
88------------ warnings
89Uncovered pattern(s) at testdata/language-features/as-pattern/as-pattern01.lc:1:1:
90f y@(x:xs) = x:y
91^
92Missing case(s):
93 f _ | [] <- _a
94Uncovered pattern(s) at testdata/language-features/as-pattern/as-pattern01.lc:3:1:
95g x@3 y = x + y
96^
97Missing case(s):
98 g _ _ | False <- fromInt 3 == _a \ No newline at end of file
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 @@
1testdata/language-features/as-pattern/as-pattern02.lc:7:1: 1main
2main = 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
7main = main
8------------ desugared source code
9f
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
20main :: Bool
21main
22 = _lhs
23 main
24 (_rhs (f [fromInt 0, fromInt 1] == [fromInt 1] && f [fromInt 1] == [fromInt 1]))
25------------ core code
26f :: forall a . (Eq a, Num a) => [a] -> [a]
27f
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
35main
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
41main
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
61testdata/language-features/as-pattern/as-pattern02.lc 3:1-3:2
62 forall a . (Eq a, Num a) => [a] -> [a]
63testdata/language-features/as-pattern/as-pattern02.lc 3:7-4:49
64 [_c]
65testdata/language-features/as-pattern/as-pattern02.lc 3:12-3:13
66 _e
67testdata/language-features/as-pattern/as-pattern02.lc 4:24-4:49
68 [_e]
69testdata/language-features/as-pattern/as-pattern02.lc 4:27-4:28
70 _g
71testdata/language-features/as-pattern/as-pattern02.lc 4:27-4:30
72 _f -> Bool
73testdata/language-features/as-pattern/as-pattern02.lc 4:27-4:31
74 Bool
75testdata/language-features/as-pattern/as-pattern02.lc 4:27-4:41
76 [_f] -> [_f]
77testdata/language-features/as-pattern/as-pattern02.lc 4:28-4:30
78 forall a . Eq a => a -> a -> Bool
79testdata/language-features/as-pattern/as-pattern02.lc 4:30-4:31
80 _b
81testdata/language-features/as-pattern/as-pattern02.lc 4:37-4:41
82 [_g]
83testdata/language-features/as-pattern/as-pattern02.lc 4:47-4:49
84 _g
85testdata/language-features/as-pattern/as-pattern02.lc 6:9-6:13
86 Type
87testdata/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
93testdata/language-features/as-pattern/as-pattern02.lc 7:8-7:9
94 forall a . (Eq a, Num a) => [a] -> [a]
95testdata/language-features/as-pattern/as-pattern02.lc 7:8-7:15
96 [_d]
97testdata/language-features/as-pattern/as-pattern02.lc 7:8-7:18
98 [_c] -> Bool
99testdata/language-features/as-pattern/as-pattern02.lc 7:8-7:22
100 Bool
101testdata/language-features/as-pattern/as-pattern02.lc 7:8-7:25
102 Bool -> Bool
103testdata/language-features/as-pattern/as-pattern02.lc 7:8-7:38
104 Bool
105testdata/language-features/as-pattern/as-pattern02.lc 7:10-7:15
106 [_e]
107testdata/language-features/as-pattern/as-pattern02.lc 7:11-7:12
108 _b
109testdata/language-features/as-pattern/as-pattern02.lc 7:13-7:14
110 _b | [_e]
111testdata/language-features/as-pattern/as-pattern02.lc 7:16-7:18
112 forall a . Eq a => a -> a -> Bool
113testdata/language-features/as-pattern/as-pattern02.lc 7:19-7:22
114 [_d]
115testdata/language-features/as-pattern/as-pattern02.lc 7:20-7:21
116 _b
117testdata/language-features/as-pattern/as-pattern02.lc 7:23-7:25
118 Bool -> Bool -> Bool
119testdata/language-features/as-pattern/as-pattern02.lc 7:26-7:27
120 forall a . (Eq a, Num a) => [a] -> [a]
121testdata/language-features/as-pattern/as-pattern02.lc 7:26-7:31
122 [_d]
123testdata/language-features/as-pattern/as-pattern02.lc 7:26-7:34
124 [_c] -> Bool
125testdata/language-features/as-pattern/as-pattern02.lc 7:26-7:38
126 Bool
127testdata/language-features/as-pattern/as-pattern02.lc 7:28-7:31
128 [_d]
129testdata/language-features/as-pattern/as-pattern02.lc 7:29-7:30
130 _b
131testdata/language-features/as-pattern/as-pattern02.lc 7:32-7:34
132 forall a . Eq a => a -> a -> Bool
133testdata/language-features/as-pattern/as-pattern02.lc 7:35-7:38
134 [_d]
135testdata/language-features/as-pattern/as-pattern02.lc 7:36-7:37
136 _b
137------------ warnings
138Uncovered pattern(s) at testdata/language-features/as-pattern/as-pattern02.lc:3:12:
139f e = case e of
140 ^
141Missing case(s):
142 _ | [] <- _a \ No newline at end of file
diff --git a/testdata/language-features/basic-list/dotdot01.out b/testdata/language-features/basic-list/dotdot01.out
index 964cde68..9b85b6a5 100644
--- a/testdata/language-features/basic-list/dotdot01.out
+++ b/testdata/language-features/basic-list/dotdot01.out
@@ -1 +1,16 @@
1[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0] \ No newline at end of file 1main :: [Float]
2main = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]
3------------ desugared source code
4main = _lhs main (_rhs (fromTo (fromInt 1) (fromInt 10)))
5------------ core code
6main :: [Float]
7main = _rhs [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]
8------------ tooltips
9testdata/language-features/basic-list/dotdot01.lc 2:1-2:5
10 [Float]
11testdata/language-features/basic-list/dotdot01.lc 2:8-2:15
12 [Float]
13testdata/language-features/basic-list/dotdot01.lc 2:9-2:10
14 _b
15testdata/language-features/basic-list/dotdot01.lc 2:12-2:14
16 _b \ No newline at end of file
diff --git a/testdata/language-features/pattern/caseWhere.out b/testdata/language-features/pattern/caseWhere.out
index 4791ed55..3c090334 100644
--- a/testdata/language-features/pattern/caseWhere.out
+++ b/testdata/language-features/pattern/caseWhere.out
@@ -1 +1,31 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4main
5 = _lhs
6 main
7 (_rhs
8 ((\(a :: _) -> let b = _lhs c (_rhs a) in case'Bool
9 (\(_ :: _) -> _)
10 undefined
11 a
12 b)
13 True))
14------------ core code
15main :: Bool
16main = _rhs True
17------------ tooltips
18testdata/language-features/pattern/caseWhere.lc 4:1-4:5
19 Bool
20testdata/language-features/pattern/caseWhere.lc 4:8-7:14
21 Bool
22testdata/language-features/pattern/caseWhere.lc 4:13-4:17
23 Bool
24testdata/language-features/pattern/caseWhere.lc 5:9-5:10
25 _c
26testdata/language-features/pattern/caseWhere.lc 5:9-5:15
27 Bool
28testdata/language-features/pattern/caseWhere.lc 5:14-5:15
29 _d
30testdata/language-features/pattern/caseWhere.lc 7:13-7:14
31 _b \ No newline at end of file
diff --git a/testdata/language-features/pattern/patternGuard.out b/testdata/language-features/pattern/patternGuard.out
index 4791ed55..314f4834 100644
--- a/testdata/language-features/pattern/patternGuard.out
+++ b/testdata/language-features/pattern/patternGuard.out
@@ -1 +1,49 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4main
5 = _lhs
6 main
7 (_rhs
8 ((\(a :: _) -> case'Bool
9 (\(_ :: _) -> _)
10 (case'Bool
11 (\(_ :: _) -> _)
12 undefined
13 (case'Bool (\(_ :: _) -> _) undefined True True)
14 a)
15 undefined
16 False)
17 True))
18------------ core code
19main :: Bool
20main = _rhs True
21------------ tooltips
22testdata/language-features/pattern/patternGuard.lc 4:1-4:5
23 Bool
24testdata/language-features/pattern/patternGuard.lc 4:8-5:56
25 Bool
26testdata/language-features/pattern/patternGuard.lc 4:13-4:17
27 Bool
28testdata/language-features/pattern/patternGuard.lc 5:18-5:23
29 Bool
30testdata/language-features/pattern/patternGuard.lc 5:18-5:56
31 Bool
32testdata/language-features/pattern/patternGuard.lc 5:33-5:34
33 _b
34testdata/language-features/pattern/patternGuard.lc 5:33-5:56
35 Bool
36testdata/language-features/pattern/patternGuard.lc 5:44-5:48
37 Bool
38testdata/language-features/pattern/patternGuard.lc 5:44-5:56
39 Bool
40testdata/language-features/pattern/patternGuard.lc 5:52-5:56
41 Bool
42------------ warnings
43Uncovered pattern(s) at testdata/language-features/pattern/patternGuard.lc:4:13:
44main = case True of
45 ^^^^
46Missing case(s):
47 False | False <- False
48 True | False <- False, False <- True
49 _ | True <- False \ No newline at end of file
diff --git a/testdata/language-features/pattern/viewPattern.out b/testdata/language-features/pattern/viewPattern.out
index 4791ed55..f8fdb6d9 100644
--- a/testdata/language-features/pattern/viewPattern.out
+++ b/testdata/language-features/pattern/viewPattern.out
@@ -1 +1,38 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4id = _lhs id \(a :: _) -> _rhs a
5
6main
7 = _lhs
8 main
9 (_rhs ((\(a :: _) -> case'Bool (\(_ :: _) -> _) undefined True (id a)) True))
10------------ core code
11id :: forall a . a -> a
12id = \_ a -> _rhs a
13
14main :: Bool
15main = _rhs True
16------------ tooltips
17testdata/language-features/pattern/viewPattern.lc 4:1-4:3
18 forall a . a -> a
19testdata/language-features/pattern/viewPattern.lc 4:8-4:9
20 _b
21testdata/language-features/pattern/viewPattern.lc 6:1-6:5
22 Bool
23testdata/language-features/pattern/viewPattern.lc 6:8-7:25
24 Bool
25testdata/language-features/pattern/viewPattern.lc 6:13-6:17
26 Bool
27testdata/language-features/pattern/viewPattern.lc 7:6-7:8
28 forall a . a -> a | _b
29testdata/language-features/pattern/viewPattern.lc 7:6-7:25
30 Bool
31testdata/language-features/pattern/viewPattern.lc 7:21-7:25
32 Bool
33------------ warnings
34Uncovered pattern(s) at testdata/language-features/pattern/viewPattern.lc:6:13:
35main = case True of
36 ^^^^
37Missing case(s):
38 _ | False <- id _a \ No newline at end of file
diff --git a/testdata/listcompr01.out b/testdata/listcompr01.out
index 4791ed55..0b839ae1 100644
--- a/testdata/listcompr01.out
+++ b/testdata/listcompr01.out
@@ -1 +1,93 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4a :: [(Float, Float)]
5a
6 = _lhs
7 a
8 (_rhs (concatMap (\(a :: _) -> concatMap (\(b :: _) -> [(a, b)]) [1.0]) [1.0]))
9
10main :: Bool
11main
12 = _lhs
13 main
14 (_rhs
15 ((\(a :: _) -> case'List
16 (\(_ :: _) -> _)
17 undefined
18 (\(b :: _) (c :: _) -> hlistConsCase
19 _
20 (\(d :: _) (e :: _) -> case'Bool
21 (\(_ :: _) -> _)
22 undefined
23 (hlistConsCase
24 _
25 (\(f :: _) (g :: _) -> case'Bool
26 (\(_ :: _) -> _)
27 undefined
28 (hlistNilCase
29 _
30 (case'List (\(_ :: _) -> _) True (\(_ :: _) (_ :: _) -> undefined) c)
31 g)
32 (1.0 == f))
33 e)
34 (1.0 == d))
35 b)
36 a)
37 a))
38------------ core code
39a :: [(Float, Float)]
40a = _rhs [(1.0, 1.0)]
41
42main :: Bool
43main = _rhs True
44------------ tooltips
45testdata/listcompr01.lc 1:6-1:21
46 Type
47testdata/listcompr01.lc 1:7-1:20
48 Type
49testdata/listcompr01.lc 1:8-1:13
50 Type
51testdata/listcompr01.lc 1:8-1:19
52 [Type]
53testdata/listcompr01.lc 1:14-1:19
54 Type | [Type]
55testdata/listcompr01.lc 2:1-2:2
56 [(Float, Float)]
57testdata/listcompr01.lc 2:5-2:35
58 [(Float, Float)]
59testdata/listcompr01.lc 2:6-2:11
60 (_f, _c) | [(_e, _b)]
61testdata/listcompr01.lc 2:6-2:34
62 [(_b, Float)]
63testdata/listcompr01.lc 2:7-2:8
64 _i
65testdata/listcompr01.lc 2:9-2:10
66 _f | ((_c))
67testdata/listcompr01.lc 2:17-2:22
68 [Float]
69testdata/listcompr01.lc 2:18-2:21
70 Float
71testdata/listcompr01.lc 2:29-2:34
72 [Float]
73testdata/listcompr01.lc 2:30-2:33
74 Float
75testdata/listcompr01.lc 4:9-4:13
76 Type
77testdata/listcompr01.lc 5:1-5:5
78 Bool
79testdata/listcompr01.lc 5:8-6:29
80 Bool
81testdata/listcompr01.lc 5:13-5:14
82 [(Float, Float)]
83testdata/listcompr01.lc 6:25-6:29
84 Bool | Bool | Bool | Bool | Bool | Bool | Bool
85------------ warnings
86Uncovered pattern(s) at testdata/listcompr01.lc:5:13:
87main = case a of
88 ^
89Missing case(s):
90 []
91 (HCons _ _ : _) | False <- 1.0 == _b
92 (HCons _ (HCons _ _) : _) | True <- 1.0 == _b, False <- 1.0 == _b
93 ((_, _) : _ : _) | True <- 1.0 == _b, True <- 1.0 == _b \ No newline at end of file
diff --git a/testdata/listcompr02.out b/testdata/listcompr02.out
index 4791ed55..88460fca 100644
--- a/testdata/listcompr02.out
+++ b/testdata/listcompr02.out
@@ -1 +1,205 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4a :: [(Float, Float)]
5a
6 = _lhs
7 a
8 (_rhs
9 (concatMap
10 (\(a :: _) -> concatMap (\(b :: _) -> [(a *! b, a +! b)]) [1.0, 1.0])
11 [1.0, 1.0]))
12
13main :: Bool
14main
15 = _lhs
16 main
17 (_rhs
18 ((\(a :: _) -> case'List
19 (\(_ :: _) -> _)
20 undefined
21 (\(b :: _) (c :: _) -> hlistConsCase
22 _
23 (\(d :: _) (e :: _) -> case'Bool
24 (\(_ :: _) -> _)
25 undefined
26 (hlistConsCase
27 _
28 (\(f :: _) (g :: _) -> case'Bool
29 (\(_ :: _) -> _)
30 undefined
31 (hlistNilCase
32 _
33 (case'List
34 (\(_ :: _) -> _)
35 undefined
36 (\(h :: _) (i :: _) -> hlistConsCase
37 _
38 (\(j :: _) (k :: _) -> case'Bool
39 (\(_ :: _) -> _)
40 undefined
41 (hlistConsCase
42 _
43 (\(l :: _) (m :: _) -> case'Bool
44 (\(_ :: _) -> _)
45 undefined
46 (hlistNilCase
47 _
48 (case'List
49 (\(_ :: _) -> _)
50 undefined
51 (\(n :: _) (o :: _) -> hlistConsCase
52 _
53 (\(p :: _) (q :: _) -> case'Bool
54 (\(_ :: _) -> _)
55 undefined
56 (hlistConsCase
57 _
58 (\(r :: _) (s :: _) -> case'Bool
59 (\(_ :: _) -> _)
60 undefined
61 (hlistNilCase
62 _
63 (case'List
64 (\(_ :: _) -> _)
65 undefined
66 (\(t :: _) (u :: _) -> hlistConsCase
67 _
68 (\(v :: _) (w :: _) -> case'Bool
69 (\(_ :: _) -> _)
70 undefined
71 (hlistConsCase
72 _
73 (\(x :: _) (y :: _) -> case'Bool
74 (\(_ :: _) -> _)
75 undefined
76 (hlistNilCase
77 _
78 (case'List (\(_ :: _) -> _) True (\(_ :: _) (_ :: _) -> undefined) u)
79 y)
80 (2.0 == x))
81 w)
82 (1.0 == v))
83 t)
84 o)
85 s)
86 (2.0 == r))
87 q)
88 (1.0 == p))
89 n)
90 i)
91 m)
92 (2.0 == l))
93 k)
94 (1.0 == j))
95 h)
96 c)
97 g)
98 (2.0 == f))
99 e)
100 (1.0 == d))
101 b)
102 a)
103 a))
104------------ core code
105a :: [(Float, Float)]
106a = _rhs [(1.0, 2.0), (1.0, 2.0), (1.0, 2.0), (1.0, 2.0)]
107
108main :: Bool
109main = _rhs True
110------------ tooltips
111testdata/listcompr02.lc 1:6-1:21
112 Type
113testdata/listcompr02.lc 1:7-1:20
114 Type
115testdata/listcompr02.lc 1:8-1:13
116 Type
117testdata/listcompr02.lc 1:8-1:19
118 [Type]
119testdata/listcompr02.lc 1:14-1:19
120 Type | [Type]
121testdata/listcompr02.lc 2:1-2:2
122 [(Float, Float)]
123testdata/listcompr02.lc 2:5-2:51
124 [(Float, Float)]
125testdata/listcompr02.lc 2:6-2:17
126 (_g, _g) | [(_e, _e)]
127testdata/listcompr02.lc 2:6-2:50
128 [(_d, _d)]
129testdata/listcompr02.lc 2:7-2:8
130 _k
131testdata/listcompr02.lc 2:7-2:10
132 MatVecScalarElem _j -> _j
133testdata/listcompr02.lc 2:7-2:11
134 _h
135testdata/listcompr02.lc 2:8-2:10
136 forall a . Num (MatVecScalarElem a) => a -> MatVecScalarElem a -> a
137testdata/listcompr02.lc 2:10-2:11
138 _f
139testdata/listcompr02.lc 2:12-2:13
140 _k
141testdata/listcompr02.lc 2:12-2:15
142 MatVecScalarElem _j -> _j
143testdata/listcompr02.lc 2:12-2:16
144 _i | ((_g))
145testdata/listcompr02.lc 2:13-2:15
146 forall a . Num (MatVecScalarElem a) => a -> MatVecScalarElem a -> a
147testdata/listcompr02.lc 2:15-2:16
148 MatVecScalarElem _i
149testdata/listcompr02.lc 2:23-2:33
150 [Float]
151testdata/listcompr02.lc 2:24-2:27
152 Float
153testdata/listcompr02.lc 2:29-2:32
154 Float | [Float]
155testdata/listcompr02.lc 2:40-2:50
156 [Float]
157testdata/listcompr02.lc 2:41-2:44
158 Float
159testdata/listcompr02.lc 2:46-2:49
160 Float | [Float]
161testdata/listcompr02.lc 4:9-4:13
162 Type
163testdata/listcompr02.lc 5:1-5:5
164 Bool
165testdata/listcompr02.lc 5:8-6:59
166 Bool
167testdata/listcompr02.lc 5:13-5:14
168 [(Float, Float)]
169testdata/listcompr02.lc 6:55-6:59
170 Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool
171------------ warnings
172Uncovered pattern(s) at testdata/listcompr02.lc:5:13:
173main = case a of
174 ^
175Missing case(s):
176 []
177 (HCons _ _ : _) | False <- 1.0 == _b
178 (HCons _ (HCons _ _) : _) | True <- 1.0 == _b, False <- 2.0 == _b
179 [(_, _)] | True <- 1.0 == _b, True <- 2.0 == _b
180 ((_, _) : HCons _ _ : _)
181 | True <- 1.0 == _b, True <- 2.0 == _b, False <- 1.0 == _b
182 ((_, _) : HCons _ (HCons _ _) : _)
183 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, False <- 2.0 == _b
184 [(_, _), (_, _)]
185 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True <- 2.0 == _b
186 ((_, _) : (_, _) : HCons _ _ : _)
187 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True
188 <- 2.0 == _b, False <- 1.0 == _b
189 ((_, _) : (_, _) : HCons _ (HCons _ _) : _)
190 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True
191 <- 2.0 == _b, True <- 1.0 == _b, False <- 2.0 == _b
192 [(_, _), (_, _), (_, _)]
193 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True
194 <- 2.0 == _b, True <- 1.0 == _b, True <- 2.0 == _b
195 ((_, _) : (_, _) : (_, _) : HCons _ _ : _)
196 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True
197 <- 2.0 == _b, True <- 1.0 == _b, True <- 2.0 == _b, False <- 1.0 == _b
198 ((_, _) : (_, _) : (_, _) : HCons _ (HCons _ _) : _)
199 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True
200 <- 2.0 == _b, True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, False
201 <- 2.0 == _b
202 ((_, _) : (_, _) : (_, _) : (_, _) : _ : _)
203 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True
204 <- 2.0 == _b, True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True
205 <- 2.0 == _b \ No newline at end of file
diff --git a/testdata/listcompr03.out b/testdata/listcompr03.out
index 4791ed55..9a33c1ea 100644
--- a/testdata/listcompr03.out
+++ b/testdata/listcompr03.out
@@ -1 +1,215 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4a :: [(Float, Float)]
5a
6 = _lhs
7 a
8 (_rhs
9 let a = _lhs _k (_rhs 1.0); b = _lhs k (_rhs ((\(c :: _) -> c) a)) in concatMap
10 (\(d :: _) -> concatMap (\(e :: _) -> [(b *! d *! e, d +! e)]) [1.0, 1.0])
11 [1.0, b])
12
13main :: Bool
14main
15 = _lhs
16 main
17 (_rhs
18 ((\(a :: _) -> case'List
19 (\(_ :: _) -> _)
20 undefined
21 (\(b :: _) (c :: _) -> hlistConsCase
22 _
23 (\(d :: _) (e :: _) -> case'Bool
24 (\(_ :: _) -> _)
25 undefined
26 (hlistConsCase
27 _
28 (\(f :: _) (g :: _) -> case'Bool
29 (\(_ :: _) -> _)
30 undefined
31 (hlistNilCase
32 _
33 (case'List
34 (\(_ :: _) -> _)
35 undefined
36 (\(h :: _) (i :: _) -> hlistConsCase
37 _
38 (\(j :: _) (k :: _) -> case'Bool
39 (\(_ :: _) -> _)
40 undefined
41 (hlistConsCase
42 _
43 (\(l :: _) (m :: _) -> case'Bool
44 (\(_ :: _) -> _)
45 undefined
46 (hlistNilCase
47 _
48 (case'List
49 (\(_ :: _) -> _)
50 undefined
51 (\(n :: _) (o :: _) -> hlistConsCase
52 _
53 (\(p :: _) (q :: _) -> case'Bool
54 (\(_ :: _) -> _)
55 undefined
56 (hlistConsCase
57 _
58 (\(r :: _) (s :: _) -> case'Bool
59 (\(_ :: _) -> _)
60 undefined
61 (hlistNilCase
62 _
63 (case'List
64 (\(_ :: _) -> _)
65 undefined
66 (\(t :: _) (u :: _) -> hlistConsCase
67 _
68 (\(v :: _) (w :: _) -> case'Bool
69 (\(_ :: _) -> _)
70 undefined
71 (hlistConsCase
72 _
73 (\(x :: _) (y :: _) -> case'Bool
74 (\(_ :: _) -> _)
75 undefined
76 (hlistNilCase
77 _
78 (case'List (\(_ :: _) -> _) True (\(_ :: _) (_ :: _) -> undefined) u)
79 y)
80 (2.0 == x))
81 w)
82 (1.0 == v))
83 t)
84 o)
85 s)
86 (2.0 == r))
87 q)
88 (1.0 == p))
89 n)
90 i)
91 m)
92 (2.0 == l))
93 k)
94 (1.0 == j))
95 h)
96 c)
97 g)
98 (2.0 == f))
99 e)
100 (1.0 == d))
101 b)
102 a)
103 a))
104------------ core code
105a :: [(Float, Float)]
106a = _rhs [(1.0, 2.0), (1.0, 2.0), (1.0, 2.0), (1.0, 2.0)]
107
108main :: Bool
109main = _rhs True
110------------ tooltips
111testdata/listcompr03.lc 1:6-1:21
112 Type
113testdata/listcompr03.lc 1:7-1:20
114 Type
115testdata/listcompr03.lc 1:8-1:13
116 Type
117testdata/listcompr03.lc 1:8-1:19
118 [Type]
119testdata/listcompr03.lc 1:14-1:19
120 Type | [Type]
121testdata/listcompr03.lc 2:1-2:2
122 [(Float, Float)]
123testdata/listcompr03.lc 2:6-2:20
124 (Float, Float) | [(Float, Float)]
125testdata/listcompr03.lc 2:6-2:63
126 [(Float, Float)]
127testdata/listcompr03.lc 2:7-2:8
128 Float
129testdata/listcompr03.lc 2:7-2:10
130 MatVecScalarElem Float -> Float
131testdata/listcompr03.lc 2:7-2:11
132 Float
133testdata/listcompr03.lc 2:7-2:13
134 MatVecScalarElem Float -> Float
135testdata/listcompr03.lc 2:7-2:14
136 Float
137testdata/listcompr03.lc 2:8-2:10
138 forall a . Num (MatVecScalarElem a) => a -> MatVecScalarElem a -> a
139testdata/listcompr03.lc 2:10-2:11
140 _j
141testdata/listcompr03.lc 2:11-2:13
142 forall a . Num (MatVecScalarElem a) => a -> MatVecScalarElem a -> a
143testdata/listcompr03.lc 2:13-2:14
144 _e
145testdata/listcompr03.lc 2:15-2:16
146 Float
147testdata/listcompr03.lc 2:15-2:18
148 MatVecScalarElem Float -> Float
149testdata/listcompr03.lc 2:15-2:19
150 Float | ((Float))
151testdata/listcompr03.lc 2:16-2:18
152 forall a . Num (MatVecScalarElem a) => a -> MatVecScalarElem a -> a
153testdata/listcompr03.lc 2:18-2:19
154 Float
155testdata/listcompr03.lc 2:25-2:26
156 _b | Float
157testdata/listcompr03.lc 2:29-2:32
158 Float
159testdata/listcompr03.lc 2:38-2:46
160 [Float]
161testdata/listcompr03.lc 2:39-2:42
162 Float
163testdata/listcompr03.lc 2:44-2:45
164 Float | [Float]
165testdata/listcompr03.lc 2:53-2:63
166 [Float]
167testdata/listcompr03.lc 2:54-2:57
168 Float
169testdata/listcompr03.lc 2:59-2:62
170 Float | [Float]
171testdata/listcompr03.lc 4:9-4:13
172 Type
173testdata/listcompr03.lc 5:1-5:5
174 Bool
175testdata/listcompr03.lc 5:8-6:59
176 Bool
177testdata/listcompr03.lc 5:13-5:14
178 [(Float, Float)]
179testdata/listcompr03.lc 6:55-6:59
180 Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool | Bool
181------------ warnings
182Uncovered pattern(s) at testdata/listcompr03.lc:5:13:
183main = case a of
184 ^
185Missing case(s):
186 []
187 (HCons _ _ : _) | False <- 1.0 == _b
188 (HCons _ (HCons _ _) : _) | True <- 1.0 == _b, False <- 2.0 == _b
189 [(_, _)] | True <- 1.0 == _b, True <- 2.0 == _b
190 ((_, _) : HCons _ _ : _)
191 | True <- 1.0 == _b, True <- 2.0 == _b, False <- 1.0 == _b
192 ((_, _) : HCons _ (HCons _ _) : _)
193 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, False <- 2.0 == _b
194 [(_, _), (_, _)]
195 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True <- 2.0 == _b
196 ((_, _) : (_, _) : HCons _ _ : _)
197 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True
198 <- 2.0 == _b, False <- 1.0 == _b
199 ((_, _) : (_, _) : HCons _ (HCons _ _) : _)
200 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True
201 <- 2.0 == _b, True <- 1.0 == _b, False <- 2.0 == _b
202 [(_, _), (_, _), (_, _)]
203 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True
204 <- 2.0 == _b, True <- 1.0 == _b, True <- 2.0 == _b
205 ((_, _) : (_, _) : (_, _) : HCons _ _ : _)
206 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True
207 <- 2.0 == _b, True <- 1.0 == _b, True <- 2.0 == _b, False <- 1.0 == _b
208 ((_, _) : (_, _) : (_, _) : HCons _ (HCons _ _) : _)
209 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True
210 <- 2.0 == _b, True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, False
211 <- 2.0 == _b
212 ((_, _) : (_, _) : (_, _) : (_, _) : _ : _)
213 | True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True
214 <- 2.0 == _b, True <- 1.0 == _b, True <- 2.0 == _b, True <- 1.0 == _b, True
215 <- 2.0 == _b \ No newline at end of file
diff --git a/testdata/listcompr04.out b/testdata/listcompr04.out
index 4791ed55..db27d5d9 100644
--- a/testdata/listcompr04.out
+++ b/testdata/listcompr04.out
@@ -1 +1,90 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4a :: [Float]
5a
6 = _lhs
7 a
8 (_rhs
9 let a = _lhs _k (_rhs 2.0); b = _lhs k (_rhs ((\(c :: _) -> c) a)) in concatMap
10 (\(d :: _) -> [d *! b])
11 [1.0, b])
12
13main :: Bool
14main
15 = _lhs
16 main
17 (_rhs
18 ((\(a :: _) -> case'List
19 (\(_ :: _) -> _)
20 undefined
21 (\(b :: _) (c :: _) -> case'Bool
22 (\(_ :: _) -> _)
23 undefined
24 (case'List
25 (\(_ :: _) -> _)
26 undefined
27 (\(d :: _) (e :: _) -> case'Bool
28 (\(_ :: _) -> _)
29 undefined
30 (case'List (\(_ :: _) -> _) True (\(_ :: _) (_ :: _) -> undefined) e)
31 (4.0 == d))
32 c)
33 (2.0 == b))
34 a)
35 a))
36------------ core code
37a :: [Float]
38a = _rhs [2.0, 4.0]
39
40main :: Bool
41main = _rhs True
42------------ tooltips
43testdata/listcompr04.lc 1:6-1:13
44 Type
45testdata/listcompr04.lc 1:7-1:12
46 Type
47testdata/listcompr04.lc 2:1-2:2
48 [Float]
49testdata/listcompr04.lc 2:6-2:7
50 _f
51testdata/listcompr04.lc 2:6-2:9
52 MatVecScalarElem _e -> _e
53testdata/listcompr04.lc 2:6-2:10
54 _e | [_d]
55testdata/listcompr04.lc 2:6-2:36
56 [Float]
57testdata/listcompr04.lc 2:7-2:9
58 forall a . Num (MatVecScalarElem a) => a -> MatVecScalarElem a -> a
59testdata/listcompr04.lc 2:9-2:10
60 Float
61testdata/listcompr04.lc 2:15-2:16
62 _b | Float
63testdata/listcompr04.lc 2:19-2:22
64 Float
65testdata/listcompr04.lc 2:28-2:36
66 [Float]
67testdata/listcompr04.lc 2:29-2:32
68 Float
69testdata/listcompr04.lc 2:34-2:35
70 Float | [Float]
71testdata/listcompr04.lc 4:9-4:13
72 Type
73testdata/listcompr04.lc 5:1-5:5
74 Bool
75testdata/listcompr04.lc 5:8-6:28
76 Bool
77testdata/listcompr04.lc 5:13-5:14
78 [Float]
79testdata/listcompr04.lc 6:24-6:28
80 Bool | Bool | Bool | Bool | Bool
81------------ warnings
82Uncovered pattern(s) at testdata/listcompr04.lc:5:13:
83main = case a of
84 ^
85Missing case(s):
86 []
87 (_ : _) | False <- 2.0 == _b
88 [_] | True <- 2.0 == _b
89 (_ : _ : _) | True <- 2.0 == _b, False <- 4.0 == _b
90 (_ : _ : _ : _) | True <- 2.0 == _b, True <- 4.0 == _b \ No newline at end of file
diff --git a/testdata/listcompr05.out b/testdata/listcompr05.out
index 4791ed55..0e6445e3 100644
--- a/testdata/listcompr05.out
+++ b/testdata/listcompr05.out
@@ -1 +1,128 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4isZero :: Float -> Bool
5isZero
6 = _lhs
7 isZero
8 \(a :: _) -> case'Bool (\(_ :: _) -> _) (_rhs False) (_rhs True) (0.0 == a)
9
10a :: [Float]
11a
12 = _lhs
13 a
14 (_rhs
15 (concatMap
16 (\(a :: _) -> concatMap
17 (\(b :: _) -> primIfThenElse (isZero a) [a *! b] [])
18 [1.0, 2.0])
19 [0.0, 2.0]))
20
21main :: Bool
22main
23 = _lhs
24 main
25 (_rhs
26 ((\(a :: _) -> case'List
27 (\(_ :: _) -> _)
28 undefined
29 (\(b :: _) (c :: _) -> case'Bool
30 (\(_ :: _) -> _)
31 undefined
32 (case'List
33 (\(_ :: _) -> _)
34 undefined
35 (\(d :: _) (e :: _) -> case'Bool
36 (\(_ :: _) -> _)
37 undefined
38 (case'List (\(_ :: _) -> _) True (\(_ :: _) (_ :: _) -> undefined) e)
39 (0.0 == d))
40 c)
41 (0.0 == b))
42 a)
43 a))
44------------ core code
45a :: [Float]
46a = _rhs [0.0, 0.0]
47
48isZero :: Float -> Bool
49isZero
50 = \a -> case'Bool
51 (\_ -> 'Bool)
52 (_rhs False)
53 (_rhs True)
54 (isEQ (primCompareFloat 0.0 a))
55
56main :: Bool
57main = _rhs True
58------------ tooltips
59testdata/listcompr05.lc 1:11-1:16
60 Type
61testdata/listcompr05.lc 1:20-1:24
62 Type | Type
63testdata/listcompr05.lc 2:1-2:7
64 Float -> Bool
65testdata/listcompr05.lc 2:14-2:18
66 Bool
67testdata/listcompr05.lc 2:14-3:17
68 Bool -> Bool | Bool
69testdata/listcompr05.lc 3:12-3:17
70 Bool
71testdata/listcompr05.lc 5:6-5:13
72 Type
73testdata/listcompr05.lc 5:7-5:12
74 Type
75testdata/listcompr05.lc 6:1-6:2
76 [Float]
77testdata/listcompr05.lc 6:5-6:51
78 [Float]
79testdata/listcompr05.lc 6:6-6:7
80 Float
81testdata/listcompr05.lc 6:6-6:9
82 MatVecScalarElem Float -> Float
83testdata/listcompr05.lc 6:6-6:10
84 Float | [Float]
85testdata/listcompr05.lc 6:6-6:50
86 [Float] -> [Float] | [Float] | [Float]
87testdata/listcompr05.lc 6:7-6:9
88 forall a . Num (MatVecScalarElem a) => a -> MatVecScalarElem a -> a
89testdata/listcompr05.lc 6:9-6:10
90 _d
91testdata/listcompr05.lc 6:16-6:25
92 [Float]
93testdata/listcompr05.lc 6:17-6:20
94 Float
95testdata/listcompr05.lc 6:21-6:24
96 Float | [Float]
97testdata/listcompr05.lc 6:32-6:41
98 [Float]
99testdata/listcompr05.lc 6:33-6:36
100 Float
101testdata/listcompr05.lc 6:37-6:40
102 Float | [Float]
103testdata/listcompr05.lc 6:42-6:48
104 Float -> Bool
105testdata/listcompr05.lc 6:42-6:50
106 Bool
107testdata/listcompr05.lc 6:49-6:50
108 _g
109testdata/listcompr05.lc 8:9-8:13
110 Type
111testdata/listcompr05.lc 9:1-9:5
112 Bool
113testdata/listcompr05.lc 9:8-10:27
114 Bool
115testdata/listcompr05.lc 9:13-9:14
116 [Float]
117testdata/listcompr05.lc 10:23-10:27
118 Bool | Bool | Bool | Bool | Bool
119------------ warnings
120Uncovered pattern(s) at testdata/listcompr05.lc:9:13:
121main = case a of
122 ^
123Missing case(s):
124 []
125 (_ : _) | False <- 0.0 == _b
126 [_] | True <- 0.0 == _b
127 (_ : _ : _) | True <- 0.0 == _b, False <- 0.0 == _b
128 (_ : _ : _ : _) | True <- 0.0 == _b, True <- 0.0 == _b \ No newline at end of file
diff --git a/testdata/localfun.out b/testdata/localfun.out
index 4791ed55..bf1b11b3 100644
--- a/testdata/localfun.out
+++ b/testdata/localfun.out
@@ -1 +1,61 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4f
5 = _lhs
6 f
7 \(a :: _) (b :: _) -> _rhs
8 let
9 c = _lhs g \(d :: _) -> case'Bool (\(_ :: _) -> _) (_rhs b) (_rhs True) d
10 in c a
11
12main = _lhs main (_rhs (f True False && f False True))
13------------ core code
14f :: Bool -> Bool -> Bool
15f = \a b -> _rhs (g b a)
16
17main :: Bool
18main = _rhs True
19------------ tooltips
20testdata/localfun.lc 3:1-3:2
21 Bool -> Bool -> Bool
22testdata/localfun.lc 3:9-3:10
23 Bool -> Bool
24testdata/localfun.lc 3:9-3:12
25 Bool
26testdata/localfun.lc 3:11-3:12
27 _d
28testdata/localfun.lc 5:14-5:18
29 Bool
30testdata/localfun.lc 5:14-6:16
31 Bool -> Bool
32testdata/localfun.lc 6:15-6:16
33 _e
34testdata/localfun.lc 8:1-8:5
35 Bool
36testdata/localfun.lc 8:8-8:9
37 Bool -> Bool -> Bool
38testdata/localfun.lc 8:8-8:14
39 Bool -> Bool
40testdata/localfun.lc 8:8-8:20
41 Bool
42testdata/localfun.lc 8:8-8:23
43 Bool -> Bool
44testdata/localfun.lc 8:8-8:36
45 Bool
46testdata/localfun.lc 8:10-8:14
47 Bool
48testdata/localfun.lc 8:15-8:20
49 Bool
50testdata/localfun.lc 8:21-8:23
51 Bool -> Bool -> Bool
52testdata/localfun.lc 8:24-8:25
53 Bool -> Bool -> Bool
54testdata/localfun.lc 8:24-8:31
55 Bool -> Bool
56testdata/localfun.lc 8:24-8:36
57 Bool
58testdata/localfun.lc 8:26-8:31
59 Bool
60testdata/localfun.lc 8:32-8:36
61 Bool \ No newline at end of file
diff --git a/testdata/record02.out b/testdata/record02.out
index 4791ed55..ce80a224 100644
--- a/testdata/record02.out
+++ b/testdata/record02.out
@@ -1 +1,385 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4v1 = _lhs v1 (_rhs (RecordCons @[RecItem "x" _, RecItem "y" _] (1.0, 0.0)))
5
6v2
7 = _lhs
8 v2
9 (_rhs
10 (RecordCons @[RecItem "x" _, RecItem "y" _, RecItem "z" _] (1.0, 0.0, 10.0)))
11
12v3 = _lhs v3 (_rhs (RecordCons @[RecItem "v1" _, RecItem "v2" _] (v1, v2)))
13
14f = _lhs f \(a :: _) -> _rhs (project "x" a +! project "y" a)
15
16g
17 = _lhs
18 g
19 \(a :: _) -> _rhs (project "x" (project "v1" a) +! project "z" (project "v2" a))
20
21x = _lhs x \(a :: _) -> _rhs (project "x" (a v3))
22
23z = _lhs z \(a :: _) -> _rhs (project "v" (project "c" (project "x" (a v3))))
24
25main
26 = _lhs
27 main
28 (_rhs
29 ((\(a :: _) -> case'Bool (\(_ :: _) -> _) False True (13.0 == a))
30 (f v1 +! f v2 +! g v3)))
31------------ core code
32f
33 :: forall a
34 . Num (MatVecScalarElem a)
35 => forall (b :: [RecItem])
36 . (isKeyC "x" a b, isKeyC "y" (MatVecScalarElem a) b) => RecordC b -> a
37f
38 = \a b c d e f -> _rhs
39 (PrimAddS
40 ('MatVecScalarElem a)
41 a
42 TT
43 b
44 (project a c "x" d f)
45 (project ('MatVecScalarElem a) c "y" e f))
46
47g
48 :: forall a
49 . Num (MatVecScalarElem a)
50 => forall (b :: [RecItem])
51 . isKeyC "x" a b
52 => forall (c :: [RecItem])
53 . isKeyC "v1" (RecordC b) c
54 => forall (d :: [RecItem])
55 . (isKeyC "z" (MatVecScalarElem a) d, isKeyC "v2" (RecordC d) c)
56 => RecordC c -> a
57g
58 = \a b c d e f g h i j -> _rhs
59 (PrimAddS
60 ('MatVecScalarElem a)
61 a
62 TT
63 b
64 (project a c "x" d (project ('RecordC c) e "v1" f j))
65 (project ('MatVecScalarElem a) g "z" h (project ('RecordC g) e "v2" i j)))
66
67main :: Bool
68main = _rhs True
69
70v1 :: RecordC ' ['RecItem "x" Float, 'RecItem "y" Float]
71v1 = _rhs (RecordCons (1.0, 0.0))
72
73v2 :: RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float]
74v2 = _rhs (RecordCons (1.0, 0.0, 10.0))
75
76v3
77 :: RecordC
78 ' ['RecItem "v1" (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float])
79 , 'RecItem
80 "v2"
81 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float])]
82v3 = _rhs (RecordCons (RecordCons (1.0, 0.0), RecordCons (1.0, 0.0, 10.0)))
83
84x
85 :: forall a (b :: [RecItem])
86 . isKeyC "x" a b
87 => (RecordC
88 ' ['RecItem "v1" (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float])
89 , 'RecItem
90 "v2"
91 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float])]
92 -> RecordC b)
93 -> a
94x
95 = \a b c d -> _rhs
96 (project
97 a
98 b
99 "x"
100 c
101 (d (RecordCons (RecordCons (1.0, 0.0), RecordCons (1.0, 0.0, 10.0)))))
102
103z
104 :: forall a (b :: [RecItem])
105 . isKeyC "v" a b
106 => forall (c :: [RecItem])
107 . isKeyC "c" (RecordC b) c
108 => forall (d :: [RecItem])
109 . isKeyC "x" (RecordC c) d
110 => (RecordC
111 ' ['RecItem "v1" (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float])
112 , 'RecItem
113 "v2"
114 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float])]
115 -> RecordC d)
116 -> a
117z
118 = \a b c d e f g h -> _rhs
119 (project
120 a
121 b
122 "v"
123 c
124 (project
125 ('RecordC b)
126 d
127 "c"
128 e
129 (project
130 ('RecordC d)
131 f
132 "x"
133 g
134 (h (RecordCons (RecordCons (1.0, 0.0), RecordCons (1.0, 0.0, 10.0)))))))
135------------ tooltips
136testdata/record02.lc 1:1-1:3
137 RecordC ' ['RecItem "x" Float, 'RecItem "y" Float]
138testdata/record02.lc 1:6-1:19
139 RecordC ' ['RecItem "x" Float, 'RecItem "y" Float]
140testdata/record02.lc 1:7-1:8
141 String | RecItem
142testdata/record02.lc 1:7-1:14
143 [RecItem]
144testdata/record02.lc 1:9-1:12
145 Float
146testdata/record02.lc 1:9-1:18
147 HList
148 (Float : recItemType ('RecItem "y" Float) : map RecItem Type recItemType ' [])
149testdata/record02.lc 1:13-1:14
150 String | RecItem | [RecItem]
151testdata/record02.lc 1:15-1:18
152 Float | ((Float))
153testdata/record02.lc 2:1-2:3
154 RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float]
155testdata/record02.lc 2:6-2:26
156 RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float]
157testdata/record02.lc 2:7-2:8
158 String | RecItem
159testdata/record02.lc 2:7-2:20
160 [RecItem]
161testdata/record02.lc 2:9-2:12
162 Float
163testdata/record02.lc 2:9-2:25
164 HList
165 (Float
166 : recItemType ('RecItem "y" Float)
167 : map RecItem Type recItemType ' ['RecItem "z" Float])
168testdata/record02.lc 2:13-2:14
169 String | RecItem
170testdata/record02.lc 2:13-2:20
171 [RecItem]
172testdata/record02.lc 2:15-2:18
173 Float
174testdata/record02.lc 2:15-2:25
175 HList
176 (Float : recItemType ('RecItem "z" Float) : map RecItem Type recItemType ' [])
177testdata/record02.lc 2:19-2:20
178 String | RecItem | [RecItem]
179testdata/record02.lc 2:21-2:25
180 Float | ((Float))
181testdata/record02.lc 3:1-3:3
182 RecordC
183 ' ['RecItem "v1" (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float])
184 , 'RecItem
185 "v2"
186 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float])]
187testdata/record02.lc 3:6-3:20
188 RecordC
189 ' ['RecItem "v1" (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float])
190 , 'RecItem
191 "v2"
192 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float])]
193testdata/record02.lc 3:7-3:9
194 String | RecItem
195testdata/record02.lc 3:7-3:16
196 [RecItem]
197testdata/record02.lc 3:10-3:12
198 RecordC ' ['RecItem "x" Float, 'RecItem "y" Float]
199testdata/record02.lc 3:10-3:19
200 HList
201 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float]
202 : recItemType
203 ('RecItem
204 "v2"
205 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float]))
206 : map RecItem Type recItemType ' [])
207testdata/record02.lc 3:14-3:16
208 String | RecItem | [RecItem]
209testdata/record02.lc 3:17-3:19
210 RecordC
211 ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float] | ((RecordC
212 ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float]))
213testdata/record02.lc 4:1-4:2
214 forall a
215 . Num (MatVecScalarElem a)
216 => forall (b :: [RecItem])
217 . (isKeyC "x" a b, isKeyC "y" (MatVecScalarElem a) b) => RecordC b -> a
218testdata/record02.lc 4:7-4:8
219 _g
220testdata/record02.lc 4:7-4:10
221 _c
222testdata/record02.lc 4:7-4:13
223 MatVecScalarElem _d -> _d
224testdata/record02.lc 4:7-4:17
225 _e
226testdata/record02.lc 4:9-4:10
227 String
228testdata/record02.lc 4:11-4:13
229 forall a . Num (MatVecScalarElem a) => a -> MatVecScalarElem a -> a
230testdata/record02.lc 4:14-4:15
231 RecordC _e
232testdata/record02.lc 4:14-4:17
233 _b
234testdata/record02.lc 4:16-4:17
235 String
236testdata/record02.lc 5:1-5:2
237 forall a
238 . Num (MatVecScalarElem a)
239 => forall (b :: [RecItem])
240 . isKeyC "x" a b
241 => forall (c :: [RecItem])
242 . isKeyC "v1" (RecordC b) c
243 => forall (d :: [RecItem])
244 . (isKeyC "z" (MatVecScalarElem a) d, isKeyC "v2" (RecordC d) c)
245 => RecordC c -> a
246testdata/record02.lc 5:7-5:8
247 _j
248testdata/record02.lc 5:7-5:11
249 _c
250testdata/record02.lc 5:7-5:13
251 _e
252testdata/record02.lc 5:7-5:16
253 MatVecScalarElem _f -> _f
254testdata/record02.lc 5:7-5:23
255 _i
256testdata/record02.lc 5:9-5:11
257 String
258testdata/record02.lc 5:12-5:13
259 String
260testdata/record02.lc 5:14-5:16
261 forall a . Num (MatVecScalarElem a) => a -> MatVecScalarElem a -> a
262testdata/record02.lc 5:17-5:18
263 RecordC _h
264testdata/record02.lc 5:17-5:21
265 _b
266testdata/record02.lc 5:17-5:23
267 _d
268testdata/record02.lc 5:19-5:21
269 String
270testdata/record02.lc 5:22-5:23
271 String
272testdata/record02.lc 7:1-7:2
273 forall a (b :: [RecItem])
274 . isKeyC "x" a b
275 => (RecordC
276 ' ['RecItem "v1" (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float])
277 , 'RecItem
278 "v2"
279 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float])]
280 -> RecordC b)
281 -> a
282testdata/record02.lc 7:7-7:15
283 _c
284testdata/record02.lc 7:8-7:9
285 _e
286testdata/record02.lc 7:10-7:12
287 RecordC
288 ' ['RecItem "v1" (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float])
289 , 'RecItem
290 "v2"
291 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float])]
292testdata/record02.lc 7:14-7:15
293 String
294testdata/record02.lc 8:1-8:2
295 forall a (b :: [RecItem])
296 . isKeyC "v" a b
297 => forall (c :: [RecItem])
298 . isKeyC "c" (RecordC b) c
299 => forall (d :: [RecItem])
300 . isKeyC "x" (RecordC c) d
301 => (RecordC
302 ' ['RecItem "v1" (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float])
303 , 'RecItem
304 "v2"
305 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float])]
306 -> RecordC d)
307 -> a
308testdata/record02.lc 8:7-8:19
309 _g
310testdata/record02.lc 8:8-8:9
311 _k
312testdata/record02.lc 8:8-8:15
313 _c
314testdata/record02.lc 8:8-8:17
315 _e
316testdata/record02.lc 8:10-8:12
317 RecordC
318 ' ['RecItem "v1" (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float])
319 , 'RecItem
320 "v2"
321 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float])]
322testdata/record02.lc 8:14-8:15
323 String
324testdata/record02.lc 8:16-8:17
325 String
326testdata/record02.lc 8:18-8:19
327 String
328testdata/record02.lc 10:1-10:5
329 Bool
330testdata/record02.lc 10:8-12:15
331 Bool
332testdata/record02.lc 10:13-10:14
333 forall a
334 . Num (MatVecScalarElem a)
335 => forall (b :: [RecItem])
336 . (isKeyC "x" a b, isKeyC "y" (MatVecScalarElem a) b) => RecordC b -> a
337testdata/record02.lc 10:13-10:17
338 _d
339testdata/record02.lc 10:13-10:20
340 MatVecScalarElem Float -> Float
341testdata/record02.lc 10:13-10:25
342 Float
343testdata/record02.lc 10:13-10:28
344 MatVecScalarElem Float -> Float
345testdata/record02.lc 10:13-10:33
346 Float
347testdata/record02.lc 10:15-10:17
348 RecordC ' ['RecItem "x" Float, 'RecItem "y" Float]
349testdata/record02.lc 10:18-10:20
350 forall a . Num (MatVecScalarElem a) => a -> MatVecScalarElem a -> a
351testdata/record02.lc 10:21-10:22
352 forall a
353 . Num (MatVecScalarElem a)
354 => forall (b :: [RecItem])
355 . (isKeyC "x" a b, isKeyC "y" (MatVecScalarElem a) b) => RecordC b -> a
356testdata/record02.lc 10:21-10:25
357 _d
358testdata/record02.lc 10:23-10:25
359 RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float]
360testdata/record02.lc 10:26-10:28
361 forall a . Num (MatVecScalarElem a) => a -> MatVecScalarElem a -> a
362testdata/record02.lc 10:29-10:30
363 forall a
364 . Num (MatVecScalarElem a)
365 => forall (b :: [RecItem])
366 . isKeyC "x" a b
367 => forall (c :: [RecItem])
368 . isKeyC "v1" (RecordC b) c
369 => forall (d :: [RecItem])
370 . (isKeyC "z" (MatVecScalarElem a) d, isKeyC "v2" (RecordC d) c)
371 => RecordC c -> a
372testdata/record02.lc 10:29-10:33
373 _h
374testdata/record02.lc 10:31-10:33
375 RecordC
376 ' ['RecItem "v1" (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float])
377 , 'RecItem
378 "v2"
379 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float])]
380testdata/record02.lc 11:13-11:17
381 Bool
382testdata/record02.lc 11:13-12:15
383 Bool -> Bool
384testdata/record02.lc 12:10-12:15
385 Bool \ No newline at end of file
diff --git a/testdata/reduce06.out b/testdata/reduce06.out
index 4791ed55..2ddd9a75 100644
--- a/testdata/reduce06.out
+++ b/testdata/reduce06.out
@@ -1 +1,33 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4constf = _lhs constf (_rhs \(a :: _) (_ :: _) -> a)
5
6main = _lhs main (_rhs ((\(a :: _) -> constf a False) True))
7------------ core code
8constf :: forall a b . a -> b -> a
9constf = \_ _ -> _rhs \a _ -> a
10
11main :: Bool
12main = _rhs True
13------------ tooltips
14testdata/reduce06.lc 1:1-1:7
15 forall a b . a -> b -> a
16testdata/reduce06.lc 1:18-1:19
17 _d
18testdata/reduce06.lc 3:1-3:5
19 Bool
20testdata/reduce06.lc 3:8-3:35
21 Bool
22testdata/reduce06.lc 3:15-3:21
23 forall a b . a -> b -> a
24testdata/reduce06.lc 3:15-3:23
25 _a -> _c
26testdata/reduce06.lc 3:15-3:29
27 _b
28testdata/reduce06.lc 3:22-3:23
29 _d
30testdata/reduce06.lc 3:24-3:29
31 Bool
32testdata/reduce06.lc 3:31-3:35
33 Bool \ No newline at end of file
diff --git a/testdata/swizzling.out b/testdata/swizzling.out
index 4791ed55..295c8736 100644
--- a/testdata/swizzling.out
+++ b/testdata/swizzling.out
@@ -1 +1,89 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4v = _lhs v (_rhs (V3 1.0 2.0 3.0))
5
6v2 = _lhs v2 (_rhs (swizzvector v (V2 Sx Sx)))
7
8v3 = _lhs v3 (_rhs (swizzscalar v Sx))
9
10main
11 = _lhs
12 main
13 (_rhs
14 ((\(a :: _) -> case'VecS
15 (\(_ :: _) (_ :: _) -> _)
16 (\(_ :: _) (_ :: _) -> undefined)
17 (\(b :: _) (c :: _) (d :: _) -> case'Bool
18 (\(_ :: _) -> _)
19 undefined
20 (case'Bool
21 (\(_ :: _) -> _)
22 undefined
23 (case'Bool (\(_ :: _) -> _) undefined True (2.0 == d))
24 (1.0 == c))
25 (1.0 == b))
26 (\(_ :: _) (_ :: _) (_ :: _) (_ :: _) -> undefined)
27 a)
28 (swizzvector v (V3 Sx Sx Sy))))
29------------ core code
30main :: Bool
31main = _rhs True
32
33v :: VecS Float 3
34v = _rhs (V3 1.0 2.0 3.0)
35
36v2 :: VecS Float 2
37v2 = _rhs (V2 1.0 1.0)
38
39v3 :: Float
40v3 = _rhs 1.0
41------------ tooltips
42testdata/swizzling.lc 3:1-3:2
43 VecS Float 3
44testdata/swizzling.lc 3:5-3:7
45 forall a . a -> a -> a -> VecS a 3
46testdata/swizzling.lc 3:5-3:11
47 Float -> Float -> VecS Float 3
48testdata/swizzling.lc 3:5-3:15
49 Float -> VecS Float 3
50testdata/swizzling.lc 3:5-3:19
51 VecS Float 3
52testdata/swizzling.lc 3:8-3:11
53 Float
54testdata/swizzling.lc 3:12-3:15
55 Float
56testdata/swizzling.lc 3:16-3:19
57 Float
58testdata/swizzling.lc 4:1-4:3
59 VecS Float 2
60testdata/swizzling.lc 4:6-4:7
61 VecS Float 3
62testdata/swizzling.lc 4:6-4:10
63 VecS Float 2
64testdata/swizzling.lc 5:1-5:3
65 Float
66testdata/swizzling.lc 5:6-5:7
67 VecS Float 3
68testdata/swizzling.lc 5:6-5:9
69 Float
70testdata/swizzling.lc 7:1-7:5
71 Bool
72testdata/swizzling.lc 7:8-8:27
73 Bool
74testdata/swizzling.lc 7:13-7:14
75 VecS Float 3
76testdata/swizzling.lc 7:13-7:18
77 VecS Float 3
78testdata/swizzling.lc 8:23-8:27
79 Bool | Bool | Bool | Bool
80------------ warnings
81Uncovered pattern(s) at testdata/swizzling.lc:7:13:
82main = case v%xxy of
83 ^^^^^
84Missing case(s):
85 (V2 _ _)
86 (V3 _ _ _) | False <- 1.0 == _c
87 (V3 _ _ _) | True <- 1.0 == _c, False <- 1.0 == _b
88 (V3 _ _ _) | True <- 1.0 == _c, True <- 1.0 == _b, False <- 2.0 == _a
89 (V4 _ _ _ _) \ No newline at end of file
diff --git a/testdata/typeclass0.out b/testdata/typeclass0.out
index 4791ed55..bd1ec8c4 100644
--- a/testdata/typeclass0.out
+++ b/testdata/typeclass0.out
@@ -1 +1,27 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4main
5 = _lhs
6 main
7 (_rhs
8 ((\(a :: _) -> case'Bool (\(_ :: _) -> _) undefined True (1.0 == a))
9 (fromInt 1)))
10------------ core code
11main :: Bool
12main = _rhs True
13------------ tooltips
14testdata/typeclass0.lc 2:1-2:5
15 Bool
16testdata/typeclass0.lc 2:8-3:16
17 Bool
18testdata/typeclass0.lc 2:13-2:14
19 _b
20testdata/typeclass0.lc 3:12-3:16
21 Bool
22------------ warnings
23Uncovered pattern(s) at testdata/typeclass0.lc:2:13:
24main = case 1 of
25 ^
26Missing case(s):
27 _ | False <- 1.0 == _a \ No newline at end of file
diff --git a/testdata/typesyn.out b/testdata/typesyn.out
index 4791ed55..6dc5080a 100644
--- a/testdata/typesyn.out
+++ b/testdata/typesyn.out
@@ -1 +1,68 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4'B = _lhs 'B (_rhs 'Bool)
5
6'F = _lhs 'F \(a :: _) (b :: _) -> _rhs ' (a, b)
7
8main = _lhs main (_rhs ((True :: B) && fst ((True, 'c') :: F Bool Char)))
9------------ core code
10'B :: Type
11'B = _rhs 'Bool
12
13'F :: Type -> Type -> Type
14'F = \a b -> _rhs ' (a, b)
15
16main :: Bool
17main = _rhs True
18------------ tooltips
19testdata/typesyn.lc 3:6-3:7
20 Type
21testdata/typesyn.lc 3:10-3:14
22 Type
23testdata/typesyn.lc 5:6-5:7
24 Type -> Type -> Type
25testdata/typesyn.lc 5:14-5:20
26 Type
27testdata/typesyn.lc 5:15-5:16
28 _e
29testdata/typesyn.lc 5:15-5:19
30 [Type]
31testdata/typesyn.lc 5:18-5:19
32 _c | [Type]
33testdata/typesyn.lc 7:1-7:5
34 Bool
35testdata/typesyn.lc 7:8-7:22
36 Bool -> Bool
37testdata/typesyn.lc 7:8-7:55
38 Bool
39testdata/typesyn.lc 7:9-7:13
40 Bool
41testdata/typesyn.lc 7:9-7:18
42 B
43testdata/typesyn.lc 7:17-7:18
44 Type
45testdata/typesyn.lc 7:20-7:22
46 Bool -> Bool -> Bool
47testdata/typesyn.lc 7:23-7:26
48 forall a b . (a, b) -> a
49testdata/typesyn.lc 7:23-7:55
50 Bool
51testdata/typesyn.lc 7:28-7:39
52 (Bool, Char)
53testdata/typesyn.lc 7:28-7:54
54 F Bool Char
55testdata/typesyn.lc 7:29-7:33
56 Bool
57testdata/typesyn.lc 7:35-7:38
58 Char | ((Char))
59testdata/typesyn.lc 7:43-7:44
60 Type -> Type -> Type
61testdata/typesyn.lc 7:43-7:49
62 Type -> Type
63testdata/typesyn.lc 7:43-7:54
64 Type
65testdata/typesyn.lc 7:45-7:49
66 Type
67testdata/typesyn.lc 7:50-7:54
68 Type \ No newline at end of file