[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / compiler / tests / deSugar / ds020.stderr
1 Desugared:
2 Test.a :: for all d, e, f, g. ([d], [e], [f]) -> [g]
3 Test.a = /\ t118 t119 t120 t121 -> \ ds.314 -> Nil! t121
4 Test.b :: for all d, e. [d] -> [e]
5 Test.b =
6     /\ t134 t135 -> \ ds.323 ->
7         let
8           x.328 =
9               case ds.323 of {
10                 (:) x.324 ds.325 ->
11                     case ds.325 of {
12                       (:) xs.326 ys.327 -> x.324
13                       _ -> 
14                           (error Char)
15                               "``impossible'' pattern-matching error!\n"S
16                     }
17                 _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
18               } in
19         let
20           xs.333 =
21               case ds.323 of {
22                 (:) x.329 ds.330 ->
23                     case ds.330 of {
24                       (:) xs.331 ys.332 -> xs.331
25                       _ -> 
26                           (error Char)
27                               "``impossible'' pattern-matching error!\n"S
28                     }
29                 _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
30               } in
31         let
32           ys.338 =
33               case ds.323 of {
34                 (:) x.334 ds.335 ->
35                     case ds.335 of {
36                       (:) xs.336 ys.337 -> ys.337
37                       _ -> 
38                           (error Char)
39                               "``impossible'' pattern-matching error!\n"S
40                     }
41                 _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
42               }
43         in  Nil! t135
44 Test.c :: for all d, e, f, g. <Fractional f> -> <Num e> -> g -> d -> e -> f -> g
45 Test.c =
46     /\ o139 t140 t143 o138 -> \ dict.144 dict.141 ->
47         let
48           dict.145 = (sdsel.Num.Eq t143) ((sdsel.Fractional.Num t143) dict.144) in
49         let dict.142 = (sdsel.Num.Eq t140) dict.141 in
50         let c.137 = \ x.87 ds.339 ds.340 ds.341 -> let x.87 = x.87 in  x.87
51         in  c.137
52 Test.d :: for all d, e. <Num e> -> <Ord d> -> <Num d> -> d -> e
53 Test.d =
54     /\ t171 t174 -> \ dict.175 dict.173 dict.172 ->
55         let dict.169 = dict.175 in
56         let dict.163 = dict.169 in
57         let dict.157 = dict.163 in
58         let dict.152 = dict.157 in
59         let dict.166 = dict.172 in
60         let dict.160 = dict.166 in
61         let dict.154 = dict.160 in
62         let dict.149 = dict.154 in
63         let dict.167 = dict.173 in
64         let dict.161 = dict.167 in
65         let dict.155 = (sdsel.Ord.Eq t171) dict.161 in
66         let dict.150 = dict.155 in
67         let
68           d.147 =
69               \ ds.344 ->
70                   let
71                     fail.345 =
72                         (error t174)
73                             "\"ds020.hs\", line 17: pattern-matching failure [function binding]\n"S in
74                   let
75                     fail.349 =
76                         let
77                           n.88 =
78                               let
79                                 n.346 =
80                                     (fromInteger t171) dict.160 (MkInteger! 4##)
81                               in 
82                                 case
83                                     ((>= t171)
84                                          dict.161
85                                          ds.344
86                                          ((fromInteger t171)
87                                               dict.160 (MkInteger! 4##)))
88                                 of {
89                                   True ->
90                                       let
91                                         n.88 =
92                                             (- t171)
93                                                 dict.160
94                                                 ds.344
95                                                 ((fromInteger t171)
96                                                      dict.160 (MkInteger! 4##))
97                                       in  n.88
98                                   False ->
99                                       (error Char)
100                                           "``impossible'' pattern-matching error!\n"S
101                                 }
102                         in  (fromInteger t174) dict.163 (MkInteger! 2##)
103                   in 
104                     case
105                         ((== t171)
106                              dict.150
107                              ((fromInteger t171) dict.149 (MkInteger! 11##))
108                              ds.344)
109                     of {
110                       True -> (fromInteger t174) dict.152 (MkInteger! 4##)
111                       False ->
112                           case
113                               ((== t171)
114                                    dict.155
115                                    ((fromInteger t171)
116                                         dict.154 (MkInteger! 12##))
117                                    ds.344)
118                           of {
119                             True -> (fromInteger t174) dict.157 (MkInteger! 3##)
120                             False -> fail.349
121                           }
122                     }
123         in  d.147
124 Test.f :: for all d, e. [d] -> [e]
125 Test.f =
126     /\ t182 t183 -> \ x.352 ->
127         let
128           x.353 =
129               case x.352 of {
130                 Nil -> x.352
131                 _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
132               }
133         in  Nil! t183
134 Test.g :: for all d, e. [d] -> [e]
135 Test.g = /\ t186 t187 -> \ ds.356 -> Nil! t187
136 ds.357 :: ([t191], [t192], [t193])
137 ds.357 = MkTuple3! [t191] [t192] [t193] (Nil! t191) (Nil! t192) (Nil! t193)
138 ds.358 :: ([t197], [t198], [t199])
139 ds.358 = MkTuple3! [t197] [t198] [t199] (Nil! t197) (Nil! t198) (Nil! t199)
140 ds.359 :: [t208]
141 ds.359 = /\ t208 -> Nil! t208
142 Test.x1 :: for all d. d
143 Test.x1 =
144     /\ t208 ->
145         case ds.359 of {
146           (:) x1.363 ds.364 ->
147               case ds.364 of {
148                 (:) xs1.365 ys1.366 -> x1.363
149                 _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
150               }
151           _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
152         }
153 Test.xs1 :: for all d. d
154 Test.xs1 =
155     /\ t208 ->
156         case ds.359 of {
157           (:) x1.367 ds.368 ->
158               case ds.368 of {
159                 (:) xs1.369 ys1.370 -> xs1.369
160                 _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
161               }
162           _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
163         }
164 Test.ys1 :: for all d. [d]
165 Test.ys1 =
166     /\ t208 ->
167         case ds.359 of {
168           (:) x1.371 ds.372 ->
169               case ds.372 of {
170                 (:) xs1.373 ys1.374 -> ys1.374
171                 _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
172               }
173           _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
174         }
175 ds.375 :: [t217]
176 ds.375 = /\ t217 -> Nil! t217
177 Test.x :: for all d. d
178 Test.x =
179     /\ t217 ->
180         case ds.375 of {
181           (:) x.379 ds.380 ->
182               case ds.380 of {
183                 (:) xs.381 ys.382 ->
184                     let ys.383 = ys.382 in
185                     let xs.384 = xs.381 in let x.385 = x.379 in  x.385
186                 _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
187               }
188           _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
189         }
190 Test.xs :: for all d. d
191 Test.xs =
192     /\ t217 ->
193         case ds.375 of {
194           (:) x.386 ds.387 ->
195               case ds.387 of {
196                 (:) xs.388 ys.389 ->
197                     let ys.390 = ys.389 in
198                     let xs.391 = xs.388 in let x.392 = x.386 in  xs.391
199                 _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
200               }
201           _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
202         }
203 Test.ys :: for all d. [d]
204 Test.ys =
205     /\ t217 ->
206         case ds.375 of {
207           (:) x.393 ds.394 ->
208               case ds.394 of {
209                 (:) xs.395 ys.396 ->
210                     let ys.397 = ys.396 in
211                     let xs.398 = xs.395 in let x.399 = x.393 in  ys.397
212                 _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
213               }
214           _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
215         }
216 {- plain CoRec -}
217 ds.406 :: [t254]
218 ds.406 =
219     /\ t254 ->
220         let dict.410 = dfun.Eq.Int in
221         let
222           eq2.413 =
223               eqInt
224                   (let dict.411 = dfun.Num.Int in  MkInt! 2#)
225                   (let dict.412 = dfun.Num.Int in  MkInt! 4#) in
226         let dict.414 = dfun.Eq.Int in
227         let
228           eq3.417 =
229               eqInt
230                   (let dict.415 = dfun.Num.Int in  MkInt! 3#)
231                   (let dict.416 = dfun.Num.Int in  MkInt! 3#) in
232         let dict.418 = dfun.Eq.Int in
233         let
234           eq4.421 =
235               eqInt
236                   (let dict.419 = dfun.Num.Int in  MkInt! 4#)
237                   (let dict.420 = dfun.Num.Int in  MkInt! 2#)
238         in 
239           case eq2.413 of {
240             True -> Nil! t254
241             False ->
242                 case eq3.417 of {
243                   True -> :! t254 (Test.x2 t254) (Nil! t254)
244                   False ->
245                       case eq4.421 of {
246                         True -> :! t254 (Test.x2 t254) (Nil! t254)
247                         False -> Nil! t254
248                       }
249                 }
250           }
251 Test.x2 :: for all d. d
252 Test.x2 =
253     /\ t254 ->
254         case ds.406 of {
255           (:) x2.422 ds.423 ->
256               case ds.423 of {
257                 (:) xs2.424 ys2.425 -> x2.422
258                 _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
259               }
260           _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
261         }
262 Test.xs2 :: for all d. d
263 Test.xs2 =
264     /\ t254 ->
265         case ds.406 of {
266           (:) x2.426 ds.427 ->
267               case ds.427 of {
268                 (:) xs2.428 ys2.429 -> xs2.428
269                 _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
270               }
271           _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
272         }
273 Test.ys2 :: for all d. [d]
274 Test.ys2 =
275     /\ t254 ->
276         case ds.406 of {
277           (:) x2.430 ds.431 ->
278               case ds.431 of {
279                 (:) xs2.432 ys2.433 -> ys2.433
280                 _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
281               }
282           _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
283         }
284 {- end plain CoRec -}
285 ds.435 :: for all d, e. <Num e> -> <Ord d> -> <Num d> -> (d, e)
286 ds.435 =
287     /\ t273 t275 -> \ dict.276 dict.269 dict.274 ->
288         let dict.267 = dict.276 in
289         let dict.271 = dict.274 in
290         let dict.265 = dict.271 in
291         let dict.262 = dict.265 in
292         let dict.260 = dict.269
293         in 
294           let
295             {- CoRec -}
296             ds.434 =
297                 case
298                     ((> t273)
299                          dict.260
300                          x3.257
301                          ((fromInteger t273) dict.262 (MkInteger! 3##)))
302                 of {
303                   True ->
304                       MkTuple2!
305                           t273
306                           t275
307                           ((fromInteger t273) dict.265 (MkInteger! 4##))
308                           ((fromInteger t275) dict.267 (MkInteger! 5##))
309                   False ->
310                       case
311                           ((<= t273)
312                                dict.269
313                                x3.257
314                                ((fromInteger t273) dict.271 (MkInteger! 3##)))
315                       of {
316                         True ->
317                             MkTuple2!
318                                 t273
319                                 t275
320                                 ((fromInteger t273) dict.274 (MkInteger! 2##))
321                                 ((fromInteger t275) dict.276 (MkInteger! 3##))
322                         False ->
323                             (error (t273, t275))
324                                 "\"ds020.hs\", line 42: pattern-matching failure [pat binding]\n"S
325                       }
326                 }
327             x3.257 =
328                 case ds.434 of {
329                   MkTuple2 x3.257 y3.258 -> x3.257
330                 }
331             y3.258 =
332                 case ds.434 of {
333                   MkTuple2 x3.257 y3.258 -> y3.258
334                 }
335             {- end CoRec -}
336           in  MkTuple2! t273 t275 x3.257 y3.258
337 Test.x3 :: for all d, e. <Num e> -> <Ord d> -> <Num d> -> d
338 Test.x3 =
339     /\ t273 t275 -> \ dict.276 dict.269 dict.274 ->
340         case (((ds.435 t273) t275) dict.276 dict.269 dict.274) of {
341           MkTuple2 x3.257 y3.258 -> x3.257
342         }
343 Test.y3 :: for all d, e. <Num e> -> <Ord d> -> <Num d> -> e
344 Test.y3 =
345     /\ t273 t275 -> \ dict.276 dict.269 dict.274 ->
346         case (((ds.435 t273) t275) dict.276 dict.269 dict.274) of {
347           MkTuple2 x3.257 y3.258 -> y3.258
348         }
349 ds.442 :: (Char, (Char, (Char, Char)))
350 ds.442 =
351     let dict.451 = dfun.Eq.Int in
352     let
353       eq2.454 =
354           eqInt
355               (let dict.452 = dfun.Num.Int in  MkInt! 2#)
356               (let dict.453 = dfun.Num.Int in  MkInt! 4#) in
357     let dict.455 = dfun.Eq.Int in
358     let
359       eq3.458 =
360           eqInt
361               (let dict.456 = dfun.Num.Int in  MkInt! 3#)
362               (let dict.457 = dfun.Num.Int in  MkInt! 3#) in
363     let dict.459 = dfun.Eq.Int in
364     let
365       eq4.462 =
366           eqInt
367               (let dict.460 = dfun.Num.Int in  MkInt! 4#)
368               (let dict.461 = dfun.Num.Int in  MkInt! 2#)
369     in 
370       case eq2.454 of {
371         True ->
372             MkTuple2!
373                 Char
374                 (Char, (Char, Char))
375                 (MkChar! 'a'#)
376                 (MkTuple2!
377                      Char
378                      (Char, Char)
379                      (MkChar! 'a'#)
380                      (MkTuple2! Char Char (MkChar! 'a'#) (MkChar! 'a'#)))
381         False ->
382             case eq3.458 of {
383               True ->
384                   MkTuple2!
385                       Char
386                       (Char, (Char, Char))
387                       (MkChar! 'b'#)
388                       (MkTuple2!
389                            Char
390                            (Char, Char)
391                            (MkChar! 'b'#)
392                            (MkTuple2! Char Char (MkChar! 'b'#) (MkChar! 'b'#)))
393               False ->
394                   case eq4.462 of {
395                     True ->
396                         MkTuple2!
397                             Char
398                             (Char, (Char, Char))
399                             (MkChar! 'c'#)
400                             (MkTuple2!
401                                  Char
402                                  (Char, Char)
403                                  (MkChar! 'c'#)
404                                  (MkTuple2!
405                                       Char Char (MkChar! 'c'#) (MkChar! 'c'#)))
406                     False ->
407                         MkTuple2!
408                             Char
409                             (Char, (Char, Char))
410                             (MkChar! 'd'#)
411                             (MkTuple2!
412                                  Char
413                                  (Char, Char)
414                                  (MkChar! 'd'#)
415                                  (MkTuple2!
416                                       Char Char (MkChar! 'd'#) (MkChar! 'd'#)))
417                   }
418             }
419       }
420 Test.x4 :: Char
421 Test.x4 =
422     case ds.442 of {
423       MkTuple2 x4.463 ds.464 ->
424           case ds.464 of {
425             MkTuple2 y4.465 ds.466 ->
426                 case ds.466 of {
427                   MkTuple2 z4.467 a4.468 -> x4.463
428                 }
429           }
430     }
431 Test.y4 :: Char
432 Test.y4 =
433     case ds.442 of {
434       MkTuple2 x4.469 ds.470 ->
435           case ds.470 of {
436             MkTuple2 y4.471 ds.472 ->
437                 case ds.472 of {
438                   MkTuple2 z4.473 a4.474 -> y4.471
439                 }
440           }
441     }
442 Test.z4 :: Char
443 Test.z4 =
444     case ds.442 of {
445       MkTuple2 x4.475 ds.476 ->
446           case ds.476 of {
447             MkTuple2 y4.477 ds.478 ->
448                 case ds.478 of {
449                   MkTuple2 z4.479 a4.480 -> z4.479
450                 }
451           }
452     }
453 Test.a4 :: Char
454 Test.a4 =
455     case ds.442 of {
456       MkTuple2 x4.481 ds.482 ->
457           case ds.482 of {
458             MkTuple2 y4.483 ds.484 ->
459                 case ds.484 of {
460                   MkTuple2 z4.485 a4.486 -> a4.486
461                 }
462           }
463     }
464