summaryrefslogtreecommitdiff
path: root/testdata/language-features/adt/adt05.out
diff options
context:
space:
mode:
Diffstat (limited to 'testdata/language-features/adt/adt05.out')
-rw-r--r--testdata/language-features/adt/adt05.out145
1 files changed, 142 insertions, 3 deletions
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