summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T22611.stderr
blob: 709751732d70524b0b62687739dcfcea382f02f3 (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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285

==================== Tidy Core ====================
Result size of Tidy Core
  = {terms: 544, types: 486, coercions: 0, joins: 0/7}

$WFound
  = \ @a @m conrep conrep1 ->
      case conrep of conrep2 { __DEFAULT -> Found conrep2 conrep1 }

$fFunctorCheckRes_$c<$
  = \ @a @a1 @b z ds ->
      case z of z1 { __DEFAULT ->
      case ds of {
        NotFound -> NotFound;
        Found a2 a3 -> Found a2 z1
      }
      }

$fFunctorCheckRes_$cfmap
  = \ @a @a1 @b f ds ->
      case f of f1 { __DEFAULT ->
      case ds of {
        NotFound -> NotFound;
        Found a2 a3 -> Found a2 (f1 a3)
      }
      }

$fFunctorCheckRes
  = \ @a -> C:Functor $fFunctorCheckRes_$cfmap $fFunctorCheckRes_$c<$

Rec {
$w$sgo15
  = \ @a1 ww ww1 ds ds1 ->
      case ds of ds2 { __DEFAULT ->
      case ds1 of {
        Bin ipv2 ipv3 ipv4 ipv5 ipv6 ->
          case ds2 of wild1 {
            Left a2 ->
              case ipv3 of {
                Left b2 ->
                  case a2 of { I# x# ->
                  case b2 of { I# y# ->
                  case <# x# y# of {
                    __DEFAULT ->
                      case ==# x# y# of {
                        __DEFAULT ->
                          $w$sgo15
                            (or# (uncheckedShiftRL# ww 1#) 9223372036854775808##)
                            (or# (uncheckedShiftRL# ww1 1#) (uncheckedShiftL# ww 63#))
                            wild1
                            ipv6;
                        1# ->
                          case ww1 of ds3 {
                            __DEFAULT ->
                              let {
                                hi1 = or# (uncheckedShiftRL# ww 1#) 9223372036854775808## } in
                              let { zeros = word2Int# (ctz# ds3) } in
                              (# Just ipv4, uncheckedShiftRL# hi1 zeros,
                                 or#
                                   (uncheckedShiftRL#
                                      (or# (uncheckedShiftRL# ds3 1#) (uncheckedShiftL# ww 63#))
                                      zeros)
                                   (uncheckedShiftL# hi1 (-# 64# zeros)) #);
                            0## ->
                              (# Just ipv4, 0##,
                                 uncheckedShiftRL#
                                   (or# (uncheckedShiftRL# ww 1#) 9223372036854775808##)
                                   (word2Int# (ctz# ww)) #)
                          }
                      };
                    1# ->
                      $w$sgo15
                        (uncheckedShiftRL# ww 1#)
                        (or# (uncheckedShiftRL# ww1 1#) (uncheckedShiftL# ww 63#))
                        wild1
                        ipv5
                  }
                  }
                  };
                Right ipv ->
                  $w$sgo15
                    (uncheckedShiftRL# ww 1#)
                    (or# (uncheckedShiftRL# ww1 1#) (uncheckedShiftL# ww 63#))
                    wild1
                    ipv5
              };
            Right a2 ->
              case ipv3 of {
                Left ipv ->
                  $w$sgo15
                    (or# (uncheckedShiftRL# ww 1#) 9223372036854775808##)
                    (or# (uncheckedShiftRL# ww1 1#) (uncheckedShiftL# ww 63#))
                    wild1
                    ipv6;
                Right b2 ->
                  case a2 of { C# x ->
                  case b2 of { C# y ->
                  case eqChar# x y of {
                    __DEFAULT ->
                      case leChar# x y of {
                        __DEFAULT ->
                          $w$sgo15
                            (or# (uncheckedShiftRL# ww 1#) 9223372036854775808##)
                            (or# (uncheckedShiftRL# ww1 1#) (uncheckedShiftL# ww 63#))
                            wild1
                            ipv6;
                        1# ->
                          $w$sgo15
                            (uncheckedShiftRL# ww 1#)
                            (or# (uncheckedShiftRL# ww1 1#) (uncheckedShiftL# ww 63#))
                            wild1
                            ipv5
                      };
                    1# ->
                      case ww1 of ds3 {
                        __DEFAULT ->
                          let {
                            hi1 = or# (uncheckedShiftRL# ww 1#) 9223372036854775808## } in
                          let { zeros = word2Int# (ctz# ds3) } in
                          (# Just ipv4, uncheckedShiftRL# hi1 zeros,
                             or#
                               (uncheckedShiftRL#
                                  (or# (uncheckedShiftRL# ds3 1#) (uncheckedShiftL# ww 63#)) zeros)
                               (uncheckedShiftL# hi1 (-# 64# zeros)) #);
                        0## ->
                          (# Just ipv4, 0##,
                             uncheckedShiftRL#
                               (or# (uncheckedShiftRL# ww 1#) 9223372036854775808##)
                               (word2Int# (ctz# ww)) #)
                      }
                  }
                  }
                  }
              }
          };
        Tip ->
          case ww1 of ds3 {
            __DEFAULT ->
              let {
                hi1 = or# (uncheckedShiftRL# ww 1#) 9223372036854775808## } in
              let { zeros = word2Int# (ctz# ds3) } in
              (# Nothing, uncheckedShiftRL# hi1 zeros,
                 or#
                   (uncheckedShiftRL#
                      (or# (uncheckedShiftRL# ds3 1#) (uncheckedShiftL# ww 63#)) zeros)
                   (uncheckedShiftL# hi1 (-# 64# zeros)) #);
            0## ->
              (# Nothing, 0##,
                 uncheckedShiftRL#
                   (or# (uncheckedShiftRL# ww 1#) 9223372036854775808##)
                   (word2Int# (ctz# ww)) #)
          }
      }
      }
end Rec }

$salterF
  = \ @v @a f1 k1 m ->
      case $w$sgo15 9223372036854775808## 0## k1 m of
      { (# ww, ww1, ww2 #) ->
      case f1 ww of {
        NotFound -> NotFound;
        Found a1 a2 ->
          Found
            a1
            (case a2 of {
               Nothing ->
                 case ww of {
                   Nothing -> m;
                   Just old -> case $wbogus (##) of { __DEFAULT -> $wgo ww1 ww2 m }
                 };
               Just new ->
                 case new of new1 { __DEFAULT ->
                 case ww of {
                   Nothing -> $winsertAlong ww1 ww2 k1 new1 m;
                   Just ds -> $wreplaceAlong ww1 ww2 new1 m
                 }
                 }
             })
      }
      }

lvl
  = \ @v ds ->
      case ds of {
        Nothing -> NotFound;
        Just t -> case t of conrep { __DEFAULT -> Found conrep Nothing }
      }

Rec {
$wfoo
  = \ @v x subst ->
      case $salterF lvl x subst of {
        NotFound ->
          case x of wild1 {
            Left x1 -> $wfoo wild1 subst;
            Right y ->
              $wfoo
                (Right
                   (case y of { C# c# ->
                    let { i# = +# (ord# c#) 1# } in
                    case leWord# (int2Word# i#) 1114111## of {
                      __DEFAULT -> $wlvl i#;
                      1# -> C# (chr# i#)
                    }
                    }))
                subst
          };
        Found p q -> (# p, q #)
      }
end Rec }

foo
  = \ @v x subst ->
      case $wfoo x subst of { (# ww, ww1 #) -> Just (ww, ww1) }

$trModule4 = "main"#

$trModule3 = TrNameS $trModule4

$trModule2 = "T22611"#

$trModule1 = TrNameS $trModule2

$trModule = Module $trModule3 $trModule1

$krep = KindRepVar 1#

$krep1 = KindRepVar 0#

$tcCheckRes2 = "CheckRes"#

$tcCheckRes1 = TrNameS $tcCheckRes2

$tcCheckRes
  = TyCon
      2720702776801478797#Word64
      9603347784695333983#Word64
      $trModule
      $tcCheckRes1
      0#
      krep$*->*->*

$krep2 = : $krep []

$krep3 = : $krep1 $krep2

$tc'NotFound1 = KindRepTyConApp $tcCheckRes $krep3

$tc'NotFound3 = "'NotFound"#

$tc'NotFound2 = TrNameS $tc'NotFound3

$tc'NotFound
  = TyCon
      11874520794839816490#Word64
      7404827959462889921#Word64
      $trModule
      $tc'NotFound2
      2#
      $tc'NotFound1

$krep4 = KindRepFun $krep $tc'NotFound1

$tc'Found1 = KindRepFun $krep1 $krep4

$tc'Found3 = "'Found"#

$tc'Found2 = TrNameS $tc'Found3

$tc'Found
  = TyCon
      14824125456853884021#Word64
      17338070180827954559#Word64
      $trModule
      $tc'Found2
      2#
      $tc'Found1


------ Local rules for imported ids --------
"SPEC/T22611 alterF @(CheckRes v) @(Either Int Char) @_" [2]
    forall @v @a $dFunctor $dOrd. alterF $dFunctor $dOrd = $salterF