summaryrefslogtreecommitdiff
path: root/testdata/language-features/recursion/mutualRec.out
blob: e802e88842e5fd940db3d7d00cd86a6c3f717568 (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 :: Bool
main = True
------------ desugared source code
_y_x
  = primFix
    \(a :: _) -> let
      b = a;
      c
        = (\(e :: _) -> hlistConsCase
            _
            (\(_ :: _) (f :: _) -> hlistConsCase
              _
              (\(g :: _) (h :: _) -> hlistNilCase _ g h)
              f)
            e)
          b;
      d
        = (\(i :: _) -> hlistConsCase
            _
            (\(j :: _) (k :: _) -> hlistConsCase
              _
              (\(_ :: _) (l :: _) -> hlistNilCase _ j l)
              k)
            i)
          b
      in (_lhs y (_rhs (True : c)), _lhs x (_rhs (False : d)))

_x_y = _y_x

x
  = (\(a :: _) -> hlistConsCase
      _
      (\(_ :: _) (b :: _) -> hlistConsCase
        _
        (\(c :: _) (d :: _) -> hlistNilCase _ c d)
        b)
      a)
    _x_y

y
  = (\(a :: _) -> hlistConsCase
      _
      (\(b :: _) (c :: _) -> hlistConsCase
        _
        (\(_ :: _) (d :: _) -> hlistNilCase _ b d)
        c)
      a)
    _x_y

main
  = _lhs
    main
    (_rhs
      ((\(a :: _) -> case'List
          (\(_ :: _) -> _)
          undefined
          (\(b :: _) (c :: _) -> case'Bool
            (\(_ :: _) -> _)
            (case'List
              (\(_ :: _) -> _)
              undefined
              (\(d :: _) (e :: _) -> case'Bool
                (\(_ :: _) -> _)
                undefined
                (case'List
                  (\(_ :: _) -> _)
                  undefined
                  (\(f :: _) (_ :: _) -> case'Bool (\(_ :: _) -> _) True undefined f)
                  e)
                d)
              c)
            undefined
            b)
          a)
        x))
------------ core code
_x_y :: ([Bool], [Bool])
_x_y = primFix _ \a -> <<1st constructor of 'HList>>

_y_x :: ([Bool], [Bool])
_y_x = primFix _ \a -> <<1st constructor of 'HList>>

main :: Bool
main = _rhs True

x :: [Bool]
x = _rhs (False : y)

y :: [Bool]
y = _rhs (True : x)
------------ tooltips
4:1-4:2
    _f | _c | _c | _f | _c | _c | [Bool]
4:1-5:2
    _b | _e | (_e, _d) | ([Bool], [Bool]) | ([Bool], [Bool]) | ([Bool]
    , [Bool]) | ([Bool], [Bool]) | ([Bool], [Bool])
4:5-4:10
    Bool
4:5-4:11
    [Bool] -> [Bool]
4:5-4:13
    [Bool] | (([Bool]))
4:5-5:12
    ([Bool], [Bool])
4:10-4:11
    forall a . a -> [a] -> [a]
4:12-4:13
    _e
5:1-5:2
    _k | _h | _d | _k | _h | _d | [Bool]
5:5-5:9
    Bool
5:5-5:10
    [Bool] -> [Bool]
5:5-5:12
    [Bool]
5:9-5:10
    forall a . a -> [a] -> [a]
5:11-5:12
    _d
7:1-7:5
    Bool
7:8-8:34
    Bool
7:13-7:14
    [Bool]
8:30-8:34
    Bool | Bool | Bool | Bool | Bool | Bool
------------ warnings
Uncovered pattern(s) at ./testdata/language-features/recursion/mutualRec.lc:7:13:
main = case x of
            ^
Missing case(s):
     []
     [False]
     (False : False : _)
     [False, True]
     (False : True : True : _)
     (True : _)