summaryrefslogtreecommitdiff
path: root/ghc/compiler/tests/deSugar/ds020.stderr
blob: 5c0371c9d7aaa50a27ba909134b095867fbf60b9 (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
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
Desugared:
Test.a :: for all d, e, f, g. ([d], [e], [f]) -> [g]
Test.a = /\ t118 t119 t120 t121 -> \ ds.314 -> Nil! t121
Test.b :: for all d, e. [d] -> [e]
Test.b =
    /\ t134 t135 -> \ ds.323 ->
	let
	  x.328 =
	      case ds.323 of {
		(:) x.324 ds.325 ->
		    case ds.325 of {
		      (:) xs.326 ys.327 -> x.324
		      _ -> 
			  (error Char)
			      "``impossible'' pattern-matching error!\n"S
		    }
		_ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	      } in
	let
	  xs.333 =
	      case ds.323 of {
		(:) x.329 ds.330 ->
		    case ds.330 of {
		      (:) xs.331 ys.332 -> xs.331
		      _ -> 
			  (error Char)
			      "``impossible'' pattern-matching error!\n"S
		    }
		_ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	      } in
	let
	  ys.338 =
	      case ds.323 of {
		(:) x.334 ds.335 ->
		    case ds.335 of {
		      (:) xs.336 ys.337 -> ys.337
		      _ -> 
			  (error Char)
			      "``impossible'' pattern-matching error!\n"S
		    }
		_ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	      }
	in  Nil! t135
Test.c :: for all d, e, f, g. <Fractional f> -> <Num e> -> g -> d -> e -> f -> g
Test.c =
    /\ o139 t140 t143 o138 -> \ dict.144 dict.141 ->
	let
	  dict.145 = (sdsel.Num.Eq t143) ((sdsel.Fractional.Num t143) dict.144) in
	let dict.142 = (sdsel.Num.Eq t140) dict.141 in
	let c.137 = \ x.87 ds.339 ds.340 ds.341 -> let x.87 = x.87 in  x.87
	in  c.137
Test.d :: for all d, e. <Num e> -> <Ord d> -> <Num d> -> d -> e
Test.d =
    /\ t171 t174 -> \ dict.175 dict.173 dict.172 ->
	let dict.169 = dict.175 in
	let dict.163 = dict.169 in
	let dict.157 = dict.163 in
	let dict.152 = dict.157 in
	let dict.166 = dict.172 in
	let dict.160 = dict.166 in
	let dict.154 = dict.160 in
	let dict.149 = dict.154 in
	let dict.167 = dict.173 in
	let dict.161 = dict.167 in
	let dict.155 = (sdsel.Ord.Eq t171) dict.161 in
	let dict.150 = dict.155 in
	let
	  d.147 =
	      \ ds.344 ->
		  let
		    fail.345 =
			(error t174)
			    "\"ds020.hs\", line 17: pattern-matching failure [function binding]\n"S in
		  let
		    fail.349 =
			let
			  n.88 =
			      let
				n.346 =
				    (fromInteger t171) dict.160 (MkInteger! 4##)
			      in 
				case
				    ((>= t171)
					 dict.161
					 ds.344
					 ((fromInteger t171)
					      dict.160 (MkInteger! 4##)))
				of {
				  True ->
				      let
					n.88 =
					    (- t171)
						dict.160
						ds.344
						((fromInteger t171)
						     dict.160 (MkInteger! 4##))
				      in  n.88
				  False ->
				      (error Char)
					  "``impossible'' pattern-matching error!\n"S
				}
			in  (fromInteger t174) dict.163 (MkInteger! 2##)
		  in 
		    case
			((== t171)
			     dict.150
			     ((fromInteger t171) dict.149 (MkInteger! 11##))
			     ds.344)
		    of {
		      True -> (fromInteger t174) dict.152 (MkInteger! 4##)
		      False ->
			  case
			      ((== t171)
				   dict.155
				   ((fromInteger t171)
					dict.154 (MkInteger! 12##))
				   ds.344)
			  of {
			    True -> (fromInteger t174) dict.157 (MkInteger! 3##)
			    False -> fail.349
			  }
		    }
	in  d.147
Test.f :: for all d, e. [d] -> [e]
Test.f =
    /\ t182 t183 -> \ x.352 ->
	let
	  x.353 =
	      case x.352 of {
		Nil -> x.352
		_ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	      }
	in  Nil! t183
Test.g :: for all d, e. [d] -> [e]
Test.g = /\ t186 t187 -> \ ds.356 -> Nil! t187
ds.357 :: ([t191], [t192], [t193])
ds.357 = MkTuple3! [t191] [t192] [t193] (Nil! t191) (Nil! t192) (Nil! t193)
ds.358 :: ([t197], [t198], [t199])
ds.358 = MkTuple3! [t197] [t198] [t199] (Nil! t197) (Nil! t198) (Nil! t199)
ds.359 :: [t208]
ds.359 = /\ t208 -> Nil! t208
Test.x1 :: for all d. d
Test.x1 =
    /\ t208 ->
	case ds.359 of {
	  (:) x1.363 ds.364 ->
	      case ds.364 of {
		(:) xs1.365 ys1.366 -> x1.363
		_ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	      }
	  _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	}
Test.xs1 :: for all d. d
Test.xs1 =
    /\ t208 ->
	case ds.359 of {
	  (:) x1.367 ds.368 ->
	      case ds.368 of {
		(:) xs1.369 ys1.370 -> xs1.369
		_ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	      }
	  _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	}
Test.ys1 :: for all d. [d]
Test.ys1 =
    /\ t208 ->
	case ds.359 of {
	  (:) x1.371 ds.372 ->
	      case ds.372 of {
		(:) xs1.373 ys1.374 -> ys1.374
		_ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	      }
	  _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	}
ds.375 :: [t217]
ds.375 = /\ t217 -> Nil! t217
Test.x :: for all d. d
Test.x =
    /\ t217 ->
	case ds.375 of {
	  (:) x.379 ds.380 ->
	      case ds.380 of {
		(:) xs.381 ys.382 ->
		    let ys.383 = ys.382 in
		    let xs.384 = xs.381 in let x.385 = x.379 in  x.385
		_ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	      }
	  _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	}
Test.xs :: for all d. d
Test.xs =
    /\ t217 ->
	case ds.375 of {
	  (:) x.386 ds.387 ->
	      case ds.387 of {
		(:) xs.388 ys.389 ->
		    let ys.390 = ys.389 in
		    let xs.391 = xs.388 in let x.392 = x.386 in  xs.391
		_ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	      }
	  _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	}
Test.ys :: for all d. [d]
Test.ys =
    /\ t217 ->
	case ds.375 of {
	  (:) x.393 ds.394 ->
	      case ds.394 of {
		(:) xs.395 ys.396 ->
		    let ys.397 = ys.396 in
		    let xs.398 = xs.395 in let x.399 = x.393 in  ys.397
		_ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	      }
	  _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	}
{- plain CoRec -}
ds.406 :: [t254]
ds.406 =
    /\ t254 ->
	let dict.410 = dfun.Eq.Int in
	let
	  eq2.413 =
	      eqInt
		  (let dict.411 = dfun.Num.Int in  MkInt! 2#)
		  (let dict.412 = dfun.Num.Int in  MkInt! 4#) in
	let dict.414 = dfun.Eq.Int in
	let
	  eq3.417 =
	      eqInt
		  (let dict.415 = dfun.Num.Int in  MkInt! 3#)
		  (let dict.416 = dfun.Num.Int in  MkInt! 3#) in
	let dict.418 = dfun.Eq.Int in
	let
	  eq4.421 =
	      eqInt
		  (let dict.419 = dfun.Num.Int in  MkInt! 4#)
		  (let dict.420 = dfun.Num.Int in  MkInt! 2#)
	in 
	  case eq2.413 of {
	    True -> Nil! t254
	    False ->
		case eq3.417 of {
		  True -> :! t254 (Test.x2 t254) (Nil! t254)
		  False ->
		      case eq4.421 of {
			True -> :! t254 (Test.x2 t254) (Nil! t254)
			False -> Nil! t254
		      }
		}
	  }
Test.x2 :: for all d. d
Test.x2 =
    /\ t254 ->
	case ds.406 of {
	  (:) x2.422 ds.423 ->
	      case ds.423 of {
		(:) xs2.424 ys2.425 -> x2.422
		_ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	      }
	  _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	}
Test.xs2 :: for all d. d
Test.xs2 =
    /\ t254 ->
	case ds.406 of {
	  (:) x2.426 ds.427 ->
	      case ds.427 of {
		(:) xs2.428 ys2.429 -> xs2.428
		_ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	      }
	  _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	}
Test.ys2 :: for all d. [d]
Test.ys2 =
    /\ t254 ->
	case ds.406 of {
	  (:) x2.430 ds.431 ->
	      case ds.431 of {
		(:) xs2.432 ys2.433 -> ys2.433
		_ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	      }
	  _ ->  (error Char) "``impossible'' pattern-matching error!\n"S
	}
{- end plain CoRec -}
ds.435 :: for all d, e. <Num e> -> <Ord d> -> <Num d> -> (d, e)
ds.435 =
    /\ t273 t275 -> \ dict.276 dict.269 dict.274 ->
	let dict.267 = dict.276 in
	let dict.271 = dict.274 in
	let dict.265 = dict.271 in
	let dict.262 = dict.265 in
	let dict.260 = dict.269
	in 
	  let
	    {- CoRec -}
	    ds.434 =
		case
		    ((> t273)
			 dict.260
			 x3.257
			 ((fromInteger t273) dict.262 (MkInteger! 3##)))
		of {
		  True ->
		      MkTuple2!
			  t273
			  t275
			  ((fromInteger t273) dict.265 (MkInteger! 4##))
			  ((fromInteger t275) dict.267 (MkInteger! 5##))
		  False ->
		      case
			  ((<= t273)
			       dict.269
			       x3.257
			       ((fromInteger t273) dict.271 (MkInteger! 3##)))
		      of {
			True ->
			    MkTuple2!
				t273
				t275
				((fromInteger t273) dict.274 (MkInteger! 2##))
				((fromInteger t275) dict.276 (MkInteger! 3##))
			False ->
			    (error (t273, t275))
				"\"ds020.hs\", line 42: pattern-matching failure [pat binding]\n"S
		      }
		}
	    x3.257 =
		case ds.434 of {
		  MkTuple2 x3.257 y3.258 -> x3.257
		}
	    y3.258 =
		case ds.434 of {
		  MkTuple2 x3.257 y3.258 -> y3.258
		}
	    {- end CoRec -}
	  in  MkTuple2! t273 t275 x3.257 y3.258
Test.x3 :: for all d, e. <Num e> -> <Ord d> -> <Num d> -> d
Test.x3 =
    /\ t273 t275 -> \ dict.276 dict.269 dict.274 ->
	case (((ds.435 t273) t275) dict.276 dict.269 dict.274) of {
	  MkTuple2 x3.257 y3.258 -> x3.257
	}
Test.y3 :: for all d, e. <Num e> -> <Ord d> -> <Num d> -> e
Test.y3 =
    /\ t273 t275 -> \ dict.276 dict.269 dict.274 ->
	case (((ds.435 t273) t275) dict.276 dict.269 dict.274) of {
	  MkTuple2 x3.257 y3.258 -> y3.258
	}
ds.442 :: (Char, (Char, (Char, Char)))
ds.442 =
    let dict.451 = dfun.Eq.Int in
    let
      eq2.454 =
	  eqInt
	      (let dict.452 = dfun.Num.Int in  MkInt! 2#)
	      (let dict.453 = dfun.Num.Int in  MkInt! 4#) in
    let dict.455 = dfun.Eq.Int in
    let
      eq3.458 =
	  eqInt
	      (let dict.456 = dfun.Num.Int in  MkInt! 3#)
	      (let dict.457 = dfun.Num.Int in  MkInt! 3#) in
    let dict.459 = dfun.Eq.Int in
    let
      eq4.462 =
	  eqInt
	      (let dict.460 = dfun.Num.Int in  MkInt! 4#)
	      (let dict.461 = dfun.Num.Int in  MkInt! 2#)
    in 
      case eq2.454 of {
	True ->
	    MkTuple2!
		Char
		(Char, (Char, Char))
		(MkChar! 'a'#)
		(MkTuple2!
		     Char
		     (Char, Char)
		     (MkChar! 'a'#)
		     (MkTuple2! Char Char (MkChar! 'a'#) (MkChar! 'a'#)))
	False ->
	    case eq3.458 of {
	      True ->
		  MkTuple2!
		      Char
		      (Char, (Char, Char))
		      (MkChar! 'b'#)
		      (MkTuple2!
			   Char
			   (Char, Char)
			   (MkChar! 'b'#)
			   (MkTuple2! Char Char (MkChar! 'b'#) (MkChar! 'b'#)))
	      False ->
		  case eq4.462 of {
		    True ->
			MkTuple2!
			    Char
			    (Char, (Char, Char))
			    (MkChar! 'c'#)
			    (MkTuple2!
				 Char
				 (Char, Char)
				 (MkChar! 'c'#)
				 (MkTuple2!
				      Char Char (MkChar! 'c'#) (MkChar! 'c'#)))
		    False ->
			MkTuple2!
			    Char
			    (Char, (Char, Char))
			    (MkChar! 'd'#)
			    (MkTuple2!
				 Char
				 (Char, Char)
				 (MkChar! 'd'#)
				 (MkTuple2!
				      Char Char (MkChar! 'd'#) (MkChar! 'd'#)))
		  }
	    }
      }
Test.x4 :: Char
Test.x4 =
    case ds.442 of {
      MkTuple2 x4.463 ds.464 ->
	  case ds.464 of {
	    MkTuple2 y4.465 ds.466 ->
		case ds.466 of {
		  MkTuple2 z4.467 a4.468 -> x4.463
		}
	  }
    }
Test.y4 :: Char
Test.y4 =
    case ds.442 of {
      MkTuple2 x4.469 ds.470 ->
	  case ds.470 of {
	    MkTuple2 y4.471 ds.472 ->
		case ds.472 of {
		  MkTuple2 z4.473 a4.474 -> y4.471
		}
	  }
    }
Test.z4 :: Char
Test.z4 =
    case ds.442 of {
      MkTuple2 x4.475 ds.476 ->
	  case ds.476 of {
	    MkTuple2 y4.477 ds.478 ->
		case ds.478 of {
		  MkTuple2 z4.479 a4.480 -> z4.479
		}
	  }
    }
Test.a4 :: Char
Test.a4 =
    case ds.442 of {
      MkTuple2 x4.481 ds.482 ->
	  case ds.482 of {
	    MkTuple2 y4.483 ds.484 ->
		case ds.484 of {
		  MkTuple2 z4.485 a4.486 -> a4.486
		}
	  }
    }