summaryrefslogtreecommitdiff
path: root/testdata/typeclass.out
blob: 8a79e832777b5666f8592b5af041441a47fbf5b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
main is not found
------------ desugared source code
infix 4 ==

infix 4 /=

infix 4 <

infixr 3 &&

infixr 2 ||

not = \(a :: _) -> case'Bool (\_ -> _) (_rhs True) (_rhs False) a

(&&) = \(a :: _) (b :: _) -> case'Bool (\_ -> _) (_rhs False) (_rhs b) a

(||) = \(a :: _) (b :: _) -> case'Bool (\_ -> _) (_rhs b) (_rhs True) a

'Eq :: Type -> Type
'Eq
  = \(a :: _) -> match'Bool
    (\_ -> _)
    (_rhs 'Unit)
    a
    (_rhs ('Empty "no instance of 'Eq on ???"))

(==) :: forall a . Eq a => a -> a -> Bool
(==)
  = \ @a @_ -> match'Bool
    (\_ -> _)
    (_rhs
      let b
        = \(c :: _) (d :: _) -> case'Bool (\_ -> _) (_rhs (not d)) (_rhs d) c in b)
    a
    (_rhs undefined)

(/=) = \(a :: _) (b :: _) -> _rhs (not (a == b))

(==.)
  = \(a :: _) (b :: _) -> case'List
    (\_ -> _)
    (case'List (\_ -> _) (_rhs True) (\_ _ -> _rhs False) b)
    (\_ (c :: _) -> case'List
      (\_ -> _)
      (_rhs False)
      (\_ (d :: _) -> _rhs (c ==. d))
      b)
    a
------------ trace
not :: Bool -> Bool
(&&) :: Bool -> Bool -> Bool
(||) :: Bool -> Bool -> Bool
'Eq :: Type -> Type
(==) :: forall a . Eq a => a -> a -> Bool
(/=) :: forall a . Eq a => a -> a -> Bool
(==.) :: forall a b . [a] -> [b] -> Bool
------------ tooltips
testdata/typeclass.lc 8:1-8:4
    Bool -> Bool
testdata/typeclass.lc 8:12-8:17
    Bool
testdata/typeclass.lc 8:12-9:17
    Bool -> Bool
testdata/typeclass.lc 9:13-9:17
    Bool
testdata/typeclass.lc 11:6-11:8
    Bool -> Bool -> Bool
testdata/typeclass.lc 11:13-11:14
    _b
testdata/typeclass.lc 11:13-12:19
    Bool -> Bool
testdata/typeclass.lc 12:14-12:19
    Bool
testdata/typeclass.lc 14:7-14:9
    Bool -> Bool -> Bool
testdata/typeclass.lc 14:14-14:15
    _c
testdata/typeclass.lc 14:14-15:17
    Bool -> Bool
testdata/typeclass.lc 15:13-15:17
    Bool
testdata/typeclass.lc 17:7-17:9
    Type -> Type | Type -> Type
testdata/typeclass.lc 17:7-18:27
    Type
testdata/typeclass.lc 18:6-18:8
    forall a . Eq a => a -> a -> Bool
testdata/typeclass.lc 18:13-18:14
    Type
testdata/typeclass.lc 18:13-18:27
    Type
testdata/typeclass.lc 18:18-18:19
    Type
testdata/typeclass.lc 18:18-18:27
    Type
testdata/typeclass.lc 18:23-18:27
    Type | Type
testdata/typeclass.lc 20:3-20:5
    forall a . Eq a => a -> a -> Bool
testdata/typeclass.lc 20:10-20:13
    Bool -> Bool
testdata/typeclass.lc 20:10-20:22
    Bool
testdata/typeclass.lc 20:15-20:16
    _f
testdata/typeclass.lc 20:15-20:19
    _e -> Bool
testdata/typeclass.lc 20:15-20:21
    Bool
testdata/typeclass.lc 20:17-20:19
    forall a . Eq a => a -> a -> Bool
testdata/typeclass.lc 20:20-20:21
    _c
testdata/typeclass.lc 23:17-23:18
    Bool
testdata/typeclass.lc 23:17-24:23
    Bool -> Bool
testdata/typeclass.lc 24:18-24:21
    Bool -> Bool
testdata/typeclass.lc 24:18-24:23
    Bool
testdata/typeclass.lc 24:22-24:23
    _b
testdata/typeclass.lc 26:6-26:9
    forall a b . [a] -> [b] -> Bool
testdata/typeclass.lc 26:17-26:21
    Bool
testdata/typeclass.lc 26:17-28:22
    [_a] -> Bool | Bool
testdata/typeclass.lc 27:36-27:38
    [_j]
testdata/typeclass.lc 27:36-28:22
    [_a] -> Bool | Bool
testdata/typeclass.lc 27:39-27:42
    _l
testdata/typeclass.lc 27:43-27:45
    [_g]
testdata/typeclass.lc 28:17-28:22
    Bool | Bool