From 40cc9182affda1964b480f5d251200d853ce2327 Mon Sep 17 00:00:00 2001 From: sof Date: Mon, 26 May 1997 06:03:10 +0000 Subject: [PATCH] [project @ 1997-05-26 05:58:06 by sof] Updated for 2.03 --- ghc/compiler/tests/ccall/Makefile | 40 +- ghc/compiler/tests/ccall/cc001.hs | 2 +- ghc/compiler/tests/ccall/cc001.stderr | 491 +++-- ghc/compiler/tests/ccall/cc002.hs | 7 +- ghc/compiler/tests/ccall/cc002.stderr | 149 +- ghc/compiler/tests/ccall/cc003.hs | 5 +- ghc/compiler/tests/ccall/cc003.stderr | 118 +- ghc/compiler/tests/ccall/cc004.hs | 8 +- ghc/compiler/tests/ccall/cc004.stderr | 9 + ghc/compiler/tests/ccall/cc005.hs | 2 +- ghc/compiler/tests/ccall/cc005.stderr | 1276 +++++++++++-- ghc/compiler/tests/ccall/cc006.hs | 11 +- ghc/compiler/tests/ccall/cc006.stderr | 803 ++++++-- ghc/compiler/tests/ccall/cc007.hs | 10 +- ghc/compiler/tests/ccall/cc007.stderr | 9 + ghc/compiler/tests/deSugar/Makefile | 19 +- ghc/compiler/tests/deSugar/ds-wildcard.stderr | 19 + ghc/compiler/tests/deSugar/ds001.stderr | 134 +- ghc/compiler/tests/deSugar/ds002.stderr | 84 +- ghc/compiler/tests/deSugar/ds003.stderr | 121 +- ghc/compiler/tests/deSugar/ds004.stderr | 135 +- ghc/compiler/tests/deSugar/ds005.stderr | 266 ++- ghc/compiler/tests/deSugar/ds006.stderr | 72 +- ghc/compiler/tests/deSugar/ds007.stderr | 33 +- ghc/compiler/tests/deSugar/ds008.stderr | 135 +- ghc/compiler/tests/deSugar/ds009.stderr | 629 +++++-- ghc/compiler/tests/deSugar/ds010.stderr | 560 +++--- ghc/compiler/tests/deSugar/ds011.stderr | 78 +- ghc/compiler/tests/deSugar/ds012.stderr | 355 +++- ghc/compiler/tests/deSugar/ds013.stderr | 462 ++++- ghc/compiler/tests/deSugar/ds014.stderr | 706 ++++++-- ghc/compiler/tests/deSugar/ds014a.stderr | 2 + ghc/compiler/tests/deSugar/ds015.stderr | 106 +- ghc/compiler/tests/deSugar/ds016.stderr | 247 ++- ghc/compiler/tests/deSugar/ds017.stderr | 90 +- ghc/compiler/tests/deSugar/ds018.stderr | 1522 +++++++--------- ghc/compiler/tests/deSugar/ds019.stderr | 65 +- ghc/compiler/tests/deSugar/ds020.stderr | 2415 ++++++++++++++++++++----- ghc/compiler/tests/deSugar/ds021.stderr | 102 +- ghc/compiler/tests/deSugar/ds022.stderr | 1355 ++++++++++---- ghc/compiler/tests/deSugar/ds023.stderr | 139 +- ghc/compiler/tests/deSugar/ds024.stderr | 86 +- ghc/compiler/tests/deSugar/ds025.stderr | 100 +- ghc/compiler/tests/deSugar/ds026.stderr | 239 ++- ghc/compiler/tests/deSugar/ds027.stderr | 160 +- ghc/compiler/tests/deSugar/ds028.stderr | 111 +- ghc/compiler/tests/deSugar/ds029.stderr | 255 ++- ghc/compiler/tests/deSugar/ds030.stderr | 81 +- ghc/compiler/tests/deSugar/ds031.stderr | 186 +- ghc/compiler/tests/deSugar/ds032.stderr | 263 ++- ghc/compiler/tests/deSugar/ds033.stderr | 180 +- ghc/compiler/tests/deSugar/ds034.stderr | 135 +- ghc/compiler/tests/deSugar/ds035.stderr | 25 +- ghc/compiler/tests/deSugar/ds036.stderr | 668 +++++-- ghc/compiler/tests/deSugar/ds037.stderr | 189 ++ ghc/compiler/tests/deSugar/ds038.stderr | 5 + ghc/compiler/tests/deSugar/ds039.stderr | 8 + ghc/compiler/tests/deSugar/ds040.stderr | 9 + ghc/compiler/tests/deriving/Makefile | 25 +- ghc/compiler/tests/deriving/drv001.stderr | 514 ++++++ ghc/compiler/tests/deriving/drv002.stderr | 303 ++++ ghc/compiler/tests/deriving/drv003.stderr | 184 ++ ghc/compiler/tests/deriving/drv004.stderr | 9 + ghc/compiler/tests/deriving/drv005.stderr | 188 ++ ghc/compiler/tests/deriving/drv006.hs | 2 +- ghc/compiler/tests/deriving/drv006.stderr | 405 +++++ ghc/compiler/tests/deriving/drv007.stderr | 13 + ghc/compiler/tests/printing/Makefile | 25 +- ghc/compiler/tests/printing/Print001.hs | 2 + ghc/compiler/tests/printing/Print001.stderr | 105 +- ghc/compiler/tests/printing/Print002.stderr | 853 ++++++--- ghc/compiler/tests/printing/Print003.stderr | 44 + ghc/compiler/tests/printing/Print004.hs | 4 +- ghc/compiler/tests/printing/Print004.stderr | 134 ++ ghc/compiler/tests/reader/Makefile | 27 +- ghc/compiler/tests/reader/expr001.stderr | 6 + ghc/compiler/tests/reader/read001.hs | 2 +- ghc/compiler/tests/reader/read001.stderr | 594 +----- ghc/compiler/tests/reader/read002.hs | 1 + ghc/compiler/tests/reader/read002.stderr | 478 +---- ghc/compiler/tests/reader/read003.hs | 3 + ghc/compiler/tests/reader/read003.stderr | 21 + ghc/compiler/tests/reader/read004.hs | 14 +- ghc/compiler/tests/reader/read004.stderr | 2 + 84 files changed, 14103 insertions(+), 5346 deletions(-) diff --git a/ghc/compiler/tests/ccall/Makefile b/ghc/compiler/tests/ccall/Makefile index e9fde1b..a02df9b 100644 --- a/ghc/compiler/tests/ccall/Makefile +++ b/ghc/compiler/tests/ccall/Makefile @@ -1,18 +1,32 @@ -TOP = ../../../.. -GhcRunTestRules = YES -# These options apply to all tests -RUNSTDTEST_OPTS = -fglasgow-exts -dcore-lint -include $(TOP)/ghc/mk/ghc.mk +TOP = ../../.. +include $(TOP)/mk/boilerplate.mk -runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs)) +HS_SRCS = $(wildcard *.hs) + +SRC_RUNTEST_OPTS += -o1 $*.stdout -o2 $*.stderr -x 0 +HC_OPTS += -dcore-lint -fglasgow-exts + +cc002_RUNTEST_OPTS = -x 1 +cc004_RUNTEST_OPTS = -x 1 +cc007_RUNTEST_OPTS = -x 1 # Note that these tests are still in a state of flux... don't believe errors # they report. In fact, these aren't really very good tests at all... -cc001_flags = -noC -ddump-tc -ddump-ds -cc002_flags = -noC -ddump-tc -ddump-ds -cc003_flags = -noC -ddump-tc -ddump-ds -x1 -cc004_flags = -noC -ddump-tc -ddump-ds -cc005_flags = -via-C -ddump-stg -ddump-flatC -cc006_flags = -via-C -ddump-stg -ddump-flatC -cc007_flags = -via-C -ddump-stg -ddump-flatC +cc001_HC_OPTS = -noC -ddump-tc -ddump-ds +cc002_HC_OPTS = -noC -ddump-tc -ddump-ds +cc003_HC_OPTS = -noC -ddump-tc -ddump-ds +cc004_HC_OPTS = -noC -ddump-tc -ddump-ds +cc005_HC_OPTS = -fvia-C -ddump-stg -ddump-flatC +cc006_HC_OPTS = -fvia-C -ddump-stg -ddump-flatC +cc007_HC_OPTS = -fvia-C -ddump-stg -ddump-flatC + + +%.o : %.hs + +%.o : %.hs + $(RUNTEST) $(HC) $(RUNTEST_OPTS) $(HC_OPTS) -c $< -o $@ -osuf $(subst .,,$(suffix $@)) + +all :: $(HS_OBJS) + +include $(TOP)/mk/target.mk diff --git a/ghc/compiler/tests/ccall/cc001.hs b/ghc/compiler/tests/ccall/cc001.hs index c26a53f..8aeca95 100644 --- a/ghc/compiler/tests/ccall/cc001.hs +++ b/ghc/compiler/tests/ccall/cc001.hs @@ -2,7 +2,7 @@ module Test where -import PreludeGlaST +import GlaExts -- simple functions diff --git a/ghc/compiler/tests/ccall/cc001.stderr b/ghc/compiler/tests/ccall/cc001.stderr index ab13745..952647f 100644 --- a/ghc/compiler/tests/ccall/cc001.stderr +++ b/ghc/compiler/tests/ccall/cc001.stderr @@ -1,188 +1,333 @@ + + +================================================================================ Typechecked: -lit.t444 = D# 2.0000000000000000## -lit.t443 = F# 1.0000000000000000# -AbsBinds [] [] [(a.t439, Test.a{-r79-})] - {- nonrec -} - a.t439 :: IoWorld -> (Int, IoWorld) - a.t439 - = ccall a [Int] {- nonrec -} {- nonrec -} -AbsBinds [] [] [(b.t440, Test.b{-r80-})] - {- nonrec -} - b.t440 :: Int -> IoWorld -> (Int, IoWorld) - b.t440 - x.r212 = ccall b [Int, Int] x.r212 {- nonrec -} +d.Fractional_a16j = + PrelNum.$d23{-rtW,p-} +fromRational_a16o = + PrelNum.fromRational{-8T,p-} + PrelBase.Float{-3c,p-} + d.Fractional_a16j +lit_a16r = + fromRational_a16o + 1.0000000000000000 +d.Fractional_a16n = + PrelNum.$d14{-rtM,p-} +fromRational_a16q = + PrelNum.fromRational{-8T,p-} + PrelBase.Double{-3a,p-} + d.Fractional_a16n +lit_a16p = + fromRational_a16q + 2.0000000000000000 {- nonrec -} -AbsBinds [] [] [(c.t441, Test.c{-r81-})] - {- nonrec -} - c.t441 :: Int -> Char -> Float -> Double -> IoWorld -> (Float, IoWorld) - c.t441 - x1.r213 x2.r214 x3.r215 x4.r216 - = ccall c [Float, Int, Char, Float, Double] - x1.r213 x2.r214 x3.r215 x4.r216 +AbsBinds [] [] [([], c{-r5,x-}, c_a15h)] + c_a15h + x1_r4l x2_r4n x3_r4p x4_r4r + = STBase.ST{-5G,p-}{i} + [GHC.RealWorld{-3s,p-}, PrelBase.Float{-3c,p-}] + _ccall_ c + x1_r4l x2_r4n x3_r4p x4_r4r {- nonrec -} {- nonrec -} -AbsBinds [] [] [(d.t442, Test.d{-r82-})] - {- nonrec -} - d.t442 :: IoWorld -> (Float, IoWorld) - d.t442 - = (thenIO{-r102-} [Int, Float]) - Test.a{-r79-} - (\ x.r217 -> (thenIO{-r102-} [Int, Float]) - (Test.b{-r80-} x.r217) - (\ y.r218 -> Test.c{-r81-} - y.r218 'f' lit.t443 lit.t444)) +AbsBinds [] [] [([], b{-r3,x-}, b_a15F)] + b_a15F + x_r4j = STBase.ST{-5G,p-}{i} + [GHC.RealWorld{-3s,p-}, PrelBase.Int{-3g,p-}] + _ccall_ b + x_r4j {- nonrec -} {- nonrec -} +AbsBinds [] [] [([], a{-r1,x-}, a_a15R)] + a_a15R + = STBase.ST{-5G,p-}{i} + [GHC.RealWorld{-3s,p-}, PrelBase.Int{-3g,p-}] + _ccall_ a +{- nonrec -} +{- nonrec -} +AbsBinds [] [] [([], d{-r7,x-}, d_a15Y)] + d_a15Y + = STBase.thenPrimIO{-r4w,p-} + [PrelBase.Int{-3g,p-}, PrelBase.Float{-3c,p-}] + a{-r1,x-} + (\ x_r4t -> STBase.thenPrimIO{-r4w,p-} + [PrelBase.Int{-3g,p-}, PrelBase.Float{-3c,p-}] + (b{-r3,x-} + x_r4t) + (\ y_r4v -> c{-r5,x-} + y_r4v 'f' lit_a16r lit_a16p)) +{- nonrec -} + + +================================================================================ Desugared: -{- plain CoRec -} -lit.t444 :: Double -_NI_ -lit.t444 = (\ tpl.d0# -> D#! tpl.d0#) 2.0000000000000000## -lit.t443 :: Float -_NI_ -lit.t443 = (\ tpl.d1# -> F#! tpl.d1#) 1.0000000000000000# -Test.a{-r79-} :: IoWorld -> (Int, IoWorld) -_NI_ -Test.a{-r79-} = - \ ds.d2 -> - case - (case - (case ds.d2 of { - IoWorld ds.d3# -> ds.d3# - }) - of { - a.d8# -> ( _CCALL_ a [] Int# )! a.d8# - }) - of { - IntPrimAndIoWorld ds.d4# ds.d5# -> - let { - a.d6 :: Int - _NI_ - a.d6 = I#! ds.d4# } in - let { - a.d7 :: IoWorld - _NI_ - a.d7 = IoWorld! ds.d5# - } in Tup2! Int IoWorld a.d6 a.d7 - } -Test.b{-r80-} :: Int -> IoWorld -> (Int, IoWorld) -_NI_ -Test.b{-r80-} = - \ x.r212 ds.d9 -> - case - (case - (case ds.d9 of { - IoWorld ds.d10# -> ds.d10# - }) - of { - a.d16# -> - case - (case x.r212 of { - I# ds.d11# -> ds.d11# - }) - of { - a.d17# -> ( _CCALL_ b [Int#] Int# )! a.d16# a.d17# - } - }) - of { - IntPrimAndIoWorld ds.d12# ds.d13# -> - let { - a.d14 :: Int - _NI_ - a.d14 = I#! ds.d12# } in - let { - a.d15 :: IoWorld - _NI_ - a.d15 = IoWorld! ds.d13# - } in Tup2! Int IoWorld a.d14 a.d15 - } -Test.c{-r81-} :: Int -> Char -> Float -> Double -> IoWorld -> (Float, IoWorld) -_NI_ -Test.c{-r81-} = - \ x1.r213 x2.r214 x3.r215 x4.r216 ds.d18 -> - case - (case - (case ds.d18 of { - IoWorld ds.d19# -> ds.d19# - }) - of { - a.d28# -> - case - (case x1.r213 of { - I# ds.d20# -> ds.d20# - }) - of { - a.d29# -> - case - (case x2.r214 of { - C# ds.d21# -> ds.d21# - }) - of { - a.d30# -> - case - (case x3.r215 of { - F# ds.d22# -> ds.d22# - }) - of { - a.d31# -> - case - (case x4.r216 of { - D# ds.d23# -> ds.d23# - }) - of { - a.d32# -> - ( _CCALL_ c [Int#, - Char#, - Float#, - Double#] Float# )! - a.d28# - a.d29# - a.d30# - a.d31# - a.d32# - } - } - } - } - }) - of { - FloatPrimAndIoWorld ds.d24# ds.d25# -> +Rec { +d.Fractional_a16j :: + {PrelNum.Fractional{-26,p-} PrelBase.Float{-3c,p-}} +{-# L #-} +d.Fractional_a16j = + PrelNum.$d23{-rtW,p-} +fromRational_a16o :: + PrelNum.Rational{-3r,p-} -> PrelBase.Float{-3c,p-} +{-# L #-} +fromRational_a16o = + PrelNum.fromRational{-8T,p-} + _@_ PrelBase.Float{-3c,p-} d.Fractional_a16j +lit_a16r :: + PrelBase.Float{-3c,p-} +{-# L #-} +lit_a16r = + fromRational_a16o + _rational_ 1 1 +d.Fractional_a16n :: + {PrelNum.Fractional{-26,p-} PrelBase.Double{-3a,p-}} +{-# L #-} +d.Fractional_a16n = + PrelNum.$d14{-rtM,p-} +fromRational_a16q :: + PrelNum.Rational{-3r,p-} -> PrelBase.Double{-3a,p-} +{-# L #-} +fromRational_a16q = + PrelNum.fromRational{-8T,p-} + _@_ PrelBase.Double{-3a,p-} d.Fractional_a16n +lit_a16p :: + PrelBase.Double{-3a,p-} +{-# L #-} +lit_a16p = + fromRational_a16q + _rational_ 2 1 +c_a15h :: + PrelBase.Int{-3g,p-} + -> PrelBase.Char{-38,p-} + -> PrelBase.Float{-3c,p-} + -> PrelBase.Double{-3a,p-} + -> STBase.PrimIO{-3P,p-} PrelBase.Float{-3c,p-} +{-# L #-} +c_a15h = + \ x1_r4l :: + PrelBase.Int{-3g,p-} + {-# L #-} + x1_r4l x2_r4n :: + PrelBase.Char{-38,p-} + {-# L #-} + x2_r4n x3_r4p :: + PrelBase.Float{-3c,p-} + {-# L #-} + x3_r4p x4_r4r :: + PrelBase.Double{-3a,p-} + {-# L #-} + x4_r4r -> + let { + ds_d1et :: + STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + -> (PrelBase.Float{-3c,p-}, STBase.State{-3M,p-} GHC.RealWorld{-3s,p-}) + {-# L #-} + ds_d1et = + \ ds_d1ez :: + STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + {-# L #-} + ds_d1ez -> + case ds_d1ez of { STBase.S#{-5D,p-}{i} ds_d1eI -> + case x1_r4l of { PrelBase.I#{-5b,p-}{i} ds_d1eR -> + case x2_r4n of { PrelBase.C#{-54,p-}{i} ds_d1f0 -> + case x3_r4p of { PrelBase.F#{-59,p-}{i} ds_d1f9 -> + case x4_r4r of { PrelBase.D#{-56,p-}{i} ds_d1fw -> + case + _ccall_ c [(STBase.StateAndFloat#{-3C,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-}) GHC.Int#{-3f,p-} GHC.Char#{-37,p-} GHC.Float#{-3b,p-} GHC.Double#{-39,p-}]! + ds_d1eI ds_d1eR ds_d1f0 ds_d1f9 ds_d1fw + of { + STBase.StateAndFloat#{-5u,p-}{i} ds_d1fZ ds_d1fX -> + let { + ds_d1fO :: + PrelBase.Float{-3c,p-} + {-# L #-} + ds_d1fO = + PrelBase.F#{-59,p-}{i} + {ds_d1fX} } in + let { + ds_d1fS :: + STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + {-# L #-} + ds_d1fS = + STBase.S#{-5D,p-}{i} + {_@_ GHC.RealWorld{-3s,p-} ds_d1fZ} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Float{-3c,p-} + _@_ (STBase.State{-3M,p-} GHC.RealWorld{-3s,p-}) + ds_d1fO + ds_d1fS};};};};};};} + } in + STBase.ST{-5G,p-}{i} + _@_ GHC.RealWorld{-3s,p-} _@_ PrelBase.Float{-3c,p-} ds_d1et +c{-r5,x-} :: + PrelBase.Int{-3g,p-} + -> PrelBase.Char{-38,p-} + -> PrelBase.Float{-3c,p-} + -> PrelBase.Double{-3a,p-} + -> STBase.PrimIO{-3P,p-} PrelBase.Float{-3c,p-} +{-# L #-} +c{-r5,x-} = + c_a15h +b_a15F :: + PrelBase.Int{-3g,p-} -> STBase.PrimIO{-3P,p-} PrelBase.Int{-3g,p-} +{-# L #-} +b_a15F = + \ x_r4j :: + PrelBase.Int{-3g,p-} + {-# L #-} + x_r4j -> + let { + ds_d1gj :: + STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + -> (PrelBase.Int{-3g,p-}, STBase.State{-3M,p-} GHC.RealWorld{-3s,p-}) + {-# L #-} + ds_d1gj = + \ ds_d1gp :: + STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + {-# L #-} + ds_d1gp -> + case ds_d1gp of { STBase.S#{-5D,p-}{i} ds_d1gy -> + case x_r4j of { PrelBase.I#{-5b,p-}{i} ds_d1gM -> + case + _ccall_ b [(STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-}) GHC.Int#{-3f,p-}]! + ds_d1gy ds_d1gM + of { + STBase.StateAndInt#{-5v,p-}{i} ds_d1hf ds_d1hd -> + let { + ds_d1h4 :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1h4 = + PrelBase.I#{-5b,p-}{i} + {ds_d1hd} } in + let { + ds_d1h8 :: + STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + {-# L #-} + ds_d1h8 = + STBase.S#{-5D,p-}{i} + {_@_ GHC.RealWorld{-3s,p-} ds_d1hf} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Int{-3g,p-} + _@_ (STBase.State{-3M,p-} GHC.RealWorld{-3s,p-}) + ds_d1h4 + ds_d1h8};};};} + } in + STBase.ST{-5G,p-}{i} + _@_ GHC.RealWorld{-3s,p-} _@_ PrelBase.Int{-3g,p-} ds_d1gj +b{-r3,x-} :: + PrelBase.Int{-3g,p-} -> STBase.PrimIO{-3P,p-} PrelBase.Int{-3g,p-} +{-# L #-} +b{-r3,x-} = + b_a15F +a_a15R :: + STBase.PrimIO{-3P,p-} PrelBase.Int{-3g,p-} +{-# L #-} +a_a15R = + let { + ds_d1hy :: + STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + -> (PrelBase.Int{-3g,p-}, STBase.State{-3M,p-} GHC.RealWorld{-3s,p-}) + {-# L #-} + ds_d1hy = + \ ds_d1hE :: + STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + {-# L #-} + ds_d1hE -> + case ds_d1hE of { STBase.S#{-5D,p-}{i} ds_d1hP -> + case + _ccall_ a [(STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-})]! + ds_d1hP + of { + STBase.StateAndInt#{-5v,p-}{i} ds_d1ii ds_d1ig -> let { - a.d26 :: Float - _NI_ - a.d26 = F#! ds.d24# } in + ds_d1i7 :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1i7 = + PrelBase.I#{-5b,p-}{i} + {ds_d1ig} } in let { - a.d27 :: IoWorld - _NI_ - a.d27 = IoWorld! ds.d25# - } in Tup2! Float IoWorld a.d26 a.d27 - } -Test.d{-r82-} :: IoWorld -> (Float, IoWorld) -_NI_ -Test.d{-r82-} = + ds_d1ib :: + STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + {-# L #-} + ds_d1ib = + STBase.S#{-5D,p-}{i} + {_@_ GHC.RealWorld{-3s,p-} ds_d1ii} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Int{-3g,p-} + _@_ (STBase.State{-3M,p-} GHC.RealWorld{-3s,p-}) + ds_d1i7 + ds_d1ib};};} + } in + STBase.ST{-5G,p-}{i} + _@_ GHC.RealWorld{-3s,p-} _@_ PrelBase.Int{-3g,p-} ds_d1hy +a{-r1,x-} :: + STBase.PrimIO{-3P,p-} PrelBase.Int{-3g,p-} +{-# L #-} +a{-r1,x-} = + a_a15R +d_a15Y :: + STBase.PrimIO{-3P,p-} PrelBase.Float{-3c,p-} +{-# L #-} +d_a15Y = let { - a.d36 :: Int -> IoWorld -> (Float, IoWorld) - _NI_ - a.d36 = - \ x.r217 -> + ds_d1iE :: + PrelBase.Int{-3g,p-} + -> STBase.PrimIO{-3P,p-} PrelBase.Float{-3c,p-} + {-# L #-} + ds_d1iE = + \ x_r4t :: + PrelBase.Int{-3g,p-} + {-# L #-} + x_r4t -> + let { + ds_d1iT :: + STBase.PrimIO{-3P,p-} PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1iT = + b{-r3,x-} + x_r4t } in let { - a.d35 :: Int -> IoWorld -> (Float, IoWorld) - _NI_ - a.d35 = - \ y.r218 -> - (let { - a.d33 :: Char - _NI_ - a.d33 = C#! 'f'# - } in Test.c{-r81-} y.r218 a.d33) lit.t443 lit.t444 + ds_d1iX :: + PrelBase.Int{-3g,p-} + -> STBase.PrimIO{-3P,p-} PrelBase.Float{-3c,p-} + {-# L #-} + ds_d1iX = + \ y_r4v :: + PrelBase.Int{-3g,p-} + {-# L #-} + y_r4v -> + let { + ds_d1jf :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1jf = + PrelBase.C#{-54,p-}{i} + {'f'} + } in + c{-r5,x-} + y_r4v ds_d1jf lit_a16r lit_a16p } in - (let { - a.d34 :: IoWorld -> (Int, IoWorld) - _NI_ - a.d34 = Test.b{-r80-} x.r217 - } in ((thenIO{-r102-} Int) Float) a.d34) a.d35 - } in ((thenIO{-r102-} Int) Float) Test.a{-r79-} a.d36 -{- end plain CoRec -} + STBase.thenPrimIO{-r4w,p-} + _@_ PrelBase.Int{-3g,p-} _@_ PrelBase.Float{-3c,p-} ds_d1iT ds_d1iX + } in + STBase.thenPrimIO{-r4w,p-} + _@_ PrelBase.Int{-3g,p-} + _@_ PrelBase.Float{-3c,p-} + a{-r1,x-} + ds_d1iE +d{-r7,x-} :: + STBase.PrimIO{-3P,p-} PrelBase.Float{-3c,p-} +{-# L #-} +d{-r7,x-} = + d_a15Y +end Rec } + +NOTE: Simplifier still going after 4 iterations; bailing out. diff --git a/ghc/compiler/tests/ccall/cc002.hs b/ghc/compiler/tests/ccall/cc002.hs index 95a061b..c970d88 100644 --- a/ghc/compiler/tests/ccall/cc002.hs +++ b/ghc/compiler/tests/ccall/cc002.hs @@ -2,14 +2,15 @@ module Test where -import PreludeGlaST +import GlaExts +import Foreign -- Test returning results a :: PrimIO ForeignObj a = _ccall_ a -b :: PrimIO StablePtr +b :: PrimIO (StablePtr Double) b = _ccall_ b -- Test taking arguments @@ -17,5 +18,5 @@ b = _ccall_ b c :: ForeignObj -> PrimIO Int c x = _ccall_ c x -d :: StablePtr -> PrimIO Int +d :: StablePtr Int -> PrimIO Int d x = _ccall_ d x diff --git a/ghc/compiler/tests/ccall/cc002.stderr b/ghc/compiler/tests/ccall/cc002.stderr index 2f097cf..4d70998 100644 --- a/ghc/compiler/tests/ccall/cc002.stderr +++ b/ghc/compiler/tests/ccall/cc002.stderr @@ -1,140 +1,9 @@ -Typechecked: -AbsBinds [] [] [(a.t439, Test.a{-r79-})] - {- nonrec -} - a.t439 :: IoWorld -> (CHeapPtr, IoWorld) - a.t439 - = ccall a [CHeapPtr] -{- nonrec -} -{- nonrec -} -AbsBinds [] [] [(b.t440, Test.b{-r80-})] - {- nonrec -} - b.t440 :: IoWorld -> (StablePtr, IoWorld) - b.t440 - = ccall b [StablePtr] -{- nonrec -} -{- nonrec -} -AbsBinds [] [] [(c.t441, Test.c{-r81-})] - {- nonrec -} - c.t441 :: CHeapPtr -> IoWorld -> (Int, IoWorld) - c.t441 - x.r211 = ccall c [Int, CHeapPtr] x.r211 -{- nonrec -} -{- nonrec -} -AbsBinds [] [] [(d.t442, Test.d{-r82-})] - {- nonrec -} - d.t442 :: StablePtr -> IoWorld -> (Int, IoWorld) - d.t442 - x.r212 = ccall d [Int, StablePtr] x.r212 -{- nonrec -} -{- nonrec -} -Desugared: -Test.a{-r79-} :: IoWorld -> (CHeapPtr, IoWorld) -_NI_ -Test.a{-r79-} = - \ ds.d0 -> - case - (case - (case ds.d0 of { - IoWorld ds.d1# -> ds.d1# - }) - of { - a.d6# -> ( _CCALL_ a [] CHeapPtr# )! a.d6# - }) - of { - CHPPrimAndIoWorld ds.d2# ds.d3# -> - let { - a.d4 :: CHeapPtr - _NI_ - a.d4 = CHP#! ds.d2# } in - let { - a.d5 :: IoWorld - _NI_ - a.d5 = IoWorld! ds.d3# - } in Tup2! CHeapPtr IoWorld a.d4 a.d5 - } -Test.b{-r80-} :: IoWorld -> (StablePtr, IoWorld) -_NI_ -Test.b{-r80-} = - \ ds.d7 -> - case - (case - (case ds.d7 of { - IoWorld ds.d8# -> ds.d8# - }) - of { - a.d13# -> ( _CCALL_ b [] StablePtr# )! a.d13# - }) - of { - SPPrimAndIoWorld ds.d9# ds.d10# -> - let { - a.d11 :: StablePtr - _NI_ - a.d11 = StablePtr#! ds.d9# } in - let { - a.d12 :: IoWorld - _NI_ - a.d12 = IoWorld! ds.d10# - } in Tup2! StablePtr IoWorld a.d11 a.d12 - } -Test.c{-r81-} :: CHeapPtr -> IoWorld -> (Int, IoWorld) -_NI_ -Test.c{-r81-} = - \ x.r211 ds.d14 -> - case - (case - (case ds.d14 of { - IoWorld ds.d15# -> ds.d15# - }) - of { - a.d21# -> - case - (case x.r211 of { - CHP# ds.d16# -> ds.d16# - }) - of { - a.d22# -> ( _CCALL_ c [CHeapPtr#] Int# )! a.d21# a.d22# - } - }) - of { - IntPrimAndIoWorld ds.d17# ds.d18# -> - let { - a.d19 :: Int - _NI_ - a.d19 = I#! ds.d17# } in - let { - a.d20 :: IoWorld - _NI_ - a.d20 = IoWorld! ds.d18# - } in Tup2! Int IoWorld a.d19 a.d20 - } -Test.d{-r82-} :: StablePtr -> IoWorld -> (Int, IoWorld) -_NI_ -Test.d{-r82-} = - \ x.r212 ds.d23 -> - case - (case - (case ds.d23 of { - IoWorld ds.d24# -> ds.d24# - }) - of { - a.d30# -> - case - (case x.r212 of { - StablePtr# ds.d25# -> ds.d25# - }) - of { - a.d31# -> ( _CCALL_ d [StablePtr#] Int# )! a.d30# a.d31# - } - }) - of { - IntPrimAndIoWorld ds.d26# ds.d27# -> - let { - a.d28 :: Int - _NI_ - a.d28 = I#! ds.d26# } in - let { - a.d29 :: IoWorld - _NI_ - a.d29 = IoWorld! ds.d27# - } in Tup2! Int IoWorld a.d28 a.d29 - } + +cc002.hs:11: No instance for: + `Foreign.CReturnable Foreign.ForeignObj' + cc002.hs:11: + in the result of the _ccall_ to a + When checking signature(s) for: `a' + + +Compilation had errors diff --git a/ghc/compiler/tests/ccall/cc003.hs b/ghc/compiler/tests/ccall/cc003.hs index 474a4b3..b8c8d35 100644 --- a/ghc/compiler/tests/ccall/cc003.hs +++ b/ghc/compiler/tests/ccall/cc003.hs @@ -1,8 +1,9 @@ --!!! cc003 -- ccall with unresolved polymorphism (should fail) +--!!! not anymore (as of 0.29, result type will default to ()) module Test where -import PreludeGlaST +import GlaExts fubar :: PrimIO Int -fubar = ccall f `seqPrimIO` ccall b +fubar = _ccall_ f `seqPrimIO` _ccall_ b --^ result type of f "lost" (never gets generalised) diff --git a/ghc/compiler/tests/ccall/cc003.stderr b/ghc/compiler/tests/ccall/cc003.stderr index 4b2772f..1f8dfdc 100644 --- a/ghc/compiler/tests/ccall/cc003.stderr +++ b/ghc/compiler/tests/ccall/cc003.stderr @@ -1,15 +1,115 @@ + + +================================================================================ Typechecked: -AbsBinds [] [] [(fubar.t439, Main.fubar{-r79-})] - {- nonrec -} - fubar.t439 :: IoWorld -> (Int, IoWorld) - fubar.t439 - = (thenIO_{-r99-} [bpv83, Int]) (ccall f [bpv83] ) (ccall b [Int] ) {- nonrec -} {- nonrec -} -Desugared: +AbsBinds [] [] [([], fubar{-r1,x-}, fubar_aZa)] + fubar_aZa + = STBase.seqPrimIO{-r46,p-} + [PrelBase.(){-40,p-}, PrelBase.Int{-3g,p-}] + (STBase.ST{-5G,p-}{i} + [GHC.RealWorld{-3s,p-}, PrelBase.(){-40,p-}] + _ccall_ f) + (STBase.ST{-5G,p-}{i} + [GHC.RealWorld{-3s,p-}, PrelBase.Int{-3g,p-}] + _ccall_ b) +{- nonrec -} -Fail: panic! (the `impossible' happened): - getBoxedPrimTypeInfo: bpv83 -Please report it as a compiler bug to glasgow-haskell-bugs@dcs.glasgow.ac.uk. +================================================================================ +Desugared: +fubar_aZa :: + STBase.PrimIO{-3P,p-} PrelBase.Int{-3g,p-} +{-# L #-} +fubar_aZa = + let { ds_d110 :: + STBase.ST{-3O,p-} GHC.RealWorld{-3s,p-} PrelBase.(){-40,p-} + {-# L #-} + ds_d110 = + let { + ds_d11g :: + STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + -> (PrelBase.(){-40,p-}, STBase.State{-3M,p-} GHC.RealWorld{-3s,p-}) + {-# L #-} + ds_d11g = + \ ds_d11m :: + STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + {-# L #-} + ds_d11m -> + case ds_d11m of { STBase.S#{-5D,p-}{i} ds_d11x -> + case + _ccall_ f [(STBase.State{-3M,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-})]! + ds_d11x + of { + STBase.S#{-5D,p-}{i} ds_d11X -> + let { + ds_d11Q :: + STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + {-# L #-} + ds_d11Q = + STBase.S#{-5D,p-}{i} + {_@_ GHC.RealWorld{-3s,p-} ds_d11X} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.(){-40,p-} + _@_ (STBase.State{-3M,p-} GHC.RealWorld{-3s,p-}) + PrelBase.(){-60,p-}{i} + ds_d11Q};};} + } in + STBase.ST{-5G,p-}{i} + _@_ GHC.RealWorld{-3s,p-} _@_ PrelBase.(){-40,p-} ds_d11g + } in + let { ds_d114 :: + STBase.ST{-3O,p-} GHC.RealWorld{-3s,p-} PrelBase.Int{-3g,p-} + {-# L #-} + ds_d114 = + let { + ds_d12a :: + STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + -> (PrelBase.Int{-3g,p-}, STBase.State{-3M,p-} GHC.RealWorld{-3s,p-}) + {-# L #-} + ds_d12a = + \ ds_d12g :: + STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + {-# L #-} + ds_d12g -> + case ds_d12g of { STBase.S#{-5D,p-}{i} ds_d12r -> + case + _ccall_ b [(STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-})]! + ds_d12r + of { + STBase.StateAndInt#{-5v,p-}{i} ds_d12U ds_d12S -> + let { + ds_d12J :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d12J = + PrelBase.I#{-5b,p-}{i} + {ds_d12S} } in + let { + ds_d12N :: + STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + {-# L #-} + ds_d12N = + STBase.S#{-5D,p-}{i} + {_@_ GHC.RealWorld{-3s,p-} ds_d12U} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Int{-3g,p-} + _@_ (STBase.State{-3M,p-} GHC.RealWorld{-3s,p-}) + ds_d12J + ds_d12N};};} + } in + STBase.ST{-5G,p-}{i} + _@_ GHC.RealWorld{-3s,p-} _@_ PrelBase.Int{-3g,p-} ds_d12a + } in + STBase.seqPrimIO{-r46,p-} + _@_ PrelBase.(){-40,p-} _@_ PrelBase.Int{-3g,p-} ds_d110 ds_d114 +fubar{-r1,x-} :: + STBase.PrimIO{-3P,p-} PrelBase.Int{-3g,p-} +{-# L #-} +fubar{-r1,x-} = + fubar_aZa +NOTE: Simplifier still going after 4 iterations; bailing out. diff --git a/ghc/compiler/tests/ccall/cc004.hs b/ghc/compiler/tests/ccall/cc004.hs index 6dee399..f53c61d 100644 --- a/ghc/compiler/tests/ccall/cc004.hs +++ b/ghc/compiler/tests/ccall/cc004.hs @@ -1,7 +1,7 @@ --!!! cc004 -- ccall with synonyms, polymorphic type variables and user type variables. module Test where -import PreludeGlaST +import GlaExts -- Since I messed up the handling of polymorphism originally, I'll -- explicitly test code with UserSysTyVar (ie an explicit polymorphic @@ -10,16 +10,14 @@ import PreludeGlaST foo = _ccall_ f `thenADR` \ a -> returnPrimIO (a + 1) where thenADR :: PrimIO a -> (a -> PrimIO b) -> PrimIO b - m `thenADR` k = \ s -> case m s of - (a,t) -> k a t + thenADR = thenPrimIO -- and with a PolySysTyVar (ie no explicit signature) bar = _ccall_ f `thenADR` \ a -> returnPrimIO (a + 1) where -- thenADR :: PrimIO a -> (a -> PrimIO b) -> PrimIO b - m `thenADR` k = \ s -> case m s of - (a,t) -> k a t + thenADR = thenPrimIO -- and with a type synonym diff --git a/ghc/compiler/tests/ccall/cc004.stderr b/ghc/compiler/tests/ccall/cc004.stderr index e69de29..b8cd850 100644 --- a/ghc/compiler/tests/ccall/cc004.stderr +++ b/ghc/compiler/tests/ccall/cc004.stderr @@ -0,0 +1,9 @@ + +cc004.hs:2: Cannot generalise these overloadings (in a _ccall_): + `Foreign.CReturnable t{-a12p-}' + +cc004.hs:2: Cannot generalise these overloadings (in a _ccall_): + `Foreign.CReturnable t{-a138-}' + + +Compilation had errors diff --git a/ghc/compiler/tests/ccall/cc005.hs b/ghc/compiler/tests/ccall/cc005.hs index c26a53f..8aeca95 100644 --- a/ghc/compiler/tests/ccall/cc005.hs +++ b/ghc/compiler/tests/ccall/cc005.hs @@ -2,7 +2,7 @@ module Test where -import PreludeGlaST +import GlaExts -- simple functions diff --git a/ghc/compiler/tests/ccall/cc005.stderr b/ghc/compiler/tests/ccall/cc005.stderr index ab13745..ed9f6bb 100644 --- a/ghc/compiler/tests/ccall/cc005.stderr +++ b/ghc/compiler/tests/ccall/cc005.stderr @@ -1,188 +1,1100 @@ -Typechecked: -lit.t444 = D# 2.0000000000000000## -lit.t443 = F# 1.0000000000000000# -AbsBinds [] [] [(a.t439, Test.a{-r79-})] - {- nonrec -} - a.t439 :: IoWorld -> (Int, IoWorld) - a.t439 - = ccall a [Int] -{- nonrec -} -{- nonrec -} -AbsBinds [] [] [(b.t440, Test.b{-r80-})] - {- nonrec -} - b.t440 :: Int -> IoWorld -> (Int, IoWorld) - b.t440 - x.r212 = ccall b [Int, Int] x.r212 -{- nonrec -} -{- nonrec -} -AbsBinds [] [] [(c.t441, Test.c{-r81-})] - {- nonrec -} - c.t441 :: Int -> Char -> Float -> Double -> IoWorld -> (Float, IoWorld) - c.t441 - x1.r213 x2.r214 x3.r215 x4.r216 - = ccall c [Float, Int, Char, Float, Double] - x1.r213 x2.r214 x3.r215 x4.r216 -{- nonrec -} -{- nonrec -} -AbsBinds [] [] [(d.t442, Test.d{-r82-})] - {- nonrec -} - d.t442 :: IoWorld -> (Float, IoWorld) - d.t442 - = (thenIO{-r102-} [Int, Float]) - Test.a{-r79-} - (\ x.r217 -> (thenIO{-r102-} [Int, Float]) - (Test.b{-r80-} x.r217) - (\ y.r218 -> Test.c{-r81-} - y.r218 'f' lit.t443 lit.t444)) -{- nonrec -} -{- nonrec -} -Desugared: -{- plain CoRec -} -lit.t444 :: Double -_NI_ -lit.t444 = (\ tpl.d0# -> D#! tpl.d0#) 2.0000000000000000## -lit.t443 :: Float -_NI_ -lit.t443 = (\ tpl.d1# -> F#! tpl.d1#) 1.0000000000000000# -Test.a{-r79-} :: IoWorld -> (Int, IoWorld) -_NI_ -Test.a{-r79-} = - \ ds.d2 -> + +NOTE: Simplifier still going after 4 iterations; bailing out. + + +================================================================================ +STG syntax: +nrlit_s25b = + PrelNum.:%{-5l,p-}{i}! [PrelNum.integer_2{-8e,p-} PrelNum.integer_1{-8d,p-}]; +lit_a19u = + (False, True, False, False, True) [] \u [] case - (case - (case ds.d2 of { - IoWorld ds.d3# -> ds.d3# - }) - of { - a.d8# -> ( _CCALL_ a [] Int# )! a.d8# - }) + PrelNum.$d14{-rtM,p-} ::{PrelNum.Fractional{-26,p-} PrelBase.Double{-3a,p-}} of { - IntPrimAndIoWorld ds.d4# ds.d5# -> - let { - a.d6 :: Int - _NI_ - a.d6 = I#! ds.d4# } in - let { - a.d7 :: IoWorld - _NI_ - a.d7 = IoWorld! ds.d5# - } in Tup2! Int IoWorld a.d6 a.d7 - } -Test.b{-r80-} :: Int -> IoWorld -> (Int, IoWorld) -_NI_ -Test.b{-r80-} = - \ x.r212 ds.d9 -> + -- lvs: []; rhs lvs: []; uniq: c2b9 + PrelTup.(,,,){-64,p-}{i} tpl_s1V1 tpl_s1V2 tpl_s1V3 tpl_s1V0 -> + tpl_s1V0 + nrlit_s25b; + }; +nrlit_s25c = + PrelNum.:%{-5l,p-}{i}! [PrelNum.integer_1{-8d,p-} PrelNum.integer_1{-8d,p-}]; +lit_a19w = + (False, True, False, False, True) [] \u [] case - (case - (case ds.d9 of { - IoWorld ds.d10# -> ds.d10# - }) - of { - a.d16# -> - case - (case x.r212 of { - I# ds.d11# -> ds.d11# - }) - of { - a.d17# -> ( _CCALL_ b [Int#] Int# )! a.d16# a.d17# - } - }) + PrelNum.$d23{-rtW,p-} ::{PrelNum.Fractional{-26,p-} PrelBase.Float{-3c,p-}} of { - IntPrimAndIoWorld ds.d12# ds.d13# -> - let { - a.d14 :: Int - _NI_ - a.d14 = I#! ds.d12# } in - let { - a.d15 :: IoWorld - _NI_ - a.d15 = IoWorld! ds.d13# - } in Tup2! Int IoWorld a.d14 a.d15 + -- lvs: []; rhs lvs: []; uniq: c2ba + PrelTup.(,,,){-64,p-}{i} tpl_s1Vt tpl_s1Vu tpl_s1Vv tpl_s1Vs -> + tpl_s1Vs + nrlit_s25c; + }; +s_s1MF = + [] \r [ds_s1VJ] + case ds_s1VJ ::STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} of { + -- lvs: [ds_s1VJ]; rhs lvs: []; uniq: c2bb + STBase.S#{-5D,p-}{i} ds_s1Wa -> + case + _ccall_ a [(STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-})]# [ds_s1Wa] ::STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s1Wa]; rhs lvs: []; uniq: c2bc + STBase.StateAndInt#{-5v,p-}{i} ds_s1Wk ds_s1W9 -> + let { + ds_s1WA = + PrelBase.I#{-5b,p-}{i}! [ds_s1W9]; } in + let { + ds_s1Wz = + STBase.S#{-5D,p-}{i}! [ds_s1Wk]; + } in + PrelTup.(,){-62,p-}{i}! [ds_s1WA ds_s1Wz]; + }; + }; +s_s1Xu = + [] \r [ds_s1WI] + case ds_s1WI ::STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} of { + -- lvs: [ds_s1WI]; rhs lvs: []; uniq: c2bd + STBase.S#{-5D,p-}{i} ds_s1X9 -> + case + _ccall_ a [(STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-})]# [ds_s1X9] ::STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s1X9]; rhs lvs: []; uniq: c2be + STBase.StateAndInt#{-5v,p-}{i} ds_s1Xj ds_s1X8 -> + let { + ds_s1XP = + PrelBase.I#{-5b,p-}{i}! [ds_s1X8]; } in + let { + ds_s1XO = + STBase.S#{-5D,p-}{i}! [ds_s1Xj]; + } in + PrelTup.(,){-62,p-}{i}! [ds_s1XP ds_s1XO]; + }; + }; +a{-r1,x-} = + [] \u [] + s_s1Xu; +b{-r3,x-} = + [] \r [x_s1XY] + let { + stg_c2ac = + (False, True, False, False, True) [x_s1XY] \r [ds_s1XN] + case + ds_s1XN{-lvs:x_s1XY-} ::STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s1XN x_s1XY]; rhs lvs: [x_s1XY]; uniq: c2bf + STBase.S#{-5D,p-}{i} ds_s1XZ -> + case x_s1XY{-lvs:ds_s1XZ-} ::PrelBase.Int{-3g,p-} of { + -- lvs: [x_s1XY ds_s1XZ]; rhs lvs: [ds_s1XZ]; uniq: c2bg + PrelBase.I#{-5b,p-}{i} ds_s1Yp -> + case + _ccall_ b [(STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-}) GHC.Int#{-3f,p-}]# [ds_s1XZ ds_s1Yp] ::STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s1XZ ds_s1Yp]; rhs lvs: []; uniq: c2bh + STBase.StateAndInt#{-5v,p-}{i} ds_s1YA ds_s1Yq -> + let { + ds_s1Za = + PrelBase.I#{-5b,p-}{i}! [ds_s1Yq]; } in + let { + ds_s1Z9 = + STBase.S#{-5D,p-}{i}! [ds_s1YA]; + } in + PrelTup.(,){-62,p-}{i}! [ds_s1Za ds_s1Z9]; + }; + }; + }; + } in + stg_c2ac; +c{-r5,x-} = + [] \r [x1_s1Zj x2_s1Zt x3_s1ZD x4_s1ZN] + let { + stg_c29C = + (False, True, False, False, True) [x1_s1Zj x2_s1Zt x3_s1ZD x4_s1ZN] \r [ds_s1Z8] + case + ds_s1Z8{-lvs:x1_s1Zj, x2_s1Zt, x3_s1ZD, x4_s1ZN-} ::STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s1Z8 x1_s1Zj x2_s1Zt x3_s1ZD x4_s1ZN]; rhs lvs: [x1_s1Zj x2_s1Zt x3_s1ZD x4_s1ZN]; uniq: c2bi + STBase.S#{-5D,p-}{i} ds_s1Zk -> + case + x1_s1Zj{-lvs:ds_s1Zk, x2_s1Zt, x3_s1ZD, x4_s1ZN-} ::PrelBase.Int{-3g,p-} + of { + -- lvs: [x1_s1Zj ds_s1Zk x2_s1Zt x3_s1ZD x4_s1ZN]; rhs lvs: [ds_s1Zk x2_s1Zt x3_s1ZD x4_s1ZN]; uniq: c2bj + PrelBase.I#{-5b,p-}{i} ds_s1Zu -> + case + x2_s1Zt{-lvs:ds_s1Zk, ds_s1Zu, x3_s1ZD, x4_s1ZN-} ::PrelBase.Char{-38,p-} + of { + -- lvs: [ds_s1Zk x2_s1Zt ds_s1Zu x3_s1ZD x4_s1ZN]; rhs lvs: [ds_s1Zk ds_s1Zu x3_s1ZD x4_s1ZN]; uniq: c2bk + PrelBase.C#{-54,p-}{i} ds_s1ZE -> + case + x3_s1ZD{-lvs:ds_s1Zk, ds_s1Zu, ds_s1ZE, x4_s1ZN-} ::PrelBase.Float{-3c,p-} + of { + -- lvs: [ds_s1Zk ds_s1Zu x3_s1ZD ds_s1ZE x4_s1ZN]; rhs lvs: [ds_s1Zk ds_s1Zu ds_s1ZE x4_s1ZN]; uniq: c2bl + PrelBase.F#{-59,p-}{i} ds_s1ZO -> + case + x4_s1ZN{-lvs:ds_s1Zk, ds_s1Zu, ds_s1ZE, ds_s1ZO-} ::PrelBase.Double{-3a,p-} + of { + -- lvs: [ds_s1Zk ds_s1Zu ds_s1ZE x4_s1ZN ds_s1ZO]; rhs lvs: [ds_s1Zk ds_s1Zu ds_s1ZE ds_s1ZO]; uniq: c2bm + PrelBase.D#{-56,p-}{i} ds_s20e -> + case + _ccall_ c [(STBase.StateAndFloat#{-3C,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-}) GHC.Int#{-3f,p-} GHC.Char#{-37,p-} GHC.Float#{-3b,p-} GHC.Double#{-39,p-}]# [ds_s1Zk ds_s1Zu ds_s1ZE ds_s1ZO ds_s20e] ::STBase.StateAndFloat#{-3C,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s1Zk ds_s1Zu ds_s1ZE ds_s1ZO ds_s20e]; rhs lvs: []; uniq: c2bn + STBase.StateAndFloat#{-5u,p-}{i} ds_s20p ds_s20f -> + let { + ds_s217 = + PrelBase.F#{-59,p-}{i}! [ds_s20f]; } in + let { + ds_s216 = + STBase.S#{-5D,p-}{i}! [ds_s20p]; + } in + PrelTup.(,){-62,p-}{i}! [ds_s217 ds_s216]; + }; + }; + }; + }; + }; + }; + } in + stg_c29C; +d{-r7,x-} = + [] \u [] + let { + ds_s258 = + [] \r [x_s21g] + let { s_s22a = [x_s21g] \r [ds_s215] + case + ds_s215{-lvs:x_s21g-} ::STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s215 x_s21g]; rhs lvs: [x_s21g]; uniq: c2bo + STBase.S#{-5D,p-}{i} ds_s21h -> + case x_s21g{-lvs:ds_s21h-} ::PrelBase.Int{-3g,p-} of { + -- lvs: [x_s21g ds_s21h]; rhs lvs: [ds_s21h]; uniq: c2bp + PrelBase.I#{-5b,p-}{i} ds_s21H -> + case + _ccall_ b [(STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-}) GHC.Int#{-3f,p-}]# [ds_s21h ds_s21H] ::STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s21h ds_s21H]; rhs lvs: []; uniq: c2bq + STBase.StateAndInt#{-5v,p-}{i} ds_s21S ds_s21I -> + let { + ds_s22c = + PrelBase.I#{-5b,p-}{i}! [ds_s21I]; } in + let { + ds_s22b = + STBase.S#{-5D,p-}{i}! [ds_s21S]; + } in + PrelTup.(,){-62,p-}{i}! [ds_s22c ds_s22b]; + }; + }; + } } in + let { s_s23h = [x_s21g] \r [ds_s22k] + case + ds_s22k{-lvs:x_s21g-} ::STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [x_s21g ds_s22k]; rhs lvs: [x_s21g]; uniq: c2br + STBase.S#{-5D,p-}{i} ds_s22t -> + case x_s21g{-lvs:ds_s22t-} ::PrelBase.Int{-3g,p-} of { + -- lvs: [x_s21g ds_s22t]; rhs lvs: [ds_s22t]; uniq: c2bs + PrelBase.I#{-5b,p-}{i} ds_s22T -> + case + _ccall_ b [(STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-}) GHC.Int#{-3f,p-}]# [ds_s22t ds_s22T] ::STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s22t ds_s22T]; rhs lvs: []; uniq: c2bt + STBase.StateAndInt#{-5v,p-}{i} ds_s234 ds_s22U -> + let { + ds_s23A = + PrelBase.I#{-5b,p-}{i}! [ds_s22U]; } in + let { + ds_s23z = + STBase.S#{-5D,p-}{i}! [ds_s234]; + } in + PrelTup.(,){-62,p-}{i}! [ds_s23A ds_s23z]; + }; + }; + } } in + let { + ds_s24V = + [] \r [y_s23K] + let { + stg_c28E = + (False, True, False, False, True) [y_s23K] \r [ds_s23y] + case + ds_s23y{-lvs:y_s23K-} ::STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s23y y_s23K]; rhs lvs: [y_s23K]; uniq: c2bu + STBase.S#{-5D,p-}{i} ds_s23L -> + case y_s23K{-lvs:ds_s23L-} ::PrelBase.Int{-3g,p-} of { + -- lvs: [y_s23K ds_s23L]; rhs lvs: [ds_s23L]; uniq: c2bv + PrelBase.I#{-5b,p-}{i} ds_s23U -> + case + lit_a19w{-lvs:ds_s23L, ds_s23U-} ::PrelBase.Float{-3c,p-} + of { + -- lvs: [ds_s23L ds_s23U]; rhs lvs: [ds_s23L ds_s23U]; uniq: c2bw + PrelBase.F#{-59,p-}{i} ds_s243 -> + case + lit_a19u{-lvs:ds_s23L, ds_s23U, ds_s243-} ::PrelBase.Double{-3a,p-} + of { + -- lvs: [ds_s23L ds_s23U ds_s243]; rhs lvs: [ds_s23L ds_s23U ds_s243]; uniq: c2bx + PrelBase.D#{-56,p-}{i} ds_s24t -> + case + _ccall_ c [(STBase.StateAndFloat#{-3C,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-}) GHC.Int#{-3f,p-} GHC.Char#{-37,p-} GHC.Float#{-3b,p-} GHC.Double#{-39,p-}]# [ds_s23L ds_s23U 'f' ds_s243 ds_s24t] ::STBase.StateAndFloat#{-3C,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s23L ds_s23U ds_s243 ds_s24t]; rhs lvs: []; uniq: c2by + STBase.StateAndFloat#{-5u,p-}{i} ds_s24E ds_s24u -> + let { + ds_s24U = + PrelBase.F#{-59,p-}{i}! [ds_s24u]; } in + let { + ds_s24T = + STBase.S#{-5D,p-}{i}! [ds_s24E]; + } in + PrelTup.(,){-62,p-}{i}! [ds_s24U ds_s24T]; + }; + }; + }; + }; + }; + } in + stg_c28E; + } in + STBase.thenPrimIO{-r4w,p-} + s_s23h ds_s24V; + } in + STBase.thenPrimIO{-r4w,p-} + s_s1Xu ds_s258; + + +================================================================================ +Flat Abstract C: +ED_(PrelNum_integerZu2_closure); +ED_(PrelNum_integerZu1_closure); +SET_STATIC_HDR(s25b_closure,PrelNum_ZcZ37_static_info,0,static ,ED_RO_) + , (W_)PrelNum_integerZu2_closure, (W_)PrelNum_integerZu1_closure +}; +IFN_(ret_c2b9) { +ID_(s25b_closure); + FB_ + SpA[-1]=s25b_closure; + RetReg=StdUpdRetVecReg; + R1=R6; + SpA=SpA-1; + SpB=SpB-1; + ENT_VIA_NODE(); + GRAN_EXEC(6,1,1,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +UNVECTBL(static,vtbl_c2b9,ret_c2b9) +STATIC_ITBL(a19u_info,a19u_entry,StdErrorCode,1,-1,(STATIC_VHS+ + 2),0,static const,IF_,0,0,0); +IFN_(a19u_entry) { +ED_(PrelNum_Z36d14_closure); + FB_ + STK_CHK(1,1,5,0,0,0,1); + HEAP_CHK(1,(BH_HS+2),1); + SET_BH_HDR(Hp-(BH_HS+1),BH_UPD_info,0,(BH_VHS+2),0); + UPD_CAF(R1.p,Hp-(BH_HS+1)); + PUSH_STD_UPD_FRAME(Hp-(BH_HS+1),0,0); + RetReg=(StgRetAddr)UNVEC(ret_c2b9,vtbl_c2b9); + R1.p=PrelNum_Z36d14_closure; + SpB=SpB+5; + ENT_VIA_NODE(); + GRAN_EXEC(19,2,2,8,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +SET_STATIC_HDR(a19u_closure,a19u_info,0,static ,ID_RO_) + , (W_)0, (W_)0 +}; +ED_(PrelNum_integerZu1_closure); +SET_STATIC_HDR(s25c_closure,PrelNum_ZcZ37_static_info,0,static ,ED_RO_) + , (W_)PrelNum_integerZu1_closure, (W_)PrelNum_integerZu1_closure +}; +IFN_(ret_c2ba) { +ID_(s25c_closure); + FB_ + SpA[-1]=s25c_closure; + RetReg=StdUpdRetVecReg; + R1=R6; + SpA=SpA-1; + SpB=SpB-1; + ENT_VIA_NODE(); + GRAN_EXEC(6,1,1,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +UNVECTBL(static,vtbl_c2ba,ret_c2ba) +STATIC_ITBL(a19w_info,a19w_entry,StdErrorCode,1,-1,(STATIC_VHS+ + 2),0,static const,IF_,0,0,0); +IFN_(a19w_entry) { +ED_(PrelNum_Z36d23_closure); + FB_ + STK_CHK(1,1,5,0,0,0,1); + HEAP_CHK(1,(BH_HS+2),1); + SET_BH_HDR(Hp-(BH_HS+1),BH_UPD_info,0,(BH_VHS+2),0); + UPD_CAF(R1.p,Hp-(BH_HS+1)); + PUSH_STD_UPD_FRAME(Hp-(BH_HS+1),0,0); + RetReg=(StgRetAddr)UNVEC(ret_c2ba,vtbl_c2ba); + R1.p=PrelNum_Z36d23_closure; + SpB=SpB+5; + ENT_VIA_NODE(); + GRAN_EXEC(19,2,2,8,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +SET_STATIC_HDR(a19w_closure,a19w_info,0,static ,ID_RO_) + , (W_)0, (W_)0 +}; +IFN_(ret_c2bb) { +ED_RO_(PrelBase_IZh_con_info); +ED_(STBase_SZh_static_closure); +ED_RO_(PrelTup_Z40Z44Z41_inregs_info); +I_ s1W9; + FB_ + HEAP_CHK(0,(_FHS+1),0); + { + I_ _ccall_result; + CALLER_SAVE_Base + CALLER_SAVE_SpA + CALLER_SAVE_SuA + CALLER_SAVE_SpB + CALLER_SAVE_SuB + CALLER_SAVE_Ret + CALLER_SAVE_Hp + CALLER_SAVE_HpLim + _ccall_result = (a()); + CALLER_RESTORE_Base + CALLER_RESTORE_SpA + CALLER_RESTORE_SuA + CALLER_RESTORE_SpB + CALLER_RESTORE_SuB + CALLER_RESTORE_Ret + CALLER_RESTORE_Hp + CALLER_RESTORE_HpLim + CALLER_RESTORE_StdUpdRetVec + CALLER_RESTORE_StkStub + s1W9=_ccall_result; } -Test.c{-r81-} :: Int -> Char -> Float -> Double -> IoWorld -> (Float, IoWorld) -_NI_ -Test.c{-r81-} = - \ x1.r213 x2.r214 x3.r215 x4.r216 ds.d18 -> - case - (case - (case ds.d18 of { - IoWorld ds.d19# -> ds.d19# - }) - of { - a.d28# -> - case - (case x1.r213 of { - I# ds.d20# -> ds.d20# - }) - of { - a.d29# -> - case - (case x2.r214 of { - C# ds.d21# -> ds.d21# - }) - of { - a.d30# -> - case - (case x3.r215 of { - F# ds.d22# -> ds.d22# - }) - of { - a.d31# -> - case - (case x4.r216 of { - D# ds.d23# -> ds.d23# - }) - of { - a.d32# -> - ( _CCALL_ c [Int#, - Char#, - Float#, - Double#] Float# )! - a.d28# - a.d29# - a.d30# - a.d31# - a.d32# - } - } - } - } - }) - of { - FloatPrimAndIoWorld ds.d24# ds.d25# -> - let { - a.d26 :: Float - _NI_ - a.d26 = F#! ds.d24# } in - let { - a.d27 :: IoWorld - _NI_ - a.d27 = IoWorld! ds.d25# - } in Tup2! Float IoWorld a.d26 a.d27 + SET_SPEC_HDR(Hp-_FHS,PrelBase_IZh_con_info,0,1,0); + *Hp=(W_)(s1W9); + R4.p=STBase_SZh_static_closure; + R3.p=Hp-_FHS; + SpB=SpB-1; + R2.d=PrelTup_Z40Z44Z41_inregs_info; + GRAN_EXEC(10,2,21,22,0); + JMP_(DIRECT((StgRetAddr)(SpB[1]))); + FE_ +} +UNVECTBL(static,vtbl_c2bb,ret_c2bb) +STATIC_ITBL(s1MF_info,s1MF_entry,StdErrorCode,1,-1,STATIC_VHS,0,static const,IF_,0,0,0); +IFN_(s1MF_entry) { +ID_(s1MF_closure); +IF_(s1MF_fast1); + FB_ + ARGS_CHK_A_LOAD_NODE(1,s1MF_closure); + R1.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(s1MF_fast1); + FE_ +} +IFN_(s1MF_fast1) { + FB_ + STK_CHK(1,0,1,0,0,0,0); + SpB[1]=(W_)(RetReg); + RetReg=(StgRetAddr)UNVEC(ret_c2bb,vtbl_c2bb); + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(3,1,1,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +SET_STATIC_HDR(s1MF_closure,s1MF_info,0,static ,ID_RO_) +}; +IFN_(ret_c2bd) { +ED_RO_(PrelBase_IZh_con_info); +ED_(STBase_SZh_static_closure); +ED_RO_(PrelTup_Z40Z44Z41_inregs_info); +I_ s1X8; + FB_ + HEAP_CHK(0,(_FHS+1),0); + { + I_ _ccall_result; + CALLER_SAVE_Base + CALLER_SAVE_SpA + CALLER_SAVE_SuA + CALLER_SAVE_SpB + CALLER_SAVE_SuB + CALLER_SAVE_Ret + CALLER_SAVE_Hp + CALLER_SAVE_HpLim + _ccall_result = (a()); + CALLER_RESTORE_Base + CALLER_RESTORE_SpA + CALLER_RESTORE_SuA + CALLER_RESTORE_SpB + CALLER_RESTORE_SuB + CALLER_RESTORE_Ret + CALLER_RESTORE_Hp + CALLER_RESTORE_HpLim + CALLER_RESTORE_StdUpdRetVec + CALLER_RESTORE_StkStub + s1X8=_ccall_result; + } + SET_SPEC_HDR(Hp-_FHS,PrelBase_IZh_con_info,0,1,0); + *Hp=(W_)(s1X8); + R4.p=STBase_SZh_static_closure; + R3.p=Hp-_FHS; + SpB=SpB-1; + R2.d=PrelTup_Z40Z44Z41_inregs_info; + GRAN_EXEC(10,2,21,22,0); + JMP_(DIRECT((StgRetAddr)(SpB[1]))); + FE_ +} +UNVECTBL(static,vtbl_c2bd,ret_c2bd) +STATIC_ITBL(s1Xu_info,s1Xu_entry,StdErrorCode,1,-1,STATIC_VHS,0,static const,IF_,0,0,0); +IFN_(s1Xu_entry) { +ID_(s1Xu_closure); +IF_(s1Xu_fast1); + FB_ + ARGS_CHK_A_LOAD_NODE(1,s1Xu_closure); + R1.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(s1Xu_fast1); + FE_ +} +IFN_(s1Xu_fast1) { + FB_ + STK_CHK(1,0,1,0,0,0,0); + SpB[1]=(W_)(RetReg); + RetReg=(StgRetAddr)UNVEC(ret_c2bd,vtbl_c2bd); + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(3,1,1,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +SET_STATIC_HDR(s1Xu_closure,s1Xu_info,0,static ,ID_RO_) +}; +STATIC_ITBL(Test_a_info,Test_a_entry,StdErrorCode,1,-1,(STATIC_VHS+ + 2),0,const,EF_,0,0,0); +FN_(Test_a_entry) { +IF_(s1Xu_entry); + FB_ + STK_CHK(1,0,4,0,0,0,1); + HEAP_CHK(1,(BH_HS+2),1); + SET_BH_HDR(Hp-(BH_HS+1),BH_UPD_info,0,(BH_VHS+2),0); + UPD_CAF(R1.p,Hp-(BH_HS+1)); + PUSH_STD_UPD_FRAME(Hp-(BH_HS+1),0,0); + RetReg=StdUpdRetVecReg; + SpB=SpB+4; + GRAN_EXEC(16,2,1,8,0); + JMP_(s1Xu_entry); + FE_ +} +SET_STATIC_HDR(Test_a_closure,Test_a_info,0,,ED_RO_) + , (W_)0, (W_)0 +}; +IFN_(ret_c2bg) { +ED_RO_(PrelBase_IZh_con_info); +ED_(STBase_SZh_static_closure); +ED_RO_(PrelTup_Z40Z44Z41_inregs_info); +I_ s1Yq; + FB_ + HEAP_CHK(0,(_FHS+1),0); + { + I_ _ccall_result; + I_ _ccall_arg1=R3.i; + CALLER_SAVE_Base + CALLER_SAVE_SpA + CALLER_SAVE_SuA + CALLER_SAVE_SpB + CALLER_SAVE_SuB + CALLER_SAVE_Ret + CALLER_SAVE_Hp + CALLER_SAVE_HpLim + _ccall_result = (b((_ccall_arg1))); + CALLER_RESTORE_Base + CALLER_RESTORE_SpA + CALLER_RESTORE_SuA + CALLER_RESTORE_SpB + CALLER_RESTORE_SuB + CALLER_RESTORE_Ret + CALLER_RESTORE_Hp + CALLER_RESTORE_HpLim + CALLER_RESTORE_StdUpdRetVec + CALLER_RESTORE_StkStub + s1Yq=_ccall_result; + } + SET_SPEC_HDR(Hp-_FHS,PrelBase_IZh_con_info,0,1,0); + *Hp=(W_)(s1Yq); + R4.p=STBase_SZh_static_closure; + R3.p=Hp-_FHS; + SpB=SpB-1; + R2.d=PrelTup_Z40Z44Z41_inregs_info; + GRAN_EXEC(10,2,22,22,0); + JMP_(DIRECT((StgRetAddr)(SpB[1]))); + FE_ +} +UNVECTBL(static,vtbl_c2bg,ret_c2bg) +IFN_(ret_c2bf) { + FB_ + RetReg=(StgRetAddr)UNVEC(ret_c2bg,vtbl_c2bg); + R1.p=*SpA; + SpA=SpA+1; + ENT_VIA_NODE(); + GRAN_EXEC(3,1,2,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +UNVECTBL(static,vtbl_c2bf,ret_c2bf) +SPEC_N_ITBL(c2ac_info,c2ac_entry,StdErrorCode,1,-1,1,1,static const,IF_,0,0,0); +IFN_(c2ac_entry) { +IF_(c2ac_fast1); + FB_ + ARGS_CHK_A(1); + R2.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(c2ac_fast1); + FE_ +} +IFN_(c2ac_fast1) { + FB_ + STK_CHK(3,1,1,0,0,0,1); + SpB[1]=(W_)(RetReg); + RetReg=(StgRetAddr)UNVEC(ret_c2bf,vtbl_c2bf); + SpA[-1]=(P_)(R1.p[_FHS]); + R1=R2; + SpA=SpA-1; + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(5,1,2,2,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +STATIC_ITBL(Test_b_info,Test_b_entry,StdErrorCode,1,-1,STATIC_VHS,0,const,EF_,0,0,0); +FN_(Test_b_entry) { +ED_(Test_b_closure); +EF_(Test_b_fast1); + FB_ + ARGS_CHK_A_LOAD_NODE(1,Test_b_closure); + R1.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(Test_b_fast1); + FE_ +} +FN_(Test_b_fast1) { +ID_RO_(c2ac_info); +IF_(c2ac_entry); + FB_ + HEAP_CHK(1,(_FHS+1),0); + SET_SPEC_HDR(Hp-_FHS,c2ac_info,0,1,1); + *Hp=(W_)(R1.p); + R1.p=Hp-_FHS; + GRAN_EXEC(5,2,0,2,0); + JMP_(c2ac_entry); + FE_ +} +SET_STATIC_HDR(Test_b_closure,Test_b_info,0,,ED_RO_) +}; +IFN_(ret_c2bm) { +ED_RO_(PrelBase_FZh_con_info); +ED_(STBase_SZh_static_closure); +ED_RO_(PrelTup_Z40Z44Z41_inregs_info); +StgFloat s20f; + FB_ + HEAP_CHK(0,(_FHS+1),0); + { + StgFloat _ccall_result; + I_ _ccall_arg1=(I_)(SpB[-2]); + StgChar _ccall_arg2=(StgChar)(SpB[-1]); + StgFloat _ccall_arg3=PK_FLT(SpB); + StgDouble _ccall_arg4=DblReg1; + CALLER_SAVE_Base + CALLER_SAVE_SpA + CALLER_SAVE_SuA + CALLER_SAVE_SpB + CALLER_SAVE_SuB + CALLER_SAVE_Ret + CALLER_SAVE_Hp + CALLER_SAVE_HpLim + _ccall_result = (c((_ccall_arg1),(_ccall_arg2),(_ccall_arg3),(_ccall_arg4))); + CALLER_RESTORE_Base + CALLER_RESTORE_SpA + CALLER_RESTORE_SuA + CALLER_RESTORE_SpB + CALLER_RESTORE_SuB + CALLER_RESTORE_Ret + CALLER_RESTORE_Hp + CALLER_RESTORE_HpLim + CALLER_RESTORE_StdUpdRetVec + CALLER_RESTORE_StkStub + s20f=_ccall_result; + } + SET_SPEC_HDR(Hp-_FHS,PrelBase_FZh_con_info,0,1,0); + ASSIGN_FLT(Hp,s20f); + R4.p=STBase_SZh_static_closure; + R3.p=Hp-_FHS; + SpB=SpB-4; + R2.d=PrelTup_Z40Z44Z41_inregs_info; + GRAN_EXEC(10,2,25,22,0); + JMP_(DIRECT((StgRetAddr)(SpB[1]))); + FE_ +} +UNVECTBL(static,vtbl_c2bm,ret_c2bm) +IFN_(ret_c2bl) { + FB_ + RetReg=(StgRetAddr)UNVEC(ret_c2bm,vtbl_c2bm); + R1.p=*SpA; + ASSIGN_FLT(SpB+1,FltReg1); + SpA=SpA+4; + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(4,1,2,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +UNVECTBL(static,vtbl_c2bl,ret_c2bl) +IFN_(ret_c2bk) { + FB_ + RetReg=(StgRetAddr)UNVEC(ret_c2bl,vtbl_c2bl); + R1.p=SpA[1]; + SpB[1]=(W_)(R3.c); + SpA[1]=StkStubReg; + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(3,1,2,2,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +UNVECTBL(static,vtbl_c2bk,ret_c2bk) +IFN_(ret_c2bj) { + FB_ + RetReg=(StgRetAddr)UNVEC(ret_c2bk,vtbl_c2bk); + R1.p=SpA[2]; + SpB[1]=(W_)(R3.i); + SpA[2]=StkStubReg; + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(3,1,2,2,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +UNVECTBL(static,vtbl_c2bj,ret_c2bj) +IFN_(ret_c2bi) { + FB_ + RetReg=(StgRetAddr)UNVEC(ret_c2bj,vtbl_c2bj); + R1.p=SpA[3]; + SpA[3]=StkStubReg; + ENT_VIA_NODE(); + GRAN_EXEC(2,1,2,2,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +UNVECTBL(static,vtbl_c2bi,ret_c2bi) +SPEC_N_ITBL(c29C_info,c29C_entry,StdErrorCode,1,-1,4,4,static const,IF_,0,0,0); +IFN_(c29C_entry) { +IF_(c29C_fast1); + FB_ + ARGS_CHK_A(1); + R2.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(c29C_fast1); + FE_ +} +IFN_(c29C_fast1) { + FB_ + STK_CHK(3,4,4,0,0,0,1); + SpB[1]=(W_)(RetReg); + RetReg=(StgRetAddr)UNVEC(ret_c2bi,vtbl_c2bi); + SpA[-4]=(P_)(R1.p[(_FHS+3)]); + SpA[-3]=(P_)(R1.p[(_FHS+2)]); + SpA[-2]=(P_)(R1.p[(_FHS+1)]); + SpA[-1]=(P_)(R1.p[_FHS]); + R1=R2; + SpA=SpA-4; + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(5,1,5,5,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +STATIC_ITBL(Test_c_info,Test_c_entry,StdErrorCode,1,-1,STATIC_VHS,0,const,EF_,0,0,0); +FN_(Test_c_entry) { +ED_(Test_c_closure); +EF_(Test_c_fast4); + FB_ + ARGS_CHK_A_LOAD_NODE(4,Test_c_closure); + R1.p=*SpA; + R2.p=SpA[1]; + R3.p=SpA[2]; + R4.p=SpA[3]; + SpA=SpA+4; + GRAN_EXEC(5,2,4,0,0); + JMP_(Test_c_fast4); + FE_ +} +FN_(Test_c_fast4) { +ID_RO_(c29C_info); +IF_(c29C_entry); + FB_ + HEAP_CHK(15,(_FHS+4),0); + SET_SPEC_HDR(Hp-(_FHS+3),c29C_info,0,4,4); + Hp[-3]=(W_)(R1.p); + Hp[-2]=(W_)(R2.p); + Hp[-1]=(W_)(R3.p); + *Hp=(W_)(R4.p); + R1.p=Hp-(_FHS+3); + GRAN_EXEC(5,2,0,5,0); + JMP_(c29C_entry); + FE_ +} +SET_STATIC_HDR(Test_c_closure,Test_c_info,0,,ED_RO_) +}; +IFN_(ret_c2bp) { +ED_RO_(PrelBase_IZh_con_info); +ED_(STBase_SZh_static_closure); +ED_RO_(PrelTup_Z40Z44Z41_inregs_info); +I_ s21I; + FB_ + HEAP_CHK(0,(_FHS+1),0); + { + I_ _ccall_result; + I_ _ccall_arg1=R3.i; + CALLER_SAVE_Base + CALLER_SAVE_SpA + CALLER_SAVE_SuA + CALLER_SAVE_SpB + CALLER_SAVE_SuB + CALLER_SAVE_Ret + CALLER_SAVE_Hp + CALLER_SAVE_HpLim + _ccall_result = (b((_ccall_arg1))); + CALLER_RESTORE_Base + CALLER_RESTORE_SpA + CALLER_RESTORE_SuA + CALLER_RESTORE_SpB + CALLER_RESTORE_SuB + CALLER_RESTORE_Ret + CALLER_RESTORE_Hp + CALLER_RESTORE_HpLim + CALLER_RESTORE_StdUpdRetVec + CALLER_RESTORE_StkStub + s21I=_ccall_result; + } + SET_SPEC_HDR(Hp-_FHS,PrelBase_IZh_con_info,0,1,0); + *Hp=(W_)(s21I); + R4.p=STBase_SZh_static_closure; + R3.p=Hp-_FHS; + SpB=SpB-1; + R2.d=PrelTup_Z40Z44Z41_inregs_info; + GRAN_EXEC(10,2,22,22,0); + JMP_(DIRECT((StgRetAddr)(SpB[1]))); + FE_ +} +UNVECTBL(static,vtbl_c2bp,ret_c2bp) +IFN_(ret_c2bo) { + FB_ + RetReg=(StgRetAddr)UNVEC(ret_c2bp,vtbl_c2bp); + R1.p=*SpA; + SpA=SpA+1; + ENT_VIA_NODE(); + GRAN_EXEC(3,1,2,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +UNVECTBL(static,vtbl_c2bo,ret_c2bo) +SPEC_N_ITBL(s22a_info,s22a_entry,StdErrorCode,1,-1,1,1,static const,IF_,0,0,0); +IFN_(s22a_entry) { +IF_(s22a_fast1); + FB_ + ARGS_CHK_A(1); + R2.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(s22a_fast1); + FE_ +} +IFN_(s22a_fast1) { + FB_ + STK_CHK(3,1,1,0,0,0,1); + SpB[1]=(W_)(RetReg); + RetReg=(StgRetAddr)UNVEC(ret_c2bo,vtbl_c2bo); + SpA[-1]=(P_)(R1.p[_FHS]); + R1=R2; + SpA=SpA-1; + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(5,1,2,2,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +IFN_(ret_c2bs) { +ED_RO_(PrelBase_IZh_con_info); +ED_(STBase_SZh_static_closure); +ED_RO_(PrelTup_Z40Z44Z41_inregs_info); +I_ s22U; + FB_ + HEAP_CHK(0,(_FHS+1),0); + { + I_ _ccall_result; + I_ _ccall_arg1=R3.i; + CALLER_SAVE_Base + CALLER_SAVE_SpA + CALLER_SAVE_SuA + CALLER_SAVE_SpB + CALLER_SAVE_SuB + CALLER_SAVE_Ret + CALLER_SAVE_Hp + CALLER_SAVE_HpLim + _ccall_result = (b((_ccall_arg1))); + CALLER_RESTORE_Base + CALLER_RESTORE_SpA + CALLER_RESTORE_SuA + CALLER_RESTORE_SpB + CALLER_RESTORE_SuB + CALLER_RESTORE_Ret + CALLER_RESTORE_Hp + CALLER_RESTORE_HpLim + CALLER_RESTORE_StdUpdRetVec + CALLER_RESTORE_StkStub + s22U=_ccall_result; + } + SET_SPEC_HDR(Hp-_FHS,PrelBase_IZh_con_info,0,1,0); + *Hp=(W_)(s22U); + R4.p=STBase_SZh_static_closure; + R3.p=Hp-_FHS; + SpB=SpB-1; + R2.d=PrelTup_Z40Z44Z41_inregs_info; + GRAN_EXEC(10,2,22,22,0); + JMP_(DIRECT((StgRetAddr)(SpB[1]))); + FE_ +} +UNVECTBL(static,vtbl_c2bs,ret_c2bs) +IFN_(ret_c2br) { + FB_ + RetReg=(StgRetAddr)UNVEC(ret_c2bs,vtbl_c2bs); + R1.p=*SpA; + SpA=SpA+1; + ENT_VIA_NODE(); + GRAN_EXEC(3,1,2,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +UNVECTBL(static,vtbl_c2br,ret_c2br) +SPEC_N_ITBL(s23h_info,s23h_entry,StdErrorCode,1,-1,1,1,static const,IF_,0,0,0); +IFN_(s23h_entry) { +IF_(s23h_fast1); + FB_ + ARGS_CHK_A(1); + R2.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(s23h_fast1); + FE_ +} +IFN_(s23h_fast1) { + FB_ + STK_CHK(3,1,1,0,0,0,1); + SpB[1]=(W_)(RetReg); + RetReg=(StgRetAddr)UNVEC(ret_c2br,vtbl_c2br); + SpA[-1]=(P_)(R1.p[_FHS]); + R1=R2; + SpA=SpA-1; + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(5,1,2,2,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +IFN_(ret_c2bx) { +ED_RO_(PrelBase_FZh_con_info); +ED_(STBase_SZh_static_closure); +ED_RO_(PrelTup_Z40Z44Z41_inregs_info); +StgFloat s24u; + FB_ + HEAP_CHK(0,(_FHS+1),0); + { + StgFloat _ccall_result; + I_ _ccall_arg1=(I_)(SpB[-1]); + StgChar _ccall_arg2=(C_)'f'; + StgFloat _ccall_arg3=PK_FLT(SpB); + StgDouble _ccall_arg4=DblReg1; + CALLER_SAVE_Base + CALLER_SAVE_SpA + CALLER_SAVE_SuA + CALLER_SAVE_SpB + CALLER_SAVE_SuB + CALLER_SAVE_Ret + CALLER_SAVE_Hp + CALLER_SAVE_HpLim + _ccall_result = (c((_ccall_arg1),(_ccall_arg2),(_ccall_arg3),(_ccall_arg4))); + CALLER_RESTORE_Base + CALLER_RESTORE_SpA + CALLER_RESTORE_SuA + CALLER_RESTORE_SpB + CALLER_RESTORE_SuB + CALLER_RESTORE_Ret + CALLER_RESTORE_Hp + CALLER_RESTORE_HpLim + CALLER_RESTORE_StdUpdRetVec + CALLER_RESTORE_StkStub + s24u=_ccall_result; } -Test.d{-r82-} :: IoWorld -> (Float, IoWorld) -_NI_ -Test.d{-r82-} = - let { - a.d36 :: Int -> IoWorld -> (Float, IoWorld) - _NI_ - a.d36 = - \ x.r217 -> - let { - a.d35 :: Int -> IoWorld -> (Float, IoWorld) - _NI_ - a.d35 = - \ y.r218 -> - (let { - a.d33 :: Char - _NI_ - a.d33 = C#! 'f'# - } in Test.c{-r81-} y.r218 a.d33) lit.t443 lit.t444 - } in - (let { - a.d34 :: IoWorld -> (Int, IoWorld) - _NI_ - a.d34 = Test.b{-r80-} x.r217 - } in ((thenIO{-r102-} Int) Float) a.d34) a.d35 - } in ((thenIO{-r102-} Int) Float) Test.a{-r79-} a.d36 -{- end plain CoRec -} + SET_SPEC_HDR(Hp-_FHS,PrelBase_FZh_con_info,0,1,0); + ASSIGN_FLT(Hp,s24u); + R4.p=STBase_SZh_static_closure; + R3.p=Hp-_FHS; + SpB=SpB-3; + R2.d=PrelTup_Z40Z44Z41_inregs_info; + GRAN_EXEC(11,2,24,22,0); + JMP_(DIRECT((StgRetAddr)(SpB[1]))); + FE_ +} +UNVECTBL(static,vtbl_c2bx,ret_c2bx) +IFN_(ret_c2bw) { +ID_(a19u_closure); + FB_ + RetReg=(StgRetAddr)UNVEC(ret_c2bx,vtbl_c2bx); + R1.p=a19u_closure; + ASSIGN_FLT(SpB+1,FltReg1); + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(5,1,1,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +UNVECTBL(static,vtbl_c2bw,ret_c2bw) +IFN_(ret_c2bv) { +ID_(a19w_closure); + FB_ + RetReg=(StgRetAddr)UNVEC(ret_c2bw,vtbl_c2bw); + R1.p=a19w_closure; + SpB[1]=(W_)(R3.i); + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(5,1,1,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +UNVECTBL(static,vtbl_c2bv,ret_c2bv) +IFN_(ret_c2bu) { + FB_ + RetReg=(StgRetAddr)UNVEC(ret_c2bv,vtbl_c2bv); + R1.p=*SpA; + SpA=SpA+1; + ENT_VIA_NODE(); + GRAN_EXEC(3,1,2,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +UNVECTBL(static,vtbl_c2bu,ret_c2bu) +SPEC_N_ITBL(c28E_info,c28E_entry,StdErrorCode,1,-1,1,1,static const,IF_,0,0,0); +IFN_(c28E_entry) { +IF_(c28E_fast1); + FB_ + ARGS_CHK_A(1); + R2.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(c28E_fast1); + FE_ +} +IFN_(c28E_fast1) { + FB_ + STK_CHK(3,1,3,0,0,0,1); + SpB[1]=(W_)(RetReg); + RetReg=(StgRetAddr)UNVEC(ret_c2bu,vtbl_c2bu); + SpA[-1]=(P_)(R1.p[_FHS]); + R1=R2; + SpA=SpA-1; + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(5,1,2,2,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +SPEC_N_ITBL(s24V_info,s24V_entry,StdErrorCode,1,-1,1,0,static const,IF_,0,0,0); +IFN_(s24V_entry) { +IF_(s24V_fast1); + FB_ + ARGS_CHK_A(1); + R2.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(s24V_fast1); + FE_ +} +IFN_(s24V_fast1) { +ID_RO_(c28E_info); +IF_(c28E_entry); + FB_ + HEAP_CHK(3,(_FHS+1),1); + SET_SPEC_HDR(Hp-_FHS,c28E_info,0,1,1); + *Hp=(W_)(R2.p); + R1.p=Hp-_FHS; + GRAN_EXEC(5,2,0,2,0); + JMP_(c28E_entry); + FE_ +} +SPEC_N_ITBL(s258_info,s258_entry,StdErrorCode,1,-1,1,0,static const,IF_,0,0,0); +IFN_(s258_entry) { +IF_(s258_fast1); + FB_ + ARGS_CHK_A(1); + R2.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(s258_fast1); + FE_ +} +IFN_(s258_fast1) { +ID_RO_(s22a_info); +ID_RO_(s23h_info); +ID_RO_(s24V_info); +ED_(STBase_thenPrimIO_closure); + FB_ + STK_CHK(3,2,0,0,0,0,1); + HEAP_CHK(3,((_FHS*3)+3),1); + SET_SPEC_HDR(Hp-((_FHS*3)+2),s22a_info,0,1,1); + Hp[-((_FHS*2)+2)]=(W_)(R2.p); + SET_SPEC_HDR(Hp-((_FHS*2)+1),s23h_info,0,1,1); + Hp[-(_FHS+1)]=(W_)(R2.p); + SET_SPEC_HDR(Hp-_FHS,s24V_info,0,1,0); + SpA[-1]=Hp-_FHS; + SpA[-2]=Hp-((_FHS*2)+1); + R1.p=STBase_thenPrimIO_closure; + SpA=SpA-2; + ENT_VIA_NODE(); + GRAN_EXEC(11,2,3,7,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +STATIC_ITBL(Test_d_info,Test_d_entry,StdErrorCode,1,-1,(STATIC_VHS+ + 2),0,const,EF_,0,0,0); +FN_(Test_d_entry) { +ID_RO_(s258_info); +ID_(s1Xu_closure); +ED_(STBase_thenPrimIO_closure); + FB_ + STK_CHK(1,2,4,0,0,0,1); + HEAP_CHK(1,(BH_HS+_FHS+3),1); + SET_BH_HDR(Hp-(BH_HS+_FHS+2),BH_UPD_info,0,(BH_VHS+2),0); + UPD_CAF(R1.p,Hp-(BH_HS+_FHS+2)); + PUSH_STD_UPD_FRAME(Hp-(BH_HS+_FHS+2),0,0); + SET_SPEC_HDR(Hp-_FHS,s258_info,0,1,0); + SpA[-1]=Hp-_FHS; + SpA[-2]=s1Xu_closure; + RetReg=StdUpdRetVecReg; + R1.p=STBase_thenPrimIO_closure; + SpA=SpA-2; + SpB=SpB+4; + ENT_VIA_NODE(); + GRAN_EXEC(23,2,3,11,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +SET_STATIC_HDR(Test_d_closure,Test_d_info,0,,ED_RO_) + , (W_)0, (W_)0 +}; +ghc: module version changed to 1; reason: no old .hi file diff --git a/ghc/compiler/tests/ccall/cc006.hs b/ghc/compiler/tests/ccall/cc006.hs index 95a061b..27579e9 100644 --- a/ghc/compiler/tests/ccall/cc006.hs +++ b/ghc/compiler/tests/ccall/cc006.hs @@ -1,15 +1,16 @@ ---!!! cc002 -- ccall with non-standard boxed arguments and results +--!!! cc006 -- ccall with non-standard boxed arguments and results module Test where -import PreludeGlaST +import GlaExts +import Foreign -- Test returning results -a :: PrimIO ForeignObj +a :: PrimIO Int a = _ccall_ a -b :: PrimIO StablePtr +b :: PrimIO (StablePtr Int) b = _ccall_ b -- Test taking arguments @@ -17,5 +18,5 @@ b = _ccall_ b c :: ForeignObj -> PrimIO Int c x = _ccall_ c x -d :: StablePtr -> PrimIO Int +d :: StablePtr Int -> PrimIO Int d x = _ccall_ d x diff --git a/ghc/compiler/tests/ccall/cc006.stderr b/ghc/compiler/tests/ccall/cc006.stderr index 2f097cf..df765d7 100644 --- a/ghc/compiler/tests/ccall/cc006.stderr +++ b/ghc/compiler/tests/ccall/cc006.stderr @@ -1,140 +1,671 @@ -Typechecked: -AbsBinds [] [] [(a.t439, Test.a{-r79-})] - {- nonrec -} - a.t439 :: IoWorld -> (CHeapPtr, IoWorld) - a.t439 - = ccall a [CHeapPtr] -{- nonrec -} -{- nonrec -} -AbsBinds [] [] [(b.t440, Test.b{-r80-})] - {- nonrec -} - b.t440 :: IoWorld -> (StablePtr, IoWorld) - b.t440 - = ccall b [StablePtr] -{- nonrec -} -{- nonrec -} -AbsBinds [] [] [(c.t441, Test.c{-r81-})] - {- nonrec -} - c.t441 :: CHeapPtr -> IoWorld -> (Int, IoWorld) - c.t441 - x.r211 = ccall c [Int, CHeapPtr] x.r211 -{- nonrec -} -{- nonrec -} -AbsBinds [] [] [(d.t442, Test.d{-r82-})] - {- nonrec -} - d.t442 :: StablePtr -> IoWorld -> (Int, IoWorld) - d.t442 - x.r212 = ccall d [Int, StablePtr] x.r212 -{- nonrec -} -{- nonrec -} -Desugared: -Test.a{-r79-} :: IoWorld -> (CHeapPtr, IoWorld) -_NI_ -Test.a{-r79-} = - \ ds.d0 -> - case - (case - (case ds.d0 of { - IoWorld ds.d1# -> ds.d1# - }) - of { - a.d6# -> ( _CCALL_ a [] CHeapPtr# )! a.d6# - }) - of { - CHPPrimAndIoWorld ds.d2# ds.d3# -> - let { - a.d4 :: CHeapPtr - _NI_ - a.d4 = CHP#! ds.d2# } in - let { - a.d5 :: IoWorld - _NI_ - a.d5 = IoWorld! ds.d3# - } in Tup2! CHeapPtr IoWorld a.d4 a.d5 + +NOTE: Simplifier still going after 4 iterations; bailing out. + + +================================================================================ +STG syntax: +d{-r5y,x-} = + [] \r [x_s1vw] + let { + stg_c1Fh = + (False, True, False, False, True) [x_s1vw] \r [ds_s1vn] + case + ds_s1vn{-lvs:x_s1vw-} ::STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s1vn x_s1vw]; rhs lvs: [x_s1vw]; uniq: c1Fi + STBase.S#{-5D,p-}{i} ds_s1vx -> + case + x_s1vw{-lvs:ds_s1vx-} ::Foreign.StablePtr{-3w,p-} PrelBase.Int{-3g,p-} + of { + -- lvs: [x_s1vw ds_s1vx]; rhs lvs: [ds_s1vx]; uniq: c1Fj + Foreign.StablePtr{-5o,p-}{i} ds_s1vX -> + case + _ccall_ d [(STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-}) (GHC.StablePtr#{-3v,p-} PrelBase.Int{-3g,p-})]# [ds_s1vx ds_s1vX] ::STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s1vx ds_s1vX]; rhs lvs: []; uniq: c1Fk + STBase.StateAndInt#{-5v,p-}{i} ds_s1w8 ds_s1vY -> + let { + ds_s1wC = + PrelBase.I#{-5b,p-}{i}! [ds_s1vY]; } in + let { + ds_s1wB = + STBase.S#{-5D,p-}{i}! [ds_s1w8]; + } in + PrelTup.(,){-62,p-}{i}! [ds_s1wC ds_s1wB]; + }; + }; + }; + } in + stg_c1Fh; +c{-r5x,x-} = + [] \r [x_s1wL] + let { + stg_c1EH = + (False, True, False, False, True) [x_s1wL] \r [ds_s1wA] + case + ds_s1wA{-lvs:x_s1wL-} ::STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s1wA x_s1wL]; rhs lvs: [x_s1wL]; uniq: c1Fl + STBase.S#{-5D,p-}{i} ds_s1wM -> + case x_s1wL{-lvs:ds_s1wM-} ::Foreign.ForeignObj{-3l,p-} of { + -- lvs: [x_s1wL ds_s1wM]; rhs lvs: [ds_s1wM]; uniq: c1Fm + Foreign.ForeignObj{-5f,p-}{i} ds_s1xc -> + case + _ccall_ c [(STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-}) GHC.ForeignObj#{-3k,p-}]# [ds_s1wM ds_s1xc] ::STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s1wM ds_s1xc]; rhs lvs: []; uniq: c1Fn + STBase.StateAndInt#{-5v,p-}{i} ds_s1xn ds_s1xd -> + let { + ds_s1xL = + PrelBase.I#{-5b,p-}{i}! [ds_s1xd]; } in + let { + ds_s1xK = + STBase.S#{-5D,p-}{i}! [ds_s1xn]; + } in + PrelTup.(,){-62,p-}{i}! [ds_s1xL ds_s1xK]; + }; + }; + }; + } in + stg_c1EH; +s_s1sE = + [] \r [ds_s1xJ] + case ds_s1xJ ::STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} of { + -- lvs: [ds_s1xJ]; rhs lvs: []; uniq: c1Fo + STBase.S#{-5D,p-}{i} ds_s1yc -> + case + _ccall_ b [(Foreign.StateAndStablePtr#{-3J,p-} GHC.RealWorld{-3s,p-} PrelBase.Int{-3g,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-})]# [ds_s1yc] ::Foreign.StateAndStablePtr#{-3J,p-} GHC.RealWorld{-3s,p-} PrelBase.Int{-3g,p-} + of { + -- lvs: [ds_s1yc]; rhs lvs: []; uniq: c1Fp + Foreign.StateAndStablePtr#{-5B,p-}{i} ds_s1ym ds_s1yb -> + let { + ds_s1yC = + Foreign.StablePtr{-5o,p-}{i}! [ds_s1yb]; } in + let { + ds_s1yB = + STBase.S#{-5D,p-}{i}! [ds_s1ym]; + } in + PrelTup.(,){-62,p-}{i}! [ds_s1yC ds_s1yB]; + }; + }; +s_s1zw = + (False, True, False, False, True) [] \r [ds_s1yK] + case ds_s1yK ::STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} of { + -- lvs: [ds_s1yK]; rhs lvs: []; uniq: c1Fq + STBase.S#{-5D,p-}{i} ds_s1zb -> + case + _ccall_ b [(Foreign.StateAndStablePtr#{-3J,p-} GHC.RealWorld{-3s,p-} PrelBase.Int{-3g,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-})]# [ds_s1zb] ::Foreign.StateAndStablePtr#{-3J,p-} GHC.RealWorld{-3s,p-} PrelBase.Int{-3g,p-} + of { + -- lvs: [ds_s1zb]; rhs lvs: []; uniq: c1Fr + Foreign.StateAndStablePtr#{-5B,p-}{i} ds_s1zl ds_s1za -> + let { + ds_s1zL = + Foreign.StablePtr{-5o,p-}{i}! [ds_s1za]; } in + let { + ds_s1zK = + STBase.S#{-5D,p-}{i}! [ds_s1zl]; + } in + PrelTup.(,){-62,p-}{i}! [ds_s1zL ds_s1zK]; + }; + }; +b{-r5w,x-} = + [] \u [] + s_s1zw; +s_s1uE = + [] \r [ds_s1zJ] + case ds_s1zJ ::STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} of { + -- lvs: [ds_s1zJ]; rhs lvs: []; uniq: c1Fs + STBase.S#{-5D,p-}{i} ds_s1Ac -> + case + _ccall_ a [(STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-})]# [ds_s1Ac] ::STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s1Ac]; rhs lvs: []; uniq: c1Ft + STBase.StateAndInt#{-5v,p-}{i} ds_s1Am ds_s1Ab -> + let { + ds_s1AC = + PrelBase.I#{-5b,p-}{i}! [ds_s1Ab]; } in + let { + ds_s1AB = + STBase.S#{-5D,p-}{i}! [ds_s1Am]; + } in + PrelTup.(,){-62,p-}{i}! [ds_s1AC ds_s1AB]; + }; + }; +s_s1Bw = + (False, True, False, False, True) [] \r [ds_s1AK] + case ds_s1AK ::STBase.State{-3M,p-} GHC.RealWorld{-3s,p-} of { + -- lvs: [ds_s1AK]; rhs lvs: []; uniq: c1Fu + STBase.S#{-5D,p-}{i} ds_s1Bb -> + case + _ccall_ a [(STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-}) (GHC.State#{-3L,p-} GHC.RealWorld{-3s,p-})]# [ds_s1Bb] ::STBase.StateAndInt#{-3D,p-} GHC.RealWorld{-3s,p-} + of { + -- lvs: [ds_s1Bb]; rhs lvs: []; uniq: c1Fv + STBase.StateAndInt#{-5v,p-}{i} ds_s1Bl ds_s1Ba -> + let { + ds_s1BE = + PrelBase.I#{-5b,p-}{i}! [ds_s1Ba]; } in + let { + ds_s1BF = + STBase.S#{-5D,p-}{i}! [ds_s1Bl]; + } in + PrelTup.(,){-62,p-}{i}! [ds_s1BE ds_s1BF]; + }; + }; +a{-r5v,x-} = + [] \u [] + s_s1Bw; + + +================================================================================ +Flat Abstract C: +IFN_(ret_c1Fj) { +ED_RO_(PrelBase_IZh_con_info); +ED_(STBase_SZh_static_closure); +ED_RO_(PrelTup_Z40Z44Z41_inregs_info); +I_ s1vY; + FB_ + HEAP_CHK(0,(_FHS+1),0); + { + I_ _ccall_result; + StgStablePtr _ccall_arg1=R3.i; + CALLER_SAVE_Base + CALLER_SAVE_SpA + CALLER_SAVE_SuA + CALLER_SAVE_SpB + CALLER_SAVE_SuB + CALLER_SAVE_Ret + CALLER_SAVE_Hp + CALLER_SAVE_HpLim + _ccall_result = (d((_ccall_arg1))); + CALLER_RESTORE_Base + CALLER_RESTORE_SpA + CALLER_RESTORE_SuA + CALLER_RESTORE_SpB + CALLER_RESTORE_SuB + CALLER_RESTORE_Ret + CALLER_RESTORE_Hp + CALLER_RESTORE_HpLim + CALLER_RESTORE_StdUpdRetVec + CALLER_RESTORE_StkStub + s1vY=_ccall_result; } -Test.b{-r80-} :: IoWorld -> (StablePtr, IoWorld) -_NI_ -Test.b{-r80-} = - \ ds.d7 -> - case - (case - (case ds.d7 of { - IoWorld ds.d8# -> ds.d8# - }) - of { - a.d13# -> ( _CCALL_ b [] StablePtr# )! a.d13# - }) - of { - SPPrimAndIoWorld ds.d9# ds.d10# -> - let { - a.d11 :: StablePtr - _NI_ - a.d11 = StablePtr#! ds.d9# } in - let { - a.d12 :: IoWorld - _NI_ - a.d12 = IoWorld! ds.d10# - } in Tup2! StablePtr IoWorld a.d11 a.d12 + SET_SPEC_HDR(Hp-_FHS,PrelBase_IZh_con_info,0,1,0); + *Hp=(W_)(s1vY); + R4.p=STBase_SZh_static_closure; + R3.p=Hp-_FHS; + SpB=SpB-1; + R2.d=PrelTup_Z40Z44Z41_inregs_info; + GRAN_EXEC(10,2,22,22,0); + JMP_(DIRECT((StgRetAddr)(SpB[1]))); + FE_ +} +UNVECTBL(static,vtbl_c1Fj,ret_c1Fj) +IFN_(ret_c1Fi) { + FB_ + RetReg=(StgRetAddr)UNVEC(ret_c1Fj,vtbl_c1Fj); + R1.p=*SpA; + SpA=SpA+1; + ENT_VIA_NODE(); + GRAN_EXEC(3,1,2,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +UNVECTBL(static,vtbl_c1Fi,ret_c1Fi) +SPEC_N_ITBL(c1Fh_info,c1Fh_entry,StdErrorCode,1,-1,1,1,static const,IF_,0,0,0); +IFN_(c1Fh_entry) { +IF_(c1Fh_fast1); + FB_ + ARGS_CHK_A(1); + R2.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(c1Fh_fast1); + FE_ +} +IFN_(c1Fh_fast1) { + FB_ + STK_CHK(3,1,1,0,0,0,1); + SpB[1]=(W_)(RetReg); + RetReg=(StgRetAddr)UNVEC(ret_c1Fi,vtbl_c1Fi); + SpA[-1]=(P_)(R1.p[_FHS]); + R1=R2; + SpA=SpA-1; + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(5,1,2,2,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +STATIC_ITBL(Test_d_info,Test_d_entry,StdErrorCode,1,-1,STATIC_VHS,0,const,EF_,0,0,0); +FN_(Test_d_entry) { +ED_(Test_d_closure); +EF_(Test_d_fast1); + FB_ + ARGS_CHK_A_LOAD_NODE(1,Test_d_closure); + R1.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(Test_d_fast1); + FE_ +} +FN_(Test_d_fast1) { +ID_RO_(c1Fh_info); +IF_(c1Fh_entry); + FB_ + HEAP_CHK(1,(_FHS+1),0); + SET_SPEC_HDR(Hp-_FHS,c1Fh_info,0,1,1); + *Hp=(W_)(R1.p); + R1.p=Hp-_FHS; + GRAN_EXEC(5,2,0,2,0); + JMP_(c1Fh_entry); + FE_ +} +SET_STATIC_HDR(Test_d_closure,Test_d_info,0,,ED_RO_) +}; +IFN_(ret_c1Fm) { +ED_RO_(PrelBase_IZh_con_info); +ED_(STBase_SZh_static_closure); +ED_RO_(PrelTup_Z40Z44Z41_inregs_info); +I_ s1xd; + FB_ + HEAP_CHK(4,(_FHS+1),0); + { + I_ _ccall_result; + StgForeignObj _ccall_arg1=ForeignObj_CLOSURE_DATA(R3.p); + CALLER_SAVE_Base + CALLER_SAVE_SpA + CALLER_SAVE_SuA + CALLER_SAVE_SpB + CALLER_SAVE_SuB + CALLER_SAVE_Ret + CALLER_SAVE_Hp + CALLER_SAVE_HpLim + _ccall_result = (c((_ccall_arg1))); + CALLER_RESTORE_Base + CALLER_RESTORE_SpA + CALLER_RESTORE_SuA + CALLER_RESTORE_SpB + CALLER_RESTORE_SuB + CALLER_RESTORE_Ret + CALLER_RESTORE_Hp + CALLER_RESTORE_HpLim + CALLER_RESTORE_StdUpdRetVec + CALLER_RESTORE_StkStub + s1xd=_ccall_result; } -Test.c{-r81-} :: CHeapPtr -> IoWorld -> (Int, IoWorld) -_NI_ -Test.c{-r81-} = - \ x.r211 ds.d14 -> - case - (case - (case ds.d14 of { - IoWorld ds.d15# -> ds.d15# - }) - of { - a.d21# -> - case - (case x.r211 of { - CHP# ds.d16# -> ds.d16# - }) - of { - a.d22# -> ( _CCALL_ c [CHeapPtr#] Int# )! a.d21# a.d22# - } - }) - of { - IntPrimAndIoWorld ds.d17# ds.d18# -> - let { - a.d19 :: Int - _NI_ - a.d19 = I#! ds.d17# } in - let { - a.d20 :: IoWorld - _NI_ - a.d20 = IoWorld! ds.d18# - } in Tup2! Int IoWorld a.d19 a.d20 + SET_SPEC_HDR(Hp-_FHS,PrelBase_IZh_con_info,0,1,0); + *Hp=(W_)(s1xd); + R4.p=STBase_SZh_static_closure; + R3.p=Hp-_FHS; + SpB=SpB-1; + R2.d=PrelTup_Z40Z44Z41_inregs_info; + GRAN_EXEC(10,2,22,22,0); + JMP_(DIRECT((StgRetAddr)(SpB[1]))); + FE_ +} +UNVECTBL(static,vtbl_c1Fm,ret_c1Fm) +IFN_(ret_c1Fl) { + FB_ + RetReg=(StgRetAddr)UNVEC(ret_c1Fm,vtbl_c1Fm); + R1.p=*SpA; + SpA=SpA+1; + ENT_VIA_NODE(); + GRAN_EXEC(3,1,2,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +UNVECTBL(static,vtbl_c1Fl,ret_c1Fl) +SPEC_N_ITBL(c1EH_info,c1EH_entry,StdErrorCode,1,-1,1,1,static const,IF_,0,0,0); +IFN_(c1EH_entry) { +IF_(c1EH_fast1); + FB_ + ARGS_CHK_A(1); + R2.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(c1EH_fast1); + FE_ +} +IFN_(c1EH_fast1) { + FB_ + STK_CHK(3,1,1,0,0,0,1); + SpB[1]=(W_)(RetReg); + RetReg=(StgRetAddr)UNVEC(ret_c1Fl,vtbl_c1Fl); + SpA[-1]=(P_)(R1.p[_FHS]); + R1=R2; + SpA=SpA-1; + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(5,1,2,2,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +STATIC_ITBL(Test_c_info,Test_c_entry,StdErrorCode,1,-1,STATIC_VHS,0,const,EF_,0,0,0); +FN_(Test_c_entry) { +ED_(Test_c_closure); +EF_(Test_c_fast1); + FB_ + ARGS_CHK_A_LOAD_NODE(1,Test_c_closure); + R1.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(Test_c_fast1); + FE_ +} +FN_(Test_c_fast1) { +ID_RO_(c1EH_info); +IF_(c1EH_entry); + FB_ + HEAP_CHK(1,(_FHS+1),0); + SET_SPEC_HDR(Hp-_FHS,c1EH_info,0,1,1); + *Hp=(W_)(R1.p); + R1.p=Hp-_FHS; + GRAN_EXEC(5,2,0,2,0); + JMP_(c1EH_entry); + FE_ +} +SET_STATIC_HDR(Test_c_closure,Test_c_info,0,,ED_RO_) +}; +IFN_(ret_c1Fo) { +ED_RO_(Foreign_StablePtr_con_info); +ED_(STBase_SZh_static_closure); +ED_RO_(PrelTup_Z40Z44Z41_inregs_info); +StgStablePtr s1yb; + FB_ + HEAP_CHK(0,(_FHS+1),0); + { + StgStablePtr _ccall_result; + CALLER_SAVE_Base + CALLER_SAVE_SpA + CALLER_SAVE_SuA + CALLER_SAVE_SpB + CALLER_SAVE_SuB + CALLER_SAVE_Ret + CALLER_SAVE_Hp + CALLER_SAVE_HpLim + _ccall_result = (b()); + CALLER_RESTORE_Base + CALLER_RESTORE_SpA + CALLER_RESTORE_SuA + CALLER_RESTORE_SpB + CALLER_RESTORE_SuB + CALLER_RESTORE_Ret + CALLER_RESTORE_Hp + CALLER_RESTORE_HpLim + CALLER_RESTORE_StdUpdRetVec + CALLER_RESTORE_StkStub + s1yb=_ccall_result; } -Test.d{-r82-} :: StablePtr -> IoWorld -> (Int, IoWorld) -_NI_ -Test.d{-r82-} = - \ x.r212 ds.d23 -> - case - (case - (case ds.d23 of { - IoWorld ds.d24# -> ds.d24# - }) - of { - a.d30# -> - case - (case x.r212 of { - StablePtr# ds.d25# -> ds.d25# - }) - of { - a.d31# -> ( _CCALL_ d [StablePtr#] Int# )! a.d30# a.d31# - } - }) - of { - IntPrimAndIoWorld ds.d26# ds.d27# -> - let { - a.d28 :: Int - _NI_ - a.d28 = I#! ds.d26# } in - let { - a.d29 :: IoWorld - _NI_ - a.d29 = IoWorld! ds.d27# - } in Tup2! Int IoWorld a.d28 a.d29 + SET_SPEC_HDR(Hp-_FHS,Foreign_StablePtr_con_info,0,1,0); + *Hp=(W_)(s1yb); + R4.p=STBase_SZh_static_closure; + R3.p=Hp-_FHS; + SpB=SpB-1; + R2.d=PrelTup_Z40Z44Z41_inregs_info; + GRAN_EXEC(10,2,21,22,0); + JMP_(DIRECT((StgRetAddr)(SpB[1]))); + FE_ +} +UNVECTBL(static,vtbl_c1Fo,ret_c1Fo) +STATIC_ITBL(s1sE_info,s1sE_entry,StdErrorCode,1,-1,STATIC_VHS,0,static const,IF_,0,0,0); +IFN_(s1sE_entry) { +ID_(s1sE_closure); +IF_(s1sE_fast1); + FB_ + ARGS_CHK_A_LOAD_NODE(1,s1sE_closure); + R1.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(s1sE_fast1); + FE_ +} +IFN_(s1sE_fast1) { + FB_ + STK_CHK(1,0,1,0,0,0,0); + SpB[1]=(W_)(RetReg); + RetReg=(StgRetAddr)UNVEC(ret_c1Fo,vtbl_c1Fo); + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(3,1,1,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +SET_STATIC_HDR(s1sE_closure,s1sE_info,0,static ,ID_RO_) +}; +IFN_(ret_c1Fq) { +ED_RO_(Foreign_StablePtr_con_info); +ED_(STBase_SZh_static_closure); +ED_RO_(PrelTup_Z40Z44Z41_inregs_info); +StgStablePtr s1za; + FB_ + HEAP_CHK(0,(_FHS+1),0); + { + StgStablePtr _ccall_result; + CALLER_SAVE_Base + CALLER_SAVE_SpA + CALLER_SAVE_SuA + CALLER_SAVE_SpB + CALLER_SAVE_SuB + CALLER_SAVE_Ret + CALLER_SAVE_Hp + CALLER_SAVE_HpLim + _ccall_result = (b()); + CALLER_RESTORE_Base + CALLER_RESTORE_SpA + CALLER_RESTORE_SuA + CALLER_RESTORE_SpB + CALLER_RESTORE_SuB + CALLER_RESTORE_Ret + CALLER_RESTORE_Hp + CALLER_RESTORE_HpLim + CALLER_RESTORE_StdUpdRetVec + CALLER_RESTORE_StkStub + s1za=_ccall_result; } + SET_SPEC_HDR(Hp-_FHS,Foreign_StablePtr_con_info,0,1,0); + *Hp=(W_)(s1za); + R4.p=STBase_SZh_static_closure; + R3.p=Hp-_FHS; + SpB=SpB-1; + R2.d=PrelTup_Z40Z44Z41_inregs_info; + GRAN_EXEC(10,2,21,22,0); + JMP_(DIRECT((StgRetAddr)(SpB[1]))); + FE_ +} +UNVECTBL(static,vtbl_c1Fq,ret_c1Fq) +STATIC_ITBL(s1zw_info,s1zw_entry,StdErrorCode,1,-1,STATIC_VHS,0,static const,IF_,0,0,0); +IFN_(s1zw_entry) { +ID_(s1zw_closure); +IF_(s1zw_fast1); + FB_ + ARGS_CHK_A_LOAD_NODE(1,s1zw_closure); + R1.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(s1zw_fast1); + FE_ +} +IFN_(s1zw_fast1) { + FB_ + STK_CHK(1,0,1,0,0,0,0); + SpB[1]=(W_)(RetReg); + RetReg=(StgRetAddr)UNVEC(ret_c1Fq,vtbl_c1Fq); + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(3,1,1,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +SET_STATIC_HDR(s1zw_closure,s1zw_info,0,static ,ID_RO_) +}; +STATIC_ITBL(Test_b_info,Test_b_entry,StdErrorCode,1,-1,(STATIC_VHS+ + 2),0,const,EF_,0,0,0); +FN_(Test_b_entry) { +IF_(s1zw_entry); + FB_ + STK_CHK(1,0,4,0,0,0,1); + HEAP_CHK(1,(BH_HS+2),1); + SET_BH_HDR(Hp-(BH_HS+1),BH_UPD_info,0,(BH_VHS+2),0); + UPD_CAF(R1.p,Hp-(BH_HS+1)); + PUSH_STD_UPD_FRAME(Hp-(BH_HS+1),0,0); + RetReg=StdUpdRetVecReg; + SpB=SpB+4; + GRAN_EXEC(16,2,1,8,0); + JMP_(s1zw_entry); + FE_ +} +SET_STATIC_HDR(Test_b_closure,Test_b_info,0,,ED_RO_) + , (W_)0, (W_)0 +}; +IFN_(ret_c1Fs) { +ED_RO_(PrelBase_IZh_con_info); +ED_(STBase_SZh_static_closure); +ED_RO_(PrelTup_Z40Z44Z41_inregs_info); +I_ s1Ab; + FB_ + HEAP_CHK(0,(_FHS+1),0); + { + I_ _ccall_result; + CALLER_SAVE_Base + CALLER_SAVE_SpA + CALLER_SAVE_SuA + CALLER_SAVE_SpB + CALLER_SAVE_SuB + CALLER_SAVE_Ret + CALLER_SAVE_Hp + CALLER_SAVE_HpLim + _ccall_result = (a()); + CALLER_RESTORE_Base + CALLER_RESTORE_SpA + CALLER_RESTORE_SuA + CALLER_RESTORE_SpB + CALLER_RESTORE_SuB + CALLER_RESTORE_Ret + CALLER_RESTORE_Hp + CALLER_RESTORE_HpLim + CALLER_RESTORE_StdUpdRetVec + CALLER_RESTORE_StkStub + s1Ab=_ccall_result; + } + SET_SPEC_HDR(Hp-_FHS,PrelBase_IZh_con_info,0,1,0); + *Hp=(W_)(s1Ab); + R4.p=STBase_SZh_static_closure; + R3.p=Hp-_FHS; + SpB=SpB-1; + R2.d=PrelTup_Z40Z44Z41_inregs_info; + GRAN_EXEC(10,2,21,22,0); + JMP_(DIRECT((StgRetAddr)(SpB[1]))); + FE_ +} +UNVECTBL(static,vtbl_c1Fs,ret_c1Fs) +STATIC_ITBL(s1uE_info,s1uE_entry,StdErrorCode,1,-1,STATIC_VHS,0,static const,IF_,0,0,0); +IFN_(s1uE_entry) { +ID_(s1uE_closure); +IF_(s1uE_fast1); + FB_ + ARGS_CHK_A_LOAD_NODE(1,s1uE_closure); + R1.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(s1uE_fast1); + FE_ +} +IFN_(s1uE_fast1) { + FB_ + STK_CHK(1,0,1,0,0,0,0); + SpB[1]=(W_)(RetReg); + RetReg=(StgRetAddr)UNVEC(ret_c1Fs,vtbl_c1Fs); + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(3,1,1,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +SET_STATIC_HDR(s1uE_closure,s1uE_info,0,static ,ID_RO_) +}; +IFN_(ret_c1Fu) { +ED_RO_(PrelBase_IZh_con_info); +ED_(STBase_SZh_static_closure); +ED_RO_(PrelTup_Z40Z44Z41_inregs_info); +I_ s1Ba; + FB_ + HEAP_CHK(0,(_FHS+1),0); + { + I_ _ccall_result; + CALLER_SAVE_Base + CALLER_SAVE_SpA + CALLER_SAVE_SuA + CALLER_SAVE_SpB + CALLER_SAVE_SuB + CALLER_SAVE_Ret + CALLER_SAVE_Hp + CALLER_SAVE_HpLim + _ccall_result = (a()); + CALLER_RESTORE_Base + CALLER_RESTORE_SpA + CALLER_RESTORE_SuA + CALLER_RESTORE_SpB + CALLER_RESTORE_SuB + CALLER_RESTORE_Ret + CALLER_RESTORE_Hp + CALLER_RESTORE_HpLim + CALLER_RESTORE_StdUpdRetVec + CALLER_RESTORE_StkStub + s1Ba=_ccall_result; + } + SET_SPEC_HDR(Hp-_FHS,PrelBase_IZh_con_info,0,1,0); + *Hp=(W_)(s1Ba); + R4.p=STBase_SZh_static_closure; + R3.p=Hp-_FHS; + SpB=SpB-1; + R2.d=PrelTup_Z40Z44Z41_inregs_info; + GRAN_EXEC(10,2,21,22,0); + JMP_(DIRECT((StgRetAddr)(SpB[1]))); + FE_ +} +UNVECTBL(static,vtbl_c1Fu,ret_c1Fu) +STATIC_ITBL(s1Bw_info,s1Bw_entry,StdErrorCode,1,-1,STATIC_VHS,0,static const,IF_,0,0,0); +IFN_(s1Bw_entry) { +ID_(s1Bw_closure); +IF_(s1Bw_fast1); + FB_ + ARGS_CHK_A_LOAD_NODE(1,s1Bw_closure); + R1.p=*SpA; + SpA=SpA+1; + GRAN_EXEC(5,2,1,0,0); + JMP_(s1Bw_fast1); + FE_ +} +IFN_(s1Bw_fast1) { + FB_ + STK_CHK(1,0,1,0,0,0,0); + SpB[1]=(W_)(RetReg); + RetReg=(StgRetAddr)UNVEC(ret_c1Fu,vtbl_c1Fu); + SpB=SpB+1; + ENT_VIA_NODE(); + GRAN_EXEC(3,1,1,1,0); + JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p))))); + FE_ +} +SET_STATIC_HDR(s1Bw_closure,s1Bw_info,0,static ,ID_RO_) +}; +STATIC_ITBL(Test_a_info,Test_a_entry,StdErrorCode,1,-1,(STATIC_VHS+ + 2),0,const,EF_,0,0,0); +FN_(Test_a_entry) { +IF_(s1Bw_entry); + FB_ + STK_CHK(1,0,4,0,0,0,1); + HEAP_CHK(1,(BH_HS+2),1); + SET_BH_HDR(Hp-(BH_HS+1),BH_UPD_info,0,(BH_VHS+2),0); + UPD_CAF(R1.p,Hp-(BH_HS+1)); + PUSH_STD_UPD_FRAME(Hp-(BH_HS+1),0,0); + RetReg=StdUpdRetVecReg; + SpB=SpB+4; + GRAN_EXEC(16,2,1,8,0); + JMP_(s1Bw_entry); + FE_ +} +SET_STATIC_HDR(Test_a_closure,Test_a_info,0,,ED_RO_) + , (W_)0, (W_)0 +}; +ghc: module version changed to 1; reason: no old .hi file diff --git a/ghc/compiler/tests/ccall/cc007.hs b/ghc/compiler/tests/ccall/cc007.hs index 6dee399..42d1260 100644 --- a/ghc/compiler/tests/ccall/cc007.hs +++ b/ghc/compiler/tests/ccall/cc007.hs @@ -1,7 +1,7 @@ ---!!! cc004 -- ccall with synonyms, polymorphic type variables and user type variables. +--!!! cc007 -- ccall with synonyms, polymorphic type variables and user type variables. module Test where -import PreludeGlaST +import GlaExts -- Since I messed up the handling of polymorphism originally, I'll -- explicitly test code with UserSysTyVar (ie an explicit polymorphic @@ -10,16 +10,14 @@ import PreludeGlaST foo = _ccall_ f `thenADR` \ a -> returnPrimIO (a + 1) where thenADR :: PrimIO a -> (a -> PrimIO b) -> PrimIO b - m `thenADR` k = \ s -> case m s of - (a,t) -> k a t + thenADR = thenPrimIO -- and with a PolySysTyVar (ie no explicit signature) bar = _ccall_ f `thenADR` \ a -> returnPrimIO (a + 1) where -- thenADR :: PrimIO a -> (a -> PrimIO b) -> PrimIO b - m `thenADR` k = \ s -> case m s of - (a,t) -> k a t + thenADR = thenPrimIO -- and with a type synonym diff --git a/ghc/compiler/tests/ccall/cc007.stderr b/ghc/compiler/tests/ccall/cc007.stderr index e69de29..a5da32e 100644 --- a/ghc/compiler/tests/ccall/cc007.stderr +++ b/ghc/compiler/tests/ccall/cc007.stderr @@ -0,0 +1,9 @@ + +cc007.hs:2: Cannot generalise these overloadings (in a _ccall_): + `Foreign.CReturnable t{-a12t-}' + +cc007.hs:2: Cannot generalise these overloadings (in a _ccall_): + `Foreign.CReturnable t{-a13c-}' + + +Compilation had errors diff --git a/ghc/compiler/tests/deSugar/Makefile b/ghc/compiler/tests/deSugar/Makefile index 829a772..76a64e1 100644 --- a/ghc/compiler/tests/deSugar/Makefile +++ b/ghc/compiler/tests/deSugar/Makefile @@ -1,13 +1,21 @@ TOP = ../../.. include $(TOP)/mk/boilerplate.mk -SRCS = $(wildcard *.hs) -HS_PROG = ds040 +HS_SRCS = $(wildcard *.hs) +SRC_RUNTEST_OPTS += -o1 $*.stdout -o2 $*.stderr -x 0 -PROG : $(SRCS) +ds014a_RUNTEST_OPTS = -x 1 +ds025_RUNTEST_OPTS = -x 1 +ds035_RUNTEST_OPTS = -x 1 +ds038_RUNTEST_OPTS = -x 1 +ds040_RUNTEST_OPTS = -x 1 -runtests :: $(wildcard *.hs) - @echo 'TODO: ds014a -- some things that should NOT go through' +%.o : %.hs + +%.o : %.hs + $(RUNTEST) $(HC) $(RUNTEST_OPTS) $(HC_OPTS) -c $< -o $@ -osuf $(subst .,,$(suffix $@)) + +all :: $(HS_OBJS) #SUBDIRS = cvh-ds-unboxed @@ -18,5 +26,4 @@ ds030_HC_OPTS = -dppr-all ds035_HC_OPTS = -fglasgow-exts ds039_HC_OPTS = -dppr-all - include $(TOP)/mk/target.mk diff --git a/ghc/compiler/tests/deSugar/ds-wildcard.stderr b/ghc/compiler/tests/deSugar/ds-wildcard.stderr index e69de29..07da869 100644 --- a/ghc/compiler/tests/deSugar/ds-wildcard.stderr +++ b/ghc/compiler/tests/deSugar/ds-wildcard.stderr @@ -0,0 +1,19 @@ + + +================================================================================ +Desugared: +Rec { +x{-r1,x-} :: + _forall_ [t{-amE-}] => t{-amE-} +{-# L #-} +x{-r1,x-} = + _/\_ t{-amE-} -> + _letrec_ { + x_amC :: + t{-amE-} + {-# L #-} + x_amC = + x_amC; + } in + x_amC +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds001.stderr b/ghc/compiler/tests/deSugar/ds001.stderr index 6282a3e..cc34719 100644 --- a/ghc/compiler/tests/deSugar/ds001.stderr +++ b/ghc/compiler/tests/deSugar/ds001.stderr @@ -1,23 +1,113 @@ -Desugared: -Test.f :: for all d. d -> d -Test.f = /\ o95 -> \ x.129 -> x.129 -Test.g :: for all d, e, f. d -> e -> f -> f -Test.g = /\ o98 o99 t101 -> \ x.130 y.131 z.132 -> (Test.f t101) z.132 -Test.j :: for all d, e, f, g. d -> e -> f -> g -> g -Test.j = - /\ t108 t109 o106 t110 -> \ w.133 x.134 y.135 z.136 -> - (((Test.g t108) t109) t110) w.133 x.134 z.136 -Test.h :: for all d, e, f. d -> f -> e -> f -Test.h = - /\ o113 t119 t120 -> \ x.139 y.140 -> - let f.145 = /\ o141 o142 -> \ a.143 b.144 -> a.143 - in ((f.145 t119) t120) y.140 -Test.b :: for all d. d -> d -Test.b = /\ t123 -> Test.f t123 -Test.a :: for all d. d -> d -Test.a = /\ t126 -> Test.b t126 -{- plain CoRec -} -Test.c :: for all d. d -Test.c = /\ t127 -> Test.c t127 -{- end plain CoRec -} + +================================================================================ +Desugared: +Rec { +c{-r3I,x-} :: + _forall_ [t{-ang-}] => t{-ang-} +{-# L #-} +c{-r3I,x-} = + _/\_ t{-ang-} -> + _letrec_ { + c_ane :: + t{-ang-} + {-# L #-} + c_ane = + c_ane; + } in + c_ane +end Rec } +h{-r3L,x-} :: + _forall_ + [t{-anG-} t{-anC-} t{-anE-}] + => + t{-anG-} -> t{-anC-} -> t{-anE-} -> t{-anC-} +{-# L #-} +h{-r3L,x-} = + _/\_ t{-anG-} t{-anC-} t{-anE-} -> \ x_r3z :: + t{-anG-} + {-# L #-} + x_r3z y_r3B :: + t{-anC-} + {-# L #-} + y_r3B -> + let { + f_r3D :: + _forall_ [t{-any-} t{-anA-}] => t{-any-} -> t{-anA-} -> t{-any-} + {-# L #-} + f_r3D = + _/\_ t{-any-} t{-anA-} -> \ a_r3F :: + t{-any-} + {-# L #-} + a_r3F b_r3H :: + t{-anA-} + {-# L #-} + b_r3H -> + a_r3F + } in + f_r3D + _@_ t{-anC-} _@_ t{-anE-} y_r3B +f{-r3O,x-} :: + _forall_ [t{-anO-}] => t{-anO-} -> t{-anO-} +{-# L #-} +f{-r3O,x-} = + _/\_ t{-anO-} -> \ x_r3j :: + t{-anO-} + {-# L #-} + x_r3j -> + x_r3j +g{-r3N,x-} :: + _forall_ + [t{-anW-} t{-ao2-} t{-ao4-}] + => + t{-ao2-} -> t{-ao4-} -> t{-anW-} -> t{-anW-} +{-# L #-} +g{-r3N,x-} = + _/\_ t{-anW-} t{-ao2-} t{-ao4-} -> \ x_r3l :: + t{-ao2-} + {-# L #-} + x_r3l y_r3n :: + t{-ao4-} + {-# L #-} + y_r3n z_r3p :: + t{-anW-} + {-# L #-} + z_r3p -> + f{-r3O,x-} + _@_ t{-anW-} z_r3p +j{-r3M,x-} :: + _forall_ + [t{-aoe-} t{-aoh-} t{-aoj-} t{-aoo-}] + => + t{-aoe-} -> t{-aoh-} -> t{-aoo-} -> t{-aoj-} -> t{-aoj-} +{-# L #-} +j{-r3M,x-} = + _/\_ t{-aoe-} t{-aoh-} t{-aoj-} t{-aoo-} -> \ w_r3r :: + t{-aoe-} + {-# L #-} + w_r3r x_r3t :: + t{-aoh-} + {-# L #-} + x_r3t y_r3v :: + t{-aoo-} + {-# L #-} + y_r3v z_r3x :: + t{-aoj-} + {-# L #-} + z_r3x -> + g{-r3N,x-} + _@_ t{-aoj-} _@_ t{-aoe-} _@_ t{-aoh-} w_r3r x_r3t z_r3x +b{-r3J,x-} :: + _forall_ [t{-aou-}] => t{-aou-} -> t{-aou-} +{-# L #-} +b{-r3J,x-} = + _/\_ t{-aou-} -> + f{-r3O,x-} + _@_ t{-aou-} +a{-r3K,x-} :: + _forall_ [t{-aoA-}] => t{-aoA-} -> t{-aoA-} +{-# L #-} +a{-r3K,x-} = + _/\_ t{-aoA-} -> + b{-r3J,x-} + _@_ t{-aoA-} diff --git a/ghc/compiler/tests/deSugar/ds002.stderr b/ghc/compiler/tests/deSugar/ds002.stderr index 4cd3d62..5e6aeeb 100644 --- a/ghc/compiler/tests/deSugar/ds002.stderr +++ b/ghc/compiler/tests/deSugar/ds002.stderr @@ -1,12 +1,74 @@ -Desugared: -Test.f :: for all d. d -> d -Test.f = /\ o88 -> \ x.104 -> x.104 -Test.g :: for all d, e, f. d -> e -> f -> f -Test.g = - /\ o97 o98 t102 -> \ x.106 y.107 z.108 -> - let - fail.109 = - (error t102) - "\"ds002.hs\", line 16: pattern-matching failure [function binding]\n"S - in (Test.f t102) z.108 +ds002.hs:8: + Warning: Pattern match(es) completely overlapped + in the definition of function `f' +ds002.hs:9: + Warning: Pattern match(es) completely overlapped + in the definition of function `f' +ds002.hs:13: + Warning: Possibly incomplete patterns + in the definition of function `g' + +================================================================================ +Desugared: +f{-r3w,x-} :: + _forall_ [t{-an6-}] => t{-an6-} -> t{-an6-} +{-# L #-} +f{-r3w,x-} = + _/\_ t{-an6-} -> \ x_r3e :: + t{-an6-} + {-# L #-} + x_r3e -> + x_r3e +g{-r3v,x-} :: + _forall_ + [t{-anr-} t{-anA-} t{-anC-}] + => + t{-anA-} -> t{-anC-} -> t{-anr-} -> t{-anr-} +{-# L #-} +g{-r3v,x-} = + _/\_ t{-anr-} t{-anA-} t{-anC-} -> \ x_r3k :: + t{-anA-} + {-# L #-} + x_r3k y_r3m :: + t{-anC-} + {-# L #-} + y_r3m z_r3o :: + t{-anr-} + {-# L #-} + z_r3o -> + let { + fail_drB :: + t{-anr-} + {-# L #-} + fail_drB = + GHCerr.patError{-8r,p-} + _@_ t{-anr-} _string_ "ds002.hs:11|function `g'" } in + let { fail_drG :: + t{-anr-} + {-# L #-} + fail_drG = + let { + z_r3u :: + t{-anr-} + {-# L #-} + z_r3u = + z_r3o } in + let { + y_r3s :: + t{-anC-} + {-# L #-} + y_r3s = + y_r3m } in + let { + x_r3q :: + t{-anA-} + {-# L #-} + x_r3q = + x_r3k + } in + f{-r3w,x-} + _@_ t{-anr-} z_r3u + } in + f{-r3w,x-} + _@_ t{-anr-} z_r3o diff --git a/ghc/compiler/tests/deSugar/ds003.stderr b/ghc/compiler/tests/deSugar/ds003.stderr index da843e7..a5f1cb9 100644 --- a/ghc/compiler/tests/deSugar/ds003.stderr +++ b/ghc/compiler/tests/deSugar/ds003.stderr @@ -1,61 +1,64 @@ + + +================================================================================ Desugared: -Test.f :: for all d, e, f, g. [d] -> (e, f) -> Bool -> [g] -Test.f = - /\ t106 o107 o108 t113 -> \ ds.122 y.123 ds.124 -> - let - fail.125 = - (error [t113]) - "\"ds003.hs\", line 8: pattern-matching failure [function binding]\n"S in - let - fail.149 = - let - fail.142 = - let - fail.128 = - case ds.124 of { - True -> - let y.126 = y.123 in - let x.127 = ds.122 in Nil! t113 - _ -> fail.125 - } - in - case ds.122 of { - (:) x.129 ds.130 -> - case ds.130 of { - (:) x1.131 ds.132 -> - case ds.132 of { - (:) x2.133 x3.134 -> - let z.135 = ds.124 in - let - y.138 = - case y.123 of { - MkTuple2 y.136 ys.137 -> y.136 - } in - let - ys.141 = - case y.123 of { - MkTuple2 y.139 ys.140 -> ys.140 - } - in Nil! t113 - _ -> fail.128 - } - _ -> fail.128 - } - _ -> fail.128 - } - in - case y.123 of { - MkTuple2 y.143 ys.144 -> - let z.146 = let z.145 = ds.124 in z.145 in - let a.147 = y.123 in let x.148 = ds.122 in Nil! t113 - } - in - case ds.122 of { - Nil -> - case ds.124 of { - True -> Nil! t113 - _ -> fail.149 - } - _ -> fail.149 +f{-r3C,x-} :: + _forall_ + [t{-aBt-} t{-aBF-} t{-aBI-} t{-aBS-}] + => + [t{-aBt-}] + -> (t{-aBF-}, t{-aBI-}) + -> PrelBase.Bool{-34,p-} + -> [t{-aBS-}] +{-# L #-} +f{-r3C,x-} = + _/\_ t{-aBt-} t{-aBF-} t{-aBI-} t{-aBS-} -> \ ds_dGi :: + [t{-aBt-}] + {-# L #-} + ds_dGi y_r3e :: + (t{-aBF-}, t{-aBI-}) + {-# L #-} + y_r3e ds_dGj :: + PrelBase.Bool{-34,p-} + {-# L #-} + ds_dGj -> + let { + fail_dGE :: + [t{-aBS-}] + {-# L #-} + fail_dGE = + case y_r3e of { PrelTup.(,){-62,p-}{i} y_r3k ys_r3l -> + let { + z_r3n :: + PrelBase.Bool{-34,p-} + {-# L #-} + z_r3n = + ds_dGj } in + let { + a_r3j :: + (t{-aBF-}, t{-aBI-}) + {-# L #-} + a_r3j = + y_r3e } in + let { + x_r3h :: + [t{-aBt-}] + {-# L #-} + x_r3h = + ds_dGi + } in + PrelBase.[]{-5i,p-}{i} + _@_ t{-aBS-};} + } in + case ds_dGi of { + PrelBase.:{-55,p-}{i} ds_dGM ds_dGL -> + fail_dGE; + PrelBase.[]{-5i,p-}{i} -> + case ds_dGj of { + PrelBase.False{-58,p-}{i} -> + fail_dGE; + PrelBase.True{-5E,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-aBS-}; + }; } - diff --git a/ghc/compiler/tests/deSugar/ds004.stderr b/ghc/compiler/tests/deSugar/ds004.stderr index 5890e92..342da36 100644 --- a/ghc/compiler/tests/deSugar/ds004.stderr +++ b/ghc/compiler/tests/deSugar/ds004.stderr @@ -1,31 +1,106 @@ -Desugared: -{- plain CoRec -} -Test.nodups :: for all d. -> [d] -> [d] -Test.nodups = - /\ t95 -> \ dict.90 ds.103 -> - let - fail.104 = - (error [t95]) - "\"ds004.hs\", line 9: pattern-matching failure [function binding]\n"S - in - case ds.103 of { - Nil -> Nil! t95 - (:) x.105 ds.106 -> - case ds.106 of { - Nil -> :! t95 x.105 (Nil! t95) - (:) x.107 xs.108 -> - let y.109 = x.105 - in - case ((== t95) dict.90 y.109 x.107) of { - True -> - (Test.nodups t95) dict.90 ((: t95) x.107 xs.108) - False -> - (: t95) - y.109 - ((Test.nodups t95) - dict.90 ((: t95) x.107 xs.108)) - } - } - } -{- end plain CoRec -} +ds004.hs:6: + Warning: Possibly incomplete patterns + in the definition of function `nodups' + +================================================================================ +Desugared: +Rec { +nodups{-r3j,x-} :: + _forall_ + [t{-aGj-}] + => + {PrelBase.Eq{-23,p-} t{-aGj-}} -> [t{-aGj-}] -> [t{-aGj-}] +{-# L #-} +nodups{-r3j,x-} = + _/\_ t{-aGj-} -> \ d.Eq_aGz :: + {PrelBase.Eq{-23,p-} t{-aGj-}} + {-# L #-} + d.Eq_aGz -> + _letrec_ { + ==_aJI :: + t{-aGj-} -> t{-aGj-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_aJI = + PrelBase.=={-8Y,p-} + _@_ t{-aGj-} d.Eq_aGz; + nodups_aG4 :: + [t{-aGj-}] -> [t{-aGj-}] + {-# L #-} + nodups_aG4 = + \ ds_dK8 :: + [t{-aGj-}] + {-# L #-} + ds_dK8 -> + let { + fail_dK9 :: + [t{-aGj-}] + {-# L #-} + fail_dK9 = + GHCerr.patError{-8r,p-} + _@_ [t{-aGj-}] _string_ "ds004.hs:6|function `nodups'" + } in + case ds_dK8 of { + PrelBase.[]{-5i,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-aGj-}; + PrelBase.:{-55,p-}{i} x_r3e ds_dKq -> + case ds_dKq of { + PrelBase.[]{-5i,p-}{i} -> + let { + ds_dKG :: + [t{-aGj-}] + {-# L #-} + ds_dKG = + PrelBase.[]{-5i,p-}{i} + {_@_ t{-aGj-}} + } in + PrelBase.:{-55,p-}{i} + {_@_ t{-aGj-} x_r3e ds_dKG}; + PrelBase.:{-55,p-}{i} x_r3h xs_r3i -> + let { + y_r3g :: + t{-aGj-} + {-# L #-} + y_r3g = + x_r3e + } in + case + ==_aJI + y_r3g x_r3h + of { + PrelBase.True{-5E,p-}{i} -> + let { + ds_dLd :: + [t{-aGj-}] + {-# L #-} + ds_dLd = + PrelBase.:{-55,p-}{i} + _@_ t{-aGj-} x_r3h xs_r3i + } in + nodups_aG4 + ds_dLd; + PrelBase.False{-58,p-}{i} -> + let { ds_dLF :: + [t{-aGj-}] + {-# L #-} + ds_dLF = + let { + ds_dLN :: + [t{-aGj-}] + {-# L #-} + ds_dLN = + PrelBase.:{-55,p-}{i} + _@_ t{-aGj-} x_r3h xs_r3i + } in + nodups_aG4 + ds_dLN + } in + PrelBase.:{-55,p-}{i} + _@_ t{-aGj-} y_r3g ds_dLF; + }; + }; + }; + } in + nodups_aG4 +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds005.stderr b/ghc/compiler/tests/deSugar/ds005.stderr index 84c0664..75f16db 100644 --- a/ghc/compiler/tests/deSugar/ds005.stderr +++ b/ghc/compiler/tests/deSugar/ds005.stderr @@ -1,65 +1,205 @@ +ds005.hs:13: + Warning: Possibly incomplete patterns + in the definition of function `mappairs'' + + +================================================================================ Desugared: -{- plain CoRec -} -MapPairs.mappairs :: for all d, e, f. (d -> e -> f) -> [d] -> [e] -> [f] -MapPairs.mappairs = - /\ t109 t112 t105 -> \ f.146 ds.147 ys.148 -> - let - fail.149 = - (error [t105]) - "\"ds005.hs\", line 10: pattern-matching failure [function binding]\n"S - in - case ds.147 of { - Nil -> Nil! t105 - (:) x.150 xs.151 -> - case ys.148 of { - Nil -> let f.152 = f.146 in Nil! t105 - (:) y.153 ys.154 -> - let xs.155 = xs.151 in - let x.156 = x.150 in - let f.157 = f.146 - in - (: t105) - (f.157 x.156 y.153) - ((((MapPairs.mappairs t109) t112) t105) - f.157 xs.155 ys.154) - } - } -{- end plain CoRec -} -{- plain CoRec -} -MapPairs.mappairs' :: for all d, e, f. (d -> e -> f) -> [d] -> [e] -> [f] -MapPairs.mappairs' = - /\ t133 t136 t129 -> \ f.162 ds.163 ys.164 -> - let - fail.165 = - (error [t129]) - "\"ds005.hs\", line 15: pattern-matching failure [function binding]\n"S in - let - fail.174 = - let - fail.171 = - case ds.163 of { - (:) x.166 xs.167 -> - case ys.164 of { - (:) y.168 ys.169 -> - let f.170 = f.162 - in - (: t129) - (f.170 x.166 y.168) - ((((MapPairs.mappairs' t133) t136) t129) - f.170 xs.167 ys.169) - _ -> fail.165 +Rec { +mappairs'{-r3O,x-} :: + _forall_ + [t{-anl-} t{-anv-} t{-anx-}] + => + (t{-anl-} -> t{-anv-} -> t{-anx-}) + -> [t{-anl-}] + -> [t{-anv-}] + -> [t{-anx-}] +{-# L #-} +mappairs'{-r3O,x-} = + _/\_ t{-anl-} t{-anv-} t{-anx-} -> + _letrec_ { + mappairs'_anf :: + (t{-anl-} -> t{-anv-} -> t{-anx-}) + -> [t{-anl-}] + -> [t{-anv-}] + -> [t{-anx-}] + {-# L #-} + mappairs'_anf = + \ f_r3x :: + t{-anl-} -> t{-anv-} -> t{-anx-} + {-# L #-} + f_r3x ds_duS :: + [t{-anl-}] + {-# L #-} + ds_duS ys_r3A :: + [t{-anv-}] + {-# L #-} + ys_r3A -> + let { + fail_duT :: + [t{-anx-}] + {-# L #-} + fail_duT = + GHCerr.patError{-8r,p-} + _@_ [t{-anx-}] _string_ "ds005.hs:13|function `mappairs''" } in + let { fail_dwj :: + [t{-anx-}] + {-# L #-} + fail_dwj = + let { + fail_dvV :: + [t{-anx-}] + {-# L #-} + fail_dvV = + case ds_duS of { + PrelBase.[]{-5i,p-}{i} -> + fail_duT; + PrelBase.:{-55,p-}{i} x_r3J xs_r3K -> + case ys_r3A of { + PrelBase.[]{-5i,p-}{i} -> + fail_duT; + PrelBase.:{-55,p-}{i} y_r3M ys_r3N -> + let { + f_r3H :: + t{-anl-} -> t{-anv-} -> t{-anx-} + {-# L #-} + f_r3H = + f_r3x } in + let { + ds_dvr :: + t{-anx-} + {-# L #-} + ds_dvr = + f_r3H + x_r3J y_r3M } in + let { + ds_dvv :: + [t{-anx-}] + {-# L #-} + ds_dvv = + mappairs'_anf + f_r3H xs_r3K ys_r3N + } in + PrelBase.:{-55,p-}{i} + _@_ t{-anx-} ds_dvr ds_dvv; + }; } - _ -> fail.165 - } - in - case ys.164 of { - Nil -> let x.172 = ds.163 in let f.173 = f.162 in Nil! t129 - _ -> fail.171 - } - in - case ds.163 of { - Nil -> Nil! t129 - _ -> fail.174 - } -{- end plain CoRec -} - + } in + case ys_r3A of { + PrelBase.:{-55,p-}{i} ds_dw3 ds_dw2 -> + fail_dvV; + PrelBase.[]{-5i,p-}{i} -> + let { + x_r3E :: + [t{-anl-}] + {-# L #-} + x_r3E = + ds_duS } in + let { + f_r3C :: + t{-anl-} -> t{-anv-} -> t{-anx-} + {-# L #-} + f_r3C = + f_r3x + } in + PrelBase.[]{-5i,p-}{i} + _@_ t{-anx-}; + } + } in + case ds_duS of { + PrelBase.:{-55,p-}{i} ds_dwr ds_dwq -> + fail_dwj; + PrelBase.[]{-5i,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-anx-}; + }; + } in + mappairs'_anf +end Rec } +Rec { +mappairs{-r3P,x-} :: + _forall_ + [t{-aoc-} t{-aoh-} t{-aoj-}] + => + (t{-aoc-} -> t{-aoh-} -> t{-aoj-}) + -> [t{-aoc-}] + -> [t{-aoh-}] + -> [t{-aoj-}] +{-# L #-} +mappairs{-r3P,x-} = + _/\_ t{-aoc-} t{-aoh-} t{-aoj-} -> + _letrec_ { + mappairs_anX :: + (t{-aoc-} -> t{-aoh-} -> t{-aoj-}) + -> [t{-aoc-}] + -> [t{-aoh-}] + -> [t{-aoj-}] + {-# L #-} + mappairs_anX = + \ f_r3e :: + t{-aoc-} -> t{-aoh-} -> t{-aoj-} + {-# L #-} + f_r3e ds_dx4 :: + [t{-aoc-}] + {-# L #-} + ds_dx4 ys_r3h :: + [t{-aoh-}] + {-# L #-} + ys_r3h -> + case ds_dx4 of { + PrelBase.[]{-5i,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-aoj-}; + PrelBase.:{-55,p-}{i} x_r3l xs_r3m -> + case ys_r3h of { + PrelBase.[]{-5i,p-}{i} -> + let { + f_r3j :: + t{-aoc-} -> t{-aoh-} -> t{-aoj-} + {-# L #-} + f_r3j = + f_r3e + } in + PrelBase.[]{-5i,p-}{i} + _@_ t{-aoj-}; + PrelBase.:{-55,p-}{i} y_r3u ys_r3v -> + let { + xs_r3s :: + [t{-aoc-}] + {-# L #-} + xs_r3s = + xs_r3m } in + let { + x_r3r :: + t{-aoc-} + {-# L #-} + x_r3r = + x_r3l } in + let { + f_r3p :: + t{-aoc-} -> t{-aoh-} -> t{-aoj-} + {-# L #-} + f_r3p = + f_r3e } in + let { + ds_dxR :: + t{-aoj-} + {-# L #-} + ds_dxR = + f_r3p + x_r3r y_r3u } in + let { + ds_dxV :: + [t{-aoj-}] + {-# L #-} + ds_dxV = + mappairs_anX + f_r3p xs_r3s ys_r3v + } in + PrelBase.:{-55,p-}{i} + _@_ t{-aoj-} ds_dxR ds_dxV; + }; + }; + } in + mappairs_anX +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds006.stderr b/ghc/compiler/tests/deSugar/ds006.stderr index 0db25c8..c6358f3 100644 --- a/ghc/compiler/tests/deSugar/ds006.stderr +++ b/ghc/compiler/tests/deSugar/ds006.stderr @@ -1,19 +1,55 @@ -Desugared: -Test.v :: for all d. -> d -Test.v = - /\ t78 -> \ dict.79 -> - let dict.77 = dict.79 - in - let - {- CoRec -} - v.75 = - let - fail.81 = - (error t78) - "\"ds006.hs\", line 6: pattern-matching failure [function binding]\n"S - in - (+ t78) - dict.77 v.75 ((fromInteger t78) dict.79 (MkInteger! 1##)) - {- end CoRec -} - in v.75 + +================================================================================ +Desugared: +Rec { +d.Num_aHu :: + {PrelBase.Num{-2c,p-} PrelBase.Int{-3g,p-}} +{-# L #-} +d.Num_aHu = + PrelBase.$d3{-rb1,p-} ++_aJy :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} +{-# L #-} ++_aJy = + PrelBase.+{-ras,p-} + _@_ PrelBase.Int{-3g,p-} d.Num_aHu +d.Num_aHy :: + {PrelBase.Num{-2c,p-} PrelBase.Int{-3g,p-}} +{-# L #-} +d.Num_aHy = + d.Num_aHu +fromInt_aJG :: + PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-} +{-# L #-} +fromInt_aJG = + PrelBase.fromInt{-8R,p-} + _@_ PrelBase.Int{-3g,p-} d.Num_aHy +lit_aJF :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_aJF = + let { + ds_dKi :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_dKi = + PrelBase.I#{-5b,p-}{i} + 1 + } in + fromInt_aJG + ds_dKi +v_aHa :: + PrelBase.Int{-3g,p-} +{-# L #-} +v_aHa = + +_aJy + v_aHa lit_aJF +v{-r1,x-} :: + PrelBase.Int{-3g,p-} +{-# L #-} +v{-r1,x-} = + v_aHa +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds007.stderr b/ghc/compiler/tests/deSugar/ds007.stderr index fad21b7..32cef47 100644 --- a/ghc/compiler/tests/deSugar/ds007.stderr +++ b/ghc/compiler/tests/deSugar/ds007.stderr @@ -1,7 +1,28 @@ -Desugared: -ShouldSucceed.w :: for all d. [d] -ShouldSucceed.w = - /\ t84 -> - let y.86 = /\ t85 -> Nil! t85 in - let a.88 = /\ t87 -> y.86 t87 in a.88 t84 + +================================================================================ +Desugared: +w{-r3f,x-} :: + _forall_ [t{-amV-}] => [t{-amV-}] +{-# L #-} +w{-r3f,x-} = + _/\_ t{-amV-} -> + let { + y_r3e :: + _forall_ [t{-amM-}] => [t{-amM-}] + {-# L #-} + y_r3e = + _/\_ t{-amM-} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-amM-} } in + let { + a_r3d :: + _forall_ [t{-amT-}] => [t{-amT-}] + {-# L #-} + a_r3d = + _/\_ t{-amT-} -> + y_r3e + _@_ t{-amT-} + } in + a_r3d + _@_ t{-amV-} diff --git a/ghc/compiler/tests/deSugar/ds008.stderr b/ghc/compiler/tests/deSugar/ds008.stderr index 240c477..7ca5532 100644 --- a/ghc/compiler/tests/deSugar/ds008.stderr +++ b/ghc/compiler/tests/deSugar/ds008.stderr @@ -1,21 +1,116 @@ -Desugared: -Test.f :: for all d, e. d -> [e] -Test.f = /\ o81 t82 -> \ x.102 -> Nil! t82 -Test.g :: for all d, e, f, g, h. d -> ([e], [f], [g], [h]) -Test.g = - /\ o85 t87 t89 t90 t91 -> \ x.103 -> - MkTuple4! - [t87] - [t89] - [t90] - [t91] - (((Test.f [t88]) t87) (Nil! t88)) - (Nil! t89) - (Nil! t90) - (Nil! t91) -Test.h :: for all d, e, f, g, h. d -> ([e], [f], [g], [h]) -Test.h = - /\ o94 t96 t97 t98 t99 -> \ x.104 -> - (((((Test.g Int) t96) t97) t98) t99) - (let dict.105 = dfun.Num.Int in MkInt! 1#) + +================================================================================ +Desugared: +Rec { +d.Num_aY4 :: + {PrelBase.Num{-2c,p-} PrelBase.Int{-3g,p-}} +{-# L #-} +d.Num_aY4 = + PrelBase.$d3{-rbb,p-} +fromInt_a117 :: + PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-} +{-# L #-} +fromInt_a117 = + PrelBase.fromInt{-8R,p-} + _@_ PrelBase.Int{-3g,p-} d.Num_aY4 +lit_a11e :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a11e = + let { + ds_d11D :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d11D = + PrelBase.I#{-5b,p-}{i} + 1 + } in + fromInt_a117 + ds_d11D +f{-r3m,x-} :: + _forall_ [t{-aXj-} t{-aXh-}] => t{-aXj-} -> [t{-aXh-}] +{-# L #-} +f{-r3m,x-} = + _/\_ t{-aXj-} t{-aXh-} -> \ x_r3f :: + t{-aXj-} + {-# L #-} + x_r3f -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-aXh-} +g{-r3l,x-} :: + _forall_ + [t{-aXD-} t{-aXv-} t{-aXx-} t{-aXz-} t{-aXB-}] + => + t{-aXD-} -> ([t{-aXv-}], [t{-aXx-}], [t{-aXz-}], [t{-aXB-}]) +{-# L #-} +g{-r3l,x-} = + _/\_ t{-aXD-} t{-aXv-} t{-aXx-} t{-aXz-} t{-aXB-} -> \ x_r3h :: + t{-aXD-} + {-# L #-} + x_r3h -> + let { ds_d12o :: + [t{-aXv-}] + {-# L #-} + ds_d12o = + let { + ds_d12M :: + [GHC.Void{-3T,p-}] + {-# L #-} + ds_d12M = + PrelBase.[]{-5i,p-}{i} + _@_ GHC.Void{-3T,p-} + } in + f{-r3m,x-} + _@_ [GHC.Void{-3T,p-}] _@_ t{-aXv-} ds_d12M + } in + let { + ds_d12s :: + [t{-aXx-}] + {-# L #-} + ds_d12s = + PrelBase.[]{-5i,p-}{i} + _@_ t{-aXx-} } in + let { + ds_d12w :: + [t{-aXz-}] + {-# L #-} + ds_d12w = + PrelBase.[]{-5i,p-}{i} + _@_ t{-aXz-} } in + let { + ds_d12A :: + [t{-aXB-}] + {-# L #-} + ds_d12A = + PrelBase.[]{-5i,p-}{i} + _@_ t{-aXB-} + } in + PrelTup.(,,,){-64,p-}{i} + {_@_ [t{-aXv-}] + _@_ [t{-aXx-}] + _@_ [t{-aXz-}] + _@_ [t{-aXB-}] + ds_d12o + ds_d12s + ds_d12w + ds_d12A} +h{-r3k,x-} :: + _forall_ + [t{-aY0-} t{-aXS-} t{-aXT-} t{-aXU-} t{-aXV-}] + => + t{-aY0-} -> ([t{-aXS-}], [t{-aXT-}], [t{-aXU-}], [t{-aXV-}]) +{-# L #-} +h{-r3k,x-} = + _/\_ t{-aY0-} t{-aXS-} t{-aXT-} t{-aXU-} t{-aXV-} -> \ x_r3j :: + t{-aY0-} + {-# L #-} + x_r3j -> + g{-r3l,x-} + _@_ PrelBase.Int{-3g,p-} + _@_ t{-aXS-} + _@_ t{-aXT-} + _@_ t{-aXU-} + _@_ t{-aXV-} + lit_a11e +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds009.stderr b/ghc/compiler/tests/deSugar/ds009.stderr index a60a3de..22fcc6f 100644 --- a/ghc/compiler/tests/deSugar/ds009.stderr +++ b/ghc/compiler/tests/deSugar/ds009.stderr @@ -1,150 +1,481 @@ -Desugared: -SimpleListComp.f :: for all d. [d] -> [d] -SimpleListComp.f = - /\ t104 -> \ xs.145 -> - let - {- CoRec -} - ds.146 = - \ ds.147 -> - case ds.147 of { - Nil -> Nil t104 - (:) ds.148 ds.149 -> - let x.150 = ds.148 in (: t104) x.150 (ds.146 ds.149) - } - {- end CoRec -} - in ds.146 xs.145 -SimpleListComp.g :: for all d, e, f. [d] -> [e] -> [f] -> [(d, e, f)] -SimpleListComp.g = - /\ t110 t111 t112 -> \ xs.163 ys.164 zs.165 -> - let - {- CoRec -} - ds.166 = - \ ds.167 -> - case ds.167 of { - Nil -> Nil (t110, t111, t112) - (:) ds.168 ds.169 -> - let x.170 = ds.168 - in - let - {- CoRec -} - ds.171 = - \ ds.172 -> - case ds.172 of { - Nil -> ds.166 ds.169 - (:) ds.173 ds.174 -> - let y.175 = ds.173 - in - let - {- CoRec -} - ds.176 = - \ ds.177 -> - case ds.177 of { - Nil -> ds.171 ds.174 - (:) ds.178 ds.179 -> - let z.180 = ds.178 - in - (: (t110, - t111, - t112)) - (MkTuple3! - t110 - t111 - t112 - x.170 - y.175 - z.180) - (ds.176 ds.179) - } - {- end CoRec -} - in ds.176 zs.165 - } - {- end CoRec -} - in ds.171 ys.164 - } - {- end CoRec -} - in ds.166 xs.163 -SimpleListComp.h :: for all d. [d] -> [d] -> [[d]] -SimpleListComp.h = - /\ t118 -> \ xs.189 ys.190 -> - let - {- CoRec -} - ds.191 = - \ ds.192 -> - case ds.192 of { - Nil -> Nil [t118] - (:) ds.193 ds.194 -> - let x.195 = ds.193 - in - let - {- CoRec -} - ds.196 = - \ ds.197 -> - case ds.197 of { - Nil -> ds.191 ds.194 - (:) ds.198 ds.199 -> - let y.200 = ds.198 in ds.196 ds.199 - } - {- end CoRec -} - in ds.196 ys.190 - } - {- end CoRec -} - in ds.191 xs.189 -SimpleListComp.i :: for all d, e. -> -> [([e], [d])] -> [[e]] -SimpleListComp.i = - /\ t128 t127 -> \ dict.133 dict.132 -> - let dict.130 = (dfun.Eq.List t127) dict.132 in - let dict.131 = (dfun.Eq.List t128) dict.133 in - let dict.126 = ((dfun.Eq.Tuple2 [t127]) [t128]) dict.130 dict.131 in - let - i.120 = - \ xs.78 -> - let - {- CoRec -} - ds.201 = - \ ds.202 -> - case ds.202 of { - Nil -> Nil [t127] - (:) ds.203 ds.204 -> - case ds.203 of { - MkTuple2 x.80 y.81 -> - let all.79 = ds.203 - in - case - ((== ([t127], [t128])) - dict.126 - all.79 - (MkTuple2! - [t127] - [t128] - (Nil! t127) - (Nil! t128))) - of { - True -> - (: [t127]) x.80 (ds.201 ds.204) - False -> ds.201 ds.204 - } - } - } - {- end CoRec -} - in ds.201 xs.78 - in i.120 -SimpleListComp.j :: for all d, e, f, g. [(f, g, d, e)] -> [(f, g)] -SimpleListComp.j = - /\ t139 t140 t137 t138 -> \ xs.210 -> - let - {- CoRec -} - ds.211 = - \ ds.212 -> - case ds.212 of { - Nil -> Nil (t137, t138) - (:) ds.213 ds.214 -> - case ds.213 of { - MkTuple4 a.215 b.216 c.217 d.218 -> - (: (t137, t138)) - (MkTuple2! t137 t138 a.215 b.216) - (ds.211 ds.214) - } - } - {- end CoRec -} - in ds.211 xs.210 + +================================================================================ +Desugared: +j{-r3R,x-} :: + _forall_ + [t{-aXD-} t{-aXG-} t{-aXJ-} t{-aXM-} a{-aXO-}] + => + {PrelBase.Monad{-28,p-} a{-aXO-}} + -> a{-aXO-} (t{-aXD-}, t{-aXG-}, t{-aXJ-}, t{-aXM-}) + -> a{-aXO-} (t{-aXD-}, t{-aXG-}) +{-# L #-} +j{-r3R,x-} = + _/\_ t{-aXD-} t{-aXG-} t{-aXJ-} t{-aXM-} a{-aXO-} -> \ d.Monad_aXY :: + {PrelBase.Monad{-28,p-} a{-aXO-}} + {-# L #-} + d.Monad_aXY -> + let { + >>=_a1c0 :: + _forall_ + [rjI{-a107-} rjJ{-a106-}] + => + a{-aXO-} rjI{-a107-} + -> (rjI{-a107-} -> a{-aXO-} rjJ{-a106-}) + -> a{-aXO-} rjJ{-a106-} + {-# L #-} + >>=_a1c0 = + PrelBase.>>={-811,p-} + _@_ a{-aXO-} d.Monad_aXY } in + let { + d.Monad_aY0 :: + {PrelBase.Monad{-28,p-} a{-aXO-}} + {-# L #-} + d.Monad_aY0 = + d.Monad_aXY } in + let { + return_a1bZ :: + _forall_ [rjQ{-a108-}] => rjQ{-a108-} -> a{-aXO-} rjQ{-a108-} + {-# L #-} + return_a1bZ = + PrelBase.return{-816,p-} + _@_ a{-aXO-} d.Monad_aY0 + } in + \ xs_r3L :: + a{-aXO-} (t{-aXD-}, t{-aXG-}, t{-aXJ-}, t{-aXM-}) + {-# L #-} + xs_r3L -> + let { + ds_d1cw :: + (t{-aXD-}, t{-aXG-}, t{-aXJ-}, t{-aXM-}) + -> a{-aXO-} (t{-aXD-}, t{-aXG-}) + {-# L #-} + ds_d1cw = + \ ds_d1cC :: + (t{-aXD-}, t{-aXG-}, t{-aXJ-}, t{-aXM-}) + {-# L #-} + ds_d1cC -> + case + ds_d1cC + of { + PrelTup.(,,,){-64,p-}{i} a_r3N b_r3O c_r3P d_r3Q -> + let { + ds_d1cQ :: + (t{-aXD-}, t{-aXG-}) + {-# L #-} + ds_d1cQ = + PrelTup.(,){-62,p-}{i} + {_@_ t{-aXD-} _@_ t{-aXG-} a_r3N b_r3O} + } in + return_a1bZ + _@_ (t{-aXD-}, t{-aXG-}) ds_d1cQ;} + } in + >>=_a1c0 + _@_ (t{-aXD-}, t{-aXG-}, t{-aXJ-}, t{-aXM-}) + _@_ (t{-aXD-}, t{-aXG-}) + xs_r3L + ds_d1cw +i{-r3S,x-} :: + _forall_ + [a{-aYh-} t{-aYm-} t{-aYo-}] + => + {PrelBase.Eq{-23,p-} t{-aYm-}} + -> {PrelBase.Eq{-23,p-} t{-aYo-}} + -> {PrelBase.MonadZero{-29,p-} a{-aYh-}} + -> a{-aYh-} ([t{-aYm-}], [t{-aYo-}]) + -> a{-aYh-} [t{-aYm-}] +{-# L #-} +i{-r3S,x-} = + _/\_ a{-aYh-} t{-aYm-} t{-aYo-} -> \ d.Eq_aYC :: + {PrelBase.Eq{-23,p-} t{-aYm-}} + {-# L #-} + d.Eq_aYC d.Eq_aYF :: + {PrelBase.Eq{-23,p-} t{-aYo-}} + {-# L #-} + d.Eq_aYF d.MonadZero_aYL :: + {PrelBase.MonadZero{-29,p-} a{-aYh-}} + {-# L #-} + d.MonadZero_aYL -> + let { + d.Monad_aYH :: + {PrelBase.Monad{-28,p-} a{-aYh-}} + {-# L #-} + d.Monad_aYH = + PrelBase.scsel_MonadZeroPrelBaseMonad{-a1dR,p-} + _@_ a{-aYh-} d.MonadZero_aYL } in + let { + d.Eq_aYA :: + {PrelBase.Eq{-23,p-} [t{-aYm-}]} + {-# L #-} + d.Eq_aYA = + PrelBase.$d27{-rqA,p-} + _@_ t{-aYm-} d.Eq_aYC } in + let { + d.Eq_aYD :: + {PrelBase.Eq{-23,p-} [t{-aYo-}]} + {-# L #-} + d.Eq_aYD = + PrelBase.$d27{-rqA,p-} + _@_ t{-aYo-} d.Eq_aYF } in + let { + d.Eq_aYy :: + {PrelBase.Eq{-23,p-} ([t{-aYm-}], [t{-aYo-}])} + {-# L #-} + d.Eq_aYy = + PrelTup.$d9{-rq7,p-} + _@_ [t{-aYm-}] _@_ [t{-aYo-}] d.Eq_aYA d.Eq_aYD } in + let { + ==_a1dH :: + ([t{-aYm-}], [t{-aYo-}]) + -> ([t{-aYm-}], [t{-aYo-}]) + -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1dH = + PrelBase.=={-8Y,p-} + _@_ ([t{-aYm-}], [t{-aYo-}]) d.Eq_aYy } in + let { + >>=_a1dG :: + _forall_ + [rjI{-a10a-} rjJ{-a109-}] + => + a{-aYh-} rjI{-a10a-} + -> (rjI{-a10a-} -> a{-aYh-} rjJ{-a109-}) + -> a{-aYh-} rjJ{-a109-} + {-# L #-} + >>=_a1dG = + PrelBase.>>={-811,p-} + _@_ a{-aYh-} d.Monad_aYH } in + let { + d.Monad_aYJ :: + {PrelBase.Monad{-28,p-} a{-aYh-}} + {-# L #-} + d.Monad_aYJ = + d.Monad_aYH } in + let { + return_a1dF :: + _forall_ [rjQ{-a10b-}] => rjQ{-a10b-} -> a{-aYh-} rjQ{-a10b-} + {-# L #-} + return_a1dF = + PrelBase.return{-816,p-} + _@_ a{-aYh-} d.Monad_aYJ } in + let { + zero_a1dE :: + _forall_ [rjD{-a10c-}] => a{-aYh-} rjD{-a10c-} + {-# L #-} + zero_a1dE = + PrelBase.zero{-810,p-} + _@_ a{-aYh-} d.MonadZero_aYL + } in + \ xs_r3F :: + a{-aYh-} ([t{-aYm-}], [t{-aYo-}]) + {-# L #-} + xs_r3F -> + let { + ds_d1f5 :: + ([t{-aYm-}], [t{-aYo-}]) -> a{-aYh-} [t{-aYm-}] + {-# L #-} + ds_d1f5 = + \ all_r3H :: + ([t{-aYm-}], [t{-aYo-}]) + {-# L #-} + all_r3H -> + case all_r3H of { PrelTup.(,){-62,p-}{i} x_r3I y_r3J -> + case + let { ds_d1fr :: + ([t{-aYm-}], [t{-aYo-}]) + {-# L #-} + ds_d1fr = + let { + ds_d1fE :: + [t{-aYm-}] + {-# L #-} + ds_d1fE = + PrelBase.[]{-5i,p-}{i} + _@_ t{-aYm-} } in + let { + ds_d1fI :: + [t{-aYo-}] + {-# L #-} + ds_d1fI = + PrelBase.[]{-5i,p-}{i} + _@_ t{-aYo-} + } in + PrelTup.(,){-62,p-}{i} + {_@_ [t{-aYm-}] _@_ [t{-aYo-}] ds_d1fE ds_d1fI} + } in + ==_a1dH + all_r3H ds_d1fr + of { + PrelBase.True{-5E,p-}{i} -> + return_a1dF + _@_ [t{-aYm-}] x_r3I; + PrelBase.False{-58,p-}{i} -> + zero_a1dE + _@_ [t{-aYm-}]; + };} + } in + >>=_a1dG + _@_ ([t{-aYm-}], [t{-aYo-}]) _@_ [t{-aYm-}] xs_r3F ds_d1f5 +h{-r3T,x-} :: + _forall_ + [a{-aYU-} t{-aYZ-}] + => + {PrelBase.MonadZero{-29,p-} a{-aYU-}} + -> a{-aYU-} t{-aYZ-} + -> a{-aYU-} t{-aYZ-} + -> a{-aYU-} [t{-aYZ-}] +{-# L #-} +h{-r3T,x-} = + _/\_ a{-aYU-} t{-aYZ-} -> \ d.MonadZero_aZd :: + {PrelBase.MonadZero{-29,p-} a{-aYU-}} + {-# L #-} + d.MonadZero_aZd -> + let { + d.Monad_aZ9 :: + {PrelBase.Monad{-28,p-} a{-aYU-}} + {-# L #-} + d.Monad_aZ9 = + PrelBase.scsel_MonadZeroPrelBaseMonad{-a1dR,p-} + _@_ a{-aYU-} d.MonadZero_aZd } in + let { + >>=_a1gH :: + _forall_ + [rjI{-a10e-} rjJ{-a10d-}] + => + a{-aYU-} rjI{-a10e-} + -> (rjI{-a10e-} -> a{-aYU-} rjJ{-a10d-}) + -> a{-aYU-} rjJ{-a10d-} + {-# L #-} + >>=_a1gH = + PrelBase.>>={-811,p-} + _@_ a{-aYU-} d.Monad_aZ9 } in + let { + d.Monad_aZb :: + {PrelBase.Monad{-28,p-} a{-aYU-}} + {-# L #-} + d.Monad_aZb = + d.Monad_aZ9 } in + let { + return_a1gG :: + _forall_ [rjQ{-a10f-}] => rjQ{-a10f-} -> a{-aYU-} rjQ{-a10f-} + {-# L #-} + return_a1gG = + PrelBase.return{-816,p-} + _@_ a{-aYU-} d.Monad_aZb } in + let { + zero_a1gF :: + _forall_ [rjD{-a10g-}] => a{-aYU-} rjD{-a10g-} + {-# L #-} + zero_a1gF = + PrelBase.zero{-810,p-} + _@_ a{-aYU-} d.MonadZero_aZd + } in + \ xs_r3x :: + a{-aYU-} t{-aYZ-} + {-# L #-} + xs_r3x ys_r3z :: + a{-aYU-} t{-aYZ-} + {-# L #-} + ys_r3z -> + let { + ds_d1hu :: + t{-aYZ-} -> a{-aYU-} [t{-aYZ-}] + {-# L #-} + ds_d1hu = + \ x_r3B :: + t{-aYZ-} + {-# L #-} + x_r3B -> + let { + ds_d1hK :: + t{-aYZ-} -> a{-aYU-} [t{-aYZ-}] + {-# L #-} + ds_d1hK = + \ y_r3D :: + t{-aYZ-} + {-# L #-} + y_r3D -> + zero_a1gF + _@_ [t{-aYZ-}] + } in + >>=_a1gH + _@_ t{-aYZ-} _@_ [t{-aYZ-}] ys_r3z ds_d1hK + } in + >>=_a1gH + _@_ t{-aYZ-} _@_ [t{-aYZ-}] xs_r3x ds_d1hu +g{-r3U,x-} :: + _forall_ + [a{-aZn-} t{-aZp-} t{-aZs-} t{-aZv-}] + => + {PrelBase.MonadZero{-29,p-} a{-aZn-}} + -> a{-aZn-} t{-aZp-} + -> a{-aZn-} t{-aZs-} + -> a{-aZn-} t{-aZv-} + -> a{-aZn-} (t{-aZp-}, t{-aZs-}, t{-aZv-}) +{-# L #-} +g{-r3U,x-} = + _/\_ a{-aZn-} t{-aZp-} t{-aZs-} t{-aZv-} -> \ d.MonadZero_aZJ :: + {PrelBase.MonadZero{-29,p-} a{-aZn-}} + {-# L #-} + d.MonadZero_aZJ -> + let { + d.Monad_aZF :: + {PrelBase.Monad{-28,p-} a{-aZn-}} + {-# L #-} + d.Monad_aZF = + PrelBase.scsel_MonadZeroPrelBaseMonad{-a1dR,p-} + _@_ a{-aZn-} d.MonadZero_aZJ } in + let { + >>=_a1im :: + _forall_ + [rjI{-a10i-} rjJ{-a10h-}] + => + a{-aZn-} rjI{-a10i-} + -> (rjI{-a10i-} -> a{-aZn-} rjJ{-a10h-}) + -> a{-aZn-} rjJ{-a10h-} + {-# L #-} + >>=_a1im = + PrelBase.>>={-811,p-} + _@_ a{-aZn-} d.Monad_aZF } in + let { + d.Monad_aZH :: + {PrelBase.Monad{-28,p-} a{-aZn-}} + {-# L #-} + d.Monad_aZH = + d.Monad_aZF } in + let { + return_a1il :: + _forall_ [rjQ{-a10j-}] => rjQ{-a10j-} -> a{-aZn-} rjQ{-a10j-} + {-# L #-} + return_a1il = + PrelBase.return{-816,p-} + _@_ a{-aZn-} d.Monad_aZH } in + let { + zero_a1ik :: + _forall_ [rjD{-a10k-}] => a{-aZn-} rjD{-a10k-} + {-# L #-} + zero_a1ik = + PrelBase.zero{-810,p-} + _@_ a{-aZn-} d.MonadZero_aZJ + } in + \ xs_r3l :: + a{-aZn-} t{-aZp-} + {-# L #-} + xs_r3l ys_r3n :: + a{-aZn-} t{-aZs-} + {-# L #-} + ys_r3n zs_r3p :: + a{-aZn-} t{-aZv-} + {-# L #-} + zs_r3p -> + let { + ds_d1ja :: + t{-aZp-} -> a{-aZn-} (t{-aZp-}, t{-aZs-}, t{-aZv-}) + {-# L #-} + ds_d1ja = + \ x_r3r :: + t{-aZp-} + {-# L #-} + x_r3r -> + let { + ds_d1jq :: + t{-aZs-} -> a{-aZn-} (t{-aZp-}, t{-aZs-}, t{-aZv-}) + {-# L #-} + ds_d1jq = + \ y_r3t :: + t{-aZs-} + {-# L #-} + y_r3t -> + let { + ds_d1jG :: + t{-aZv-} -> a{-aZn-} (t{-aZp-}, t{-aZs-}, t{-aZv-}) + {-# L #-} + ds_d1jG = + \ z_r3v :: + t{-aZv-} + {-# L #-} + z_r3v -> + let { + ds_d1jR :: + (t{-aZp-}, t{-aZs-}, t{-aZv-}) + {-# L #-} + ds_d1jR = + PrelTup.(,,){-63,p-}{i} + {_@_ t{-aZp-} + _@_ t{-aZs-} + _@_ t{-aZv-} + x_r3r + y_r3t + z_r3v} + } in + return_a1il + _@_ (t{-aZp-}, t{-aZs-}, t{-aZv-}) ds_d1jR + } in + >>=_a1im + _@_ t{-aZv-} + _@_ (t{-aZp-}, t{-aZs-}, t{-aZv-}) + zs_r3p + ds_d1jG + } in + >>=_a1im + _@_ t{-aZs-} _@_ (t{-aZp-}, t{-aZs-}, t{-aZv-}) ys_r3n ds_d1jq + } in + >>=_a1im + _@_ t{-aZp-} _@_ (t{-aZp-}, t{-aZs-}, t{-aZv-}) xs_r3l ds_d1ja +f{-r3V,x-} :: + _forall_ + [a{-aZR-} t{-aZT-}] + => + {PrelBase.Monad{-28,p-} a{-aZR-}} + -> a{-aZR-} t{-aZT-} + -> a{-aZR-} t{-aZT-} +{-# L #-} +f{-r3V,x-} = + _/\_ a{-aZR-} t{-aZT-} -> \ d.Monad_a103 :: + {PrelBase.Monad{-28,p-} a{-aZR-}} + {-# L #-} + d.Monad_a103 -> + let { + >>=_a1ky :: + _forall_ + [rjI{-a10m-} rjJ{-a10l-}] + => + a{-aZR-} rjI{-a10m-} + -> (rjI{-a10m-} -> a{-aZR-} rjJ{-a10l-}) + -> a{-aZR-} rjJ{-a10l-} + {-# L #-} + >>=_a1ky = + PrelBase.>>={-811,p-} + _@_ a{-aZR-} d.Monad_a103 } in + let { + d.Monad_a105 :: + {PrelBase.Monad{-28,p-} a{-aZR-}} + {-# L #-} + d.Monad_a105 = + d.Monad_a103 } in + let { + return_a1kx :: + _forall_ [rjQ{-a10n-}] => rjQ{-a10n-} -> a{-aZR-} rjQ{-a10n-} + {-# L #-} + return_a1kx = + PrelBase.return{-816,p-} + _@_ a{-aZR-} d.Monad_a105 + } in + \ xs_r3h :: + a{-aZR-} t{-aZT-} + {-# L #-} + xs_r3h -> + let { + ds_d1l4 :: + t{-aZT-} -> a{-aZR-} t{-aZT-} + {-# L #-} + ds_d1l4 = + \ x_r3j :: + t{-aZT-} + {-# L #-} + x_r3j -> + return_a1kx + _@_ t{-aZT-} x_r3j + } in + >>=_a1ky + _@_ t{-aZT-} _@_ t{-aZT-} xs_r3h ds_d1l4 diff --git a/ghc/compiler/tests/deSugar/ds010.stderr b/ghc/compiler/tests/deSugar/ds010.stderr index cfc1cae..35eedef 100644 --- a/ghc/compiler/tests/deSugar/ds010.stderr +++ b/ghc/compiler/tests/deSugar/ds010.stderr @@ -1,228 +1,338 @@ + + +================================================================================ Desugared: -Test.z :: [(Char, Char, Char, Char, Char, Char, Char, Char, Char, Char)] -Test.z = - let - {- CoRec -} - ds.136 = - \ ds.137 -> - case ds.137 of { - Nil -> - Nil (Char, - Char, - Char, - Char, - Char, - Char, - Char, - Char, - Char, - Char) - (:) ds.138 ds.139 -> - let a.140 = ds.138 - in - let - {- CoRec -} - ds.141 = - \ ds.142 -> - case ds.142 of { - Nil -> ds.136 ds.139 - (:) ds.143 ds.144 -> - let b.145 = ds.143 - in - let - {- CoRec -} - ds.146 = - \ ds.147 -> - case ds.147 of { - Nil -> ds.141 ds.144 - (:) ds.148 ds.149 -> - let c.150 = ds.148 - in - let - {- CoRec -} - ds.151 = - \ ds.152 -> - case - ds.152 - of { - Nil -> - ds.146 - ds.149 - (:) ds.153 - ds.154 -> - let - d.155 = - ds.153 - in - let - {- CoRec -} - ds.156 = - \ ds.157 -> - case - ds.157 - of { - Nil -> - ds.151 - ds.154 - (:) ds.158 - ds.159 -> - let - e.160 = - ds.158 - in - let - {- CoRec -} - ds.161 = - \ ds.162 -> - case - ds.162 - of { - Nil -> - ds.156 - ds.159 - (:) ds.163 - ds.164 -> - let - f.165 = - ds.163 - in - let - {- CoRec -} - ds.166 = - \ ds.167 -> - case - ds.167 - of { - Nil -> - ds.161 - ds.164 - (:) ds.168 - ds.169 -> - let - g.170 = - ds.168 - in - let - {- CoRec -} - ds.171 = - \ ds.172 -> - case - ds.172 - of { - Nil -> - ds.166 - ds.169 - (:) ds.173 - ds.174 -> - let - h.175 = - ds.173 - in - let - {- CoRec -} - ds.176 = - \ ds.177 -> +Rec { +d.Monad_aWF :: + {PrelBase.Monad{-28,p-} PrelBase.[]{-3j,p-}} +{-# L #-} +d.Monad_aWF = + PrelBase.$d24{-rq8,p-} +>>=_a11I :: + _forall_ + [rjI{-aWJ-} rjJ{-aWK-}] + => + [rjI{-aWJ-}] -> (rjI{-aWJ-} -> [rjJ{-aWK-}]) -> [rjJ{-aWK-}] +{-# L #-} +>>=_a11I = + PrelBase.>>={-811,p-} + _@_ PrelBase.[]{-3j,p-} d.Monad_aWF +d.Monad_aWI :: + {PrelBase.Monad{-28,p-} PrelBase.[]{-3j,p-}} +{-# L #-} +d.Monad_aWI = + d.Monad_aWF +return_a11P :: + _forall_ [rjQ{-aWL-}] => rjQ{-aWL-} -> [rjQ{-aWL-}] +{-# L #-} +return_a11P = + PrelBase.return{-816,p-} + _@_ PrelBase.[]{-3j,p-} d.Monad_aWI +z_aW0 :: + [(PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})] +{-# L #-} +z_aW0 = + _letrec_ { + ds_d12r :: + [PrelBase.Char{-38,p-}] + -> [(PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})] + {-# L #-} + ds_d12r = + \ ds_d12w :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d12w -> + case ds_d12w of { + PrelBase.[]{-5i,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + {_@_ (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})}; + PrelBase.:{-55,p-}{i} ds_d12I ds_d12R -> + let { + a_r3d :: + PrelBase.Char{-38,p-} + {-# L #-} + a_r3d = + ds_d12I } in + _letrec_ { + ds_d12X :: + [PrelBase.Char{-38,p-}] + -> [(PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})] + {-# L #-} + ds_d12X = + \ ds_d132 :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d132 -> + case ds_d132 of { + PrelBase.[]{-5i,p-}{i} -> + ds_d12r + ds_d12R; + PrelBase.:{-55,p-}{i} ds_d13h ds_d13q -> + let { + b_r3f :: + PrelBase.Char{-38,p-} + {-# L #-} + b_r3f = + ds_d13h } in + _letrec_ { + ds_d13w :: + [PrelBase.Char{-38,p-}] + -> [(PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})] + {-# L #-} + ds_d13w = + \ ds_d13B :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d13B -> + case ds_d13B of { + PrelBase.[]{-5i,p-}{i} -> + ds_d12X + ds_d13q; + PrelBase.:{-55,p-}{i} ds_d13Q ds_d13Z -> + let { + c_r3h :: + PrelBase.Char{-38,p-} + {-# L #-} + c_r3h = + ds_d13Q } in + _letrec_ { + ds_d145 :: + [PrelBase.Char{-38,p-}] + -> [(PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})] + {-# L #-} + ds_d145 = + \ ds_d14a :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d14a -> + case ds_d14a of { + PrelBase.[]{-5i,p-}{i} -> + ds_d13w + ds_d13Z; + PrelBase.:{-55,p-}{i} ds_d14p ds_d14y -> + let { + d_r3j :: + PrelBase.Char{-38,p-} + {-# L #-} + d_r3j = + ds_d14p } in + _letrec_ { + ds_d14E :: + [PrelBase.Char{-38,p-}] + -> [(PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})] + {-# L #-} + ds_d14E = + \ ds_d14J :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d14J -> + case ds_d14J of { + PrelBase.[]{-5i,p-}{i} -> + ds_d145 + ds_d14y; + PrelBase.:{-55,p-}{i} ds_d14Y ds_d157 -> + let { + e_r3l :: + PrelBase.Char{-38,p-} + {-# L #-} + e_r3l = + ds_d14Y } in + _letrec_ { + ds_d15d :: + [PrelBase.Char{-38,p-}] + -> [(PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})] + {-# L #-} + ds_d15d = + \ ds_d15i :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d15i -> + case + ds_d15i + of { + PrelBase.[]{-5i,p-}{i} -> + ds_d14E + ds_d157; + PrelBase.:{-55,p-}{i} ds_d15x ds_d15G -> + let { + f_r3n :: + PrelBase.Char{-38,p-} + {-# L #-} + f_r3n = + ds_d15x } in + _letrec_ { + ds_d15M :: + [PrelBase.Char{-38,p-}] + -> [(PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})] + {-# L #-} + ds_d15M = + \ ds_d15R :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d15R -> + case + ds_d15R + of { + PrelBase.[]{-5i,p-}{i} -> + ds_d15d + ds_d15G; + PrelBase.:{-55,p-}{i} ds_d166 ds_d16f -> + let { + g_r3p :: + PrelBase.Char{-38,p-} + {-# L #-} + g_r3p = + ds_d166 } in + _letrec_ { + ds_d16l :: + [PrelBase.Char{-38,p-}] + -> [(PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})] + {-# L #-} + ds_d16l = + \ ds_d16q :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d16q -> + case + ds_d16q + of { + PrelBase.[]{-5i,p-}{i} -> + ds_d15M + ds_d16f; + PrelBase.:{-55,p-}{i} ds_d16F ds_d16O -> + let { + h_r3r :: + PrelBase.Char{-38,p-} + {-# L #-} + h_r3r = + ds_d16F } in + _letrec_ { + ds_d16U :: + [PrelBase.Char{-38,p-}] + -> [(PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})] + {-# L #-} + ds_d16U = + \ ds_d16Z :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d16Z -> + case + ds_d16Z + of { + PrelBase.[]{-5i,p-}{i} -> + ds_d16l + ds_d16O; + PrelBase.:{-55,p-}{i} ds_d17e ds_d17n -> + let { + i_r3t :: + PrelBase.Char{-38,p-} + {-# L #-} + i_r3t = + ds_d17e } in + _letrec_ { + ds_d17t :: + [PrelBase.Char{-38,p-}] + -> [(PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})] + {-# L #-} + ds_d17t = + \ ds_d17y :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d17y -> case - ds.177 + ds_d17y of { - Nil -> - ds.171 - ds.174 - (:) ds.178 - ds.179 -> - let - i.180 = - ds.178 - in - let - {- CoRec -} - ds.181 = - \ ds.182 -> - case - ds.182 - of { - Nil -> - ds.176 - ds.179 - (:) ds.183 - ds.184 -> - let - j.185 = - ds.183 - in - (: (Char, - Char, - Char, - Char, - Char, - Char, - Char, - Char, - Char, - Char)) - (MkTuple10! - Char - Char - Char - Char - Char - Char - Char - Char - Char - Char - a.140 - b.145 - c.150 - d.155 - e.160 - f.165 - g.170 - h.175 - i.180 - j.185) - (ds.181 - ds.184) - } - {- end CoRec -} - in - ds.181 - "12"S - } - {- end CoRec -} - in - ds.176 - "12"S - } - {- end CoRec -} - in - ds.171 - "12"S - } - {- end CoRec -} - in - ds.166 - "12"S - } - {- end CoRec -} - in - ds.161 - "12"S - } - {- end CoRec -} - in - ds.156 - "12"S - } - {- end CoRec -} - in ds.151 "12"S - } - {- end CoRec -} - in ds.146 "12"S - } - {- end CoRec -} - in ds.141 "12"S - } - {- end CoRec -} - in ds.136 "12"S - + PrelBase.[]{-5i,p-}{i} -> + ds_d16U + ds_d17n; + PrelBase.:{-55,p-}{i} ds_d17N ds_d186 -> + let { + j_r3v :: + PrelBase.Char{-38,p-} + {-# L #-} + j_r3v = + ds_d17N } in + let { + ds_d17Z :: + (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}) + {-# L #-} + ds_d17Z = + PrelTup.(,,,,,,,,,){-6a,p-}{i} + {_@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + a_r3d + b_r3f + c_r3h + d_r3j + e_r3l + f_r3n + g_r3p + h_r3r + i_r3t + j_r3v} } in + let { + ds_d183 :: + [(PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})] + {-# L #-} + ds_d183 = + ds_d17t + ds_d186 + } in + PrelBase.:{-55,p-}{i} + {_@_ (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}) + ds_d17Z + ds_d183}; + }; + } in + ds_d17t + _string_ "12"; + }; + } in + ds_d16U + _string_ "12"; + }; + } in + ds_d16l + _string_ "12"; + }; + } in + ds_d15M + _string_ "12"; + }; + } in + ds_d15d + _string_ "12"; + }; + } in + ds_d14E + _string_ "12"; + }; + } in + ds_d145 + _string_ "12"; + }; + } in + ds_d13w + _string_ "12"; + }; + } in + ds_d12X + _string_ "12"; + }; + } in + ds_d12r + _string_ "12" +z{-r3w,x-} :: + [(PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})] +{-# L #-} +z{-r3w,x-} = + z_aW0 +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds011.stderr b/ghc/compiler/tests/deSugar/ds011.stderr index 2535d80..6585333 100644 --- a/ghc/compiler/tests/deSugar/ds011.stderr +++ b/ghc/compiler/tests/deSugar/ds011.stderr @@ -1,10 +1,70 @@ -Desugared: -Tests.f :: for all d. d -Tests.f = /\ t79 -> (error t79) (Nil! Char) -Tests.g :: for all d. d -Tests.g = /\ t83 -> (error t83) (Nil! Char) -Tests.h :: for all d. d -Tests.h = /\ t86 -> (error t86) "\""S -Tests.i :: for all d. d -Tests.i = /\ t89 -> (error t89) "foo"S + +================================================================================ +Desugared: +i{-r4,x-} :: + _forall_ [t{-amO-}] => t{-amO-} +{-# L #-} +i{-r4,x-} = + _/\_ t{-amO-} -> + IOBase.error{-87,p-} + _@_ t{-amO-} _string_ "foo" +h{-r5,x-} :: + _forall_ [t{-amW-}] => t{-amW-} +{-# L #-} +h{-r5,x-} = + _/\_ t{-amW-} -> + let { ds_dpe :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_dpe = + let { + ds_dpp :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_dpp = + PrelBase.C#{-54,p-}{i} + {'"'} } in + let { + ds_dpt :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_dpt = + PrelBase.[]{-5i,p-}{i} + {_@_ PrelBase.Char{-38,p-}} + } in + PrelBase.:{-55,p-}{i} + {_@_ PrelBase.Char{-38,p-} ds_dpp ds_dpt} + } in + IOBase.error{-87,p-} + _@_ t{-amW-} ds_dpe +g{-r6,x-} :: + _forall_ [t{-an4-}] => t{-an4-} +{-# L #-} +g{-r6,x-} = + _/\_ t{-an4-} -> + let { + ds_dpW :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_dpW = + PrelBase.[]{-5i,p-}{i} + {_@_ PrelBase.Char{-38,p-}} + } in + IOBase.error{-87,p-} + _@_ t{-an4-} ds_dpW +f{-r7,x-} :: + _forall_ [t{-and-}] => t{-and-} +{-# L #-} +f{-r7,x-} = + _/\_ t{-and-} -> + let { + ds_dqm :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_dqm = + PrelBase.[]{-5i,p-}{i} + _@_ PrelBase.Char{-38,p-} + } in + IOBase.error{-87,p-} + _@_ t{-and-} ds_dqm diff --git a/ghc/compiler/tests/deSugar/ds012.stderr b/ghc/compiler/tests/deSugar/ds012.stderr index 93c198c..a562b3d 100644 --- a/ghc/compiler/tests/deSugar/ds012.stderr +++ b/ghc/compiler/tests/deSugar/ds012.stderr @@ -1,58 +1,299 @@ -Desugared: -Tests.f :: for all d, e. -> d -> e -Tests.f = - /\ o81 t82 -> \ dict.101 -> - let dict.99 = dict.101 in - let dict.97 = dict.99 in - let dict.94 = dict.97 in - let dict.91 = dict.94 in - let dict.89 = dict.91 in - let dict.87 = dict.89 in - let dict.85 = dict.87 in - let dict.83 = dict.85 in - let - f.80 = - \ x.63 -> - (+ t82) - dict.83 - ((- t82) - dict.85 - ((+ t82) - dict.87 - ((fromInteger t82) dict.89 (MkInteger! 1##)) - ((fromInteger t82) dict.91 (MkInteger! 2##))) - ((fromInteger t82) dict.94 (MkInteger! 3##))) - ((* t82) - dict.97 - ((fromInteger t82) dict.99 (MkInteger! 4##)) - ((fromInteger t82) dict.101 (MkInteger! 5##))) - in f.80 -Tests.g :: for all d. -> d -> d -Tests.g = - /\ t110 -> \ dict.111 -> - let dict.108 = dict.111 in - let - g.105 = - \ x.64 -> - (+ t110) dict.108 x.64 (((Tests.f t110) t110) dict.111 x.64) - in g.105 -Tests.h :: for all d, e. -> d -> e -Tests.h = - /\ o115 t120 -> \ dict.121 -> - let dict.119 = dict.121 in - let dict.117 = dict.119 in - let - h.114 = - \ x.65 -> - (+ t120) - dict.117 - ((fromInteger t120) - dict.119 - (MkInteger! - 111111111111111111111111111111111111111111111111111111111111##)) - ((fromInteger t120) - dict.121 - (MkInteger! - 222222222222222222222222222222222222222222222222222222222222##)) - in h.114 + +================================================================================ +Desugared: +h{-r3l,x-} :: + _forall_ + [t{-aHu-} t{-aHz-}] + => + {PrelBase.Num{-2c,p-} t{-aHu-}} -> t{-aHz-} -> t{-aHu-} +{-# L #-} +h{-r3l,x-} = + _/\_ t{-aHu-} t{-aHz-} -> \ d.Num_aHB :: + {PrelBase.Num{-2c,p-} t{-aHu-}} + {-# L #-} + d.Num_aHB -> + let { + +_aP0 :: + t{-aHu-} -> t{-aHu-} -> t{-aHu-} + {-# L #-} + +_aP0 = + PrelBase.+{-r3k,p-} + _@_ t{-aHu-} d.Num_aHB } in + let { + d.Num_aHE :: + {PrelBase.Num{-2c,p-} t{-aHu-}} + {-# L #-} + d.Num_aHE = + d.Num_aHB } in + let { + fromInteger_aOZ :: + PrelBase.Integer{-3h,p-} -> t{-aHu-} + {-# L #-} + fromInteger_aOZ = + PrelBase.fromInteger{-8S,p-} + _@_ t{-aHu-} d.Num_aHE } in + let { + lit_aOY :: + t{-aHu-} + {-# L #-} + lit_aOY = + fromInteger_aOZ + _integer_ 111111111111111111111111111111111111111111111111111111111111 } in + let { + fromInteger_aOX :: + PrelBase.Integer{-3h,p-} -> t{-aHu-} + {-# L #-} + fromInteger_aOX = + fromInteger_aOZ } in + let { + lit_aOW :: + t{-aHu-} + {-# L #-} + lit_aOW = + fromInteger_aOX + _integer_ 222222222222222222222222222222222222222222222222222222222222 + } in + \ x_r3j :: + t{-aHz-} + {-# L #-} + x_r3j -> + +_aP0 + lit_aOY lit_aOW +f{-r3n,x-} :: + _forall_ + [t{-aI9-} t{-aIe-}] + => + {PrelBase.Num{-2c,p-} t{-aI9-}} -> t{-aIe-} -> t{-aI9-} +{-# L #-} +f{-r3n,x-} = + _/\_ t{-aI9-} t{-aIe-} -> \ d.Num_aIg :: + {PrelBase.Num{-2c,p-} t{-aI9-}} + {-# L #-} + d.Num_aIg -> + let { + +_aNl :: + t{-aI9-} -> t{-aI9-} -> t{-aI9-} + {-# L #-} + +_aNl = + PrelBase.+{-r3k,p-} + _@_ t{-aI9-} d.Num_aIg } in + let { + d.Num_aIi :: + {PrelBase.Num{-2c,p-} t{-aI9-}} + {-# L #-} + d.Num_aIi = + d.Num_aIg } in + let { + -_aNk :: + t{-aI9-} -> t{-aI9-} -> t{-aI9-} + {-# L #-} + -_aNk = + PrelBase.-{-817,p-} + _@_ t{-aI9-} d.Num_aIi } in + let { + +_aN8 :: + t{-aI9-} -> t{-aI9-} -> t{-aI9-} + {-# L #-} + +_aN8 = + +_aNl } in + let { + d.Num_aIl :: + {PrelBase.Num{-2c,p-} t{-aI9-}} + {-# L #-} + d.Num_aIl = + d.Num_aIg } in + let { + fromInt_aNj :: + PrelBase.Int{-3g,p-} -> t{-aI9-} + {-# L #-} + fromInt_aNj = + PrelBase.fromInt{-8R,p-} + _@_ t{-aI9-} d.Num_aIl } in + let { lit_aNi :: + t{-aI9-} + {-# L #-} + lit_aNi = + let { + ds_dQX :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_dQX = + PrelBase.I#{-5b,p-}{i} + 1 + } in + fromInt_aNj + ds_dQX + } in + let { + fromInt_aNh :: + PrelBase.Int{-3g,p-} -> t{-aI9-} + {-# L #-} + fromInt_aNh = + fromInt_aNj } in + let { lit_aNg :: + t{-aI9-} + {-# L #-} + lit_aNg = + let { + ds_dRc :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_dRc = + PrelBase.I#{-5b,p-}{i} + 2 + } in + fromInt_aNh + ds_dRc + } in + let { + fromInt_aNf :: + PrelBase.Int{-3g,p-} -> t{-aI9-} + {-# L #-} + fromInt_aNf = + fromInt_aNj } in + let { lit_aNe :: + t{-aI9-} + {-# L #-} + lit_aNe = + let { + ds_dRr :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_dRr = + PrelBase.I#{-5b,p-}{i} + 3 + } in + fromInt_aNf + ds_dRr + } in + let { + d.Num_aIp :: + {PrelBase.Num{-2c,p-} t{-aI9-}} + {-# L #-} + d.Num_aIp = + d.Num_aIg } in + let { + *_aNd :: + t{-aI9-} -> t{-aI9-} -> t{-aI9-} + {-# L #-} + *_aNd = + PrelBase.*{-rcJ,p-} + _@_ t{-aI9-} d.Num_aIp } in + let { + fromInt_aNc :: + PrelBase.Int{-3g,p-} -> t{-aI9-} + {-# L #-} + fromInt_aNc = + fromInt_aNj } in + let { lit_aNb :: + t{-aI9-} + {-# L #-} + lit_aNb = + let { + ds_dRP :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_dRP = + PrelBase.I#{-5b,p-}{i} + 4 + } in + fromInt_aNc + ds_dRP + } in + let { + fromInt_aNa :: + PrelBase.Int{-3g,p-} -> t{-aI9-} + {-# L #-} + fromInt_aNa = + fromInt_aNj } in + let { lit_aN9 :: + t{-aI9-} + {-# L #-} + lit_aN9 = + let { + ds_dS4 :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_dS4 = + PrelBase.I#{-5b,p-}{i} + 5 + } in + fromInt_aNa + ds_dS4 + } in + \ x_r3f :: + t{-aIe-} + {-# L #-} + x_r3f -> + let { ds_dSk :: + t{-aI9-} + {-# L #-} + ds_dSk = + let { + ds_dSw :: + t{-aI9-} + {-# L #-} + ds_dSw = + +_aN8 + lit_aNi lit_aNg + } in + -_aNk + ds_dSw lit_aNe + } in + let { + ds_dSo :: + t{-aI9-} + {-# L #-} + ds_dSo = + *_aNd + lit_aNb lit_aN9 + } in + +_aNl + ds_dSk ds_dSo +g{-r3m,x-} :: + _forall_ + [t{-aID-}] + => + {PrelBase.Num{-2c,p-} t{-aID-}} -> t{-aID-} -> t{-aID-} +{-# L #-} +g{-r3m,x-} = + _/\_ t{-aID-} -> \ d.Num_aIH :: + {PrelBase.Num{-2c,p-} t{-aID-}} + {-# L #-} + d.Num_aIH -> + let { + +_aTf :: + t{-aID-} -> t{-aID-} -> t{-aID-} + {-# L #-} + +_aTf = + PrelBase.+{-r3k,p-} + _@_ t{-aID-} d.Num_aIH } in + let { + d.Num_aIJ :: + {PrelBase.Num{-2c,p-} t{-aID-}} + {-# L #-} + d.Num_aIJ = + d.Num_aIH } in + let { + f_aTe :: + t{-aID-} -> t{-aID-} + {-# L #-} + f_aTe = + f{-r3n,x-} + _@_ t{-aID-} _@_ t{-aID-} d.Num_aIJ + } in + \ x_r3h :: + t{-aID-} + {-# L #-} + x_r3h -> + let { + ds_dTJ :: + t{-aID-} + {-# L #-} + ds_dTJ = + f_aTe + x_r3h + } in + +_aTf + x_r3h ds_dTJ diff --git a/ghc/compiler/tests/deSugar/ds013.stderr b/ghc/compiler/tests/deSugar/ds013.stderr index 3cca8d3..6238e97 100644 --- a/ghc/compiler/tests/deSugar/ds013.stderr +++ b/ghc/compiler/tests/deSugar/ds013.stderr @@ -1,89 +1,375 @@ -Desugared: -Tests.f :: for all d. -> d -Tests.f = - /\ t78 -> \ dict.97 -> - let dict.95 = dict.97 in - let dict.90 = dict.95 in - let dict.87 = dict.90 in - let dict.85 = dict.87 in - let dict.93 = (sdsel.Fractional.Num t78) dict.85 in - let dict.83 = dict.93 in - let dict.81 = dict.83 in - let dict.79 = dict.81 in - let - f.77 = - (+ t78) - dict.79 - ((- t78) - dict.81 - ((+ t78) - dict.83 - ((fromRational t78) - dict.85 (MkDouble! 1.5000000000000000##)) - ((fromRational t78) - dict.87 (MkDouble! 2.0000000000000000##))) - ((fromRational t78) - dict.90 (MkDouble! 3.1415926500000002##))) - ((* t78) - dict.93 - ((fromRational t78) - dict.95 (MkDouble! 4.2000000000000002##)) - ((fromRational t78) - dict.97 (MkDouble! 5.1111111111111107##))) - in f.77 -dict.103 :: -dict.103 = dfun.Num.Float -dict.105 :: -dict.105 = dfun.Num.Float -dict.107 :: -dict.107 = dfun.Num.Float -dict.109 :: -dict.109 = dfun.Fractional.Float -dict.111 :: -dict.111 = dfun.Fractional.Float -dict.114 :: -dict.114 = dfun.Fractional.Float -dict.117 :: -dict.117 = dfun.Num.Float -dict.119 :: -dict.119 = dfun.Fractional.Float -dict.121 :: -dict.121 = dfun.Fractional.Float -Tests.g :: Float -Tests.g = - plusFloat - (minusFloat - (plusFloat - (MkFloat! 1.5000000000000000#) (MkFloat! 2.0000000000000000#)) - (MkFloat! 3.1415926500000002#)) - (timesFloat - (MkFloat! 4.2000000000000002#) (MkFloat! 5.1111111111111107#)) -dict.127 :: -dict.127 = dfun.Num.Double -dict.129 :: -dict.129 = dfun.Num.Double -dict.131 :: -dict.131 = dfun.Num.Double -dict.133 :: -dict.133 = dfun.Fractional.Double -dict.135 :: -dict.135 = dfun.Fractional.Double -dict.138 :: -dict.138 = dfun.Fractional.Double -dict.141 :: -dict.141 = dfun.Num.Double -dict.143 :: -dict.143 = dfun.Fractional.Double -dict.145 :: -dict.145 = dfun.Fractional.Double -Tests.h :: Double -Tests.h = - plusDouble - (minusDouble - (plusDouble - (MkDouble! 1.5000000000000000##) - (MkDouble! 2.0000000000000000##)) - (MkDouble! 3.1415926500000002##)) - (timesDouble - (MkDouble! 4.2000000000000002##) (MkDouble! 5.1111111111111107##)) + +================================================================================ +Desugared: +Rec { +d.Num_a12Q :: + {PrelBase.Num{-2c,p-} PrelBase.Double{-3a,p-}} +{-# L #-} +d.Num_a12Q = + PrelNum.$d16{-rrq,p-} ++_a19S :: + PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} +{-# L #-} ++_a19S = + PrelBase.+{-rcF,p-} + _@_ PrelBase.Double{-3a,p-} d.Num_a12Q +d.Num_a12T :: + {PrelBase.Num{-2c,p-} PrelBase.Double{-3a,p-}} +{-# L #-} +d.Num_a12T = + d.Num_a12Q +-_a19R :: + PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} +{-# L #-} +-_a19R = + PrelBase.-{-817,p-} + _@_ PrelBase.Double{-3a,p-} d.Num_a12T +d.Fractional_a12W :: + {PrelNum.Fractional{-26,p-} PrelBase.Double{-3a,p-}} +{-# L #-} +d.Fractional_a12W = + PrelNum.$d14{-rro,p-} +fromRational_a19Q :: + PrelNum.Rational{-3r,p-} -> PrelBase.Double{-3a,p-} +{-# L #-} +fromRational_a19Q = + PrelNum.fromRational{-8T,p-} + _@_ PrelBase.Double{-3a,p-} d.Fractional_a12W +lit_a19P :: + PrelBase.Double{-3a,p-} +{-# L #-} +lit_a19P = + fromRational_a19Q + _rational_ 3 2 +fromRational_a19O :: + PrelNum.Rational{-3r,p-} -> PrelBase.Double{-3a,p-} +{-# L #-} +fromRational_a19O = + fromRational_a19Q +lit_a19N :: + PrelBase.Double{-3a,p-} +{-# L #-} +lit_a19N = + fromRational_a19O + _rational_ 2 1 +fromRational_a19M :: + PrelNum.Rational{-3r,p-} -> PrelBase.Double{-3a,p-} +{-# L #-} +fromRational_a19M = + fromRational_a19Q +lit_a19L :: + PrelBase.Double{-3a,p-} +{-# L #-} +lit_a19L = + fromRational_a19M + _rational_ 62831853 20000000 +d.Num_a131 :: + {PrelBase.Num{-2c,p-} PrelBase.Double{-3a,p-}} +{-# L #-} +d.Num_a131 = + d.Num_a12Q +*_a19K :: + PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} +{-# L #-} +*_a19K = + PrelBase.*{-rU,p-} + _@_ PrelBase.Double{-3a,p-} d.Num_a131 +fromRational_a19J :: + PrelNum.Rational{-3r,p-} -> PrelBase.Double{-3a,p-} +{-# L #-} +fromRational_a19J = + fromRational_a19Q +lit_a19I :: + PrelBase.Double{-3a,p-} +{-# L #-} +lit_a19I = + fromRational_a19J + _rational_ 21 5 +fromRational_a19H :: + PrelNum.Rational{-3r,p-} -> PrelBase.Double{-3a,p-} +{-# L #-} +fromRational_a19H = + fromRational_a19Q +lit_a19G :: + PrelBase.Double{-3a,p-} +{-# L #-} +lit_a19G = + fromRational_a19H + _rational_ 5111111111111111111111111111 1000000000000000000000000000 +d.Num_a135 :: + {PrelBase.Num{-2c,p-} PrelBase.Float{-3c,p-}} +{-# L #-} +d.Num_a135 = + PrelNum.$d25{-rrA,p-} ++_a19F :: + PrelBase.Float{-3c,p-} + -> PrelBase.Float{-3c,p-} + -> PrelBase.Float{-3c,p-} +{-# L #-} ++_a19F = + PrelBase.+{-rcF,p-} + _@_ PrelBase.Float{-3c,p-} d.Num_a135 +d.Num_a138 :: + {PrelBase.Num{-2c,p-} PrelBase.Float{-3c,p-}} +{-# L #-} +d.Num_a138 = + d.Num_a135 +-_a19E :: + PrelBase.Float{-3c,p-} + -> PrelBase.Float{-3c,p-} + -> PrelBase.Float{-3c,p-} +{-# L #-} +-_a19E = + PrelBase.-{-817,p-} + _@_ PrelBase.Float{-3c,p-} d.Num_a138 +d.Fractional_a13b :: + {PrelNum.Fractional{-26,p-} PrelBase.Float{-3c,p-}} +{-# L #-} +d.Fractional_a13b = + PrelNum.$d23{-rry,p-} +fromRational_a19D :: + PrelNum.Rational{-3r,p-} -> PrelBase.Float{-3c,p-} +{-# L #-} +fromRational_a19D = + PrelNum.fromRational{-8T,p-} + _@_ PrelBase.Float{-3c,p-} d.Fractional_a13b +lit_a19C :: + PrelBase.Float{-3c,p-} +{-# L #-} +lit_a19C = + fromRational_a19D + _rational_ 3 2 +fromRational_a19B :: + PrelNum.Rational{-3r,p-} -> PrelBase.Float{-3c,p-} +{-# L #-} +fromRational_a19B = + fromRational_a19D +lit_a19A :: + PrelBase.Float{-3c,p-} +{-# L #-} +lit_a19A = + fromRational_a19B + _rational_ 2 1 +fromRational_a19z :: + PrelNum.Rational{-3r,p-} -> PrelBase.Float{-3c,p-} +{-# L #-} +fromRational_a19z = + fromRational_a19D +lit_a19y :: + PrelBase.Float{-3c,p-} +{-# L #-} +lit_a19y = + fromRational_a19z + _rational_ 62831853 20000000 +d.Num_a13g :: + {PrelBase.Num{-2c,p-} PrelBase.Float{-3c,p-}} +{-# L #-} +d.Num_a13g = + d.Num_a135 +*_a19x :: + PrelBase.Float{-3c,p-} + -> PrelBase.Float{-3c,p-} + -> PrelBase.Float{-3c,p-} +{-# L #-} +*_a19x = + PrelBase.*{-rU,p-} + _@_ PrelBase.Float{-3c,p-} d.Num_a13g +fromRational_a19w :: + PrelNum.Rational{-3r,p-} -> PrelBase.Float{-3c,p-} +{-# L #-} +fromRational_a19w = + fromRational_a19D +lit_a19v :: + PrelBase.Float{-3c,p-} +{-# L #-} +lit_a19v = + fromRational_a19w + _rational_ 21 5 +fromRational_a19u :: + PrelNum.Rational{-3r,p-} -> PrelBase.Float{-3c,p-} +{-# L #-} +fromRational_a19u = + fromRational_a19D +lit_a19r :: + PrelBase.Float{-3c,p-} +{-# L #-} +lit_a19r = + fromRational_a19u + _rational_ 5111111111111111111111111111 1000000000000000000000000000 ++_a19q :: + PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} +{-# L #-} ++_a19q = + +_a19S +-_a19p :: + PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} +{-# L #-} +-_a19p = + -_a19R +lit_a19o :: + PrelBase.Double{-3a,p-} +{-# L #-} +lit_a19o = + lit_a19P +lit_a19n :: + PrelBase.Double{-3a,p-} +{-# L #-} +lit_a19n = + lit_a19N +lit_a19m :: + PrelBase.Double{-3a,p-} +{-# L #-} +lit_a19m = + lit_a19L +*_a19l :: + PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} +{-# L #-} +*_a19l = + *_a19K +lit_a19k :: + PrelBase.Double{-3a,p-} +{-# L #-} +lit_a19k = + lit_a19I +lit_a19j :: + PrelBase.Double{-3a,p-} +{-# L #-} +lit_a19j = + lit_a19G ++_a19i :: + PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} +{-# L #-} ++_a19i = + +_a19q +h_a106 :: + PrelBase.Double{-3a,p-} +{-# L #-} +h_a106 = + let { ds_d1hq :: + PrelBase.Double{-3a,p-} + {-# L #-} + ds_d1hq = + let { + ds_d1hC :: + PrelBase.Double{-3a,p-} + {-# L #-} + ds_d1hC = + +_a19i + lit_a19o lit_a19n + } in + -_a19p + ds_d1hC lit_a19m + } in + let { + ds_d1hu :: + PrelBase.Double{-3a,p-} + {-# L #-} + ds_d1hu = + *_a19l + lit_a19k lit_a19j + } in + +_a19q + ds_d1hq ds_d1hu +h{-r4,x-} :: + PrelBase.Double{-3a,p-} +{-# L #-} +h{-r4,x-} = + h_a106 ++_a1aJ :: + PrelBase.Float{-3c,p-} + -> PrelBase.Float{-3c,p-} + -> PrelBase.Float{-3c,p-} +{-# L #-} ++_a1aJ = + +_a19F +g_a10L :: + PrelBase.Float{-3c,p-} +{-# L #-} +g_a10L = + let { ds_d1ib :: + PrelBase.Float{-3c,p-} + {-# L #-} + ds_d1ib = + let { + ds_d1in :: + PrelBase.Float{-3c,p-} + {-# L #-} + ds_d1in = + +_a1aJ + lit_a19C lit_a19A + } in + -_a19E + ds_d1in lit_a19y + } in + let { + ds_d1if :: + PrelBase.Float{-3c,p-} + {-# L #-} + ds_d1if = + *_a19x + lit_a19v lit_a19r + } in + +_a19F + ds_d1ib ds_d1if +g{-r2,x-} :: + PrelBase.Float{-3c,p-} +{-# L #-} +g{-r2,x-} = + g_a10L ++_a1bs :: + PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} + -> PrelBase.Double{-3a,p-} +{-# L #-} ++_a1bs = + +_a19S +f_a11q :: + PrelBase.Double{-3a,p-} +{-# L #-} +f_a11q = + let { ds_d1iW :: + PrelBase.Double{-3a,p-} + {-# L #-} + ds_d1iW = + let { + ds_d1j8 :: + PrelBase.Double{-3a,p-} + {-# L #-} + ds_d1j8 = + +_a1bs + lit_a19P lit_a19N + } in + -_a19R + ds_d1j8 lit_a19L + } in + let { + ds_d1j0 :: + PrelBase.Double{-3a,p-} + {-# L #-} + ds_d1j0 = + *_a19K + lit_a19I lit_a19G + } in + +_a19S + ds_d1iW ds_d1j0 +f{-r5,x-} :: + PrelBase.Double{-3a,p-} +{-# L #-} +f{-r5,x-} = + f_a11q +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds014.stderr b/ghc/compiler/tests/deSugar/ds014.stderr index e151c0a..724fd2c 100644 --- a/ghc/compiler/tests/deSugar/ds014.stderr +++ b/ghc/compiler/tests/deSugar/ds014.stderr @@ -1,105 +1,603 @@ -Desugared: -Tests.a :: Char -Tests.a = MkChar! 'a'# -Tests.b :: [Char] -Tests.b = "b"S -Tests.c :: [Char] -Tests.c = (: Char) Tests.a Tests.b -Tests.d :: [Char] -Tests.d = (++ Char) Tests.b Tests.b -Tests.b1 :: [Char] -Tests.b1 = Nil! Char -Tests.b2 :: [Char] -Tests.b2 = Nil! Char -Tests.b3 :: [Char] -Tests.b3 = (++ Char) "\SO\&H"S "\137\&9"S -Tests.a000 :: Char -Tests.a000 = MkChar! '\NUL'# -Tests.a001 :: Char -Tests.a001 = MkChar! '\SOH'# -Tests.a002 :: Char -Tests.a002 = MkChar! '\STX'# -Tests.a003 :: Char -Tests.a003 = MkChar! '\ETX'# -Tests.a004 :: Char -Tests.a004 = MkChar! '\EOT'# -Tests.a005 :: Char -Tests.a005 = MkChar! '\ENQ'# -Tests.a006 :: Char -Tests.a006 = MkChar! '\ACK'# -Tests.a007 :: Char -Tests.a007 = MkChar! '\a'# -Tests.a010 :: Char -Tests.a010 = MkChar! '\b'# -Tests.a011 :: Char -Tests.a011 = MkChar! '\t'# -Tests.a012 :: Char -Tests.a012 = MkChar! '\n'# -Tests.a013 :: Char -Tests.a013 = MkChar! '\v'# -Tests.a014 :: Char -Tests.a014 = MkChar! '\f'# -Tests.a015 :: Char -Tests.a015 = MkChar! '\r'# -Tests.a016 :: Char -Tests.a016 = MkChar! '\SO'# -Tests.a017 :: Char -Tests.a017 = MkChar! '\SI'# -Tests.a020 :: Char -Tests.a020 = MkChar! '\DLE'# -Tests.a021 :: Char -Tests.a021 = MkChar! '\DC1'# -Tests.a022 :: Char -Tests.a022 = MkChar! '\DC2'# -Tests.a023 :: Char -Tests.a023 = MkChar! '\DC3'# -Tests.a024 :: Char -Tests.a024 = MkChar! '\DC4'# -Tests.a025 :: Char -Tests.a025 = MkChar! '\NAK'# -Tests.a026 :: Char -Tests.a026 = MkChar! '\SYN'# -Tests.a027 :: Char -Tests.a027 = MkChar! '\ETB'# -Tests.a030 :: Char -Tests.a030 = MkChar! '\CAN'# -Tests.a031 :: Char -Tests.a031 = MkChar! '\EM'# -Tests.a032 :: Char -Tests.a032 = MkChar! '\SUB'# -Tests.a033 :: Char -Tests.a033 = MkChar! '\ESC'# -Tests.a034 :: Char -Tests.a034 = MkChar! '\FS'# -Tests.a035 :: Char -Tests.a035 = MkChar! '\GS'# -Tests.a036 :: Char -Tests.a036 = MkChar! '\RS'# -Tests.a037 :: Char -Tests.a037 = MkChar! '\US'# -Tests.a040 :: Char -Tests.a040 = MkChar! ' '# -Tests.a042 :: Char -Tests.a042 = MkChar! '"'# -Tests.a047 :: Char -Tests.a047 = MkChar! '\''# -Tests.a134 :: Char -Tests.a134 = MkChar! '\\'# -Tests.a177 :: Char -Tests.a177 = MkChar! '\DEL'# -Tests.ascii :: [Char] -Tests.ascii = - "\NUL\SOH\STX\ETX\EOT\ENQ\ACK\a\b\t\n\v\f\r\SO\SI\DLE\DC1\DC2\DC3\DC4\NAK\SYN\ETB\CAN\EM\SUB\ESC\FS\GS\RS\US !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\DEL"S -Tests.na200 :: Char -Tests.na200 = MkChar! '\128'# -Tests.na250 :: Char -Tests.na250 = MkChar! '¨'# -Tests.na300 :: Char -Tests.na300 = MkChar! 'À'# -Tests.na350 :: Char -Tests.na350 = MkChar! 'è'# -Tests.na377 :: Char -Tests.na377 = MkChar! 'ÿ'# -Tests.eightbit :: [Char] -Tests.eightbit = "\128¨Àèÿ"S + +================================================================================ +Desugared: +Rec { +d.MonadPlus_aMn :: + {PrelBase.MonadPlus{-2a,p-} PrelBase.[]{-3j,p-}} +{-# L #-} +d.MonadPlus_aMn = + PrelBase.$d22{-rcv,p-} +++_aYd :: + _forall_ + [rjy{-aM3-}] + => + [rjy{-aM3-}] -> [rjy{-aM3-}] -> [rjy{-aM3-}] +{-# L #-} +++_aYd = + PrelBase.++{-rc4,p-} + _@_ PrelBase.[]{-3j,p-} d.MonadPlus_aMn +++_aYk :: + _forall_ + [rjy{-aLC-}] + => + [rjy{-aLC-}] -> [rjy{-aLC-}] -> [rjy{-aLC-}] +{-# L #-} +++_aYk = + ++_aYd +eightbit_aIH :: + [PrelBase.Char{-38,p-}] +{-# L #-} +eightbit_aIH = + _string_ "\128\168\192\232\255" +eightbit{-rP,x-} :: + [PrelBase.Char{-38,p-}] +{-# L #-} +eightbit{-rP,x-} = + eightbit_aIH +na377_aIL :: + PrelBase.Char{-38,p-} +{-# L #-} +na377_aIL = + PrelBase.C#{-54,p-}{i} + {'ÿ'} +na377{-rQ,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +na377{-rQ,x-} = + na377_aIL +na350_aIP :: + PrelBase.Char{-38,p-} +{-# L #-} +na350_aIP = + PrelBase.C#{-54,p-}{i} + {'è'} +na350{-rR,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +na350{-rR,x-} = + na350_aIP +na300_aIT :: + PrelBase.Char{-38,p-} +{-# L #-} +na300_aIT = + PrelBase.C#{-54,p-}{i} + {'À'} +na300{-rS,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +na300{-rS,x-} = + na300_aIT +na250_aIX :: + PrelBase.Char{-38,p-} +{-# L #-} +na250_aIX = + PrelBase.C#{-54,p-}{i} + {'¨'} +na250{-rT,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +na250{-rT,x-} = + na250_aIX +na200_aJ1 :: + PrelBase.Char{-38,p-} +{-# L #-} +na200_aJ1 = + PrelBase.C#{-54,p-}{i} + {'€'} +na200{-rU,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +na200{-rU,x-} = + na200_aJ1 +ascii_aJ5 :: + [PrelBase.Char{-38,p-}] +{-# L #-} +ascii_aJ5 = + _string_ "\NUL\SOH\STX\ETX\EOT\ENQ\ACK\a\b\t\n\v\f\r\SO\SI\DLE\DC1\DC2\DC3\DC4\NAK\SYN\ETB\CAN\EM\SUB\ESC\FS\GS\RS\US !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\DEL" +ascii{-rV,x-} :: + [PrelBase.Char{-38,p-}] +{-# L #-} +ascii{-rV,x-} = + ascii_aJ5 +a177_aJ9 :: + PrelBase.Char{-38,p-} +{-# L #-} +a177_aJ9 = + PrelBase.C#{-54,p-}{i} + {''} +a177{-rW,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a177{-rW,x-} = + a177_aJ9 +a134_aJd :: + PrelBase.Char{-38,p-} +{-# L #-} +a134_aJd = + PrelBase.C#{-54,p-}{i} + {'\'} +a134{-rX,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a134{-rX,x-} = + a134_aJd +a047_aJh :: + PrelBase.Char{-38,p-} +{-# L #-} +a047_aJh = + PrelBase.C#{-54,p-}{i} + {'''} +a047{-rY,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a047{-rY,x-} = + a047_aJh +a042_aJl :: + PrelBase.Char{-38,p-} +{-# L #-} +a042_aJl = + PrelBase.C#{-54,p-}{i} + {'"'} +a042{-rZ,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a042{-rZ,x-} = + a042_aJl +a040_aJp :: + PrelBase.Char{-38,p-} +{-# L #-} +a040_aJp = + PrelBase.C#{-54,p-}{i} + {' '} +a040{-r10,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a040{-r10,x-} = + a040_aJp +a037_aJt :: + PrelBase.Char{-38,p-} +{-# L #-} +a037_aJt = + PrelBase.C#{-54,p-}{i} + {''} +a037{-r11,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a037{-r11,x-} = + a037_aJt +a036_aJx :: + PrelBase.Char{-38,p-} +{-# L #-} +a036_aJx = + PrelBase.C#{-54,p-}{i} + {''} +a036{-r12,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a036{-r12,x-} = + a036_aJx +a035_aJB :: + PrelBase.Char{-38,p-} +{-# L #-} +a035_aJB = + PrelBase.C#{-54,p-}{i} + {''} +a035{-r13,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a035{-r13,x-} = + a035_aJB +a034_aJF :: + PrelBase.Char{-38,p-} +{-# L #-} +a034_aJF = + PrelBase.C#{-54,p-}{i} + {''} +a034{-r14,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a034{-r14,x-} = + a034_aJF +a033_aJJ :: + PrelBase.Char{-38,p-} +{-# L #-} +a033_aJJ = + PrelBase.C#{-54,p-}{i} + {''} +a033{-r15,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a033{-r15,x-} = + a033_aJJ +a032_aJN :: + PrelBase.Char{-38,p-} +{-# L #-} +a032_aJN = + PrelBase.C#{-54,p-}{i} + {''} +a032{-r16,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a032{-r16,x-} = + a032_aJN +a031_aJR :: + PrelBase.Char{-38,p-} +{-# L #-} +a031_aJR = + PrelBase.C#{-54,p-}{i} + {''} +a031{-r17,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a031{-r17,x-} = + a031_aJR +a030_aJV :: + PrelBase.Char{-38,p-} +{-# L #-} +a030_aJV = + PrelBase.C#{-54,p-}{i} + {''} +a030{-r18,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a030{-r18,x-} = + a030_aJV +a027_aJZ :: + PrelBase.Char{-38,p-} +{-# L #-} +a027_aJZ = + PrelBase.C#{-54,p-}{i} + {''} +a027{-r19,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a027{-r19,x-} = + a027_aJZ +a026_aK3 :: + PrelBase.Char{-38,p-} +{-# L #-} +a026_aK3 = + PrelBase.C#{-54,p-}{i} + {''} +a026{-r1a,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a026{-r1a,x-} = + a026_aK3 +a025_aK7 :: + PrelBase.Char{-38,p-} +{-# L #-} +a025_aK7 = + PrelBase.C#{-54,p-}{i} + {''} +a025{-r1b,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a025{-r1b,x-} = + a025_aK7 +a024_aKb :: + PrelBase.Char{-38,p-} +{-# L #-} +a024_aKb = + PrelBase.C#{-54,p-}{i} + {''} +a024{-r1c,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a024{-r1c,x-} = + a024_aKb +a023_aKf :: + PrelBase.Char{-38,p-} +{-# L #-} +a023_aKf = + PrelBase.C#{-54,p-}{i} + {''} +a023{-r1d,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a023{-r1d,x-} = + a023_aKf +a022_aKj :: + PrelBase.Char{-38,p-} +{-# L #-} +a022_aKj = + PrelBase.C#{-54,p-}{i} + {''} +a022{-r1e,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a022{-r1e,x-} = + a022_aKj +a021_aKn :: + PrelBase.Char{-38,p-} +{-# L #-} +a021_aKn = + PrelBase.C#{-54,p-}{i} + {''} +a021{-r1f,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a021{-r1f,x-} = + a021_aKn +a020_aKr :: + PrelBase.Char{-38,p-} +{-# L #-} +a020_aKr = + PrelBase.C#{-54,p-}{i} + {''} +a020{-r1g,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a020{-r1g,x-} = + a020_aKr +a017_aKv :: + PrelBase.Char{-38,p-} +{-# L #-} +a017_aKv = + PrelBase.C#{-54,p-}{i} + {''} +a017{-r1h,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a017{-r1h,x-} = + a017_aKv +a016_aKz :: + PrelBase.Char{-38,p-} +{-# L #-} +a016_aKz = + PrelBase.C#{-54,p-}{i} + {''} +a016{-r1i,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a016{-r1i,x-} = + a016_aKz +a015_aKD :: + PrelBase.Char{-38,p-} +{-# L #-} +a015_aKD = + PrelBase.C#{-54,p-}{i} + {' '} +a015{-r1j,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a015{-r1j,x-} = + a015_aKD +a014_aKH :: + PrelBase.Char{-38,p-} +{-# L #-} +a014_aKH = + PrelBase.C#{-54,p-}{i} + {' '} +a014{-r1k,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a014{-r1k,x-} = + a014_aKH +a013_aKL :: + PrelBase.Char{-38,p-} +{-# L #-} +a013_aKL = + PrelBase.C#{-54,p-}{i} + {' '} +a013{-r1l,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a013{-r1l,x-} = + a013_aKL +a012_aKP :: + PrelBase.Char{-38,p-} +{-# L #-} +a012_aKP = + PrelBase.C#{-54,p-}{i} + {' +'} +a012{-r1m,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a012{-r1m,x-} = + a012_aKP +a011_aKT :: + PrelBase.Char{-38,p-} +{-# L #-} +a011_aKT = + PrelBase.C#{-54,p-}{i} + {' '} +a011{-r1n,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a011{-r1n,x-} = + a011_aKT +a010_aKX :: + PrelBase.Char{-38,p-} +{-# L #-} +a010_aKX = + PrelBase.C#{-54,p-}{i} + {''} +a010{-r1o,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a010{-r1o,x-} = + a010_aKX +a007_aL1 :: + PrelBase.Char{-38,p-} +{-# L #-} +a007_aL1 = + PrelBase.C#{-54,p-}{i} + {''} +a007{-r1p,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a007{-r1p,x-} = + a007_aL1 +a006_aL5 :: + PrelBase.Char{-38,p-} +{-# L #-} +a006_aL5 = + PrelBase.C#{-54,p-}{i} + {''} +a006{-r1q,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a006{-r1q,x-} = + a006_aL5 +a005_aL9 :: + PrelBase.Char{-38,p-} +{-# L #-} +a005_aL9 = + PrelBase.C#{-54,p-}{i} + {''} +a005{-r1r,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a005{-r1r,x-} = + a005_aL9 +a004_aLd :: + PrelBase.Char{-38,p-} +{-# L #-} +a004_aLd = + PrelBase.C#{-54,p-}{i} + {''} +a004{-r1s,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a004{-r1s,x-} = + a004_aLd +a003_aLh :: + PrelBase.Char{-38,p-} +{-# L #-} +a003_aLh = + PrelBase.C#{-54,p-}{i} + {''} +a003{-r1t,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a003{-r1t,x-} = + a003_aLh +a002_aLl :: + PrelBase.Char{-38,p-} +{-# L #-} +a002_aLl = + PrelBase.C#{-54,p-}{i} + {''} +a002{-r1u,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a002{-r1u,x-} = + a002_aLl +a001_aLp :: + PrelBase.Char{-38,p-} +{-# L #-} +a001_aLp = + PrelBase.C#{-54,p-}{i} + {''} +a001{-r1v,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a001{-r1v,x-} = + a001_aLp +a000_aLt :: + PrelBase.Char{-38,p-} +{-# L #-} +a000_aLt = + PrelBase.C#{-54,p-}{i} + {''} +a000{-r1w,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a000{-r1w,x-} = + a000_aLt +b3_aLx :: + [PrelBase.Char{-38,p-}] +{-# L #-} +b3_aLx = + ++_aYk + _@_ PrelBase.Char{-38,p-} _string_ "\SO\&H" _string_ "\137\&9" +b3{-r1x,x-} :: + [PrelBase.Char{-38,p-}] +{-# L #-} +b3{-r1x,x-} = + b3_aLx +b2_aLM :: + [PrelBase.Char{-38,p-}] +{-# L #-} +b2_aLM = + PrelBase.[]{-5i,p-}{i} + {_@_ PrelBase.Char{-38,p-}} +b2{-r1y,x-} :: + [PrelBase.Char{-38,p-}] +{-# L #-} +b2{-r1y,x-} = + b2_aLM +b1_aLQ :: + [PrelBase.Char{-38,p-}] +{-# L #-} +b1_aLQ = + PrelBase.[]{-5i,p-}{i} + {_@_ PrelBase.Char{-38,p-}} +b1{-r1z,x-} :: + [PrelBase.Char{-38,p-}] +{-# L #-} +b1{-r1z,x-} = + b1_aLQ +b_aLU :: + [PrelBase.Char{-38,p-}] +{-# L #-} +b_aLU = + let { + ds_d18d :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d18d = + PrelBase.C#{-54,p-}{i} + {'b'} } in + let { + ds_d18h :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d18h = + PrelBase.[]{-5i,p-}{i} + {_@_ PrelBase.Char{-38,p-}} + } in + PrelBase.:{-55,p-}{i} + {_@_ PrelBase.Char{-38,p-} ds_d18d ds_d18h} +b{-r1C,x-} :: + [PrelBase.Char{-38,p-}] +{-# L #-} +b{-r1C,x-} = + b_aLU +d_aLY :: + [PrelBase.Char{-38,p-}] +{-# L #-} +d_aLY = + ++_aYd + _@_ PrelBase.Char{-38,p-} b{-r1C,x-} b{-r1C,x-} +d{-r1A,x-} :: + [PrelBase.Char{-38,p-}] +{-# L #-} +d{-r1A,x-} = + d_aLY +a_aMd :: + PrelBase.Char{-38,p-} +{-# L #-} +a_aMd = + PrelBase.C#{-54,p-}{i} + {'a'} +a{-r1D,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a{-r1D,x-} = + a_aMd +c_aMh :: + [PrelBase.Char{-38,p-}] +{-# L #-} +c_aMh = + PrelBase.:{-55,p-}{i} + _@_ PrelBase.Char{-38,p-} a{-r1D,x-} b{-r1C,x-} +c{-r1B,x-} :: + [PrelBase.Char{-38,p-}] +{-# L #-} +c{-r1B,x-} = + c_aMh +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds014a.stderr b/ghc/compiler/tests/deSugar/ds014a.stderr index e69de29..e845ab9 100644 --- a/ghc/compiler/tests/deSugar/ds014a.stderr +++ b/ghc/compiler/tests/deSugar/ds014a.stderr @@ -0,0 +1,2 @@ +ds014a.hs:4:7: Illegal character escape: `\&' +ds014a.hs:4:7: on input: "&" diff --git a/ghc/compiler/tests/deSugar/ds015.stderr b/ghc/compiler/tests/deSugar/ds015.stderr index a9ede58..c389126 100644 --- a/ghc/compiler/tests/deSugar/ds015.stderr +++ b/ghc/compiler/tests/deSugar/ds015.stderr @@ -1,21 +1,87 @@ -Desugared: -Tests.f :: for all d. d -> d -Tests.f = /\ o89 -> \ x.106 -> (\ x.107 -> x.107) x.106 -Tests.g :: for all d, e, f. ((d -> d) -> f) -> e -> f -Tests.g = - /\ o98 o94 o97 -> \ x.108 y.109 -> - (\ x.110 y.111 -> y.111 x.110) (\ x.112 -> x.112) x.108 -Tests.h :: for all d, e. [e] -> d -> e -Tests.h = - /\ o102 t105 -> \ x.115 y.116 -> - (\ ds.117 -> - let - fail.118 = - (error t105) - "\"ds015.hs\", line 9: pattern-matching failed in lambda\n"S - in - case ds.117 of { - (:) x.119 xs.120 -> x.119 - _ -> fail.118 - }) x.115 +ds015.hs:9: + Warning: Possibly incomplete patterns + in a lambda abstraction: + `(x PrelBase.: xs) -> ...' + +================================================================================ +Desugared: +h{-r3z,x-} :: + _forall_ [t{-an8-} t{-anf-}] => [t{-an8-}] -> t{-anf-} -> t{-an8-} +{-# L #-} +h{-r3z,x-} = + _/\_ t{-an8-} t{-anf-} -> \ x_r3t :: + [t{-an8-}] + {-# L #-} + x_r3t y_r3v :: + t{-anf-} + {-# L #-} + y_r3v -> + (\ ds_drl :: + [t{-an8-}] + {-# L #-} + ds_drl -> + let { + fail_drm :: + t{-an8-} + {-# L #-} + fail_drm = + GHCerr.patError{-8r,p-} + _@_ t{-an8-} _string_ "ds015.hs:9|lambda" + } in + case ds_drl of { + PrelBase.[]{-5i,p-}{i} -> + fail_drm; + PrelBase.:{-55,p-}{i} x_r3x xs_r3y -> + x_r3x; + }) + x_r3t +g{-r3A,x-} :: + _forall_ + [t{-any-} t{-anA-} t{-anC-}] + => + ((t{-any-} -> t{-any-}) -> t{-anA-}) -> t{-anC-} -> t{-anA-} +{-# L #-} +g{-r3A,x-} = + _/\_ t{-any-} t{-anA-} t{-anC-} -> \ x_r3j :: + (t{-any-} -> t{-any-}) -> t{-anA-} + {-# L #-} + x_r3j y_r3l :: + t{-anC-} + {-# L #-} + y_r3l -> + let { + ds_drT :: + t{-any-} -> t{-any-} + {-# L #-} + ds_drT = + \ x_r3r :: + t{-any-} + {-# L #-} + x_r3r -> + x_r3r + } in + (\ x_r3n :: + t{-any-} -> t{-any-} + {-# L #-} + x_r3n y_r3p :: + (t{-any-} -> t{-any-}) -> t{-anA-} + {-# L #-} + y_r3p -> + y_r3p + x_r3n) + ds_drT x_r3j +f{-r3B,x-} :: + _forall_ [t{-anM-}] => t{-anM-} -> t{-anM-} +{-# L #-} +f{-r3B,x-} = + _/\_ t{-anM-} -> \ x_r3f :: + t{-anM-} + {-# L #-} + x_r3f -> + (\ x_r3h :: + t{-anM-} + {-# L #-} + x_r3h -> + x_r3h) + x_r3f diff --git a/ghc/compiler/tests/deSugar/ds016.stderr b/ghc/compiler/tests/deSugar/ds016.stderr index 31f7e7d..7cddfe4 100644 --- a/ghc/compiler/tests/deSugar/ds016.stderr +++ b/ghc/compiler/tests/deSugar/ds016.stderr @@ -1,47 +1,202 @@ -Desugared: -Tests.f :: for all a, d, e. [a] -> d -> [e] -> [e] -Tests.f = - /\ a o86 t97 -> \ x.119 y.120 z.121 -> - let - ds.122 = - (++ a) x.119 ((++ a) x.119 ((++ a) x.119 ((++ a) x.119 x.119))) in - let - fail.123 = - (error [t97]) - "\"ds016.hs\", line 17: pattern-matching failed in case\n"S - in - case ds.122 of { - Nil -> Nil! t97 - (:) a.124 ds.125 -> - let - fail.128 = - let bs.126 = ds.125 in - let a.127 = a.124 in (error [t97]) "4"S - in - case ds.125 of { - Nil -> (error [t97]) "2"S - (:) b.129 ds.130 -> - case ds.130 of { - (:) c.131 ds.132 -> - case ds.132 of { - Nil -> - let a.133 = a.124 in - let - ds.134 = - MkTuple4! - o86 - [t97] - o86 - [t97] - y.120 - z.121 - y.120 - z.121 - in z.121 - _ -> fail.128 - } - _ -> fail.128 - } - } - } + +================================================================================ +Desugared: +Rec { +d.MonadPlus_aXs :: + {PrelBase.MonadPlus{-2a,p-} PrelBase.[]{-3j,p-}} +{-# L #-} +d.MonadPlus_aXs = + PrelBase.$d22{-rp7,p-} +++_aYK :: + _forall_ + [rjy{-aWo-}] + => + [rjy{-aWo-}] -> [rjy{-aWo-}] -> [rjy{-aWo-}] +{-# L #-} +++_aYK = + PrelBase.++{-roG,p-} + _@_ PrelBase.[]{-3j,p-} d.MonadPlus_aXs +f{-r3t,x-} :: + _forall_ + [rjy{-aWN-} t{-aWT-} t{-aXo-}] + => + [rjy{-aWN-}] -> t{-aXo-} -> [t{-aWT-}] -> [t{-aWT-}] +{-# L #-} +f{-r3t,x-} = + _/\_ rjy{-aWN-} t{-aWT-} t{-aXo-} -> + let { + ++_aYM :: + _forall_ + [rjy{-aWw-}] + => + [rjy{-aWw-}] -> [rjy{-aWw-}] -> [rjy{-aWw-}] + {-# L #-} + ++_aYM = + ++_aYK } in + let { + ++_aYL :: + _forall_ + [rjy{-aWD-}] + => + [rjy{-aWD-}] -> [rjy{-aWD-}] -> [rjy{-aWD-}] + {-# L #-} + ++_aYL = + ++_aYK } in + let { + ++_aYJ :: + _forall_ + [rjy{-aWK-}] + => + [rjy{-aWK-}] -> [rjy{-aWK-}] -> [rjy{-aWK-}] + {-# L #-} + ++_aYJ = + ++_aYK + } in + \ x_r3d :: + [rjy{-aWN-}] + {-# L #-} + x_r3d y_r3f :: + t{-aXo-} + {-# L #-} + y_r3f z_r3h :: + [t{-aWT-}] + {-# L #-} + z_r3h -> + let { ds_d13I :: + [rjy{-aWN-}] + {-# L #-} + ds_d13I = + let { ds_d131 :: + [rjy{-aWN-}] + {-# L #-} + ds_d131 = + let { ds_d13e :: + [rjy{-aWN-}] + {-# L #-} + ds_d13e = + let { + ds_d13r :: + [rjy{-aWN-}] + {-# L #-} + ds_d13r = + ++_aYJ + _@_ rjy{-aWN-} x_r3d x_r3d + } in + ++_aYL + _@_ rjy{-aWN-} x_r3d ds_d13r + } in + ++_aYM + _@_ rjy{-aWN-} x_r3d ds_d13e + } in + ++_aYK + _@_ rjy{-aWN-} x_r3d ds_d131 + } in + case ds_d13I of { + PrelBase.[]{-5i,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-aWT-}; + PrelBase.:{-55,p-}{i} a_r3k ds_d140 -> + let { fail_d14E :: + [t{-aWT-}] + {-# L #-} + fail_d14E = + let { + bs_r3s :: + [rjy{-aWN-}] + {-# L #-} + bs_r3s = + ds_d140 } in + let { + a_r3r :: + rjy{-aWN-} + {-# L #-} + a_r3r = + a_r3k } in + let { ds_d14d :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d14d = + let { + ds_d14q :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d14q = + PrelBase.C#{-54,p-}{i} + {'4'} } in + let { + ds_d14u :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d14u = + PrelBase.[]{-5i,p-}{i} + {_@_ PrelBase.Char{-38,p-}} + } in + PrelBase.:{-55,p-}{i} + {_@_ PrelBase.Char{-38,p-} ds_d14q ds_d14u} + } in + IOBase.error{-87,p-} + _@_ [t{-aWT-}] ds_d14d + } in + case ds_d140 of { + PrelBase.[]{-5i,p-}{i} -> + let { ds_d14S :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d14S = + let { + ds_d153 :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d153 = + PrelBase.C#{-54,p-}{i} + {'2'} } in + let { + ds_d157 :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d157 = + PrelBase.[]{-5i,p-}{i} + {_@_ PrelBase.Char{-38,p-}} + } in + PrelBase.:{-55,p-}{i} + {_@_ PrelBase.Char{-38,p-} ds_d153 ds_d157} + } in + IOBase.error{-87,p-} + _@_ [t{-aWT-}] ds_d14S; + PrelBase.:{-55,p-}{i} b_r3n ds_d15m -> + case ds_d15m of { + PrelBase.[]{-5i,p-}{i} -> + fail_d14E; + PrelBase.:{-55,p-}{i} c_r3o ds_d15z -> + case ds_d15z of { + PrelBase.:{-55,p-}{i} ds_d15H ds_d15G -> + fail_d14E; + PrelBase.[]{-5i,p-}{i} -> + let { + a_r3m :: + rjy{-aWN-} + {-# L #-} + a_r3m = + a_r3k } in + let { + ds_d15Q :: + (t{-aXo-}, [t{-aWT-}], t{-aXo-}, [t{-aWT-}]) + {-# L #-} + ds_d15Q = + PrelTup.(,,,){-64,p-}{i} + {_@_ t{-aXo-} + _@_ [t{-aWT-}] + _@_ t{-aXo-} + _@_ [t{-aWT-}] + y_r3f + z_r3h + y_r3f + z_r3h} + } in + z_r3h; + }; + }; + }; + } +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds017.stderr b/ghc/compiler/tests/deSugar/ds017.stderr index 5b5a8fc..bbeb820 100644 --- a/ghc/compiler/tests/deSugar/ds017.stderr +++ b/ghc/compiler/tests/deSugar/ds017.stderr @@ -1,10 +1,82 @@ -Desugared: -Tests.f :: for all d, e, f. f -> ((d, d) -> e) -> d -> (e, [f]) -Tests.f = - /\ o86 o96 t94 -> \ x.104 y.105 z.106 -> - let a.107 = (: t94) x.104 (Nil! t94) in - let b.108 = (: t94) x.104 a.107 in - let - c.110 = y.105 (let d.109 = MkTuple2! o86 o86 z.106 z.106 in d.109) in - let result.111 = MkTuple2! o96 [t94] c.110 b.108 in result.111 + +================================================================================ +Desugared: +f{-r3p,x-} :: + _forall_ + [t{-aBq-} t{-aBs-} t{-aBd-}] + => + t{-aBd-} + -> ((t{-aBq-}, t{-aBq-}) -> t{-aBs-}) + -> t{-aBq-} + -> (t{-aBs-}, [t{-aBd-}]) +{-# L #-} +f{-r3p,x-} = + _/\_ t{-aBq-} t{-aBs-} t{-aBd-} -> \ x_r3d :: + t{-aBd-} + {-# L #-} + x_r3d y_r3f :: + (t{-aBq-}, t{-aBq-}) -> t{-aBs-} + {-# L #-} + y_r3f z_r3h :: + t{-aBq-} + {-# L #-} + z_r3h -> + let { c_aAS :: + t{-aBs-} + {-# L #-} + c_aAS = + let { + ds_dEz :: + (t{-aBq-}, t{-aBq-}) + {-# L #-} + ds_dEz = + PrelTup.(,){-62,p-}{i} + {_@_ t{-aBq-} _@_ t{-aBq-} z_r3h z_r3h} + } in + y_r3f + ds_dEz + } in + let { + c_r3l :: + t{-aBs-} + {-# L #-} + c_r3l = + c_aAS } in + let { a_aB8 :: + [t{-aBd-}] + {-# L #-} + a_aB8 = + let { + ds_dF5 :: + [t{-aBd-}] + {-# L #-} + ds_dF5 = + PrelBase.[]{-5i,p-}{i} + _@_ t{-aBd-} + } in + PrelBase.:{-55,p-}{i} + _@_ t{-aBd-} x_r3d ds_dF5 + } in + let { + a_r3j :: + [t{-aBd-}] + {-# L #-} + a_r3j = + a_aB8 } in + let { + b_aBg :: + [t{-aBd-}] + {-# L #-} + b_aBg = + PrelBase.:{-55,p-}{i} + _@_ t{-aBd-} x_r3d a_r3j } in + let { + b_r3k :: + [t{-aBd-}] + {-# L #-} + b_r3k = + b_aBg + } in + PrelTup.(,){-62,p-}{i} + {_@_ t{-aBs-} _@_ [t{-aBd-}] c_r3l b_r3k} diff --git a/ghc/compiler/tests/deSugar/ds018.stderr b/ghc/compiler/tests/deSugar/ds018.stderr index 8f8863b..c74c3bd 100644 --- a/ghc/compiler/tests/deSugar/ds018.stderr +++ b/ghc/compiler/tests/deSugar/ds018.stderr @@ -1,911 +1,671 @@ +ds018.hs:41: + Warning: Possibly incomplete patterns + in the definition of function `fb' +ds018.hs:39: + Warning: Possibly incomplete patterns + in the definition of function `fa' + + +================================================================================ Desugared: -Tests.f :: for all d. d -> d -> d -> [d] -Tests.f = - /\ o175 -> \ x.282 y.283 z.284 -> - :! o175 - x.282 - (:! o175 - y.283 - (:! o175 - z.284 - (:! o175 x.282 (:! o175 y.283 (:! o175 z.284 (Nil! o175)))))) -Tests.f2 :: for all d, e, f. d -> e -> [f] -Tests.f2 = /\ o178 o179 t180 -> \ x.285 y.286 -> Nil! t180 -Tests.g1 :: for all d, e. d -> e -> () -Tests.g1 = /\ o183 o184 -> \ x.287 y.288 -> MkTuple0 -Tests.g :: - for all d, e, f. - d - -> e - -> f - -> (d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f, - d, - e, - f) -Tests.g = - /\ o187 o188 o189 -> \ x.289 y.290 z.291 -> - MkTuple150! - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - o187 - o188 - o189 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 - x.289 - y.290 - z.291 -Tests.fa :: for all d. [d] -> d -Tests.fa = - /\ t218 -> \ ds.320 -> - let - fail.321 = - (error t218) - "\"ds018.hs\", line 39: pattern-matching failure [function binding]\n"S - in - case ds.320 of { - (:) a.322 ds.323 -> - case ds.323 of { - (:) b.324 ds.325 -> - case ds.325 of { - (:) c.326 ds.327 -> - case ds.327 of { - (:) d.328 ds.329 -> - case ds.329 of { - (:) e.330 ds.331 -> - case ds.331 of { - (:) f.332 ds.333 -> - case ds.333 of { - (:) g.334 ds.335 -> - case ds.335 of { - (:) h.336 ds.337 -> - case ds.337 of { - (:) i.338 ds.339 -> - case ds.339 of { - (:) j.340 - ds.341 -> - case - ds.341 - of { - (:) k.342 - ds.343 -> - case - ds.343 - of { - (:) l.344 - ds.345 -> - case - ds.345 - of { - (:) m.346 - ds.347 -> +gb2_aCw :: + PrelBase.(){-40,p-} -> PrelBase.(){-40,p-} +{-# L #-} +gb2_aCw = + \ ds_d18I :: + PrelBase.(){-40,p-} + {-# L #-} + ds_d18I -> + case ds_d18I of { PrelBase.(){-60,p-}{i} -> + PrelBase.(){-60,p-}{i};} +gb2{-r50,x-} :: + PrelBase.(){-40,p-} -> PrelBase.(){-40,p-} +{-# L #-} +gb2{-r50,x-} = + gb2_aCw +gb{-r51,x-} :: + _forall_ [t{-aCG-}] => PrelBase.(){-40,p-} -> t{-aCG-} -> t{-aCG-} +{-# L #-} +gb{-r51,x-} = + _/\_ t{-aCG-} -> \ ds_d19f :: + PrelBase.(){-40,p-} + {-# L #-} + ds_d19f x_r4Z :: + t{-aCG-} + {-# L #-} + x_r4Z -> + case ds_d19f of { PrelBase.(){-60,p-}{i} -> x_r4Z;} +ga{-r52,x-} :: + _forall_ + [t{-aDB-} t{-aDE-} t{-aDH-} t{-aDK-} t{-aDN-} t{-aDQ-} t{-aDT-} t{-aDW-} t{-aDZ-} t{-aE2-} t{-aE5-} t{-aE8-} t{-aEb-} t{-aEe-} t{-aEh-} t{-aEk-} t{-aEn-} t{-aEq-} t{-aEt-} t{-aEw-} t{-aEz-} t{-aEC-} t{-aEF-} t{-aEI-} t{-aEL-} t{-aEO-} t{-aER-} t{-aEU-} t{-aEX-} t{-aF0-} t{-aF3-} t{-aF6-} t{-aF9-} t{-aFc-} t{-aFf-} t{-aFi-} t{-aFl-} t{-aFo-} t{-aFr-} t{-aFu-} t{-aFx-} t{-aFA-} t{-aFD-} t{-aFG-} t{-aFJ-} t{-aFM-} t{-aFP-} t{-aFS-} t{-aFV-} t{-aFY-} t{-aG1-} t{-aG4-}] + => + (t{-aDB-}, t{-aDE-}, t{-aDH-}, t{-aDK-}, t{-aDN-}, t{-aDQ-}, t{-aDT-}, t{-aDW-}, t{-aDZ-}, t{-aE2-}, t{-aE5-}, t{-aE8-}, t{-aEb-}, t{-aEe-}, t{-aEh-}, t{-aEk-}, t{-aEn-}, t{-aEq-}, t{-aEt-}, t{-aEw-}, t{-aEz-}, t{-aEC-}, t{-aEF-}, t{-aEI-}, t{-aEL-}, t{-aEO-}, t{-aER-}, t{-aEU-}, t{-aEX-}, t{-aF0-}, t{-aF3-}, t{-aF6-}, t{-aF9-}, t{-aFc-}, t{-aFf-}, t{-aFi-}, t{-aFl-}, t{-aFo-}, t{-aFr-}, t{-aFu-}, t{-aFx-}, t{-aFA-}, t{-aFD-}, t{-aFG-}, t{-aFJ-}, t{-aFM-}, t{-aFP-}, t{-aFS-}, t{-aFV-}, t{-aFY-}, t{-aG1-}, t{-aG4-}) + -> t{-aEI-} +{-# L #-} +ga{-r52,x-} = + _/\_ t{-aDB-} t{-aDE-} t{-aDH-} t{-aDK-} t{-aDN-} t{-aDQ-} t{-aDT-} t{-aDW-} t{-aDZ-} t{-aE2-} t{-aE5-} t{-aE8-} t{-aEb-} t{-aEe-} t{-aEh-} t{-aEk-} t{-aEn-} t{-aEq-} t{-aEt-} t{-aEw-} t{-aEz-} t{-aEC-} t{-aEF-} t{-aEI-} t{-aEL-} t{-aEO-} t{-aER-} t{-aEU-} t{-aEX-} t{-aF0-} t{-aF3-} t{-aF6-} t{-aF9-} t{-aFc-} t{-aFf-} t{-aFi-} t{-aFl-} t{-aFo-} t{-aFr-} t{-aFu-} t{-aFx-} t{-aFA-} t{-aFD-} t{-aFG-} t{-aFJ-} t{-aFM-} t{-aFP-} t{-aFS-} t{-aFV-} t{-aFY-} t{-aG1-} t{-aG4-} -> \ ds_d1ar :: + (t{-aDB-}, t{-aDE-}, t{-aDH-}, t{-aDK-}, t{-aDN-}, t{-aDQ-}, t{-aDT-}, t{-aDW-}, t{-aDZ-}, t{-aE2-}, t{-aE5-}, t{-aE8-}, t{-aEb-}, t{-aEe-}, t{-aEh-}, t{-aEk-}, t{-aEn-}, t{-aEq-}, t{-aEt-}, t{-aEw-}, t{-aEz-}, t{-aEC-}, t{-aEF-}, t{-aEI-}, t{-aEL-}, t{-aEO-}, t{-aER-}, t{-aEU-}, t{-aEX-}, t{-aF0-}, t{-aF3-}, t{-aF6-}, t{-aF9-}, t{-aFc-}, t{-aFf-}, t{-aFi-}, t{-aFl-}, t{-aFo-}, t{-aFr-}, t{-aFu-}, t{-aFx-}, t{-aFA-}, t{-aFD-}, t{-aFG-}, t{-aFJ-}, t{-aFM-}, t{-aFP-}, t{-aFS-}, t{-aFV-}, t{-aFY-}, t{-aG1-}, t{-aG4-}) + {-# L #-} + ds_d1ar -> + case + ds_d1ar + of { + PrelTup.(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,){-6Q,p-}{i} a_r47 b_r48 c_r49 d_r4a e_r4b f_r4c g_r4d h_r4e i_r4f j_r4g k_r4h l_r4i m_r4j n_r4k o_r4l p_r4m q_r4n r_r4o s_r4p t_r4q u_r4r v_r4s w_r4t x_r4u y_r4v z_r4w aa_r4x ab_r4y ac_r4z ad_r4A ae_r4B af_r4C ag_r4D ah_r4E ai_r4F aj_r4G ak_r4H al_r4I am_r4J an_r4K ao_r4L ap_r4M aq_r4N ar_r4O as_r4P at_r4Q au_r4R av_r4S aw_r4T ax_r4U ay_r4V az_r4W -> + x_r4u;} +fb{-r53,x-} :: + _forall_ [t{-aGc-} t{-aGe-}] => [t{-aGc-}] -> [t{-aGe-}] +{-# L #-} +fb{-r53,x-} = + _/\_ t{-aGc-} t{-aGe-} -> \ ds_d1aY :: + [t{-aGc-}] + {-# L #-} + ds_d1aY -> + let { + fail_d1aZ :: + [t{-aGe-}] + {-# L #-} + fail_d1aZ = + GHCerr.patError{-8r,p-} + _@_ [t{-aGe-}] _string_ "ds018.hs:41|function `fb'" + } in + case ds_d1aY of { + PrelBase.:{-55,p-}{i} ds_d1b7 ds_d1b6 -> + fail_d1aZ; + PrelBase.[]{-5i,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-aGe-}; + } +fa{-r54,x-} :: + _forall_ [t{-aGJ-}] => [t{-aGJ-}] -> t{-aGJ-} +{-# L #-} +fa{-r54,x-} = + _/\_ t{-aGJ-} -> \ ds_d1bF :: + [t{-aGJ-}] + {-# L #-} + ds_d1bF -> + let { + fail_d1bG :: + t{-aGJ-} + {-# L #-} + fail_d1bG = + GHCerr.patError{-8r,p-} + _@_ t{-aGJ-} _string_ "ds018.hs:39|function `fa'" + } in + case ds_d1bF of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} a_r3F ds_d1bT -> + case ds_d1bT of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} b_r3G ds_d1c6 -> + case ds_d1c6 of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} c_r3H ds_d1cj -> + case ds_d1cj of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} d_r3I ds_d1cw -> + case ds_d1cw of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} e_r3J ds_d1cJ -> + case ds_d1cJ of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} f_r3K ds_d1cW -> + case ds_d1cW of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} g_r3L ds_d1d9 -> + case ds_d1d9 of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} h_r3M ds_d1dm -> + case ds_d1dm of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} i_r3N ds_d1dz -> + case ds_d1dz of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} j_r3O ds_d1dM -> + case ds_d1dM of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} k_r3P ds_d1dZ -> + case ds_d1dZ of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} l_r3Q ds_d1ec -> + case ds_d1ec of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} m_r3R ds_d1ep -> case - ds.347 + ds_d1ep of { - (:) n.348 - ds.349 -> + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} n_r3S ds_d1eC -> case - ds.349 + ds_d1eC of { - (:) o.350 - ds.351 -> + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} o_r3T ds_d1eP -> case - ds.351 + ds_d1eP of { - (:) p.352 - ds.353 -> + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} p_r3U ds_d1f2 -> case - ds.353 + ds_d1f2 of { - (:) q.354 - ds.355 -> + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} q_r3V ds_d1ff -> case - ds.355 + ds_d1ff of { - (:) r.356 - ds.357 -> + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} r_r3W ds_d1fs -> case - ds.357 + ds_d1fs of { - (:) s.358 - ds.359 -> + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} s_r3X ds_d1fF -> case - ds.359 + ds_d1fF of { - (:) t.360 - ds.361 -> + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} t_r3Y ds_d1fS -> case - ds.361 + ds_d1fS of { - (:) u.362 - ds.363 -> + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} u_r3Z ds_d1g5 -> case - ds.363 + ds_d1g5 of { - (:) v.364 - ds.365 -> + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} v_r40 ds_d1gi -> case - ds.365 + ds_d1gi of { - (:) w.366 - ds.367 -> + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} w_r41 ds_d1gv -> case - ds.367 + ds_d1gv of { - (:) x.368 - ds.369 -> + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} x_r42 ds_d1gI -> case - ds.369 + ds_d1gI of { - (:) y.370 - ds.371 -> + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} y_r43 ds_d1gV -> case - ds.371 + ds_d1gV of { - (:) z.372 - ds.373 -> + PrelBase.[]{-5i,p-}{i} -> + fail_d1bG; + PrelBase.:{-55,p-}{i} z_r44 ds_d1h8 -> case - ds.373 + ds_d1h8 of { - Nil -> - x.368 - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> - fail.321 - } - _ -> fail.321 - } - _ -> fail.321 - } - _ -> fail.321 - } - _ -> fail.321 - } - _ -> fail.321 - } - _ -> fail.321 - } - _ -> fail.321 - } - _ -> fail.321 - } - _ -> fail.321 - } - _ -> fail.321 - } -Tests.fb :: for all d, e. [d] -> [e] -Tests.fb = - /\ t221 t222 -> \ ds.376 -> - let - fail.377 = - (error [t222]) - "\"ds018.hs\", line 41: pattern-matching failure [function binding]\n"S - in - case ds.376 of { - Nil -> Nil! t222 - _ -> fail.377 + PrelBase.:{-55,p-}{i} ds_d1hg ds_d1hf -> + fail_d1bG; + PrelBase.[]{-5i,p-}{i} -> + x_r42; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; } -Tests.ga :: - for all d, - e, - f, - g, - h, - i, - j, - k, - l, - m, - n, - o, - p, - q, - r, - s, - t, - u, - v, - w, - x, - y, - z0, - z1, - z2, - z3, - z4, - z5, - z6, - z7, - z8, - z9, - z10, - z11, - z12, - z13, - z14, - z15, - z16, - z17, - z18, - z19, - z20, - z21, - z22, - z23, - z24, - z25, - z26, - z27, - z28, - z29. - (d, - e, - f, - g, - h, - i, - j, - k, - l, - m, - n, - o, - p, - q, - r, - s, - t, - u, - v, - w, - x, - y, - z0, - z29, - z1, - z2, - z3, - z4, - z5, - z6, - z7, - z8, - z9, - z10, - z11, - z12, - z13, - z14, - z15, - z16, - z17, - z18, - z19, - z20, - z21, - z22, - z23, - z24, - z25, - z26, - z27, - z28) - -> z29 -Tests.ga = - /\ o225 - o226 - o227 - o228 - o229 - o230 - o231 - o232 - o233 - o234 - o235 - o236 - o237 - o238 - o239 - o240 - o241 - o242 - o243 - o244 - o245 - o246 - o247 - o249 - o250 - o251 - o252 - o253 - o254 - o255 - o256 - o257 - o258 - o259 - o260 - o261 - o262 - o263 - o264 - o265 - o266 - o267 - o268 - o269 - o270 - o271 - o272 - o273 - o274 - o275 - o276 - o248 -> \ ds.380 -> - let - fail.381 = - (error o248) - "\"ds018.hs\", line 45: pattern-matching failure [function binding]\n"S - in - case ds.380 of { - MkTuple52 a.382 - b.383 - c.384 - d.385 - e.386 - f.387 - g.388 - h.389 - i.390 - j.391 - k.392 - l.393 - m.394 - n.395 - o.396 - p.397 - q.398 - r.399 - s.400 - t.401 - u.402 - v.403 - w.404 - x.405 - y.406 - z.407 - aa.408 - ab.409 - ac.410 - ad.411 - ae.412 - af.413 - ag.414 - ah.415 - ai.416 - aj.417 - ak.418 - al.419 - am.420 - an.421 - ao.422 - ap.423 - aq.424 - ar.425 - as.426 - at.427 - au.428 - av.429 - aw.430 - ax.431 - ay.432 - az.433 -> x.405 - } -Tests.gb :: for all d. () -> d -> d -Tests.gb = - /\ o279 -> \ ds.436 x.437 -> - let - fail.438 = - (error o279) - "\"ds018.hs\", line 47: pattern-matching failure [function binding]\n"S - in - case ds.436 of { - MkTuple0 -> x.437 - } -Tests.gb2 :: () -> () -Tests.gb2 = - \ ds.441 -> - let - fail.442 = - (error ()) - "\"ds018.hs\", line 48: pattern-matching failure [function binding]\n"S - in - case ds.441 of { - MkTuple0 -> MkTuple0 - } - +g{-r55,x-} :: + _forall_ + [t{-aHm-} t{-aHo-} t{-aHq-}] + => + t{-aHm-} + -> t{-aHo-} + -> t{-aHq-} + -> (t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}, t{-aHm-}, t{-aHo-}, t{-aHq-}) +{-# L #-} +g{-r55,x-} = + _/\_ t{-aHm-} t{-aHo-} t{-aHq-} -> \ x_r3z :: + t{-aHm-} + {-# L #-} + x_r3z y_r3B :: + t{-aHo-} + {-# L #-} + y_r3B z_r3D :: + t{-aHq-} + {-# L #-} + z_r3D -> + PrelTup.(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,){-62q,p-}{i} + {_@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + _@_ t{-aHm-} + _@_ t{-aHo-} + _@_ t{-aHq-} + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D + x_r3z + y_r3B + z_r3D} +g1{-r56,x-} :: + _forall_ + [t{-aHA-} t{-aHC-}] + => + t{-aHA-} -> t{-aHC-} -> PrelBase.(){-40,p-} +{-# L #-} +g1{-r56,x-} = + _/\_ t{-aHA-} t{-aHC-} -> \ x_r3v :: + t{-aHA-} + {-# L #-} + x_r3v y_r3x :: + t{-aHC-} + {-# L #-} + y_r3x -> + PrelBase.(){-60,p-}{i} +f2{-r57,x-} :: + _forall_ + [t{-aHO-} t{-aHQ-} t{-aHM-}] + => + t{-aHO-} -> t{-aHQ-} -> [t{-aHM-}] +{-# L #-} +f2{-r57,x-} = + _/\_ t{-aHO-} t{-aHQ-} t{-aHM-} -> \ x_r3r :: + t{-aHO-} + {-# L #-} + x_r3r y_r3t :: + t{-aHQ-} + {-# L #-} + y_r3t -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-aHM-} +f{-r58,x-} :: + _forall_ + [t{-aI2-}] + => + t{-aI2-} -> t{-aI2-} -> t{-aI2-} -> [t{-aI2-}] +{-# L #-} +f{-r58,x-} = + _/\_ t{-aI2-} -> \ x_r3l :: + t{-aI2-} + {-# L #-} + x_r3l y_r3n :: + t{-aI2-} + {-# L #-} + y_r3n z_r3p :: + t{-aI2-} + {-# L #-} + z_r3p -> + let { ds_d1uJ :: + [t{-aI2-}] + {-# L #-} + ds_d1uJ = + let { ds_d1uV :: + [t{-aI2-}] + {-# L #-} + ds_d1uV = + let { ds_d1v7 :: + [t{-aI2-}] + {-# L #-} + ds_d1v7 = + let { ds_d1vj :: + [t{-aI2-}] + {-# L #-} + ds_d1vj = + let { ds_d1vv :: + [t{-aI2-}] + {-# L #-} + ds_d1vv = + let { + ds_d1vH :: + [t{-aI2-}] + {-# L #-} + ds_d1vH = + PrelBase.[]{-5i,p-}{i} + {_@_ t{-aI2-}} + } in + PrelBase.:{-55,p-}{i} + {_@_ t{-aI2-} z_r3p ds_d1vH} + } in + PrelBase.:{-55,p-}{i} + {_@_ t{-aI2-} y_r3n ds_d1vv} + } in + PrelBase.:{-55,p-}{i} + {_@_ t{-aI2-} x_r3l ds_d1vj} + } in + PrelBase.:{-55,p-}{i} + {_@_ t{-aI2-} z_r3p ds_d1v7} + } in + PrelBase.:{-55,p-}{i} + {_@_ t{-aI2-} y_r3n ds_d1uV} + } in + PrelBase.:{-55,p-}{i} + {_@_ t{-aI2-} x_r3l ds_d1uJ} diff --git a/ghc/compiler/tests/deSugar/ds019.stderr b/ghc/compiler/tests/deSugar/ds019.stderr index f0300f3..e064f37 100644 --- a/ghc/compiler/tests/deSugar/ds019.stderr +++ b/ghc/compiler/tests/deSugar/ds019.stderr @@ -1,34 +1,33 @@ -Desugared: -Test.f :: for all d, e, f, g, h, i, j. (d, e, f) -> (g, h) -> i -> [j] -Test.f = - /\ o105 o106 o107 o112 o113 o114 t115 -> \ ds.121 i.122 o.123 -> - let - fail.124 = - (error [t115]) - "\"ds019.hs\", line 8: pattern-matching failure [function binding]\n"S in - let - fail.140 = - let - fail.135 = - let - fail.129 = - case i.122 of { - MkTuple2 m.125 n.126 -> - let r.127 = o.123 in - let h.128 = ds.121 in Nil! t115 - } - in - case ds.121 of { - MkTuple3 e.130 f.131 g.132 -> - let q.133 = o.123 in let l.134 = i.122 in Nil! t115 - } - in - case i.122 of { - MkTuple2 j.136 k.137 -> - let p.138 = o.123 in let d.139 = ds.121 in Nil! t115 - } - in - case ds.121 of { - MkTuple3 a.141 b.142 c.143 -> Nil! t115 - } +ds019.hs:7: + Warning: Pattern match(es) completely overlapped + in the definition of function `f' +ds019.hs:8: + Warning: Pattern match(es) completely overlapped + in the definition of function `f' + +================================================================================ +Desugared: +f{-r3G,x-} :: + _forall_ + [t{-aBG-} t{-aBJ-} t{-aBM-} t{-aBY-} t{-aC1-} t{-aC9-} t{-aC7-}] + => + (t{-aBG-}, t{-aBJ-}, t{-aBM-}) + -> (t{-aBY-}, t{-aC1-}) + -> t{-aC9-} + -> [t{-aC7-}] +{-# L #-} +f{-r3G,x-} = + _/\_ t{-aBG-} t{-aBJ-} t{-aBM-} t{-aBY-} t{-aC1-} t{-aC9-} t{-aC7-} -> \ ds_dGA :: + (t{-aBG-}, t{-aBJ-}, t{-aBM-}) + {-# L #-} + ds_dGA i_r3h :: + (t{-aBY-}, t{-aC1-}) + {-# L #-} + i_r3h o_r3j :: + t{-aC9-} + {-# L #-} + o_r3j -> + case ds_dGA of { PrelTup.(,,){-63,p-}{i} a_r3d b_r3e c_r3f -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-aC7-};} diff --git a/ghc/compiler/tests/deSugar/ds020.stderr b/ghc/compiler/tests/deSugar/ds020.stderr index 5c0371c..fc6973c 100644 --- a/ghc/compiler/tests/deSugar/ds020.stderr +++ b/ghc/compiler/tests/deSugar/ds020.stderr @@ -1,464 +1,1969 @@ +ds020.hs:20: + Warning: Pattern match(es) completely overlapped + in the definition of function `f' +ds020.hs:16: + Warning: Pattern match(es) completely overlapped + in the definition of function `d' +ds020.hs:17: + Warning: Pattern match(es) completely overlapped + in the definition of function `d' +ds020.hs:9: + Warning: Pattern match(es) completely overlapped + in the definition of function `b' +ds020.hs:6: + Warning: Pattern match(es) completely overlapped + in the definition of function `a' + + +================================================================================ 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 +Rec { +d.Eq_a1aR :: + {PrelBase.Eq{-23,p-} PrelBase.Int{-3g,p-}} +{-# L #-} +d.Eq_a1aR = + PrelBase.$d7{-rqT,p-} +==_a1h7 :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Bool{-34,p-} +{-# L #-} +==_a1h7 = + PrelBase.=={-8Y,p-} + _@_ PrelBase.Int{-3g,p-} d.Eq_a1aR +d.Num_a1aV :: + {PrelBase.Num{-2c,p-} PrelBase.Int{-3g,p-}} +{-# L #-} +d.Num_a1aV = + PrelBase.$d3{-rqn,p-} +fromInt_a1h6 :: + PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-} +{-# L #-} +fromInt_a1h6 = + PrelBase.fromInt{-8R,p-} + _@_ PrelBase.Int{-3g,p-} d.Num_a1aV +lit_a1h5 :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a1h5 = + let { + ds_d1SI :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1SI = + PrelBase.I#{-5b,p-}{i} + 2 + } in + fromInt_a1h6 + ds_d1SI +fromInt_a1h4 :: + PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-} +{-# L #-} +fromInt_a1h4 = + fromInt_a1h6 +lit_a1h3 :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a1h3 = + let { + ds_d1SX :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1SX = + PrelBase.I#{-5b,p-}{i} + 4 + } in + fromInt_a1h4 + ds_d1SX +fromInt_a1h2 :: + PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-} +{-# L #-} +fromInt_a1h2 = + fromInt_a1h6 +lit_a1h1 :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a1h1 = + let { + ds_d1Tc :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1Tc = + PrelBase.I#{-5b,p-}{i} + 3 + } in + fromInt_a1h2 + ds_d1Tc +d.Ord_a1b0 :: + {PrelBase.Ord{-2d,p-} PrelBase.Int{-3g,p-}} +{-# L #-} +d.Ord_a1b0 = + PrelBase.$d6{-rqS,p-} +>_a1h0 :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Bool{-34,p-} +{-# L #-} +>_a1h0 = + PrelBase.>{-rs3,p-} + _@_ PrelBase.Int{-3g,p-} d.Ord_a1b0 +lit_a1gZ :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a1gZ = + lit_a1h1 +lit_a1gY :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a1gY = + lit_a1h3 +fromInt_a1gX :: + PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-} +{-# L #-} +fromInt_a1gX = + fromInt_a1h6 +lit_a1gW :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a1gW = + let { + ds_d1TC :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1TC = + PrelBase.I#{-5b,p-}{i} + 5 + } in + fromInt_a1gX + ds_d1TC +d.Ord_a1b4 :: + {PrelBase.Ord{-2d,p-} PrelBase.Int{-3g,p-}} +{-# L #-} +d.Ord_a1b4 = + d.Ord_a1b0 +<=_a1gV :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Bool{-34,p-} +{-# L #-} +<=_a1gV = + PrelBase.<={-rs2,p-} + _@_ PrelBase.Int{-3g,p-} d.Ord_a1b4 +lit_a1gU :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a1gU = + lit_a1h5 +lit_a1gT :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a1gT = + lit_a1h1 +==_a1gS :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Bool{-34,p-} +{-# L #-} +==_a1gS = + ==_a1h7 +lit_a1gR :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a1gR = + lit_a1h5 +lit_a1gQ :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a1gQ = + lit_a1h3 +lit_a1gP :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a1gP = + lit_a1h1 +==_a1hb :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Bool{-34,p-} +{-# L #-} +==_a1hb = + ==_a1gS +==_a1ha :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Bool{-34,p-} +{-# L #-} +==_a1ha = + ==_a1gS +lit_a1h9 :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a1h9 = + lit_a1gQ +lit_a1h8 :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a1h8 = + lit_a1gR +ds_d1Q9 :: + (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}) +{-# L #-} +ds_d1Q9 = + let { ds_d1Zt :: + (PrelBase.Char{-38,p-}, (PrelBase.Char{-38,p-}, (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}))) + {-# L #-} + ds_d1Zt = + let { + eq4_a12Q :: + PrelBase.Bool{-34,p-} + {-# L #-} + eq4_a12Q = + ==_a1ha + lit_a1h9 lit_a1h8 } in + let { + eq4_r4b :: + PrelBase.Bool{-34,p-} + {-# L #-} + eq4_r4b = + eq4_a12Q } in + let { + lit_a1Uy :: + PrelBase.Int{-3g,p-} + {-# L #-} + lit_a1Uy = + lit_a1gP } in + let { + eq3_a13e :: + PrelBase.Bool{-34,p-} + {-# L #-} + eq3_a13e = + ==_a1hb + lit_a1gP lit_a1Uy } in + let { + eq3_r4a :: + PrelBase.Bool{-34,p-} + {-# L #-} + eq3_r4a = + eq3_a13e } in + let { + eq2_a13A :: + PrelBase.Bool{-34,p-} + {-# L #-} + eq2_a13A = + ==_a1gS + lit_a1gR lit_a1gQ } in + let { + eq2_r49 :: + PrelBase.Bool{-34,p-} + {-# L #-} + eq2_r49 = + eq2_a13A + } in + case eq2_r49 of { + PrelBase.True{-5E,p-}{i} -> + let { + ds_d1Va :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1Va = + PrelBase.C#{-54,p-}{i} + {'a'} } in + let { ds_d1Ve :: + (PrelBase.Char{-38,p-}, (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})) + {-# L #-} + ds_d1Ve = + let { + ds_d1Vu :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1Vu = + PrelBase.C#{-54,p-}{i} + {'a'} } in + let { ds_d1Vy :: + (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}) + {-# L #-} + ds_d1Vy = + let { + ds_d1VO :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1VO = + PrelBase.C#{-54,p-}{i} + {'a'} } in + let { + ds_d1VS :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1VS = + PrelBase.C#{-54,p-}{i} + {'a'} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + ds_d1VO + ds_d1VS} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Char{-38,p-} + _@_ (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}) + ds_d1Vu + ds_d1Vy} } 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. -> -> 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. -> -> -> 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 + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Char{-38,p-} + _@_ (PrelBase.Char{-38,p-}, (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})) + ds_d1Va + ds_d1Ve}; + PrelBase.False{-58,p-}{i} -> + case eq3_r4a of { + PrelBase.True{-5E,p-}{i} -> + let { + ds_d1Wm :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1Wm = + PrelBase.C#{-54,p-}{i} + {'b'} } in + let { ds_d1Wq :: + (PrelBase.Char{-38,p-}, (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})) + {-# L #-} + ds_d1Wq = + let { + ds_d1WG :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1WG = + PrelBase.C#{-54,p-}{i} + {'b'} } in + let { ds_d1WK :: + (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}) + {-# L #-} + ds_d1WK = + let { + ds_d1X0 :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1X0 = + PrelBase.C#{-54,p-}{i} + {'b'} } in + let { + ds_d1X4 :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1X4 = + PrelBase.C#{-54,p-}{i} + {'b'} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + ds_d1X0 + ds_d1X4} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Char{-38,p-} + _@_ (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}) + ds_d1WG + ds_d1WK} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Char{-38,p-} + _@_ (PrelBase.Char{-38,p-}, (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})) + ds_d1Wm + ds_d1Wq}; + PrelBase.False{-58,p-}{i} -> + case eq4_r4b of { + PrelBase.True{-5E,p-}{i} -> + let { + ds_d1Xy :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1Xy = + PrelBase.C#{-54,p-}{i} + {'c'} } in + let { ds_d1XC :: + (PrelBase.Char{-38,p-}, (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})) + {-# L #-} + ds_d1XC = + let { + ds_d1XS :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1XS = + PrelBase.C#{-54,p-}{i} + {'c'} } in + let { ds_d1XW :: + (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}) + {-# L #-} + ds_d1XW = + let { + ds_d1Yc :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1Yc = + PrelBase.C#{-54,p-}{i} + {'c'} } in + let { + ds_d1Yg :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1Yg = + PrelBase.C#{-54,p-}{i} + {'c'} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + ds_d1Yc + ds_d1Yg} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Char{-38,p-} + _@_ (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}) + ds_d1XS + ds_d1XW} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Char{-38,p-} + _@_ (PrelBase.Char{-38,p-}, (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})) + ds_d1Xy + ds_d1XC}; + PrelBase.False{-58,p-}{i} -> + let { + ds_d1YC :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1YC = + PrelBase.C#{-54,p-}{i} + {'d'} } in + let { ds_d1YG :: + (PrelBase.Char{-38,p-}, (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})) + {-# L #-} + ds_d1YG = + let { + ds_d1YW :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1YW = + PrelBase.C#{-54,p-}{i} + {'d'} } in + let { ds_d1Z0 :: + (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}) + {-# L #-} + ds_d1Z0 = + let { + ds_d1Zg :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1Zg = + PrelBase.C#{-54,p-}{i} + {'d'} } in + let { + ds_d1Zk :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1Zk = + PrelBase.C#{-54,p-}{i} + {'d'} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + ds_d1Zg + ds_d1Zk} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Char{-38,p-} + _@_ (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-}) + ds_d1YW + ds_d1Z0} + } in + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Char{-38,p-} + _@_ (PrelBase.Char{-38,p-}, (PrelBase.Char{-38,p-}, PrelBase.Char{-38,p-})) + ds_d1YC + ds_d1YG}; + }; + }; } -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 + } in + case ds_d1Zt of { PrelTup.(,){-62,p-}{i} x4_a12r ds_d1ZC -> + case ds_d1ZC of { PrelTup.(,){-62,p-}{i} y4_a12s ds_d1ZL -> + case ds_d1ZL of { PrelTup.(,){-62,p-}{i} z4_a12t a4_a12u -> + PrelTup.(,,,){-64,p-}{i} + {_@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + _@_ PrelBase.Char{-38,p-} + x4_a12r + y4_a12s + z4_a12t + a4_a12u};};};} +x4_a12r :: + PrelBase.Char{-38,p-} +{-# L #-} +x4_a12r = + case + ds_d1Q9 + of { + PrelTup.(,,,){-64,p-}{i} x4_a12r y4_a12s z4_a12t a4_a12u -> + x4_a12r;} +y4_a12s :: + PrelBase.Char{-38,p-} +{-# L #-} +y4_a12s = + case + ds_d1Q9 + of { + PrelTup.(,,,){-64,p-}{i} x4_a12r y4_a12s z4_a12t a4_a12u -> + y4_a12s;} +z4_a12t :: + PrelBase.Char{-38,p-} +{-# L #-} +z4_a12t = + case + ds_d1Q9 + of { + PrelTup.(,,,){-64,p-}{i} x4_a12r y4_a12s z4_a12t a4_a12u -> + z4_a12t;} +a4_a12u :: + PrelBase.Char{-38,p-} +{-# L #-} +a4_a12u = + case + ds_d1Q9 + of { + PrelTup.(,,,){-64,p-}{i} x4_a12r y4_a12s z4_a12t a4_a12u -> + a4_a12u;} +x4{-r4f,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +x4{-r4f,x-} = + x4_a12r +y4{-r4e,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +y4{-r4e,x-} = + y4_a12s +z4{-r4d,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +z4{-r4d,x-} = + z4_a12t +a4{-r4c,x-} :: + PrelBase.Char{-38,p-} +{-# L #-} +a4{-r4c,x-} = + a4_a12u +lit_a1QK :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a1QK = + lit_a1gZ +ds_d1QP :: + (PrelBase.Int{-3g,p-}, PrelBase.Int{-3g,p-}) +{-# L #-} +ds_d1QP = + case + >_a1h0 + x3_a148 lit_a1gZ + of { + PrelBase.True{-5E,p-}{i} -> + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Int{-3g,p-} + _@_ PrelBase.Int{-3g,p-} + lit_a1gY + lit_a1gW}; + PrelBase.False{-58,p-}{i} -> + case + <=_a1gV + x3_a148 lit_a1QK + of { + PrelBase.True{-5E,p-}{i} -> + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Int{-3g,p-} + _@_ PrelBase.Int{-3g,p-} + lit_a1gU + lit_a1gT}; + PrelBase.False{-58,p-}{i} -> + GHCerr.nonExhaustiveGuardsError{-8l,p-} + _@_ (PrelBase.Int{-3g,p-}, PrelBase.Int{-3g,p-}) + _string_ "ds020.hs:42|"; + }; + } +x3_a148 :: + PrelBase.Int{-3g,p-} +{-# L #-} +x3_a148 = + case ds_d1QP of { PrelTup.(,){-62,p-}{i} x3_a148 y3_a149 -> + x3_a148;} +y3_a149 :: + PrelBase.Int{-3g,p-} +{-# L #-} +y3_a149 = + case ds_d1QP of { PrelTup.(,){-62,p-}{i} x3_a148 y3_a149 -> + y3_a149;} +x3{-r4h,x-} :: + PrelBase.Int{-3g,p-} +{-# L #-} +x3{-r4h,x-} = + x3_a148 +y3{-r4g,x-} :: + PrelBase.Int{-3g,p-} +{-# L #-} +y3{-r4g,x-} = + y3_a149 +ds_d1Ra :: + _forall_ [t{-a16h-}] => (t{-a16h-}, t{-a16h-}, [t{-a16h-}]) +{-# L #-} +ds_d1Ra = + _/\_ t{-a16h-} -> + _letrec_ { + ==_a1mv :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1mv = + ==_a1h7; + ==_a1mu :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1mu = + ==_a1h7; + lit_a1mt :: + PrelBase.Int{-3g,p-} + {-# L #-} + lit_a1mt = + lit_a1h3; + lit_a1ms :: + PrelBase.Int{-3g,p-} + {-# L #-} + lit_a1ms = + lit_a1h5; + ds_d22I :: + (t{-a16h-}, t{-a16h-}, [t{-a16h-}]) + {-# L #-} + ds_d22I = + let { ds_d257 :: + [t{-a16h-}] + {-# L #-} + ds_d257 = + let { + eq4_a158 :: + PrelBase.Bool{-34,p-} + {-# L #-} + eq4_a158 = + ==_a1mu + lit_a1mt lit_a1ms } in + let { + eq4_r41 :: + PrelBase.Bool{-34,p-} + {-# L #-} + eq4_r41 = + eq4_a158 } in + let { + lit_a23v :: + PrelBase.Int{-3g,p-} + {-# L #-} + lit_a23v = + lit_a1h1 } in + let { + eq3_a15w :: + PrelBase.Bool{-34,p-} + {-# L #-} + eq3_a15w = + ==_a1mv + lit_a1h1 lit_a23v } in + let { + eq3_r40 :: + PrelBase.Bool{-34,p-} + {-# L #-} + eq3_r40 = + eq3_a15w } in + let { + eq2_a15S :: + PrelBase.Bool{-34,p-} + {-# L #-} + eq2_a15S = + ==_a1h7 + lit_a1h5 lit_a1h3 } in + let { + eq2_r3Z :: + PrelBase.Bool{-34,p-} + {-# L #-} + eq2_r3Z = + eq2_a15S + } in + case eq2_r3Z of { + PrelBase.True{-5E,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-a16h-}; + PrelBase.False{-58,p-}{i} -> + case eq3_r40 of { + PrelBase.True{-5E,p-}{i} -> + let { + ds_d24m :: + [t{-a16h-}] + {-# L #-} + ds_d24m = + PrelBase.[]{-5i,p-}{i} + {_@_ t{-a16h-}} + } in + PrelBase.:{-55,p-}{i} + {_@_ t{-a16h-} x2_a14U ds_d24m}; + PrelBase.False{-58,p-}{i} -> + case eq4_r41 of { + PrelBase.True{-5E,p-}{i} -> + let { + ds_d24M :: + [t{-a16h-}] + {-# L #-} + ds_d24M = + PrelBase.[]{-5i,p-}{i} + {_@_ t{-a16h-}} + } in + PrelBase.:{-55,p-}{i} + {_@_ t{-a16h-} x2_a14U ds_d24M}; + PrelBase.False{-58,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-a16h-}; + }; + }; + } + } in + let { + fail_d258 :: + (t{-a16h-}, t{-a16h-}, [t{-a16h-}]) + {-# L #-} + fail_d258 = + GHCerr.irrefutPatError{-8g,p-} + _@_ (t{-a16h-}, t{-a16h-}, [t{-a16h-}]) + _string_ "ds020.hs:39|(x2 PrelBase.: (xs2 PrelBase.: ys2))" + } in + case ds_d257 of { + PrelBase.[]{-5i,p-}{i} -> + fail_d258; + PrelBase.:{-55,p-}{i} x2_a14U ds_d25l -> + case ds_d25l of { + PrelBase.[]{-5i,p-}{i} -> + fail_d258; + PrelBase.:{-55,p-}{i} xs2_a14V ys2_a14W -> + PrelTup.(,,){-63,p-}{i} + {_@_ t{-a16h-} + _@_ t{-a16h-} + _@_ [t{-a16h-}] + x2_a14U + xs2_a14V + ys2_a14W}; + }; + }; + x2_a14U :: + t{-a16h-} + {-# L #-} + x2_a14U = + case + ds_d22I + of { + PrelTup.(,,){-63,p-}{i} x2_a14U xs2_a14V ys2_a14W -> + x2_a14U;}; + xs2_a14V :: + t{-a16h-} + {-# L #-} + xs2_a14V = + case + ds_d22I + of { + PrelTup.(,,){-63,p-}{i} x2_a14U xs2_a14V ys2_a14W -> + xs2_a14V;}; + ys2_a14W :: + [t{-a16h-}] + {-# L #-} + ys2_a14W = + case + ds_d22I + of { + PrelTup.(,,){-63,p-}{i} x2_a14U xs2_a14V ys2_a14W -> + ys2_a14W;}; + } in + PrelTup.(,,){-63,p-}{i} + {_@_ t{-a16h-} + _@_ t{-a16h-} + _@_ [t{-a16h-}] + x2_a14U + xs2_a14V + ys2_a14W} +x2{-r4k,x-} :: + _forall_ [t{-a16h-}] => t{-a16h-} +{-# L #-} +x2{-r4k,x-} = + _/\_ t{-a16h-} -> + case + ds_d1Ra + _@_ t{-a16h-} + of { + PrelTup.(,,){-63,p-}{i} ds_d26G ds_d26I ds_d26H -> + ds_d26G;} +xs2{-r4j,x-} :: + _forall_ [t{-a16h-}] => t{-a16h-} +{-# L #-} +xs2{-r4j,x-} = + _/\_ t{-a16h-} -> + case + ds_d1Ra + _@_ t{-a16h-} + of { + PrelTup.(,,){-63,p-}{i} ds_d26Z ds_d26X ds_d26Y -> + ds_d26X;} +ys2{-r4i,x-} :: + _forall_ [t{-a16h-}] => [t{-a16h-}] +{-# L #-} +ys2{-r4i,x-} = + _/\_ t{-a16h-} -> + case + ds_d1Ra + _@_ t{-a16h-} + of { + PrelTup.(,,){-63,p-}{i} ds_d27g ds_d27f ds_d27e -> + ds_d27e;} +ds_d1Rr :: + _forall_ [t{-a16I-}] => (t{-a16I-}, t{-a16I-}, [t{-a16I-}]) +{-# L #-} +ds_d1Rr = + _/\_ t{-a16I-} -> + let { ds_d28P :: + (t{-a16I-}, t{-a16I-}, [t{-a16I-}]) + {-# L #-} + ds_d28P = + let { + ds_d27Z :: + [t{-a16I-}] + {-# L #-} + ds_d27Z = + PrelBase.[]{-5i,p-}{i} + _@_ t{-a16I-} } in + let { + fail_d280 :: + (t{-a16I-}, t{-a16I-}, [t{-a16I-}]) + {-# L #-} + fail_d280 = + GHCerr.irrefutPatError{-8g,p-} + _@_ (t{-a16I-}, t{-a16I-}, [t{-a16I-}]) + _string_ "ds020.hs:30|(~x PrelBase.: (~xs PrelBase.: ~ys))" + } in + case ds_d27Z of { + PrelBase.[]{-5i,p-}{i} -> + fail_d280; + PrelBase.:{-55,p-}{i} x_a16u ds_d28d -> + case ds_d28d of { + PrelBase.[]{-5i,p-}{i} -> + fail_d280; + PrelBase.:{-55,p-}{i} xs_a16v ys_a16w -> + let { + ys_a16w :: + [t{-a16I-}] + {-# L #-} + ys_a16w = + ys_a16w } in + let { + xs_a16v :: + t{-a16I-} + {-# L #-} + xs_a16v = + xs_a16v } in + let { + x_a16u :: + t{-a16I-} + {-# L #-} + x_a16u = + x_a16u + } in + PrelTup.(,,){-63,p-}{i} + {_@_ t{-a16I-} + _@_ t{-a16I-} + _@_ [t{-a16I-}] + x_a16u + xs_a16v + ys_a16w}; + }; + } + } in + let { + x_a16u :: + t{-a16I-} + {-# L #-} + x_a16u = + case + ds_d28P + of { + PrelTup.(,,){-63,p-}{i} x_a16u xs_a16v ys_a16w -> + x_a16u;} } in + let { + xs_a16v :: + t{-a16I-} + {-# L #-} + xs_a16v = + case + ds_d28P + of { + PrelTup.(,,){-63,p-}{i} x_a16u xs_a16v ys_a16w -> + xs_a16v;} } in + let { + ys_a16w :: + [t{-a16I-}] + {-# L #-} + ys_a16w = + case + ds_d28P + of { + PrelTup.(,,){-63,p-}{i} x_a16u xs_a16v ys_a16w -> + ys_a16w;} + } in + PrelTup.(,,){-63,p-}{i} + {_@_ t{-a16I-} + _@_ t{-a16I-} + _@_ [t{-a16I-}] + x_a16u + xs_a16v + ys_a16w} +x{-r4n,x-} :: + _forall_ [t{-a16I-}] => t{-a16I-} +{-# L #-} +x{-r4n,x-} = + _/\_ t{-a16I-} -> + case + ds_d1Rr + _@_ t{-a16I-} + of { + PrelTup.(,,){-63,p-}{i} ds_d29s ds_d29u ds_d29t -> + ds_d29s;} +xs{-r4m,x-} :: + _forall_ [t{-a16I-}] => t{-a16I-} +{-# L #-} +xs{-r4m,x-} = + _/\_ t{-a16I-} -> + case + ds_d1Rr + _@_ t{-a16I-} + of { + PrelTup.(,,){-63,p-}{i} ds_d29L ds_d29J ds_d29K -> + ds_d29J;} +ys{-r4l,x-} :: + _forall_ [t{-a16I-}] => [t{-a16I-}] +{-# L #-} +ys{-r4l,x-} = + _/\_ t{-a16I-} -> + case + ds_d1Rr + _@_ t{-a16I-} + of { + PrelTup.(,,){-63,p-}{i} ds_d2a2 ds_d2a1 ds_d2a0 -> + ds_d2a0;} +ds_d1RI :: + _forall_ [t{-a16Y-}] => (t{-a16Y-}, t{-a16Y-}, [t{-a16Y-}]) +{-# L #-} +ds_d1RI = + _/\_ t{-a16Y-} -> + let { ds_d2bs :: + (t{-a16Y-}, t{-a16Y-}, [t{-a16Y-}]) + {-# L #-} + ds_d2bs = + let { + ds_d2aL :: + [t{-a16Y-}] + {-# L #-} + ds_d2aL = + PrelBase.[]{-5i,p-}{i} + _@_ t{-a16Y-} } in + let { + fail_d2aM :: + (t{-a16Y-}, t{-a16Y-}, [t{-a16Y-}]) + {-# L #-} + fail_d2aM = + GHCerr.irrefutPatError{-8g,p-} + _@_ (t{-a16Y-}, t{-a16Y-}, [t{-a16Y-}]) + _string_ "ds020.hs:29|(x1 PrelBase.: (xs1 PrelBase.: ys1))" + } in + case ds_d2aL of { + PrelBase.[]{-5i,p-}{i} -> + fail_d2aM; + PrelBase.:{-55,p-}{i} x1_a16K ds_d2aZ -> + case ds_d2aZ of { + PrelBase.[]{-5i,p-}{i} -> + fail_d2aM; + PrelBase.:{-55,p-}{i} xs1_a16L ys1_a16M -> + PrelTup.(,,){-63,p-}{i} + {_@_ t{-a16Y-} + _@_ t{-a16Y-} + _@_ [t{-a16Y-}] + x1_a16K + xs1_a16L + ys1_a16M}; + }; + } + } in + let { + x1_a16K :: + t{-a16Y-} + {-# L #-} + x1_a16K = + case + ds_d2bs + of { + PrelTup.(,,){-63,p-}{i} x1_a16K xs1_a16L ys1_a16M -> + x1_a16K;} } in + let { + xs1_a16L :: + t{-a16Y-} + {-# L #-} + xs1_a16L = + case + ds_d2bs + of { + PrelTup.(,,){-63,p-}{i} x1_a16K xs1_a16L ys1_a16M -> + xs1_a16L;} } in + let { + ys1_a16M :: + [t{-a16Y-}] + {-# L #-} + ys1_a16M = + case + ds_d2bs + of { + PrelTup.(,,){-63,p-}{i} x1_a16K xs1_a16L ys1_a16M -> + ys1_a16M;} + } in + PrelTup.(,,){-63,p-}{i} + {_@_ t{-a16Y-} + _@_ t{-a16Y-} + _@_ [t{-a16Y-}] + x1_a16K + xs1_a16L + ys1_a16M} +x1{-r4q,x-} :: + _forall_ [t{-a16Y-}] => t{-a16Y-} +{-# L #-} +x1{-r4q,x-} = + _/\_ t{-a16Y-} -> + case + ds_d1RI + _@_ t{-a16Y-} + of { + PrelTup.(,,){-63,p-}{i} ds_d2c5 ds_d2c7 ds_d2c6 -> + ds_d2c5;} +xs1{-r4p,x-} :: + _forall_ [t{-a16Y-}] => t{-a16Y-} +{-# L #-} +xs1{-r4p,x-} = + _/\_ t{-a16Y-} -> + case + ds_d1RI + _@_ t{-a16Y-} + of { + PrelTup.(,,){-63,p-}{i} ds_d2co ds_d2cm ds_d2cn -> + ds_d2cm;} +ys1{-r4o,x-} :: + _forall_ [t{-a16Y-}] => [t{-a16Y-}] +{-# L #-} +ys1{-r4o,x-} = + _/\_ t{-a16Y-} -> + case + ds_d1RI + _@_ t{-a16Y-} + of { + PrelTup.(,,){-63,p-}{i} ds_d2cF ds_d2cE ds_d2cD -> + ds_d2cD;} +ds_d1RZ :: + PrelBase.(){-40,p-} +{-# L #-} +ds_d1RZ = + let { ds_d2dp :: + ([GHC.Void{-3T,p-}], [GHC.Void{-3T,p-}], [GHC.Void{-3T,p-}]) + {-# L #-} + ds_d2dp = + let { + ds_d2cZ :: + [GHC.Void{-3T,p-}] + {-# L #-} + ds_d2cZ = + PrelBase.[]{-5i,p-}{i} + _@_ GHC.Void{-3T,p-} } in + let { + ds_d2d3 :: + [GHC.Void{-3T,p-}] + {-# L #-} + ds_d2d3 = + PrelBase.[]{-5i,p-}{i} + _@_ GHC.Void{-3T,p-} } in + let { + ds_d2d7 :: + [GHC.Void{-3T,p-}] + {-# L #-} + ds_d2d7 = + PrelBase.[]{-5i,p-}{i} + _@_ GHC.Void{-3T,p-} + } in + PrelTup.(,,){-63,p-}{i} + {_@_ [GHC.Void{-3T,p-}] + _@_ [GHC.Void{-3T,p-}] + _@_ [GHC.Void{-3T,p-}] + ds_d2cZ + ds_d2d3 + ds_d2d7} + } in + case + ds_d2dp + of { + PrelTup.(,,){-63,p-}{i} ds_d2dQ ds_d2dP ds_d2dO -> + let { ds_d2eg :: + PrelBase.(){-40,p-} + {-# L #-} + ds_d2eg = + let { + fail_d2dR :: + PrelBase.(){-40,p-} + {-# L #-} + fail_d2dR = + GHCerr.irrefutPatError{-8g,p-} + _@_ PrelBase.(){-40,p-} _string_ "ds020.hs:27|PrelBase.[]" + } in + case ds_d2dO of { + PrelBase.:{-55,p-}{i} ds_d2dZ ds_d2dY -> + fail_d2dR; + PrelBase.[]{-5i,p-}{i} -> + PrelBase.(){-60,p-}{i} + {}; } -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 + } in + let { ds_d2eG :: + PrelBase.(){-40,p-} + {-# L #-} + ds_d2eG = + let { + fail_d2eh :: + PrelBase.(){-40,p-} + {-# L #-} + fail_d2eh = + GHCerr.irrefutPatError{-8g,p-} + _@_ PrelBase.(){-40,p-} _string_ "ds020.hs:27|PrelBase.[]" + } in + case ds_d2dP of { + PrelBase.:{-55,p-}{i} ds_d2ep ds_d2eo -> + fail_d2eh; + PrelBase.[]{-5i,p-}{i} -> + PrelBase.(){-60,p-}{i} + {}; } -{- 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 + } in + let { ds_d2uC :: + PrelBase.(){-40,p-} + {-# L #-} + ds_d2uC = + let { + fail_d2eH :: + PrelBase.(){-40,p-} + {-# L #-} + fail_d2eH = + GHCerr.irrefutPatError{-8g,p-} + _@_ PrelBase.(){-40,p-} _string_ "ds020.hs:27|PrelBase.[]" + } in + case ds_d2dQ of { + PrelBase.:{-55,p-}{i} ds_d2eP ds_d2eO -> + fail_d2eH; + PrelBase.[]{-5i,p-}{i} -> + PrelBase.(){-60,p-}{i} + {}; } -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 + } in + PrelBase.(){-60,p-}{i} + {};} +ds_d1S4 :: + PrelBase.(){-40,p-} +{-# L #-} +ds_d1S4 = + let { ds_d2fM :: + ([GHC.Void{-3T,p-}], [GHC.Void{-3T,p-}], [GHC.Void{-3T,p-}]) + {-# L #-} + ds_d2fM = + let { + ds_d2ff :: + [GHC.Void{-3T,p-}] + {-# L #-} + ds_d2ff = + PrelBase.[]{-5i,p-}{i} + _@_ GHC.Void{-3T,p-} } in + let { + ds_d2fj :: + [GHC.Void{-3T,p-}] + {-# L #-} + ds_d2fj = + PrelBase.[]{-5i,p-}{i} + _@_ GHC.Void{-3T,p-} } in + let { + ds_d2fn :: + [GHC.Void{-3T,p-}] + {-# L #-} + ds_d2fn = + PrelBase.[]{-5i,p-}{i} + _@_ GHC.Void{-3T,p-} + } in + PrelTup.(,,){-63,p-}{i} + {_@_ [GHC.Void{-3T,p-}] + _@_ [GHC.Void{-3T,p-}] + _@_ [GHC.Void{-3T,p-}] + ds_d2ff + ds_d2fj + ds_d2fn} + } in + let { + fail_d2fN :: + PrelBase.(){-40,p-} + {-# L #-} + fail_d2fN = + GHCerr.irrefutPatError{-8g,p-} + _@_ PrelBase.(){-40,p-} + _string_ "ds020.hs:26|(PrelBase.[], PrelBase.[], PrelBase.[])" + } in + case + ds_d2fM + of { + PrelTup.(,,){-63,p-}{i} ds_d2fW ds_d2fY ds_d2fX -> + case ds_d2fW of { + PrelBase.:{-55,p-}{i} ds_d2g6 ds_d2g5 -> + fail_d2fN; + PrelBase.[]{-5i,p-}{i} -> + case ds_d2fY of { + PrelBase.:{-55,p-}{i} ds_d2gk ds_d2gj -> + fail_d2fN; + PrelBase.[]{-5i,p-}{i} -> + case ds_d2fX of { + PrelBase.:{-55,p-}{i} ds_d2gy ds_d2gx -> + fail_d2fN; + PrelBase.[]{-5i,p-}{i} -> + PrelBase.(){-60,p-}{i} + {}; + }; + }; + };} +g{-r4r,x-} :: + _forall_ [t{-a17G-} t{-a17I-}] => [t{-a17G-}] -> [t{-a17I-}] +{-# L #-} +g{-r4r,x-} = + _/\_ t{-a17G-} t{-a17I-} -> \ ds_d2ha :: + [t{-a17G-}] + {-# L #-} + ds_d2ha -> + let { ds_d2uD :: + PrelBase.(){-40,p-} + {-# L #-} + ds_d2uD = + let { ds_d2uE :: + PrelBase.(){-40,p-} + {-# L #-} + ds_d2uE = + let { ds_d2uF :: + PrelBase.(){-40,p-} + {-# L #-} + ds_d2uF = + let { ds_d2uG :: + PrelBase.(){-40,p-} + {-# L #-} + ds_d2uG = + let { + fail_d2hb :: + PrelBase.(){-40,p-} + {-# L #-} + fail_d2hb = + GHCerr.irrefutPatError{-8g,p-} + _@_ PrelBase.(){-40,p-} _string_ "ds020.hs:22|PrelBase.[]" + } in + case ds_d2ha of { + PrelBase.:{-55,p-}{i} ds_d2hj ds_d2hi -> + fail_d2hb; + PrelBase.[]{-5i,p-}{i} -> + PrelBase.(){-60,p-}{i} + {}; + } + } in + PrelBase.(){-60,p-}{i} + {} + } in + PrelBase.(){-60,p-}{i} + {} + } in + PrelBase.(){-60,p-}{i} + {} + } in + PrelBase.[]{-5i,p-}{i} + _@_ t{-a17I-} +f{-r4s,x-} :: + _forall_ [t{-a17W-} t{-a17Y-}] => [t{-a17W-}] -> [t{-a17Y-}] +{-# L #-} +f{-r4s,x-} = + _/\_ t{-a17W-} t{-a17Y-} -> \ x_r3U :: + [t{-a17W-}] + {-# L #-} + x_r3U -> + let { x_r3U :: + [t{-a17W-}] + {-# L #-} + x_r3U = + let { + fail_d2hN :: + [t{-a17W-}] + {-# L #-} + fail_d2hN = + GHCerr.irrefutPatError{-8g,p-} + _@_ [t{-a17W-}] _string_ "ds020.hs:19|(x@PrelBase.[])" + } in + case x_r3U of { + PrelBase.:{-55,p-}{i} ds_d2hV ds_d2hU -> + fail_d2hN; + PrelBase.[]{-5i,p-}{i} -> + x_r3U; + } + } in + PrelBase.[]{-5i,p-}{i} + _@_ t{-a17Y-} +d{-r4t,x-} :: + _forall_ + [t{-a18b-} t{-a18D-}] + => + {PrelBase.Num{-2c,p-} t{-a18b-}} + -> {PrelBase.Num{-2c,p-} t{-a18D-}} + -> {PrelBase.Ord{-2d,p-} t{-a18b-}} + -> t{-a18b-} + -> t{-a18D-} +{-# L #-} +d{-r4t,x-} = + _/\_ t{-a18b-} t{-a18D-} -> \ d.Num_a18H :: + {PrelBase.Num{-2c,p-} t{-a18b-}} + {-# L #-} + d.Num_a18H d.Num_a18M :: + {PrelBase.Num{-2c,p-} t{-a18D-}} + {-# L #-} + d.Num_a18M d.Ord_a18R :: + {PrelBase.Ord{-2d,p-} t{-a18b-}} + {-# L #-} + d.Ord_a18R -> + let { + d.Eq_a18J :: + {PrelBase.Eq{-23,p-} t{-a18b-}} + {-# L #-} + d.Eq_a18J = + PrelBase.scsel_OrdPrelBaseEq{-a2jI,p-} + _@_ t{-a18b-} d.Ord_a18R } in + let { + fromInt_a2jy :: + PrelBase.Int{-3g,p-} -> t{-a18b-} + {-# L #-} + fromInt_a2jy = + PrelBase.fromInt{-8R,p-} + _@_ t{-a18b-} d.Num_a18H } in + let { lit_a2jx :: + t{-a18b-} + {-# L #-} + lit_a2jx = + let { + ds_d2jX :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d2jX = + PrelBase.I#{-5b,p-}{i} + 11 + } in + fromInt_a2jy + ds_d2jX + } in + let { + ==_a2jw :: + t{-a18b-} -> t{-a18b-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a2jw = + PrelBase.=={-8Y,p-} + _@_ t{-a18b-} d.Eq_a18J } in + let { + fromInt_a2jv :: + PrelBase.Int{-3g,p-} -> t{-a18D-} + {-# L #-} + fromInt_a2jv = + PrelBase.fromInt{-8R,p-} + _@_ t{-a18D-} d.Num_a18M } in + let { lit_a2ju :: + t{-a18D-} + {-# L #-} + lit_a2ju = + let { + ds_d2kr :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d2kr = + PrelBase.I#{-5b,p-}{i} + 4 + } in + fromInt_a2jv + ds_d2kr + } in + let { + fromInt_a2jt :: + PrelBase.Int{-3g,p-} -> t{-a18b-} + {-# L #-} + fromInt_a2jt = + fromInt_a2jy } in + let { lit_a2js :: + t{-a18b-} + {-# L #-} + lit_a2js = + let { + ds_d2kG :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d2kG = + PrelBase.I#{-5b,p-}{i} + 12 + } in + fromInt_a2jt + ds_d2kG + } in + let { + ==_a2jr :: + t{-a18b-} -> t{-a18b-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a2jr = + ==_a2jw } in + let { + fromInt_a2jq :: + PrelBase.Int{-3g,p-} -> t{-a18D-} + {-# L #-} + fromInt_a2jq = + fromInt_a2jv } in + let { lit_a2jp :: + t{-a18D-} + {-# L #-} + lit_a2jp = + let { + ds_d2kW :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d2kW = + PrelBase.I#{-5b,p-}{i} + 3 + } in + fromInt_a2jq + ds_d2kW + } in + let { + fromInt_a2jo :: + PrelBase.Int{-3g,p-} -> t{-a18b-} + {-# L #-} + fromInt_a2jo = + fromInt_a2jy } in + let { lit_a2jn :: + t{-a18b-} + {-# L #-} + lit_a2jn = + let { + ds_d2lb :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d2lb = + PrelBase.I#{-5b,p-}{i} + 4 + } in + fromInt_a2jo + ds_d2lb + } in + let { + >=_a2jm :: + t{-a18b-} -> t{-a18b-} -> PrelBase.Bool{-34,p-} + {-# L #-} + >=_a2jm = + PrelBase.>={-8Z,p-} + _@_ t{-a18b-} d.Ord_a18R } in + let { + d.Num_a18T :: + {PrelBase.Num{-2c,p-} t{-a18b-}} + {-# L #-} + d.Num_a18T = + d.Num_a18H } in + let { + -_a2jl :: + t{-a18b-} -> t{-a18b-} -> t{-a18b-} + {-# L #-} + -_a2jl = + PrelBase.-{-817,p-} + _@_ t{-a18b-} d.Num_a18T } in + let { + fromInt_a2jk :: + PrelBase.Int{-3g,p-} -> t{-a18D-} + {-# L #-} + fromInt_a2jk = + fromInt_a2jv } in + let { lit_a2jj :: + t{-a18D-} + {-# L #-} + lit_a2jj = + let { + ds_d2lH :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d2lH = + PrelBase.I#{-5b,p-}{i} + 2 + } in + fromInt_a2jk + ds_d2lH + } in + let { + fromInt_a2ji :: + PrelBase.Int{-3g,p-} -> t{-a18b-} + {-# L #-} + fromInt_a2ji = + fromInt_a2jy } in + let { lit_a2jh :: + t{-a18b-} + {-# L #-} + lit_a2jh = + let { + ds_d2lW :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d2lW = + PrelBase.I#{-5b,p-}{i} + 43 + } in + fromInt_a2ji + ds_d2lW + } in + let { + >=_a2jg :: + t{-a18b-} -> t{-a18b-} -> PrelBase.Bool{-34,p-} + {-# L #-} + >=_a2jg = + >=_a2jm } in + let { + -_a2jf :: + t{-a18b-} -> t{-a18b-} -> t{-a18b-} + {-# L #-} + -_a2jf = + -_a2jl } in + let { + fromInt_a2je :: + PrelBase.Int{-3g,p-} -> t{-a18D-} + {-# L #-} + fromInt_a2je = + fromInt_a2jv } in + let { lit_a2jd :: + t{-a18D-} + {-# L #-} + lit_a2jd = + let { + ds_d2md :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d2md = + PrelBase.I#{-5b,p-}{i} + 1 + } in + fromInt_a2je + ds_d2md + } in + let { + fromInt_a2jc :: + PrelBase.Int{-3g,p-} -> t{-a18b-} + {-# L #-} + fromInt_a2jc = + fromInt_a2jy } in + let { lit_a2jb :: + t{-a18b-} + {-# L #-} + lit_a2jb = + let { + ds_d2ms :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d2ms = + PrelBase.I#{-5b,p-}{i} + 999 + } in + fromInt_a2jc + ds_d2ms + } in + let { + >=_a2ja :: + t{-a18b-} -> t{-a18b-} -> PrelBase.Bool{-34,p-} + {-# L #-} + >=_a2ja = + >=_a2jm } in + let { + -_a2j9 :: + t{-a18b-} -> t{-a18b-} -> t{-a18b-} + {-# L #-} + -_a2j9 = + -_a2jl } in + let { + fromInt_a2j8 :: + PrelBase.Int{-3g,p-} -> t{-a18D-} + {-# L #-} + fromInt_a2j8 = + fromInt_a2jv } in + let { lit_a2j7 :: + t{-a18D-} + {-# L #-} + lit_a2j7 = + let { + ds_d2mJ :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d2mJ = + PrelBase.I#{-5b,p-}{i} + 0 + } in + fromInt_a2j8 + ds_d2mJ + } in + \ ds_d2ng :: + t{-a18b-} + {-# L #-} + ds_d2ng -> + let { fail_d2o7 :: + t{-a18D-} + {-# L #-} + fail_d2o7 = + let { ds_d2n0 :: + PrelBase.(){-40,p-} + {-# L #-} + ds_d2n0 = + let { + fail_d2nt :: + PrelBase.(){-40,p-} + {-# L #-} + fail_d2nt = + GHCerr.irrefutPatError{-8g,p-} + _@_ PrelBase.(){-40,p-} _string_ "ds020.hs:13|(n+4)" + } in + case + (\ ds_d2nn :: + t{-a18b-} + {-# L #-} + ds_d2nn -> + >=_a2jm + ds_d2nn lit_a2jn) + ds_d2ng + of { + PrelBase.True{-5E,p-}{i} -> + let { + n_r3O :: + t{-a18b-} + {-# L #-} + n_r3O = + (\ ds_d2nM :: + t{-a18b-} + {-# L #-} + ds_d2nM -> + -_a2jl + ds_d2nM lit_a2jn) + ds_d2ng + } in + PrelBase.(){-60,p-}{i} + {}; + PrelBase.False{-58,p-}{i} -> + fail_d2nt; + } + } in + lit_a2jj + } in + let { + fail_d2or :: + t{-a18D-} + {-# L #-} + fail_d2or = + case + ==_a2jr + lit_a2js ds_d2ng + of { + PrelBase.True{-5E,p-}{i} -> + lit_a2jp; + PrelBase.False{-58,p-}{i} -> + fail_d2o7; + } + } in + case + ==_a2jw + lit_a2jx ds_d2ng + of { + PrelBase.True{-5E,p-}{i} -> + lit_a2ju; + PrelBase.False{-58,p-}{i} -> + fail_d2or; } - _ -> (error Char) "``impossible'' pattern-matching error!\n"S - } -{- end plain CoRec -} -ds.435 :: for all d, e. -> -> -> (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. -> -> -> 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. -> -> -> 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'#))) +c{-r4u,x-} :: + _forall_ + [t{-a19h-} t{-a19j-} t{-a199-} t{-a19d-}] + => + {PrelNum.Fractional{-26,p-} t{-a19d-}} + -> {PrelBase.Num{-2c,p-} t{-a199-}} + -> t{-a19h-} + -> t{-a19j-} + -> t{-a199-} + -> t{-a19d-} + -> t{-a19h-} +{-# L #-} +c{-r4u,x-} = + _/\_ t{-a19h-} t{-a19j-} t{-a199-} t{-a19d-} -> \ d.Fractional_a19r :: + {PrelNum.Fractional{-26,p-} t{-a19d-}} + {-# L #-} + d.Fractional_a19r d.Num_a19m :: + {PrelBase.Num{-2c,p-} t{-a199-}} + {-# L #-} + d.Num_a19m -> + let { + d.Eq_a19o :: + {PrelBase.Eq{-23,p-} t{-a199-}} + {-# L #-} + d.Eq_a19o = + PrelBase.scsel_NumPrelBaseEq{-a2pi,p-} + _@_ t{-a199-} d.Num_a19m } in + let { + d.Num_a1b5 :: + {PrelBase.Num{-2c,p-} t{-a19d-}} + {-# L #-} + d.Num_a1b5 = + PrelNum.scsel_FractionalPrelBaseNum{-a2pr,p-} + _@_ t{-a19d-} d.Fractional_a19r } in + let { + d.Eq_a19t :: + {PrelBase.Eq{-23,p-} t{-a19d-}} + {-# L #-} + d.Eq_a19t = + PrelBase.scsel_NumPrelBaseEq{-a2pi,p-} + _@_ t{-a19d-} d.Num_a1b5 } in + let { + fromInt_a2p8 :: + PrelBase.Int{-3g,p-} -> t{-a199-} + {-# L #-} + fromInt_a2p8 = + PrelBase.fromInt{-8R,p-} + _@_ t{-a199-} d.Num_a19m } in + let { lit_a2p7 :: + t{-a199-} + {-# L #-} + lit_a2p7 = + let { + ds_d2pO :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d2pO = + PrelBase.I#{-5b,p-}{i} + 11111 + } in + fromInt_a2p8 + ds_d2pO + } in + let { + ==_a2p6 :: + t{-a199-} -> t{-a199-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a2p6 = + PrelBase.=={-8Y,p-} + _@_ t{-a199-} d.Eq_a19o } in + let { + fromRational_a2p5 :: + PrelNum.Rational{-3r,p-} -> t{-a19d-} + {-# L #-} + fromRational_a2p5 = + PrelNum.fromRational{-8T,p-} + _@_ t{-a19d-} d.Fractional_a19r } in + let { + lit_a2p4 :: + t{-a19d-} + {-# L #-} + lit_a2p4 = + fromRational_a2p5 + _rational_ 62831853 20000000 } in + let { + ==_a2p3 :: + t{-a19d-} -> t{-a19d-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a2p3 = + PrelBase.=={-8Y,p-} + _@_ t{-a19d-} d.Eq_a19t + } in + \ x_r3H :: + t{-a19h-} + {-# L #-} + x_r3H ds_d2qY :: + t{-a19j-} + {-# L #-} + ds_d2qY ds_d2qZ :: + t{-a199-} + {-# L #-} + ds_d2qZ ds_d2qV :: + t{-a19d-} + {-# L #-} + ds_d2qV -> + let { ds_d2rv :: + PrelBase.(){-40,p-} + {-# L #-} + ds_d2rv = + let { + fail_d2r0 :: + PrelBase.(){-40,p-} + {-# L #-} + fail_d2r0 = + GHCerr.irrefutPatError{-8g,p-} + _@_ PrelBase.(){-40,p-} _string_ "ds020.hs:11|3.1415926500000002" + } in + case + ==_a2p3 + lit_a2p4 ds_d2qV + of { + PrelBase.True{-5E,p-}{i} -> + PrelBase.(){-60,p-}{i} + {}; + PrelBase.False{-58,p-}{i} -> + fail_d2r0; + } + } in + let { ds_d2rI :: + PrelBase.(){-40,p-} + {-# L #-} + ds_d2rI = + let { + fail_d2rw :: + PrelBase.(){-40,p-} + {-# L #-} + fail_d2rw = + GHCerr.irrefutPatError{-8g,p-} + _@_ PrelBase.(){-40,p-} _string_ "ds020.hs:11|11111" + } in + case + ==_a2p6 + lit_a2p7 ds_d2qZ + of { + PrelBase.True{-5E,p-}{i} -> + PrelBase.(){-60,p-}{i} + {}; + PrelBase.False{-58,p-}{i} -> + fail_d2rw; } + } in + let { + ds_d2qC :: + PrelBase.(){-40,p-} + {-# L #-} + ds_d2qC = + PrelBase.(){-60,p-}{i} + {} + } in + x_r3H +b{-r4v,x-} :: + _forall_ [t{-a19Q-} t{-a19X-}] => [t{-a19Q-}] -> [t{-a19X-}] +{-# L #-} +b{-r4v,x-} = + _/\_ t{-a19Q-} t{-a19X-} -> \ ds_d2sd :: + [t{-a19Q-}] + {-# L #-} + ds_d2sd -> + let { ds_d2sU :: + (t{-a19Q-}, t{-a19Q-}, [t{-a19Q-}]) + {-# L #-} + ds_d2sU = + let { + fail_d2se :: + (t{-a19Q-}, t{-a19Q-}, [t{-a19Q-}]) + {-# L #-} + fail_d2se = + GHCerr.irrefutPatError{-8g,p-} + _@_ (t{-a19Q-}, t{-a19Q-}, [t{-a19Q-}]) + _string_ "ds020.hs:8|(x PrelBase.: (xs PrelBase.: ys))" + } in + case ds_d2sd of { + PrelBase.[]{-5i,p-}{i} -> + fail_d2se; + PrelBase.:{-55,p-}{i} x_r3z ds_d2sr -> + case ds_d2sr of { + PrelBase.[]{-5i,p-}{i} -> + fail_d2se; + PrelBase.:{-55,p-}{i} xs_r3A ys_r3B -> + PrelTup.(,,){-63,p-}{i} + {_@_ t{-a19Q-} _@_ t{-a19Q-} _@_ [t{-a19Q-}] x_r3z xs_r3A ys_r3B}; + }; } - } -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 - } - } - } - + } in + let { + x_r3z :: + t{-a19Q-} + {-# L #-} + x_r3z = + case ds_d2sU of { PrelTup.(,,){-63,p-}{i} x_r3z xs_r3A ys_r3B -> + x_r3z;} } in + let { + xs_r3A :: + t{-a19Q-} + {-# L #-} + xs_r3A = + case ds_d2sU of { PrelTup.(,,){-63,p-}{i} x_r3z xs_r3A ys_r3B -> + xs_r3A;} } in + let { + ys_r3B :: + [t{-a19Q-}] + {-# L #-} + ys_r3B = + case ds_d2sU of { PrelTup.(,,){-63,p-}{i} x_r3z xs_r3A ys_r3B -> + ys_r3B;} + } in + PrelBase.[]{-5i,p-}{i} + _@_ t{-a19X-} +a{-r4w,x-} :: + _forall_ + [t{-a1al-} t{-a1ao-} t{-a1ar-} t{-a1at-}] + => + ([t{-a1al-}], [t{-a1ao-}], [t{-a1ar-}]) -> [t{-a1at-}] +{-# L #-} +a{-r4w,x-} = + _/\_ t{-a1al-} t{-a1ao-} t{-a1ar-} t{-a1at-} -> \ ds_d2tK :: + ([t{-a1al-}], [t{-a1ao-}], [t{-a1ar-}]) + {-# L #-} + ds_d2tK -> + let { ds_d2uH :: + PrelBase.(){-40,p-} + {-# L #-} + ds_d2uH = + let { + fail_d2tL :: + PrelBase.(){-40,p-} + {-# L #-} + fail_d2tL = + GHCerr.irrefutPatError{-8g,p-} + _@_ PrelBase.(){-40,p-} + _string_ "ds020.hs:5|(PrelBase.[], PrelBase.[], PrelBase.[])" + } in + case + ds_d2tK + of { + PrelTup.(,,){-63,p-}{i} ds_d2tU ds_d2tW ds_d2tV -> + case ds_d2tU of { + PrelBase.:{-55,p-}{i} ds_d2u4 ds_d2u3 -> + fail_d2tL; + PrelBase.[]{-5i,p-}{i} -> + case ds_d2tW of { + PrelBase.:{-55,p-}{i} ds_d2ui ds_d2uh -> + fail_d2tL; + PrelBase.[]{-5i,p-}{i} -> + case ds_d2tV of { + PrelBase.:{-55,p-}{i} ds_d2uw ds_d2uv -> + fail_d2tL; + PrelBase.[]{-5i,p-}{i} -> + PrelBase.(){-60,p-}{i} + {}; + }; + }; + };} + } in + PrelBase.[]{-5i,p-}{i} + _@_ t{-a1at-} +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds021.stderr b/ghc/compiler/tests/deSugar/ds021.stderr index 364d61b..2d6f67a 100644 --- a/ghc/compiler/tests/deSugar/ds021.stderr +++ b/ghc/compiler/tests/deSugar/ds021.stderr @@ -1,23 +1,81 @@ -Desugared: -Test.f :: for all d, e. -> d -> d -> d -> [e] -Test.f = - /\ t86 t91 -> \ dict.87 -> - let dict.83 = dict.87 in - let - f.78 = - \ x.61 y.62 z.63 -> - let - fail.92 = - (error [t91]) - "\"ds021.hs\", line 8: pattern-matching failure [function binding]\n"S - in - case ((== t86) dict.83 x.61 y.62) of { - True -> Nil! t91 - False -> - case ((/= t86) dict.87 x.61 z.63) of { - True -> Nil! t91 - False -> Nil! t91 - } - } - in f.78 +ds021.hs:8: + Warning: Possibly incomplete patterns + in the definition of function `f' + +================================================================================ +Desugared: +f{-r3i,x-} :: + _forall_ + [rlg{-aG9-} t{-aGm-}] + => + {PrelBase.Eq{-23,p-} rlg{-aG9-}} + -> rlg{-aG9-} + -> rlg{-aG9-} + -> rlg{-aG9-} + -> [t{-aGm-}] +{-# L #-} +f{-r3i,x-} = + _/\_ rlg{-aG9-} t{-aGm-} -> \ d.Eq_aGr :: + {PrelBase.Eq{-23,p-} rlg{-aG9-}} + {-# L #-} + d.Eq_aGr -> + let { + ==_aIv :: + rlg{-aG9-} -> rlg{-aG9-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_aIv = + PrelBase.=={-8Y,p-} + _@_ rlg{-aG9-} d.Eq_aGr } in + let { + d.Eq_aGt :: + {PrelBase.Eq{-23,p-} rlg{-aG9-}} + {-# L #-} + d.Eq_aGt = + d.Eq_aGr } in + let { + /=_aIu :: + rlg{-aG9-} -> rlg{-aG9-} -> PrelBase.Bool{-34,p-} + {-# L #-} + /=_aIu = + PrelBase./={-ray,p-} + _@_ rlg{-aG9-} d.Eq_aGt + } in + \ x_r3d :: + rlg{-aG9-} + {-# L #-} + x_r3d y_r3f :: + rlg{-aG9-} + {-# L #-} + y_r3f z_r3h :: + rlg{-aG9-} + {-# L #-} + z_r3h -> + let { + fail_dJa :: + [t{-aGm-}] + {-# L #-} + fail_dJa = + GHCerr.patError{-8r,p-} + _@_ [t{-aGm-}] _string_ "ds021.hs:5|function `f'" + } in + case + ==_aIv + x_r3d y_r3f + of { + PrelBase.True{-5E,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-aGm-}; + PrelBase.False{-58,p-}{i} -> + case + /=_aIu + x_r3d z_r3h + of { + PrelBase.True{-5E,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-aGm-}; + PrelBase.False{-58,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-aGm-}; + }; + } diff --git a/ghc/compiler/tests/deSugar/ds022.stderr b/ghc/compiler/tests/deSugar/ds022.stderr index cb1e587..98f3a06 100644 --- a/ghc/compiler/tests/deSugar/ds022.stderr +++ b/ghc/compiler/tests/deSugar/ds022.stderr @@ -1,368 +1,1021 @@ +ds022.hs:22: + Warning: Pattern match(es) completely overlapped + in the definition of function `i' +ds022.hs:23: + Warning: Pattern match(es) completely overlapped + in the definition of function `i' +ds022.hs:20: + Warning: Possibly incomplete patterns + in the definition of function `i' +ds022.hs:15: + Warning: Possibly incomplete patterns + in the definition of function `h' +ds022.hs:10: + Warning: Possibly incomplete patterns + in the definition of function `g' +ds022.hs:5: + Warning: Possibly incomplete patterns + in the definition of function `f' + + +================================================================================ Desugared: -Tests.f :: for all d, e, f. -> -> d -> e -> [f] -Tests.f = - /\ t101 t104 t107 -> \ dict.105 dict.102 -> - let dict.98 = dict.105 in - let dict.91 = dict.98 in - let dict.84 = dict.91 in - let - dict.106 = (sdsel.Num.Eq t104) ((sdsel.Fractional.Num t104) dict.84) in - let dict.99 = dict.106 in - let dict.92 = dict.99 in - let dict.85 = dict.92 in - let dict.95 = dict.102 in - let dict.88 = dict.95 in - let dict.81 = dict.88 in - let dict.103 = (sdsel.Num.Eq t101) dict.81 in - let dict.96 = dict.103 in - let dict.89 = dict.96 in - let dict.82 = dict.89 in - let - f.79 = - \ ds.179 ds.180 -> - let - fail.181 = - (error [t107]) - "\"ds022.hs\", line 10: pattern-matching failure [function binding]\n"S - in +Rec { +d.Eq_a13W :: + {PrelBase.Eq{-23,p-} PrelBase.Char{-38,p-}} +{-# L #-} +d.Eq_a13W = + PrelBase.$d33{-rbH,p-} +d.Eq_a13U :: + {PrelBase.Eq{-23,p-} [PrelBase.Char{-38,p-}]} +{-# L #-} +d.Eq_a13U = + PrelBase.$d27{-rbA,p-} + _@_ PrelBase.Char{-38,p-} d.Eq_a13W +==_a1pN :: + [PrelBase.Char{-38,p-}] + -> [PrelBase.Char{-38,p-}] + -> PrelBase.Bool{-34,p-} +{-# L #-} +==_a1pN = + PrelBase.=={-8Y,p-} + _@_ [PrelBase.Char{-38,p-}] d.Eq_a13U +i{-r3E,x-} :: + _forall_ + [t{-a11b-} t{-a11f-} t{-a11j-}] + => + {PrelNum.Fractional{-26,p-} t{-a11f-}} + -> {PrelBase.Num{-2c,p-} t{-a11b-}} + -> t{-a11b-} + -> t{-a11f-} + -> [t{-a11j-}] +{-# L #-} +i{-r3E,x-} = + _/\_ t{-a11b-} t{-a11f-} t{-a11j-} -> \ d.Fractional_a11r :: + {PrelNum.Fractional{-26,p-} t{-a11f-}} + {-# L #-} + d.Fractional_a11r d.Num_a11m :: + {PrelBase.Num{-2c,p-} t{-a11b-}} + {-# L #-} + d.Num_a11m -> + let { + d.Eq_a11o :: + {PrelBase.Eq{-23,p-} t{-a11b-}} + {-# L #-} + d.Eq_a11o = + PrelBase.scsel_NumPrelBaseEq{-a1rD,p-} + _@_ t{-a11b-} d.Num_a11m } in + let { + d.Num_a13X :: + {PrelBase.Num{-2c,p-} t{-a11f-}} + {-# L #-} + d.Num_a13X = + PrelNum.scsel_FractionalPrelBaseNum{-a1rM,p-} + _@_ t{-a11f-} d.Fractional_a11r } in + let { + d.Eq_a11t :: + {PrelBase.Eq{-23,p-} t{-a11f-}} + {-# L #-} + d.Eq_a11t = + PrelBase.scsel_NumPrelBaseEq{-a1rD,p-} + _@_ t{-a11f-} d.Num_a13X } in + let { + fromInt_a1rt :: + PrelBase.Int{-3g,p-} -> t{-a11b-} + {-# L #-} + fromInt_a1rt = + PrelBase.fromInt{-8R,p-} + _@_ t{-a11b-} d.Num_a11m } in + let { lit_a1rs :: + t{-a11b-} + {-# L #-} + lit_a1rs = + let { + ds_d1s9 :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1s9 = + PrelBase.I#{-5b,p-}{i} + 1 + } in + fromInt_a1rt + ds_d1s9 + } in + let { + ==_a1rr :: + t{-a11b-} -> t{-a11b-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1rr = + PrelBase.=={-8Y,p-} + _@_ t{-a11b-} d.Eq_a11o } in + let { + fromRational_a1rq :: + PrelNum.Rational{-3r,p-} -> t{-a11f-} + {-# L #-} + fromRational_a1rq = + PrelNum.fromRational{-8T,p-} + _@_ t{-a11f-} d.Fractional_a11r } in + let { + lit_a1rp :: + t{-a11f-} + {-# L #-} + lit_a1rp = + fromRational_a1rq + _rational_ 11 10 } in + let { + ==_a1ro :: + t{-a11f-} -> t{-a11f-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1ro = + PrelBase.=={-8Y,p-} + _@_ t{-a11f-} d.Eq_a11t } in + let { + fromInt_a1rn :: + PrelBase.Int{-3g,p-} -> t{-a11b-} + {-# L #-} + fromInt_a1rn = + fromInt_a1rt } in + let { lit_a1rm :: + t{-a11b-} + {-# L #-} + lit_a1rm = + let { + ds_d1sR :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1sR = + PrelBase.I#{-5b,p-}{i} + 2 + } in + fromInt_a1rn + ds_d1sR + } in + let { + ==_a1rl :: + t{-a11b-} -> t{-a11b-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1rl = + ==_a1rr } in + let { + fromRational_a1rk :: + PrelNum.Rational{-3r,p-} -> t{-a11f-} + {-# L #-} + fromRational_a1rk = + fromRational_a1rq } in + let { + lit_a1rj :: + t{-a11f-} + {-# L #-} + lit_a1rj = + fromRational_a1rk + _rational_ 11 5 } in + let { + ==_a1ri :: + t{-a11f-} -> t{-a11f-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1ri = + ==_a1ro } in + let { + lit_a1rh :: + t{-a11b-} + {-# L #-} + lit_a1rh = + lit_a1rs } in + let { + ==_a1rg :: + t{-a11b-} -> t{-a11b-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1rg = + ==_a1rr } in + let { + lit_a1rf :: + t{-a11f-} + {-# L #-} + lit_a1rf = + lit_a1rp } in + let { + ==_a1re :: + t{-a11f-} -> t{-a11f-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1re = + ==_a1ro } in + let { + lit_a1rd :: + t{-a11b-} + {-# L #-} + lit_a1rd = + lit_a1rm } in + let { + ==_a1rc :: + t{-a11b-} -> t{-a11b-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1rc = + ==_a1rr } in + let { + lit_a1rb :: + t{-a11f-} + {-# L #-} + lit_a1rb = + lit_a1rj } in + let { + ==_a1ra :: + t{-a11f-} -> t{-a11f-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1ra = + ==_a1ro + } in + \ ds_d1tC :: + t{-a11b-} + {-# L #-} + ds_d1tC ds_d1tF :: + t{-a11f-} + {-# L #-} + ds_d1tF -> + let { + fail_d1tG :: + [t{-a11j-}] + {-# L #-} + fail_d1tG = + GHCerr.patError{-8r,p-} + _@_ [t{-a11j-}] _string_ "ds022.hs:20|function `i'" } in + let { + fail_d1uo :: + [t{-a11j-}] + {-# L #-} + fail_d1uo = case - ((== t101) - dict.82 - ((fromInteger t101) dict.81 (MkInteger! 1##)) - ds.179) + ==_a1rl + lit_a1rm ds_d1tC of { - True -> - case - ((== t104) - dict.85 - ((fromRational t104) - dict.84 (MkDouble! 1.1000000000000001##)) - ds.180) - of { - True -> Nil! t107 - False -> fail.181 - } - False -> + PrelBase.True{-5E,p-}{i} -> case - ((== t101) - dict.89 - ((fromInteger t101) dict.88 (MkInteger! 2##)) - ds.179) + ==_a1ri + lit_a1rj ds_d1tF of { - True -> - case - ((== t104) - dict.92 - ((fromRational t104) - dict.91 - (MkDouble! 2.2000000000000002##)) - ds.180) - of { - True -> Nil! t107 - False -> fail.181 - } - False -> - case - ((== t101) - dict.96 - ((fromInteger t101) - dict.95 (MkInteger! 3##)) - ds.179) - of { - True -> - case - ((== t104) - dict.99 - ((fromRational t104) - dict.98 - (MkDouble! - 3.2999999999999998##)) - ds.180) - of { - True -> Nil! t107 - False -> fail.181 - } - False -> - case - ((== t101) - dict.103 - ((fromInteger t101) - dict.102 (MkInteger! 4##)) - ds.179) - of { - True -> - case - ((== t104) - dict.106 - ((fromRational t104) - dict.105 - (MkDouble! - 4.4000000000000004##)) - ds.180) - of { - True -> Nil! t107 - False -> fail.181 - } - False -> fail.181 - } - } - } + PrelBase.True{-5E,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-a11j-}; + PrelBase.False{-58,p-}{i} -> + fail_d1tG; + }; + PrelBase.False{-58,p-}{i} -> + fail_d1tG; } - in f.79 -Tests.g :: for all d, e, f. -> -> d -> e -> [f] -Tests.g = - /\ t131 t134 t137 -> \ dict.135 dict.132 -> - let dict.128 = dict.135 in - let dict.121 = dict.128 in - let dict.114 = dict.121 in - let - dict.136 = (sdsel.Num.Eq t134) ((sdsel.Fractional.Num t134) dict.114) in - let dict.129 = dict.136 in - let dict.122 = dict.129 in - let dict.115 = dict.122 in - let dict.125 = dict.132 in - let dict.118 = dict.125 in - let dict.111 = dict.118 in - let dict.133 = (sdsel.Num.Eq t131) dict.111 in - let dict.126 = dict.133 in - let dict.119 = dict.126 in - let dict.112 = dict.119 in - let - g.109 = - \ ds.183 ds.184 -> - let - fail.185 = - (error [t137]) - "\"ds022.hs\", line 15: pattern-matching failure [function binding]\n"S - in + } in + case + ==_a1rr + lit_a1rs ds_d1tC + of { + PrelBase.True{-5E,p-}{i} -> + case + ==_a1ro + lit_a1rp ds_d1tF + of { + PrelBase.True{-5E,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-a11j-}; + PrelBase.False{-58,p-}{i} -> + fail_d1uo; + }; + PrelBase.False{-58,p-}{i} -> + fail_d1uo; + } +h{-r3F,x-} :: + _forall_ + [t{-a11Q-}] + => + PrelBase.Char{-38,p-} -> [PrelBase.Char{-38,p-}] -> [t{-a11Q-}] +{-# L #-} +h{-r3F,x-} = + _/\_ t{-a11Q-} -> + let { + ==_a1v3 :: + [PrelBase.Char{-38,p-}] + -> [PrelBase.Char{-38,p-}] + -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1v3 = + ==_a1pN + } in + \ ds_d1vj :: + PrelBase.Char{-38,p-} + {-# L #-} + ds_d1vj ds_d1vk :: + [PrelBase.Char{-38,p-}] + {-# L #-} + ds_d1vk -> + let { + fail_d1vl :: + [t{-a11Q-}] + {-# L #-} + fail_d1vl = + GHCerr.patError{-8r,p-} + _@_ [t{-a11Q-}] _string_ "ds022.hs:15|function `h'" + } in + case ds_d1vj of { PrelBase.C#{-54,p-}{i} ds_d1vu -> + case# ds_d1vu of { + 'a' -> + case ds_d1vk of { + PrelBase.:{-55,p-}{i} ds_d1vK ds_d1vJ -> + fail_d1vl; + PrelBase.[]{-5i,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-a11Q-}; + }; + ''' -> + case + ==_a1v3 + _string_ "foo" ds_d1vk + of { + PrelBase.True{-5E,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-a11Q-}; + PrelBase.False{-58,p-}{i} -> + fail_d1vl; + }; + '"' -> + case ds_d1vk of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1vl; + PrelBase.:{-55,p-}{i} ds_d1wC ds_d1wD -> + case ds_d1wC of { PrelBase.C#{-54,p-}{i} ds_d1wM -> + case# ds_d1wM of { + 'b' -> + case ds_d1wD of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1vl; + PrelBase.:{-55,p-}{i} ds_d1x7 ds_d1x8 -> + case ds_d1x7 of { PrelBase.C#{-54,p-}{i} ds_d1xh -> + case# ds_d1xh of { + 'a' -> + case ds_d1x8 of { + PrelBase.[]{-5i,p-}{i} -> + fail_d1vl; + PrelBase.:{-55,p-}{i} ds_d1xC ds_d1xD -> + case + ds_d1xC + of { + PrelBase.C#{-54,p-}{i} ds_d1xM -> + case# ds_d1xM of { + 'r' -> + case ds_d1xD of { + PrelBase.:{-55,p-}{i} ds_d1y2 ds_d1y1 -> + fail_d1vl; + PrelBase.[]{-5i,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-a11Q-}; + }; + ds_d1yd -> + fail_d1vl; + };}; + }; + ds_d1yg -> + fail_d1vl; + };}; + }; + ds_d1yj -> + fail_d1vl; + };}; + }; + '¨' -> + let { + blob_r3D :: + [PrelBase.Char{-38,p-}] + {-# L #-} + blob_r3D = + ds_d1vk + } in + PrelBase.[]{-5i,p-}{i} + _@_ t{-a11Q-}; + ds_d1yx -> + fail_d1vl; + };} +g{-r3G,x-} :: + _forall_ + [t{-a12s-} t{-a12w-} t{-a12A-}] + => + {PrelNum.Fractional{-26,p-} t{-a12w-}} + -> {PrelBase.Num{-2c,p-} t{-a12s-}} + -> t{-a12s-} + -> t{-a12w-} + -> [t{-a12A-}] +{-# L #-} +g{-r3G,x-} = + _/\_ t{-a12s-} t{-a12w-} t{-a12A-} -> \ d.Fractional_a12I :: + {PrelNum.Fractional{-26,p-} t{-a12w-}} + {-# L #-} + d.Fractional_a12I d.Num_a12D :: + {PrelBase.Num{-2c,p-} t{-a12s-}} + {-# L #-} + d.Num_a12D -> + let { + d.Eq_a12F :: + {PrelBase.Eq{-23,p-} t{-a12s-}} + {-# L #-} + d.Eq_a12F = + PrelBase.scsel_NumPrelBaseEq{-a1rD,p-} + _@_ t{-a12s-} d.Num_a12D } in + let { + d.Num_a13Y :: + {PrelBase.Num{-2c,p-} t{-a12w-}} + {-# L #-} + d.Num_a13Y = + PrelNum.scsel_FractionalPrelBaseNum{-a1rM,p-} + _@_ t{-a12w-} d.Fractional_a12I } in + let { + d.Eq_a12K :: + {PrelBase.Eq{-23,p-} t{-a12w-}} + {-# L #-} + d.Eq_a12K = + PrelBase.scsel_NumPrelBaseEq{-a1rD,p-} + _@_ t{-a12w-} d.Num_a13Y } in + let { + fromInteger_a1zV :: + PrelBase.Integer{-3h,p-} -> t{-a12s-} + {-# L #-} + fromInteger_a1zV = + PrelBase.fromInteger{-8S,p-} + _@_ t{-a12s-} d.Num_a12D } in + let { + lit_a1zU :: + t{-a12s-} + {-# L #-} + lit_a1zU = + fromInteger_a1zV + _integer_ 11111111111111111111111 } in + let { + ==_a1zT :: + t{-a12s-} -> t{-a12s-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1zT = + PrelBase.=={-8Y,p-} + _@_ t{-a12s-} d.Eq_a12F } in + let { + fromRational_a1zS :: + PrelNum.Rational{-3r,p-} -> t{-a12w-} + {-# L #-} + fromRational_a1zS = + PrelNum.fromRational{-8T,p-} + _@_ t{-a12w-} d.Fractional_a12I } in + let { + lit_a1zR :: + t{-a12w-} + {-# L #-} + lit_a1zR = + fromRational_a1zS + _rational_ 111111111111111111 100000000000000000 } in + let { + ==_a1zQ :: + t{-a12w-} -> t{-a12w-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1zQ = + PrelBase.=={-8Y,p-} + _@_ t{-a12w-} d.Eq_a12K } in + let { + fromInteger_a1zP :: + PrelBase.Integer{-3h,p-} -> t{-a12s-} + {-# L #-} + fromInteger_a1zP = + fromInteger_a1zV } in + let { + lit_a1zO :: + t{-a12s-} + {-# L #-} + lit_a1zO = + fromInteger_a1zP + _integer_ 22222222222222222222222 } in + let { + ==_a1zN :: + t{-a12s-} -> t{-a12s-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1zN = + ==_a1zT } in + let { + fromRational_a1zM :: + PrelNum.Rational{-3r,p-} -> t{-a12w-} + {-# L #-} + fromRational_a1zM = + fromRational_a1zS } in + let { + lit_a1zL :: + t{-a12w-} + {-# L #-} + lit_a1zL = + fromRational_a1zM + _rational_ 111111111111111111 50000000000000000 } in + let { + ==_a1zK :: + t{-a12w-} -> t{-a12w-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1zK = + ==_a1zQ } in + let { + fromInteger_a1zJ :: + PrelBase.Integer{-3h,p-} -> t{-a12s-} + {-# L #-} + fromInteger_a1zJ = + fromInteger_a1zV } in + let { + lit_a1zI :: + t{-a12s-} + {-# L #-} + lit_a1zI = + fromInteger_a1zJ + _integer_ 33333333333333333333333 } in + let { + ==_a1zH :: + t{-a12s-} -> t{-a12s-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1zH = + ==_a1zT } in + let { + fromRational_a1zG :: + PrelNum.Rational{-3r,p-} -> t{-a12w-} + {-# L #-} + fromRational_a1zG = + fromRational_a1zS } in + let { + lit_a1zF :: + t{-a12w-} + {-# L #-} + lit_a1zF = + fromRational_a1zG + _rational_ 333333333333333333 100000000000000000 } in + let { + ==_a1zE :: + t{-a12w-} -> t{-a12w-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1zE = + ==_a1zQ } in + let { + fromInteger_a1zD :: + PrelBase.Integer{-3h,p-} -> t{-a12s-} + {-# L #-} + fromInteger_a1zD = + fromInteger_a1zV } in + let { + lit_a1zC :: + t{-a12s-} + {-# L #-} + lit_a1zC = + fromInteger_a1zD + _integer_ 44444444444444444444444 } in + let { + ==_a1zB :: + t{-a12s-} -> t{-a12s-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1zB = + ==_a1zT } in + let { + fromRational_a1zA :: + PrelNum.Rational{-3r,p-} -> t{-a12w-} + {-# L #-} + fromRational_a1zA = + fromRational_a1zS } in + let { + lit_a1zz :: + t{-a12w-} + {-# L #-} + lit_a1zz = + fromRational_a1zA + _rational_ 111111111111111111 25000000000000000 } in + let { + ==_a1zy :: + t{-a12w-} -> t{-a12w-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1zy = + ==_a1zQ + } in + \ ds_d1Cc :: + t{-a12s-} + {-# L #-} + ds_d1Cc ds_d1Cf :: + t{-a12w-} + {-# L #-} + ds_d1Cf -> + let { + fail_d1Cg :: + [t{-a12A-}] + {-# L #-} + fail_d1Cg = + GHCerr.patError{-8r,p-} + _@_ [t{-a12A-}] _string_ "ds022.hs:10|function `g'" } in + let { fail_d1Eo :: + [t{-a12A-}] + {-# L #-} + fail_d1Eo = + let { fail_d1DG :: + [t{-a12A-}] + {-# L #-} + fail_d1DG = + let { + fail_d1CY :: + [t{-a12A-}] + {-# L #-} + fail_d1CY = + case + ==_a1zB + lit_a1zC ds_d1Cc + of { + PrelBase.True{-5E,p-}{i} -> + case + ==_a1zy + lit_a1zz ds_d1Cf + of { + PrelBase.True{-5E,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-a12A-}; + PrelBase.False{-58,p-}{i} -> + fail_d1Cg; + }; + PrelBase.False{-58,p-}{i} -> + fail_d1Cg; + } + } in case - ((== t131) - dict.112 - ((fromInteger t131) - dict.111 - (MkInteger! 11111111111111111111111##)) - ds.183) + ==_a1zH + lit_a1zI ds_d1Cc of { - True -> - case - ((== t134) - dict.115 - ((fromRational t134) - dict.114 - (MkDouble! 1.1111111111111112##)) - ds.184) - of { - True -> Nil! t137 - False -> fail.185 - } - False -> + PrelBase.True{-5E,p-}{i} -> case - ((== t131) - dict.119 - ((fromInteger t131) - dict.118 - (MkInteger! 22222222222222222222222##)) - ds.183) + ==_a1zE + lit_a1zF ds_d1Cf of { - True -> - case - ((== t134) - dict.122 - ((fromRational t134) - dict.121 - (MkDouble! 2.2222222222222223##)) - ds.184) - of { - True -> Nil! t137 - False -> fail.185 - } - False -> - case - ((== t131) - dict.126 - ((fromInteger t131) - dict.125 - (MkInteger! - 33333333333333333333333##)) - ds.183) - of { - True -> - case - ((== t134) - dict.129 - ((fromRational t134) - dict.128 - (MkDouble! - 3.3333333333333335##)) - ds.184) - of { - True -> Nil! t137 - False -> fail.185 - } - False -> - case - ((== t131) - dict.133 - ((fromInteger t131) - dict.132 - (MkInteger! - 44444444444444444444444##)) - ds.183) - of { - True -> - case - ((== t134) - dict.136 - ((fromRational t134) - dict.135 - (MkDouble! - 4.4444444444444446##)) - ds.184) - of { - True -> Nil! t137 - False -> fail.185 - } - False -> fail.185 - } - } - } + PrelBase.True{-5E,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-a12A-}; + PrelBase.False{-58,p-}{i} -> + fail_d1CY; + }; + PrelBase.False{-58,p-}{i} -> + fail_d1CY; } - in g.109 -Tests.h :: for all d. Char -> [Char] -> [d] -Tests.h = - /\ t148 -> \ ds.200 ds.201 -> - let - fail.202 = - (error [t148]) - "\"ds022.hs\", line 20: pattern-matching failure [function binding]\n"S - in - case ds.200 of { - MkChar ds.203 -> - case ds.203 of { - 'a'# -> - case (eqString (Nil! Char) ds.201) of { - True -> Nil! t148 - False -> fail.202 - } - '\''# -> - case (eqString "foo"S ds.201) of { - True -> Nil! t148 - False -> fail.202 - } - '"'# -> - case ds.201 of { - (:) ds.204 ds.205 -> - case ds.204 of { - MkChar ds.206 -> - case ds.206 of { - 'b'# -> - case ds.205 of { - (:) ds.207 ds.208 -> - case ds.207 of { - MkChar ds.209 -> - case ds.209 of { - 'a'# -> - case ds.208 of { - (:) ds.210 ds.211 -> - case ds.210 of { - MkChar ds.212 -> - case - ds.212 - of { - 'r'# -> - case - ds.211 - of { - Nil -> - Nil! t148 - _ -> - fail.202 - } - _ -> - fail.202 - } - } - _ -> fail.202 - } - _ -> fail.202 - } - } - _ -> fail.202 - } - _ -> fail.202 - } - } - _ -> fail.202 - } - '¨'# -> let blob.213 = ds.201 in Nil! t148 - _ -> fail.202 + } in + case + ==_a1zN + lit_a1zO ds_d1Cc + of { + PrelBase.True{-5E,p-}{i} -> + case + ==_a1zK + lit_a1zL ds_d1Cf + of { + PrelBase.True{-5E,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-a12A-}; + PrelBase.False{-58,p-}{i} -> + fail_d1DG; + }; + PrelBase.False{-58,p-}{i} -> + fail_d1DG; } - } -Tests.i :: for all d, e, f. -> -> d -> e -> [f] -Tests.i = - /\ t172 t175 t178 -> \ dict.176 dict.173 -> - let dict.169 = dict.176 in - let dict.162 = dict.169 in - let dict.155 = dict.162 in - let - dict.177 = (sdsel.Num.Eq t175) ((sdsel.Fractional.Num t175) dict.155) in - let dict.170 = dict.177 in - let dict.163 = dict.170 in - let dict.156 = dict.163 in - let dict.166 = dict.173 in - let dict.159 = dict.166 in - let dict.152 = dict.159 in - let dict.174 = (sdsel.Num.Eq t172) dict.152 in - let dict.167 = dict.174 in - let dict.160 = dict.167 in - let dict.153 = dict.160 in - let - i.150 = - \ ds.214 ds.215 -> - let - fail.216 = - (error [t178]) - "\"ds022.hs\", line 25: pattern-matching failure [function binding]\n"S - in + } in + case + ==_a1zT + lit_a1zU ds_d1Cc + of { + PrelBase.True{-5E,p-}{i} -> case - ((== t172) - dict.153 - ((fromInteger t172) dict.152 (MkInteger! 1##)) - ds.214) + ==_a1zQ + lit_a1zR ds_d1Cf of { - True -> - case - ((== t175) - dict.156 - ((fromRational t175) - dict.155 - (MkDouble! 1.1000000000000001##)) - ds.215) - of { - True -> Nil! t178 - False -> fail.216 - } - False -> + PrelBase.True{-5E,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-a12A-}; + PrelBase.False{-58,p-}{i} -> + fail_d1Eo; + }; + PrelBase.False{-58,p-}{i} -> + fail_d1Eo; + } +f{-r3H,x-} :: + _forall_ + [t{-a13s-} t{-a13w-} t{-a13A-}] + => + {PrelNum.Fractional{-26,p-} t{-a13w-}} + -> {PrelBase.Num{-2c,p-} t{-a13s-}} + -> t{-a13s-} + -> t{-a13w-} + -> [t{-a13A-}] +{-# L #-} +f{-r3H,x-} = + _/\_ t{-a13s-} t{-a13w-} t{-a13A-} -> \ d.Fractional_a13I :: + {PrelNum.Fractional{-26,p-} t{-a13w-}} + {-# L #-} + d.Fractional_a13I d.Num_a13D :: + {PrelBase.Num{-2c,p-} t{-a13s-}} + {-# L #-} + d.Num_a13D -> + let { + d.Eq_a13F :: + {PrelBase.Eq{-23,p-} t{-a13s-}} + {-# L #-} + d.Eq_a13F = + PrelBase.scsel_NumPrelBaseEq{-a1rD,p-} + _@_ t{-a13s-} d.Num_a13D } in + let { + d.Num_a13Z :: + {PrelBase.Num{-2c,p-} t{-a13w-}} + {-# L #-} + d.Num_a13Z = + PrelNum.scsel_FractionalPrelBaseNum{-a1rM,p-} + _@_ t{-a13w-} d.Fractional_a13I } in + let { + d.Eq_a13K :: + {PrelBase.Eq{-23,p-} t{-a13w-}} + {-# L #-} + d.Eq_a13K = + PrelBase.scsel_NumPrelBaseEq{-a1rD,p-} + _@_ t{-a13w-} d.Num_a13Z } in + let { + fromInt_a1Gk :: + PrelBase.Int{-3g,p-} -> t{-a13s-} + {-# L #-} + fromInt_a1Gk = + PrelBase.fromInt{-8R,p-} + _@_ t{-a13s-} d.Num_a13D } in + let { lit_a1Gj :: + t{-a13s-} + {-# L #-} + lit_a1Gj = + let { + ds_d1GY :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1GY = + PrelBase.I#{-5b,p-}{i} + 1 + } in + fromInt_a1Gk + ds_d1GY + } in + let { + ==_a1Gi :: + t{-a13s-} -> t{-a13s-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1Gi = + PrelBase.=={-8Y,p-} + _@_ t{-a13s-} d.Eq_a13F } in + let { + fromRational_a1Gh :: + PrelNum.Rational{-3r,p-} -> t{-a13w-} + {-# L #-} + fromRational_a1Gh = + PrelNum.fromRational{-8T,p-} + _@_ t{-a13w-} d.Fractional_a13I } in + let { + lit_a1Gg :: + t{-a13w-} + {-# L #-} + lit_a1Gg = + fromRational_a1Gh + _rational_ 11 10 } in + let { + ==_a1Gf :: + t{-a13w-} -> t{-a13w-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1Gf = + PrelBase.=={-8Y,p-} + _@_ t{-a13w-} d.Eq_a13K } in + let { + fromInt_a1Ge :: + PrelBase.Int{-3g,p-} -> t{-a13s-} + {-# L #-} + fromInt_a1Ge = + fromInt_a1Gk } in + let { lit_a1Gd :: + t{-a13s-} + {-# L #-} + lit_a1Gd = + let { + ds_d1HG :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1HG = + PrelBase.I#{-5b,p-}{i} + 2 + } in + fromInt_a1Ge + ds_d1HG + } in + let { + ==_a1Gc :: + t{-a13s-} -> t{-a13s-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1Gc = + ==_a1Gi } in + let { + fromRational_a1Gb :: + PrelNum.Rational{-3r,p-} -> t{-a13w-} + {-# L #-} + fromRational_a1Gb = + fromRational_a1Gh } in + let { + lit_a1Ga :: + t{-a13w-} + {-# L #-} + lit_a1Ga = + fromRational_a1Gb + _rational_ 11 5 } in + let { + ==_a1G9 :: + t{-a13w-} -> t{-a13w-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1G9 = + ==_a1Gf } in + let { + fromInt_a1G8 :: + PrelBase.Int{-3g,p-} -> t{-a13s-} + {-# L #-} + fromInt_a1G8 = + fromInt_a1Gk } in + let { lit_a1G7 :: + t{-a13s-} + {-# L #-} + lit_a1G7 = + let { + ds_d1I3 :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1I3 = + PrelBase.I#{-5b,p-}{i} + 3 + } in + fromInt_a1G8 + ds_d1I3 + } in + let { + ==_a1G6 :: + t{-a13s-} -> t{-a13s-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1G6 = + ==_a1Gi } in + let { + fromRational_a1G5 :: + PrelNum.Rational{-3r,p-} -> t{-a13w-} + {-# L #-} + fromRational_a1G5 = + fromRational_a1Gh } in + let { + lit_a1G4 :: + t{-a13w-} + {-# L #-} + lit_a1G4 = + fromRational_a1G5 + _rational_ 33 10 } in + let { + ==_a1G3 :: + t{-a13w-} -> t{-a13w-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1G3 = + ==_a1Gf } in + let { + fromInt_a1G2 :: + PrelBase.Int{-3g,p-} -> t{-a13s-} + {-# L #-} + fromInt_a1G2 = + fromInt_a1Gk } in + let { lit_a1G1 :: + t{-a13s-} + {-# L #-} + lit_a1G1 = + let { + ds_d1Iq :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1Iq = + PrelBase.I#{-5b,p-}{i} + 4 + } in + fromInt_a1G2 + ds_d1Iq + } in + let { + ==_a1G0 :: + t{-a13s-} -> t{-a13s-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1G0 = + ==_a1Gi } in + let { + fromRational_a1FZ :: + PrelNum.Rational{-3r,p-} -> t{-a13w-} + {-# L #-} + fromRational_a1FZ = + fromRational_a1Gh } in + let { + lit_a1FY :: + t{-a13w-} + {-# L #-} + lit_a1FY = + fromRational_a1FZ + _rational_ 22 5 } in + let { + ==_a1FX :: + t{-a13w-} -> t{-a13w-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1FX = + ==_a1Gf + } in + \ ds_d1Jb :: + t{-a13s-} + {-# L #-} + ds_d1Jb ds_d1Je :: + t{-a13w-} + {-# L #-} + ds_d1Je -> + let { + fail_d1Jf :: + [t{-a13A-}] + {-# L #-} + fail_d1Jf = + GHCerr.patError{-8r,p-} + _@_ [t{-a13A-}] _string_ "ds022.hs:5|function `f'" } in + let { fail_d1Ln :: + [t{-a13A-}] + {-# L #-} + fail_d1Ln = + let { fail_d1KF :: + [t{-a13A-}] + {-# L #-} + fail_d1KF = + let { + fail_d1JX :: + [t{-a13A-}] + {-# L #-} + fail_d1JX = + case + ==_a1G0 + lit_a1G1 ds_d1Jb + of { + PrelBase.True{-5E,p-}{i} -> + case + ==_a1FX + lit_a1FY ds_d1Je + of { + PrelBase.True{-5E,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-a13A-}; + PrelBase.False{-58,p-}{i} -> + fail_d1Jf; + }; + PrelBase.False{-58,p-}{i} -> + fail_d1Jf; + } + } in + case + ==_a1G6 + lit_a1G7 ds_d1Jb + of { + PrelBase.True{-5E,p-}{i} -> case - ((== t172) - dict.160 - ((fromInteger t172) dict.159 (MkInteger! 2##)) - ds.214) + ==_a1G3 + lit_a1G4 ds_d1Je of { - True -> - case - ((== t175) - dict.163 - ((fromRational t175) - dict.162 - (MkDouble! 2.2000000000000002##)) - ds.215) - of { - True -> Nil! t178 - False -> fail.216 - } - False -> fail.216 - } + PrelBase.True{-5E,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-a13A-}; + PrelBase.False{-58,p-}{i} -> + fail_d1JX; + }; + PrelBase.False{-58,p-}{i} -> + fail_d1JX; } - in i.150 - + } in + case + ==_a1Gc + lit_a1Gd ds_d1Jb + of { + PrelBase.True{-5E,p-}{i} -> + case + ==_a1G9 + lit_a1Ga ds_d1Je + of { + PrelBase.True{-5E,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-a13A-}; + PrelBase.False{-58,p-}{i} -> + fail_d1KF; + }; + PrelBase.False{-58,p-}{i} -> + fail_d1KF; + } + } in + case + ==_a1Gi + lit_a1Gj ds_d1Jb + of { + PrelBase.True{-5E,p-}{i} -> + case + ==_a1Gf + lit_a1Gg ds_d1Je + of { + PrelBase.True{-5E,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-a13A-}; + PrelBase.False{-58,p-}{i} -> + fail_d1Ln; + }; + PrelBase.False{-58,p-}{i} -> + fail_d1Ln; + } +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds023.stderr b/ghc/compiler/tests/deSugar/ds023.stderr index fd3aaec..a34fcde 100644 --- a/ghc/compiler/tests/deSugar/ds023.stderr +++ b/ghc/compiler/tests/deSugar/ds023.stderr @@ -1,12 +1,131 @@ + + +================================================================================ Desugared: -{- plain CoRec -} -Tests.f :: for all d, e. -> -> d -> e -Tests.f = - /\ t83 t90 -> \ dict.91 dict.84 x.93 -> - ((Tests.g t83) t90) dict.91 dict.84 ((== t83) dict.84 x.93 x.93) x.93 -Tests.g :: for all d, e. -> -> Bool -> d -> e -Tests.g = - /\ t83 t90 -> \ dict.91 dict.84 b.94 x.95 -> - (abs t90) dict.91 (((Tests.f t83) t90) dict.91 dict.84 x.95) -{- end plain CoRec -} +Rec { +ds_dK5 :: + _forall_ + [rlg{-aHq-} riC{-aHC-}] + => + {PrelBase.Num{-2c,p-} riC{-aHC-}} + -> {PrelBase.Eq{-23,p-} rlg{-aHq-}} + -> (rlg{-aHq-} -> riC{-aHC-}, PrelBase.Bool{-34,p-} + -> rlg{-aHq-} + -> riC{-aHC-}) +{-# L #-} +ds_dK5 = + _/\_ rlg{-aHq-} riC{-aHC-} -> \ d.Num_aHI :: + {PrelBase.Num{-2c,p-} riC{-aHC-}} + {-# L #-} + d.Num_aHI d.Eq_aHG :: + {PrelBase.Eq{-23,p-} rlg{-aHq-}} + {-# L #-} + d.Eq_aHG -> + _letrec_ { + ==_aKk :: + rlg{-aHq-} -> rlg{-aHq-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_aKk = + PrelBase.=={-8Y,p-} + _@_ rlg{-aHq-} d.Eq_aHG; + abs_aKr :: + riC{-aHC-} -> riC{-aHC-} + {-# L #-} + abs_aKr = + PrelBase.abs{-r3j,p-} + _@_ riC{-aHC-} d.Num_aHI; + f_aHi :: + rlg{-aHq-} -> riC{-aHC-} + {-# L #-} + f_aHi = + \ x_r3e :: + rlg{-aHq-} + {-# L #-} + x_r3e -> + let { + ds_dL3 :: + PrelBase.Bool{-34,p-} + {-# L #-} + ds_dL3 = + ==_aKk + x_r3e x_r3e + } in + g_aHj + ds_dL3 x_r3e; + g_aHj :: + PrelBase.Bool{-34,p-} -> rlg{-aHq-} -> riC{-aHC-} + {-# L #-} + g_aHj = + \ b_r3g :: + PrelBase.Bool{-34,p-} + {-# L #-} + b_r3g x_r3i :: + rlg{-aHq-} + {-# L #-} + x_r3i -> + let { + ds_dLq :: + riC{-aHC-} + {-# L #-} + ds_dLq = + f_aHi + x_r3i + } in + abs_aKr + ds_dLq; + } in + PrelTup.(,){-62,p-}{i} + {_@_ (rlg{-aHq-} -> riC{-aHC-}) + _@_ (PrelBase.Bool{-34,p-} -> rlg{-aHq-} -> riC{-aHC-}) + f_aHi + g_aHj} +f{-r3l,x-} :: + _forall_ + [rlg{-aHq-} riC{-aHC-}] + => + {PrelBase.Num{-2c,p-} riC{-aHC-}} + -> {PrelBase.Eq{-23,p-} rlg{-aHq-}} + -> rlg{-aHq-} + -> riC{-aHC-} +{-# L #-} +f{-r3l,x-} = + _/\_ rlg{-aHq-} riC{-aHC-} -> \ d.Num_aHI :: + {PrelBase.Num{-2c,p-} riC{-aHC-}} + {-# L #-} + d.Num_aHI d.Eq_aHG :: + {PrelBase.Eq{-23,p-} rlg{-aHq-}} + {-# L #-} + d.Eq_aHG -> + case + ds_dK5 + _@_ rlg{-aHq-} _@_ riC{-aHC-} d.Num_aHI d.Eq_aHG + of { + PrelTup.(,){-62,p-}{i} ds_dM9 ds_dMa -> + ds_dM9;} +g{-r3k,x-} :: + _forall_ + [rlg{-aHq-} riC{-aHC-}] + => + {PrelBase.Num{-2c,p-} riC{-aHC-}} + -> {PrelBase.Eq{-23,p-} rlg{-aHq-}} + -> PrelBase.Bool{-34,p-} + -> rlg{-aHq-} + -> riC{-aHC-} +{-# L #-} +g{-r3k,x-} = + _/\_ rlg{-aHq-} riC{-aHC-} -> \ d.Num_aHI :: + {PrelBase.Num{-2c,p-} riC{-aHC-}} + {-# L #-} + d.Num_aHI d.Eq_aHG :: + {PrelBase.Eq{-23,p-} rlg{-aHq-}} + {-# L #-} + d.Eq_aHG -> + case + ds_dK5 + _@_ rlg{-aHq-} _@_ riC{-aHC-} d.Num_aHI d.Eq_aHG + of { + PrelTup.(,){-62,p-}{i} ds_dMB ds_dMA -> + ds_dMA;} +end Rec } +NOTE: Simplifier still going after 4 iterations; bailing out. diff --git a/ghc/compiler/tests/deSugar/ds024.stderr b/ghc/compiler/tests/deSugar/ds024.stderr index cb012f9..b377760 100644 --- a/ghc/compiler/tests/deSugar/ds024.stderr +++ b/ghc/compiler/tests/deSugar/ds024.stderr @@ -1,10 +1,78 @@ -Desugared: -Main.f :: for all d, e. d -> [[e]] -Main.f = - /\ o79 t81 -> \ x.88 -> - :! [t81] (Nil! t81) (:! [t81] (Nil! t81) (Nil! [t81])) -Main.g :: for all d, e, f, g. d -> ([e], [f], [g]) -Main.g = - /\ o84 t85 t86 t87 -> \ x.89 -> - MkTuple3! [t85] [t86] [t87] (Nil! t85) (Nil! t86) (Nil! t87) + +================================================================================ +Desugared: +g{-r3h,x-} :: + _forall_ + [t{-aAR-} t{-aAL-} t{-aAN-} t{-aAP-}] + => + t{-aAR-} -> ([t{-aAL-}], [t{-aAN-}], [t{-aAP-}]) +{-# L #-} +g{-r3h,x-} = + _/\_ t{-aAR-} t{-aAL-} t{-aAN-} t{-aAP-} -> \ x_r3g :: + t{-aAR-} + {-# L #-} + x_r3g -> + let { + ds_dD1 :: + [t{-aAL-}] + {-# L #-} + ds_dD1 = + PrelBase.[]{-5i,p-}{i} + _@_ t{-aAL-} } in + let { + ds_dD5 :: + [t{-aAN-}] + {-# L #-} + ds_dD5 = + PrelBase.[]{-5i,p-}{i} + _@_ t{-aAN-} } in + let { + ds_dD9 :: + [t{-aAP-}] + {-# L #-} + ds_dD9 = + PrelBase.[]{-5i,p-}{i} + _@_ t{-aAP-} + } in + PrelTup.(,,){-63,p-}{i} + {_@_ [t{-aAL-}] _@_ [t{-aAN-}] _@_ [t{-aAP-}] ds_dD1 ds_dD5 ds_dD9} +f{-r3i,x-} :: + _forall_ [t{-aAZ-} t{-aB3-}] => t{-aB3-} -> [[t{-aAZ-}]] +{-# L #-} +f{-r3i,x-} = + _/\_ t{-aAZ-} t{-aB3-} -> \ x_r3e :: + t{-aB3-} + {-# L #-} + x_r3e -> + let { + ds_dDN :: + [t{-aAZ-}] + {-# L #-} + ds_dDN = + PrelBase.[]{-5i,p-}{i} + _@_ t{-aAZ-} } in + let { ds_dDR :: + [[t{-aAZ-}]] + {-# L #-} + ds_dDR = + let { + ds_dE7 :: + [t{-aAZ-}] + {-# L #-} + ds_dE7 = + PrelBase.[]{-5i,p-}{i} + _@_ t{-aAZ-} } in + let { + ds_dEb :: + [[t{-aAZ-}]] + {-# L #-} + ds_dEb = + PrelBase.[]{-5i,p-}{i} + {_@_ [t{-aAZ-}]} + } in + PrelBase.:{-55,p-}{i} + {_@_ [t{-aAZ-}] ds_dE7 ds_dEb} + } in + PrelBase.:{-55,p-}{i} + {_@_ [t{-aAZ-}] ds_dDN ds_dDR} diff --git a/ghc/compiler/tests/deSugar/ds025.stderr b/ghc/compiler/tests/deSugar/ds025.stderr index 72e8c67..4e6ad93 100644 --- a/ghc/compiler/tests/deSugar/ds025.stderr +++ b/ghc/compiler/tests/deSugar/ds025.stderr @@ -1,84 +1,18 @@ -Desugared: -Util.ehead :: for all a. [a] -> [Char] -> a -Util.ehead = - /\ a -> \ xs.152 loc.153 -> - let - fail.154 = - (error a) - "\"ds025.hs\", line 8: pattern-matching failure [function binding]\n"S - in - case ((null a) xs.152) of { - True -> (error a) ((++ Char) "4"S loc.153) - False -> (head a) xs.152 - } -Util.assoc :: for all a, a. -> -> a -> [(a, a)] -> [Char] -> a -Util.assoc = - /\ a a -> \ dict.120 dict.128 key.165 lst.166 loc.167 -> - let - res.174 = - let - {- CoRec -} - ds.168 = - \ ds.169 -> - case ds.169 of { - Nil -> Nil a - (:) ds.170 ds.171 -> - case ds.170 of { - MkTuple2 key'.172 val.173 -> - case ((== a) dict.120 key.165 key'.172) of { - True -> (: a) val.173 (ds.168 ds.171) - False -> ds.168 ds.171 - } - } - } - {- end CoRec -} - in ds.168 lst.166 - in - case ((null a) res.174) of { - True -> - (error a) - ((++ Char) - "1"S - ((++ Char) - loc.167 - ((++ Char) "2"S ((show a) dict.128 key.165)))) - False -> (Util.ehead a) res.174 "3"S - } -Util.assocMaybe :: for all a, b. -> a -> [(a, b)] -> Util.Maybe b -Util.assocMaybe = - /\ a b -> \ dict.150 -> - let dict.142 = dict.150 in - let - assocMaybe.134 = - \ key.80 lst.81 -> - let - res.82 = - let - {- CoRec -} - ds.179 = - \ ds.180 -> - case ds.180 of { - Nil -> Nil b - (:) ds.181 ds.182 -> - case ds.181 of { - MkTuple2 key'.183 val.184 -> - case - ((== a) - dict.142 key.80 key'.183) - of { - True -> - (: b) - val.184 (ds.179 ds.182) - False -> ds.179 ds.182 - } - } - } - {- end CoRec -} - in ds.179 lst.81 - in - case ((null b) res.82) of { - True -> Util.Nothing b - False -> (Util.Just b) ((head b) res.82) - } - in assocMaybe.134 + +ds025.hs:3: + Conflicting definitions for: `Just' + Defined at ds025.hs:18 + Imported from Prelude at ds025.hs:3 + +ds025.hs:3: + Conflicting definitions for: `Nothing' + Defined at ds025.hs:18 + Imported from Prelude at ds025.hs:3 + +ds025.hs:3: + Conflicting definitions for: `Maybe' + Defined at ds025.hs:18 + Imported from Prelude at ds025.hs:3 + +Compilation had errors diff --git a/ghc/compiler/tests/deSugar/ds026.stderr b/ghc/compiler/tests/deSugar/ds026.stderr index bb52796..914cc16 100644 --- a/ghc/compiler/tests/deSugar/ds026.stderr +++ b/ghc/compiler/tests/deSugar/ds026.stderr @@ -1,49 +1,192 @@ -Desugared: -defm.Main.Boo.op1 :: for all a. -> a -> a -defm.Main.Boo.op1 = /\ a -> (error (a -> a)) "No default method for \"op1\"\n"S -Main.Boo.op1 :: for all a. -> a -> a -Main.Boo.op1 = - /\ a -> \ ds.113 -> - case ds.113 of { - MkTuple2 dict.84 op1.83 -> op1.83 - } -sdsel.Main.Boo.Main.Foo :: for all a. -> -sdsel.Main.Boo.Main.Foo = - /\ a -> \ ds.114 -> - case ds.114 of { - MkTuple2 dict.87 op1.86 -> dict.87 - } -defm.Main.Foo.op :: for all a. -> a -> a -defm.Main.Foo.op = /\ a -> (error (a -> a)) "No default method for \"op\"\n"S -Main.Foo.op :: for all a. -> a -> a -Main.Foo.op = /\ a -> \ op.90 -> op.90 -defm.Main.Noo.op2 :: for all a, b. -> -> a -> b -> a -defm.Main.Noo.op2 = - /\ a b -> \ dict.102 -> - (error (a -> b -> a)) "No default method for \"op2\"\n"S -Main.Noo.op2 :: for all a, b. -> -> a -> b -> a -Main.Noo.op2 = - /\ a b -> \ ds.115 -> - case ds.115 of { - MkTuple2 dict.94 op2.93 -> op2.93 b - } -sdsel.Main.Noo.Main.Boo :: for all a. -> -sdsel.Main.Noo.Main.Boo = - /\ a -> \ ds.116 -> - case ds.116 of { - MkTuple2 dict.98 op2.97 -> dict.98 - } -Main.f :: for all b, a. -> -> a -> b -> a -Main.f = - /\ b a -> \ dict.112 dict.111 -> - let - dict.108 = - (sdsel.Main.Boo.Main.Foo a) ((sdsel.Main.Noo.Main.Boo a) dict.111) in - let - f.104 = - \ x.68 y.69 -> - (Main.Foo.op a) - dict.108 - (((Main.Noo.op2 a) b) dict.111 dict.112 x.68 y.69) - in f.104 + +================================================================================ +Desugared: +Rec { +scsel_NooShouldSucceedBoo{-aKl,x-} :: + _forall_ + [a{-r3n-}] + => + {Noo{-r3B,x-} a{-r3n-}} -> {Boo{-r3o,x-} a{-r3n-}} +{-# L #-} +scsel_NooShouldSucceedBoo{-aKl,x-} = + _/\_ a{-r3n-} -> \ tpl_B1 :: + {Noo{-r3B,x-} a{-r3n-}} + {-# L #-} + tpl_B1 -> + case tpl_B1 of { PrelTup.(,){-62,p-}{i} tpl_B1 tpl_B2 -> tpl_B1;} +op2{-r3A,x-} :: + _forall_ + [a{-r3n-}] + => + {Noo{-r3B,x-} a{-r3n-}} + -> (_forall_ + [b{-r3q-}] + => + {PrelBase.Eq{-23,p-} b{-r3q-}} -> a{-r3n-} -> b{-r3q-} -> a{-r3n-}) +{-# L #-} +op2{-r3A,x-} = + _/\_ a{-r3n-} -> \ tpl_B1 :: + {Noo{-r3B,x-} a{-r3n-}} + {-# L #-} + tpl_B1 -> + case tpl_B1 of { PrelTup.(,){-62,p-}{i} tpl_B1 tpl_B2 -> tpl_B2;} +$mop2{-rGB,x-} :: + _forall_ + [a{-r3n-}] + => + {Noo{-r3B,x-} a{-r3n-}} + -> (_forall_ + [b{-r3q-}] + => + {PrelBase.Eq{-23,p-} b{-r3q-}} -> a{-r3n-} -> b{-r3q-} -> a{-r3n-}) +{-# L #-} +$mop2{-rGB,x-} = + _/\_ a{-aHc-} -> \ d.Noo_aH5 :: + {Noo{-r3B,x-} a{-aHc-}} + {-# L #-} + d.Noo_aH5 -> + _/\_ b{-aHg-} -> \ d.Eq_aHi :: + {PrelBase.Eq{-23,p-} b{-aHg-}} + {-# L #-} + d.Eq_aHi -> + GHCerr.noDefaultMethodError{-8k,p-} + _@_ (a{-aHc-} -> b{-aHg-} -> a{-aHc-}) + _string_ "Class Noo Method op2" +scsel_BooShouldSucceedFoo{-aKD,x-} :: + _forall_ + [a{-r3t-}] + => + {Boo{-r3o,x-} a{-r3t-}} -> {Foo{-r3u,x-} a{-r3t-}} +{-# L #-} +scsel_BooShouldSucceedFoo{-aKD,x-} = + _/\_ a{-r3t-} -> \ tpl_B1 :: + {Boo{-r3o,x-} a{-r3t-}} + {-# L #-} + tpl_B1 -> + case tpl_B1 of { PrelTup.(,){-62,p-}{i} tpl_B1 tpl_B2 -> tpl_B1;} +op1{-r3C,x-} :: + _forall_ + [a{-r3t-}] + => + {Boo{-r3o,x-} a{-r3t-}} -> a{-r3t-} -> a{-r3t-} +{-# L #-} +op1{-r3C,x-} = + _/\_ a{-r3t-} -> \ tpl_B1 :: + {Boo{-r3o,x-} a{-r3t-}} + {-# L #-} + tpl_B1 -> + case tpl_B1 of { PrelTup.(,){-62,p-}{i} tpl_B1 tpl_B2 -> tpl_B2;} +$mop1{-rGD,x-} :: + _forall_ + [a{-r3t-}] + => + {Boo{-r3o,x-} a{-r3t-}} -> a{-r3t-} -> a{-r3t-} +{-# L #-} +$mop1{-rGD,x-} = + _/\_ a{-aHs-} -> \ d.Boo_aHl :: + {Boo{-r3o,x-} a{-aHs-}} + {-# L #-} + d.Boo_aHl -> + GHCerr.noDefaultMethodError{-8k,p-} + _@_ (a{-aHs-} -> a{-aHs-}) _string_ "Class Boo Method op1" +op{-r3D,x-} :: + _forall_ + [a{-r3y-}] + => + {Foo{-r3u,x-} a{-r3y-}} -> a{-r3y-} -> a{-r3y-} +{-# L #-} +op{-r3D,x-} = + _/\_ a{-r3y-} -> \ tpl_B1 :: + {Foo{-r3u,x-} a{-r3y-}} + {-# L #-} + tpl_B1 -> + tpl_B1 +$mop{-rGC,x-} :: + _forall_ + [a{-r3y-}] + => + {Foo{-r3u,x-} a{-r3y-}} -> a{-r3y-} -> a{-r3y-} +{-# L #-} +$mop{-rGC,x-} = + _/\_ a{-aHD-} -> \ d.Foo_aHw :: + {Foo{-r3u,x-} a{-aHD-}} + {-# L #-} + d.Foo_aHw -> + GHCerr.noDefaultMethodError{-8k,p-} + _@_ (a{-aHD-} -> a{-aHD-}) _string_ "Class Foo Method op" +f{-r3z,x-} :: + _forall_ + [a{-aGK-} b{-aGQ-}] + => + {Noo{-r3B,x-} a{-aGK-}} + -> {PrelBase.Eq{-23,p-} b{-aGQ-}} + -> a{-aGK-} + -> b{-aGQ-} + -> a{-aGK-} +{-# L #-} +f{-r3z,x-} = + _/\_ a{-aGK-} b{-aGQ-} -> \ d.Noo_aGY :: + {Noo{-r3B,x-} a{-aGK-}} + {-# L #-} + d.Noo_aGY d.Eq_aH0 :: + {PrelBase.Eq{-23,p-} b{-aGQ-}} + {-# L #-} + d.Eq_aH0 -> + let { + d.Boo_aH2 :: + {Boo{-r3o,x-} a{-aGK-}} + {-# L #-} + d.Boo_aH2 = + scsel_NooShouldSucceedBoo{-aKl,x-} + _@_ a{-aGK-} d.Noo_aGY } in + let { + d.Foo_aGW :: + {Foo{-r3u,x-} a{-aGK-}} + {-# L #-} + d.Foo_aGW = + scsel_BooShouldSucceedFoo{-aKD,x-} + _@_ a{-aGK-} d.Boo_aH2 } in + let { + op_aMI :: + a{-aGK-} -> a{-aGK-} + {-# L #-} + op_aMI = + op{-r3D,x-} + _@_ a{-aGK-} d.Foo_aGW } in + let { + op2_aMH :: + _forall_ + [b{-aGM-}] + => + {PrelBase.Eq{-23,p-} b{-aGM-}} -> a{-aGK-} -> b{-aGM-} -> a{-aGK-} + {-# L #-} + op2_aMH = + op2{-r3A,x-} + _@_ a{-aGK-} d.Noo_aGY } in + let { + op2_aMG :: + a{-aGK-} -> b{-aGQ-} -> a{-aGK-} + {-# L #-} + op2_aMG = + op2_aMH + _@_ b{-aGQ-} d.Eq_aH0 + } in + \ x_r3j :: + a{-aGK-} + {-# L #-} + x_r3j y_r3l :: + b{-aGQ-} + {-# L #-} + y_r3l -> + let { + ds_dNv :: + a{-aGK-} + {-# L #-} + ds_dNv = + op2_aMG + x_r3j y_r3l + } in + op_aMI + ds_dNv +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds027.stderr b/ghc/compiler/tests/deSugar/ds027.stderr index 0b5be11..3d500d9 100644 --- a/ghc/compiler/tests/deSugar/ds027.stderr +++ b/ghc/compiler/tests/deSugar/ds027.stderr @@ -1,44 +1,118 @@ -Desugared: -{- plain CoRec -} -dfun.Eq.Test.Foo :: -dfun.Eq.Test.Foo = - let - ==.76 = - \ ds.83 ds.84 -> - let - fail.85 = - (error Bool) - "\"ds027.hs\", line 8: pattern-matching failure [function binding]\n"S - in - case ds.83 of { - Test.Bar -> - case ds.84 of { - Test.Baz -> True - _ -> fail.85 - } - _ -> fail.85 - } in - let - /=.77 = - \ ds.89 ds.90 -> - let - fail.91 = - (error Bool) - "\"ds027.hs\", line 9: pattern-matching failure [function binding]\n"S - in - case ds.89 of { - Test.Bar -> - case ds.90 of { - Test.Baz -> False - _ -> fail.91 - } - _ -> fail.91 - } - in - MkTuple2! - (Test.Foo -> Test.Foo -> Bool) - (Test.Foo -> Test.Foo -> Bool) - ==.76 - /=.77 -{- end plain CoRec -} +ds027.hs:8: + Warning: Possibly incomplete patterns + in the definition of function `==' +ds027.hs:9: + Warning: Possibly incomplete patterns + in the definition of function `/=' + +================================================================================ +Desugared: +Rec { +d.Eval_aGg :: + {PrelBase.Eval{-24,p-} Foo{-r3n,x-}} +{-# L #-} +d.Eval_aGg = + PrelBase.void{-8G,p-} +$d2{-rIX,x-} :: + {PrelBase.Eval{-24,p-} Foo{-r3n,x-}} +{-# L #-} +$d2{-rIX,x-} = + d.Eval_aGg +==_aGo :: + Foo{-r3n,x-} -> Foo{-r3n,x-} -> PrelBase.Bool{-34,p-} +{-# L #-} +==_aGo = + \ ds_dJM :: + Foo{-r3n,x-} + {-# L #-} + ds_dJM ds_dJN :: + Foo{-r3n,x-} + {-# L #-} + ds_dJN -> + let { + fail_dJO :: + PrelBase.Bool{-34,p-} + {-# L #-} + fail_dJO = + GHCerr.patError{-8r,p-} + _@_ PrelBase.Bool{-34,p-} _string_ "ds027.hs:8|function `=='" + } in + case ds_dJM of { + Baz{-r3,x-}{i} -> + fail_dJO; + Bar{-r4,x-}{i} -> + case ds_dJN of { + Bar{-r4,x-}{i} -> + fail_dJO; + Baz{-r3,x-}{i} -> + PrelBase.True{-5E,p-}{i}; + }; + } +==_aJ7 :: + Foo{-r3n,x-} -> Foo{-r3n,x-} -> PrelBase.Bool{-34,p-} +{-# L #-} +==_aJ7 = + ==_aGo +/=_aGs :: + Foo{-r3n,x-} -> Foo{-r3n,x-} -> PrelBase.Bool{-34,p-} +{-# L #-} +/=_aGs = + \ ds_dKq :: + Foo{-r3n,x-} + {-# L #-} + ds_dKq ds_dKr :: + Foo{-r3n,x-} + {-# L #-} + ds_dKr -> + let { + fail_dKs :: + PrelBase.Bool{-34,p-} + {-# L #-} + fail_dKs = + GHCerr.patError{-8r,p-} + _@_ PrelBase.Bool{-34,p-} _string_ "ds027.hs:9|function `/='" + } in + case ds_dKq of { + Baz{-r3,x-}{i} -> + fail_dKs; + Bar{-r4,x-}{i} -> + case ds_dKr of { + Bar{-r4,x-}{i} -> + fail_dKs; + Baz{-r3,x-}{i} -> + PrelBase.False{-58,p-}{i}; + }; + } +/=_aJg :: + Foo{-r3n,x-} -> Foo{-r3n,x-} -> PrelBase.Bool{-34,p-} +{-# L #-} +/=_aJg = + /=_aGs +d.Eq_aGl :: + {PrelBase.Eq{-23,p-} Foo{-r3n,x-}} +{-# L #-} +d.Eq_aGl = + PrelTup.(,){-62,p-}{i} + {_@_ (Foo{-r3n,x-} -> Foo{-r3n,x-} -> PrelBase.Bool{-34,p-}) + _@_ (Foo{-r3n,x-} -> Foo{-r3n,x-} -> PrelBase.Bool{-34,p-}) + ==_aJ7 + /=_aJg} +$d1{-rJp,x-} :: + {PrelBase.Eq{-23,p-} Foo{-r3n,x-}} +{-# L #-} +$d1{-rJp,x-} = + d.Eq_aGl +Bar{-r4,x-}{i} :: + Foo{-r3n,x-} +_A_ 0 {-# L #-} +Bar{-r4,x-}{i} = + Bar{-r4,x-}{i} + {} +Baz{-r3,x-}{i} :: + Foo{-r3n,x-} +_A_ 0 {-# L #-} +Baz{-r3,x-}{i} = + Baz{-r3,x-}{i} + {} +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds028.stderr b/ghc/compiler/tests/deSugar/ds028.stderr index 450f82f..99e83c8 100644 --- a/ghc/compiler/tests/deSugar/ds028.stderr +++ b/ghc/compiler/tests/deSugar/ds028.stderr @@ -1,30 +1,83 @@ -Desugared: -{- plain CoRec -} -Main.map :: for all d, e. (d -> e) -> [d] -> [e] -Main.map = - /\ t88 t84 -> \ f.100 ds.101 -> - let - fail.102 = - (error [t84]) - "\"ds028.hs\", line 7: pattern-matching failure [function binding]\n"S - in - case ds.101 of { - Nil -> Nil! t84 - (:) x.103 xs.104 -> - let f.105 = f.100 - in (: t84) (f.105 x.103) (((Main.map t88) t84) f.105 xs.104) - } -{- end plain CoRec -} -Main.|| :: Bool -> Bool -> Bool -Main.|| = - \ ds.109 ds.110 -> - let - fail.111 = - (error Bool) - "\"ds028.hs\", line 10: pattern-matching failure [function binding]\n"S - in - case ds.109 of { - True -> True - False -> let x.112 = ds.110 in x.112 - } + +================================================================================ +Desugared: +||||_amR :: + PrelBase.Bool{-34,p-} + -> PrelBase.Bool{-34,p-} + -> PrelBase.Bool{-34,p-} +{-# L #-} +||||_amR = + \ ds_dq6 :: + PrelBase.Bool{-34,p-} + {-# L #-} + ds_dq6 ds_dq7 :: + PrelBase.Bool{-34,p-} + {-# L #-} + ds_dq7 -> + case ds_dq6 of { + PrelBase.True{-5E,p-}{i} -> + PrelBase.True{-5E,p-}{i}; + PrelBase.False{-58,p-}{i} -> + ds_dq7; + } +||||{-r3q,x-} :: + PrelBase.Bool{-34,p-} + -> PrelBase.Bool{-34,p-} + -> PrelBase.Bool{-34,p-} +{-# L #-} +||||{-r3q,x-} = + ||||_amR +Rec { +mAp{-r3r,x-} :: + _forall_ + [t{-an5-} t{-an7-}] + => + (t{-an5-} -> t{-an7-}) -> [t{-an5-}] -> [t{-an7-}] +{-# L #-} +mAp{-r3r,x-} = + _/\_ t{-an5-} t{-an7-} -> + _letrec_ { + mAp_amZ :: + (t{-an5-} -> t{-an7-}) -> [t{-an5-}] -> [t{-an7-}] + {-# L #-} + mAp_amZ = + \ f_r3e :: + t{-an5-} -> t{-an7-} + {-# L #-} + f_r3e ds_dqV :: + [t{-an5-}] + {-# L #-} + ds_dqV -> + case ds_dqV of { + PrelBase.[]{-5i,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + _@_ t{-an7-}; + PrelBase.:{-55,p-}{i} x_r3j xs_r3k -> + let { + f_r3h :: + t{-an5-} -> t{-an7-} + {-# L #-} + f_r3h = + f_r3e } in + let { + ds_drl :: + t{-an7-} + {-# L #-} + ds_drl = + f_r3h + x_r3j } in + let { + ds_drp :: + [t{-an7-}] + {-# L #-} + ds_drp = + mAp_amZ + f_r3h xs_r3k + } in + PrelBase.:{-55,p-}{i} + _@_ t{-an7-} ds_drl ds_drp; + }; + } in + mAp_amZ +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds029.stderr b/ghc/compiler/tests/deSugar/ds029.stderr index 4f1da2b..f3230a1 100644 --- a/ghc/compiler/tests/deSugar/ds029.stderr +++ b/ghc/compiler/tests/deSugar/ds029.stderr @@ -1,70 +1,187 @@ -Desugared: -Test.f :: for all d, e. -> -> d -> e -Test.f = - /\ o79 t102 -> \ dict.103 dict.104 x.107 -> - let - ds.124 = - /\ t108 -> \ dict.109 dict.110 -> - let dict.111 = dict.110 in - let dict.112 = dict.111 in - let dict.113 = dict.112 in - let dict.114 = dict.113 in - let dict.115 = dict.114 in - let dict.116 = dict.109 - in - let - {- CoRec -} - ds.117 = - case ((< t108) dict.116 y.118 z.119) of { - True -> - MkTuple2! - t108 - t108 - ((fromInteger t108) - dict.115 (MkInteger! 0##)) - ((fromInteger t108) - dict.114 (MkInteger! 1##)) - False -> - case ((> t108) dict.109 y.118 z.119) of { - True -> - MkTuple2! - t108 - t108 - ((fromInteger t108) - dict.113 (MkInteger! 1##)) - ((fromInteger t108) - dict.112 (MkInteger! 2##)) - False -> - MkTuple2! - t108 - t108 - ((fromInteger t108) - dict.111 (MkInteger! 2##)) - ((fromInteger t108) - dict.110 (MkInteger! 3##)) - } - } - y.118 = - case ds.117 of { - MkTuple2 y.120 z.121 -> y.120 - } - z.119 = - case ds.117 of { - MkTuple2 y.122 z.123 -> z.123 - } - {- end CoRec -} - in MkTuple2! t108 t108 y.118 z.119 in - let - y.130 = - /\ t125 -> \ dict.126 dict.127 -> - case ((ds.124 t125) dict.126 dict.127) of { - MkTuple2 y.128 z.129 -> y.128 - } in - let - z.136 = - /\ t131 -> \ dict.132 dict.133 -> - case ((ds.124 t131) dict.132 dict.133) of { - MkTuple2 y.134 z.135 -> z.135 - } - in (y.130 t102) dict.103 dict.104 + +================================================================================ +Desugared: +f{-r3h,x-} :: + _forall_ + [t{-aY1-} t{-aYi-}] + => + {PrelBase.Ord{-2d,p-} t{-aY1-}} + -> {PrelBase.Num{-2c,p-} t{-aY1-}} + -> t{-aYi-} + -> t{-aY1-} +{-# L #-} +f{-r3h,x-} = + _/\_ t{-aY1-} t{-aYi-} -> \ d.Ord_aYk :: + {PrelBase.Ord{-2d,p-} t{-aY1-}} + {-# L #-} + d.Ord_aYk d.Num_aYn :: + {PrelBase.Num{-2c,p-} t{-aY1-}} + {-# L #-} + d.Num_aYn -> + let { + <_a137 :: + t{-aY1-} -> t{-aY1-} -> PrelBase.Bool{-34,p-} + {-# L #-} + <_a137 = + PrelBase.<{-rcJ,p-} + _@_ t{-aY1-} d.Ord_aYk } in + let { + fromInt_a136 :: + PrelBase.Int{-3g,p-} -> t{-aY1-} + {-# L #-} + fromInt_a136 = + PrelBase.fromInt{-8R,p-} + _@_ t{-aY1-} d.Num_aYn } in + let { lit_a135 :: + t{-aY1-} + {-# L #-} + lit_a135 = + let { + ds_d13v :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d13v = + PrelBase.I#{-5b,p-}{i} + 0 + } in + fromInt_a136 + ds_d13v + } in + let { + fromInt_a134 :: + PrelBase.Int{-3g,p-} -> t{-aY1-} + {-# L #-} + fromInt_a134 = + fromInt_a136 } in + let { lit_a133 :: + t{-aY1-} + {-# L #-} + lit_a133 = + let { + ds_d13K :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d13K = + PrelBase.I#{-5b,p-}{i} + 1 + } in + fromInt_a134 + ds_d13K + } in + let { + d.Ord_aYq :: + {PrelBase.Ord{-2d,p-} t{-aY1-}} + {-# L #-} + d.Ord_aYq = + d.Ord_aYk } in + let { + >_a132 :: + t{-aY1-} -> t{-aY1-} -> PrelBase.Bool{-34,p-} + {-# L #-} + >_a132 = + PrelBase.>{-rcL,p-} + _@_ t{-aY1-} d.Ord_aYq } in + let { + fromInt_a131 :: + PrelBase.Int{-3g,p-} -> t{-aY1-} + {-# L #-} + fromInt_a131 = + fromInt_a136 } in + let { lit_a130 :: + t{-aY1-} + {-# L #-} + lit_a130 = + let { + ds_d148 :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d148 = + PrelBase.I#{-5b,p-}{i} + 2 + } in + fromInt_a131 + ds_d148 + } in + let { + fromInt_a12Z :: + PrelBase.Int{-3g,p-} -> t{-aY1-} + {-# L #-} + fromInt_a12Z = + fromInt_a136 } in + let { lit_a12W :: + t{-aY1-} + {-# L #-} + lit_a12W = + let { + ds_d14n :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d14n = + PrelBase.I#{-5b,p-}{i} + 3 + } in + fromInt_a12Z + ds_d14n + } in + \ x_r3d :: + t{-aYi-} + {-# L #-} + x_r3d -> + _letrec_ { + lit_a14F :: + t{-aY1-} + {-# L #-} + lit_a14F = + lit_a133; + lit_a14H :: + t{-aY1-} + {-# L #-} + lit_a14H = + lit_a130; + ds_d14Q :: + (t{-aY1-}, t{-aY1-}) + {-# L #-} + ds_d14Q = + case + <_a137 + y_aXx z_aXy + of { + PrelBase.True{-5E,p-}{i} -> + PrelTup.(,){-62,p-}{i} + {_@_ t{-aY1-} _@_ t{-aY1-} lit_a135 lit_a133}; + PrelBase.False{-58,p-}{i} -> + case + >_a132 + y_aXx z_aXy + of { + PrelBase.True{-5E,p-}{i} -> + PrelTup.(,){-62,p-}{i} + {_@_ t{-aY1-} _@_ t{-aY1-} lit_a14F lit_a130}; + PrelBase.False{-58,p-}{i} -> + PrelTup.(,){-62,p-}{i} + {_@_ t{-aY1-} _@_ t{-aY1-} lit_a14H lit_a12W}; + }; + }; + y_aXx :: + t{-aY1-} + {-# L #-} + y_aXx = + case ds_d14Q of { PrelTup.(,){-62,p-}{i} y_aXx z_aXy -> y_aXx;}; + z_aXy :: + t{-aY1-} + {-# L #-} + z_aXy = + case ds_d14Q of { PrelTup.(,){-62,p-}{i} y_aXx z_aXy -> z_aXy;}; + y_r3f :: + t{-aY1-} + {-# L #-} + y_r3f = + y_aXx; + z_r3g :: + t{-aY1-} + {-# L #-} + z_r3g = + z_aXy; + } in + y_r3f diff --git a/ghc/compiler/tests/deSugar/ds030.stderr b/ghc/compiler/tests/deSugar/ds030.stderr index 7125ae6..beecd0f 100644 --- a/ghc/compiler/tests/deSugar/ds030.stderr +++ b/ghc/compiler/tests/deSugar/ds030.stderr @@ -1,31 +1,54 @@ + + +================================================================================ Desugared: -Test.f :: for all d. [d] -> Int {- 0 MkInt deriving ( )-} = - /\ t78 -> \ x.88 :: [t78] -> - let ds.89 :: [t78] = x.88 :: [t78] in - let - fail.90 :: Int {- 0 MkInt deriving ( )-} = - ({-CoTyApp-} error :: for all a. - [Char {- 0 MkChar deriving ( )-}] -> a - Int {- 0 MkInt deriving ( )-}) - "\"ds030.hs\", line 5: pattern-matching failed in case\n"S in - let - fail.92 :: Int {- 0 MkInt deriving ( )-} = - let - dict.91 :: > = - dfun.Num.Int :: - in - MkInt :: IntPrim{- StgInt -} -> Int {- 0 MkInt deriving ( )-}! - 4# - in - case ds.89 :: [t78] of { - [a] {- 1 a Nil, : deriving ( )-} - Nil :: for all a. [a] -> - let - dict.93 :: > = - dfun.Num.Int :: - in - MkInt :: IntPrim{- StgInt -} -> Int {- 0 MkInt deriving ( )-}! - 3# - _ -> fail.92 :: Int {- 0 MkInt deriving ( )-} +Rec { +{-# L #-} +d.Num_aHE = + PrelBase.$d3 +{-# L #-} +fromInt_aKm = + PrelBase.fromInt + _@_ PrelBase.Int d.Num_aHE +{-# L #-} +lit_aKx = + let { + {-# L #-} + ds_dKW = + PrelBase.I# + 3 + } in + fromInt_aKm + ds_dKW +{-# L #-} +fromInt_aKw = + fromInt_aKm +{-# L #-} +lit_aKt = + let { + {-# L #-} + ds_dLb = + PrelBase.I# + 4 + } in + fromInt_aKw + ds_dLb +{-# L #-} +f = _/\_ t{-aHm-} -> \ {-# L #-} + x_r3d -> + let { + {-# L #-} + ds_dLw = + x_r3d } in + let { + {-# L #-} + fail_dLy = + lit_aKt + } in + case ds_dLw of { + PrelBase.: ds_dLG ds_dLF -> + fail_dLy; + PrelBase.[] -> + lit_aKx; } - +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds031.stderr b/ghc/compiler/tests/deSugar/ds031.stderr index c282d34..c59f652 100644 --- a/ghc/compiler/tests/deSugar/ds031.stderr +++ b/ghc/compiler/tests/deSugar/ds031.stderr @@ -1,51 +1,137 @@ -Desugared: -{- plain CoRec -} -Main.foldPair :: - for all a, b. (a -> a -> a, b -> b -> b) -> (a, b) -> [(a, b)] -> (a, b) -Main.foldPair = - /\ a b -> \ fg.122 ab.123 ds.124 -> - let - fail.125 = - (error (a, b)) - "\"ds031.hs\", line 4: pattern-matching failure [function binding]\n"S in - let - fail.141 = - case fg.122 of { - MkTuple2 f.126 g.127 -> - case ds.124 of { - (:) ds.128 abs.129 -> - case ds.128 of { - MkTuple2 a.130 b.131 -> - let ab.132 = ab.123 in - let fg.133 = fg.122 in - let - ds.134 = - ((Main.foldPair a) b) - fg.133 ab.132 abs.129 in - let - u.137 = - case ds.134 of { - MkTuple2 u.135 v.136 -> u.135 - } in - let - v.140 = - case ds.134 of { - MkTuple2 u.138 v.139 -> v.139 - } - in - MkTuple2! - a - b - (f.126 a.130 u.137) - (g.127 b.131 v.140) - } - _ -> fail.125 - } - } - in - case ds.124 of { - Nil -> ab.123 - _ -> fail.141 - } -{- end plain CoRec -} +ds031.hs:4: + Warning: Possibly incomplete patterns + in the definition of function `foldPair' + +================================================================================ +Desugared: +Rec { +foldPair{-r3f,x-} :: + _forall_ + [a{-aB1-} b{-aB2-}] + => + (a{-aB1-} -> a{-aB1-} -> a{-aB1-}, b{-aB2-} + -> b{-aB2-} + -> b{-aB2-}) + -> (a{-aB1-}, b{-aB2-}) + -> [(a{-aB1-}, b{-aB2-})] + -> (a{-aB1-}, b{-aB2-}) +{-# L #-} +foldPair{-r3f,x-} = + _/\_ a{-aB1-} b{-aB2-} -> + _letrec_ { + foldPair_aAY :: + (a{-aB1-} -> a{-aB1-} -> a{-aB1-}, b{-aB2-} + -> b{-aB2-} + -> b{-aB2-}) + -> (a{-aB1-}, b{-aB2-}) + -> [(a{-aB1-}, b{-aB2-})] + -> (a{-aB1-}, b{-aB2-}) + {-# L #-} + foldPair_aAY = + \ fg_r3h :: + (a{-aB1-} -> a{-aB1-} -> a{-aB1-}, b{-aB2-} + -> b{-aB2-} + -> b{-aB2-}) + {-# L #-} + fg_r3h ab_r3j :: + (a{-aB1-}, b{-aB2-}) + {-# L #-} + ab_r3j ds_dFz :: + [(a{-aB1-}, b{-aB2-})] + {-# L #-} + ds_dFz -> + let { + fail_dFA :: + (a{-aB1-}, b{-aB2-}) + {-# L #-} + fail_dFA = + GHCerr.patError{-8r,p-} + _@_ (a{-aB1-}, b{-aB2-}) + _string_ "ds031.hs:4|function `foldPair'" } in + let { + fail_dHs :: + (a{-aB1-}, b{-aB2-}) + {-# L #-} + fail_dHs = + case fg_r3h of { PrelTup.(,){-62,p-}{i} f_r3n g_r3o -> + case ds_dFz of { + PrelBase.[]{-5i,p-}{i} -> + fail_dFA; + PrelBase.:{-55,p-}{i} ds_dFV abs_r3u -> + case ds_dFV of { PrelTup.(,){-62,p-}{i} a_r3s b_r3t -> + let { + ab_r3q :: + (a{-aB1-}, b{-aB2-}) + {-# L #-} + ab_r3q = + ab_r3j } in + let { + fg_r3m :: + (a{-aB1-} -> a{-aB1-} -> a{-aB1-}, b{-aB2-} + -> b{-aB2-} + -> b{-aB2-}) + {-# L #-} + fg_r3m = + fg_r3h } in + let { + ds_dGR :: + (a{-aB1-}, b{-aB2-}) + {-# L #-} + ds_dGR = + foldPair{-r3f,x-} + _@_ a{-aB1-} _@_ b{-aB2-} fg_r3m ab_r3q abs_r3u } in + let { + u_aBw :: + a{-aB1-} + {-# L #-} + u_aBw = + case ds_dGR of { PrelTup.(,){-62,p-}{i} u_aBw v_aBx -> + u_aBw;} } in + let { + v_aBx :: + b{-aB2-} + {-# L #-} + v_aBx = + case ds_dGR of { PrelTup.(,){-62,p-}{i} u_aBw v_aBx -> + v_aBx;} } in + let { + u_r3w :: + a{-aB1-} + {-# L #-} + u_r3w = + u_aBw } in + let { + v_r3x :: + b{-aB2-} + {-# L #-} + v_r3x = + v_aBx } in + let { + ds_dGq :: + a{-aB1-} + {-# L #-} + ds_dGq = + f_r3n + a_r3s u_r3w } in + let { + ds_dGu :: + b{-aB2-} + {-# L #-} + ds_dGu = + g_r3o + b_r3t v_r3x + } in + PrelTup.(,){-62,p-}{i} + {_@_ a{-aB1-} _@_ b{-aB2-} ds_dGq ds_dGu};}; + };} + } in + case ds_dFz of { + PrelBase.:{-55,p-}{i} ds_dHA ds_dHz -> + fail_dHs; + PrelBase.[]{-5i,p-}{i} -> + ab_r3j; + }; + } in + foldPair_aAY +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds032.stderr b/ghc/compiler/tests/deSugar/ds032.stderr index e5faf99..1276b4e 100644 --- a/ghc/compiler/tests/deSugar/ds032.stderr +++ b/ghc/compiler/tests/deSugar/ds032.stderr @@ -1,64 +1,201 @@ -Desugared: -dict.93 :: -dict.93 = dfun.Fractional.Float -dict.94 :: -dict.94 = dfun.Eq.Float -dict.101 :: -dict.101 = dfun.Fractional.Float -dict.102 :: -dict.102 = dfun.Eq.Float -dict.107 :: -dict.107 = dfun.Fractional.Float -dict.111 :: -dict.111 = dfun.Fractional.Float -{- plain CoRec -} -Main.flatten :: Int -> Bool -> Float -> [(Int, Float)] -> [Char] -Main.flatten = - \ n.130 nlp.131 ds.132 seqs.133 -> - let - fail.134 = - (error [Char]) - "\"ds032.hs\", line 10: pattern-matching failure [function binding]\n"S - in - case (eqFloat (MkFloat! 0.0000000000000000#) ds.132) of { - True -> Main.flattenS nlp.131 seqs.133 - False -> - case (eqFloat (MkFloat! 1.0000000000000000#) ds.132) of { - True -> - let seqs.135 = seqs.133 in - let nlp.136 = nlp.131 in - let n.137 = n.130 - in - Main.flatten - n.137 - nlp.136 - (MkFloat! 1.1000000000000001#) - ((: (Int, Float)) - (MkTuple2! - Int - Float - n.137 - (MkFloat! 1.2000000000000000#)) - seqs.135) - False -> fail.134 - } - } -Main.flattenS :: Bool -> [(Int, Float)] -> [Char] -Main.flattenS = - \ nlp.138 ds.139 -> - let - fail.140 = - (error [Char]) - "\"ds032.hs\", line 14: pattern-matching failure [function binding]\n"S - in - case ds.139 of { - Nil -> Nil! Char - (:) ds.141 seqs.142 -> - case ds.141 of { - MkTuple2 col.143 seq.144 -> - let nlp.145 = nlp.138 - in Main.flatten col.143 nlp.145 seq.144 seqs.142 - } - } -{- end plain CoRec -} +ds032.hs:12: + Warning: Possibly incomplete patterns + in the definition of function `flatten' + +================================================================================ +Desugared: +Rec { +d.Fractional_a11b :: + {PrelNum.Fractional{-26,p-} PrelBase.Float{-3c,p-}} +{-# L #-} +d.Fractional_a11b = + PrelNum.$d23{-rGg,p-} +fromRational_a17D :: + PrelNum.Rational{-3r,p-} -> PrelBase.Float{-3c,p-} +{-# L #-} +fromRational_a17D = + PrelNum.fromRational{-8T,p-} + _@_ PrelBase.Float{-3c,p-} d.Fractional_a11b +lit_a17V :: + PrelBase.Float{-3c,p-} +{-# L #-} +lit_a17V = + fromRational_a17D + _rational_ 0 1 +d.Eq_a11e :: + {PrelBase.Eq{-23,p-} PrelBase.Float{-3c,p-}} +{-# L #-} +d.Eq_a11e = + PrelNum.$d27{-rGk,p-} +==_a17U :: + PrelBase.Float{-3c,p-} + -> PrelBase.Float{-3c,p-} + -> PrelBase.Bool{-34,p-} +{-# L #-} +==_a17U = + PrelBase.=={-8Y,p-} + _@_ PrelBase.Float{-3c,p-} d.Eq_a11e +fromRational_a17T :: + PrelNum.Rational{-3r,p-} -> PrelBase.Float{-3c,p-} +{-# L #-} +fromRational_a17T = + fromRational_a17D +lit_a17S :: + PrelBase.Float{-3c,p-} +{-# L #-} +lit_a17S = + fromRational_a17T + _rational_ 1 1 +fromRational_a17R :: + PrelNum.Rational{-3r,p-} -> PrelBase.Float{-3c,p-} +{-# L #-} +fromRational_a17R = + fromRational_a17D +lit_a17Q :: + PrelBase.Float{-3c,p-} +{-# L #-} +lit_a17Q = + fromRational_a17R + _rational_ 11 10 +fromRational_a17P :: + PrelNum.Rational{-3r,p-} -> PrelBase.Float{-3c,p-} +{-# L #-} +fromRational_a17P = + fromRational_a17D +lit_a17K :: + PrelBase.Float{-3c,p-} +{-# L #-} +lit_a17K = + fromRational_a17P + _rational_ 6 5 +==_a18C :: + PrelBase.Float{-3c,p-} + -> PrelBase.Float{-3c,p-} + -> PrelBase.Bool{-34,p-} +{-# L #-} +==_a18C = + ==_a17U +flatten_a10r :: + PrelBase.Int{-3g,p-} + -> PrelBase.Bool{-34,p-} + -> PrelBase.Float{-3c,p-} + -> [(PrelBase.Int{-3g,p-}, PrelBase.Float{-3c,p-})] + -> PrelBase.String{-rzM,p-} +{-# L #-} +flatten_a10r = + \ n_r3i :: + PrelBase.Int{-3g,p-} + {-# L #-} + n_r3i nlp_r3k :: + PrelBase.Bool{-34,p-} + {-# L #-} + nlp_r3k ds_d19G :: + PrelBase.Float{-3c,p-} + {-# L #-} + ds_d19G seqs_r3n :: + [(PrelBase.Int{-3g,p-}, PrelBase.Float{-3c,p-})] + {-# L #-} + seqs_r3n -> + let { + fail_d19H :: + PrelBase.String{-rzM,p-} + {-# L #-} + fail_d19H = + GHCerr.patError{-8r,p-} + _@_ PrelBase.String{-rzM,p-} + _string_ "ds032.hs:12|function `flatten'" + } in + case ds_d19G of { PrelBase.F#{-59,p-}{i} ds_d19Q -> + case# ds_d19Q of { + _float_ 0.0000000000000000 -> + flattenS{-r3,x-} + nlp_r3k seqs_r3n; + _float_ 1.0000000000000000 -> + let { + seqs_r3u :: + [(PrelBase.Int{-3g,p-}, PrelBase.Float{-3c,p-})] + {-# L #-} + seqs_r3u = + seqs_r3n } in + let { + nlp_r3r :: + PrelBase.Bool{-34,p-} + {-# L #-} + nlp_r3r = + nlp_r3k } in + let { + n_r3p :: + PrelBase.Int{-3g,p-} + {-# L #-} + n_r3p = + n_r3i } in + let { ds_d1at :: + [(PrelBase.Int{-3g,p-}, PrelBase.Float{-3c,p-})] + {-# L #-} + ds_d1at = + let { + ds_d1aG :: + (PrelBase.Int{-3g,p-}, PrelBase.Float{-3c,p-}) + {-# L #-} + ds_d1aG = + PrelTup.(,){-62,p-}{i} + {_@_ PrelBase.Int{-3g,p-} + _@_ PrelBase.Float{-3c,p-} + n_r3p + lit_a17K} + } in + PrelBase.:{-55,p-}{i} + _@_ (PrelBase.Int{-3g,p-}, PrelBase.Float{-3c,p-}) ds_d1aG seqs_r3u + } in + flatten{-r1,x-} + n_r3p nlp_r3r lit_a17Q ds_d1at; + ds_d1b0 -> + fail_d19H; + };} +flattenS_a10s :: + PrelBase.Bool{-34,p-} + -> [(PrelBase.Int{-3g,p-}, PrelBase.Float{-3c,p-})] + -> PrelBase.String{-rzM,p-} +{-# L #-} +flattenS_a10s = + \ nlp_r3w :: + PrelBase.Bool{-34,p-} + {-# L #-} + nlp_r3w ds_d1b6 :: + [(PrelBase.Int{-3g,p-}, PrelBase.Float{-3c,p-})] + {-# L #-} + ds_d1b6 -> + case ds_d1b6 of { + PrelBase.[]{-5i,p-}{i} -> + PrelBase.[]{-5i,p-}{i} + {_@_ PrelBase.Char{-38,p-}}; + PrelBase.:{-55,p-}{i} ds_d1bl seqs_r3D -> + case ds_d1bl of { PrelTup.(,){-62,p-}{i} col_r3B seq_r3C -> + let { + nlp_r3z :: + PrelBase.Bool{-34,p-} + {-# L #-} + nlp_r3z = + nlp_r3w + } in + flatten{-r1,x-} + col_r3B nlp_r3z seq_r3C seqs_r3D;}; + } +flatten{-r1,x-} :: + PrelBase.Int{-3g,p-} + -> PrelBase.Bool{-34,p-} + -> PrelBase.Float{-3c,p-} + -> [(PrelBase.Int{-3g,p-}, PrelBase.Float{-3c,p-})] + -> PrelBase.String{-rzM,p-} +{-# L #-} +flatten{-r1,x-} = + flatten_a10r +flattenS{-r3,x-} :: + PrelBase.Bool{-34,p-} + -> [(PrelBase.Int{-3g,p-}, PrelBase.Float{-3c,p-})] + -> PrelBase.String{-rzM,p-} +{-# L #-} +flattenS{-r3,x-} = + flattenS_a10s +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds033.stderr b/ghc/compiler/tests/deSugar/ds033.stderr index 9fe0d0c..d6dd38f 100644 --- a/ghc/compiler/tests/deSugar/ds033.stderr +++ b/ghc/compiler/tests/deSugar/ds033.stderr @@ -1,22 +1,162 @@ + + +================================================================================ Desugared: -Test.g1 :: for all d. d -> d -Test.g1 = /\ o91 -> \ y.119 -> y.119 -Test.f1 :: for all d. d -> d -Test.f1 = /\ t95 -> \ x.120 -> (Test.g1 t95) x.120 -Test.g2 :: for all d. d -> d -Test.g2 = /\ o98 -> \ y.121 -> y.121 -Test.f2 :: for all d. d -> d -Test.f2 = /\ t102 -> \ x.122 -> (Test.g2 t102) x.122 -{- plain CoRec -} -Test.f3 :: for all d, e. d -> e -Test.f3 = /\ o109 o110 -> \ x.123 -> ((Test.g3 o109) o110) x.123 -Test.g3 :: for all d, e. d -> e -Test.g3 = /\ o109 o110 -> \ y.124 -> ((Test.f3 o109) o110) y.124 -{- end plain CoRec -} -{- plain CoRec -} -Test.g4 :: for all d, e. d -> e -Test.g4 = /\ o117 o118 -> \ y.125 -> ((Test.f4 o117) o118) y.125 -Test.f4 :: for all d, e. d -> e -Test.f4 = /\ o117 o118 -> \ x.126 -> ((Test.g4 o117) o118) x.126 -{- end plain CoRec -} +Rec { +ds_dsc :: + _forall_ + [t{-anl-} t{-ann-}] + => + (t{-anl-} -> t{-ann-}, t{-anl-} -> t{-ann-}) +{-# L #-} +ds_dsc = + _/\_ t{-anl-} t{-ann-} -> + _letrec_ { + g4_an6 :: + t{-anl-} -> t{-ann-} + {-# L #-} + g4_an6 = + \ y_r3w :: + t{-anl-} + {-# L #-} + y_r3w -> + f4_an7 + y_r3w; + f4_an7 :: + t{-anl-} -> t{-ann-} + {-# L #-} + f4_an7 = + \ x_r3y :: + t{-anl-} + {-# L #-} + x_r3y -> + g4_an6 + x_r3y; + } in + PrelTup.(,){-62,p-}{i} + {_@_ (t{-anl-} -> t{-ann-}) + _@_ (t{-anl-} -> t{-ann-}) + g4_an6 + f4_an7} +g4{-r3A,x-} :: + _forall_ [t{-anl-} t{-ann-}] => t{-anl-} -> t{-ann-} +{-# L #-} +g4{-r3A,x-} = + _/\_ t{-anl-} t{-ann-} -> + case + ds_dsc + _@_ t{-anl-} _@_ t{-ann-} + of { + PrelTup.(,){-62,p-}{i} ds_dth ds_dti -> + ds_dth;} +f4{-r3z,x-} :: + _forall_ [t{-anl-} t{-ann-}] => t{-anl-} -> t{-ann-} +{-# L #-} +f4{-r3z,x-} = + _/\_ t{-anl-} t{-ann-} -> + case + ds_dsc + _@_ t{-anl-} _@_ t{-ann-} + of { + PrelTup.(,){-62,p-}{i} ds_dtB ds_dtA -> + ds_dtA;} +end Rec } +Rec { +ds_dtM :: + _forall_ + [t{-anE-} t{-anG-}] + => + (t{-anE-} -> t{-anG-}, t{-anE-} -> t{-anG-}) +{-# L #-} +ds_dtM = + _/\_ t{-anE-} t{-anG-} -> + _letrec_ { + f3_anp :: + t{-anE-} -> t{-anG-} + {-# L #-} + f3_anp = + \ x_r3s :: + t{-anE-} + {-# L #-} + x_r3s -> + g3_anq + x_r3s; + g3_anq :: + t{-anE-} -> t{-anG-} + {-# L #-} + g3_anq = + \ y_r3u :: + t{-anE-} + {-# L #-} + y_r3u -> + f3_anp + y_r3u; + } in + PrelTup.(,){-62,p-}{i} + {_@_ (t{-anE-} -> t{-anG-}) + _@_ (t{-anE-} -> t{-anG-}) + f3_anp + g3_anq} +f3{-r3C,x-} :: + _forall_ [t{-anE-} t{-anG-}] => t{-anE-} -> t{-anG-} +{-# L #-} +f3{-r3C,x-} = + _/\_ t{-anE-} t{-anG-} -> + case + ds_dtM + _@_ t{-anE-} _@_ t{-anG-} + of { + PrelTup.(,){-62,p-}{i} ds_duR ds_duS -> + ds_duR;} +g3{-r3B,x-} :: + _forall_ [t{-anE-} t{-anG-}] => t{-anE-} -> t{-anG-} +{-# L #-} +g3{-r3B,x-} = + _/\_ t{-anE-} t{-anG-} -> + case + ds_dtM + _@_ t{-anE-} _@_ t{-anG-} + of { + PrelTup.(,){-62,p-}{i} ds_dvb ds_dva -> + ds_dva;} +end Rec } +g2{-r3E,x-} :: + _forall_ [t{-anO-}] => t{-anO-} -> t{-anO-} +{-# L #-} +g2{-r3E,x-} = + _/\_ t{-anO-} -> \ y_r3o :: + t{-anO-} + {-# L #-} + y_r3o -> + y_r3o +f2{-r3D,x-} :: + _forall_ [t{-anU-}] => t{-anU-} -> t{-anU-} +{-# L #-} +f2{-r3D,x-} = + _/\_ t{-anU-} -> \ x_r3q :: + t{-anU-} + {-# L #-} + x_r3q -> + g2{-r3E,x-} + _@_ t{-anU-} x_r3q +g1{-r3F,x-} :: + _forall_ [t{-ao4-}] => t{-ao4-} -> t{-ao4-} +{-# L #-} +g1{-r3F,x-} = + _/\_ t{-ao4-} -> \ y_r3m :: + t{-ao4-} + {-# L #-} + y_r3m -> + y_r3m +f1{-r3G,x-} :: + _forall_ [t{-aoa-}] => t{-aoa-} -> t{-aoa-} +{-# L #-} +f1{-r3G,x-} = + _/\_ t{-aoa-} -> \ x_r3k :: + t{-aoa-} + {-# L #-} + x_r3k -> + g1{-r3F,x-} + _@_ t{-aoa-} x_r3k +NOTE: Simplifier still going after 4 iterations; bailing out. diff --git a/ghc/compiler/tests/deSugar/ds034.stderr b/ghc/compiler/tests/deSugar/ds034.stderr index 6ca09a5..9a2659f 100644 --- a/ghc/compiler/tests/deSugar/ds034.stderr +++ b/ghc/compiler/tests/deSugar/ds034.stderr @@ -1,27 +1,110 @@ -Desugared: -{- plain CoRec -} -defm.Test.Foo.op1 :: for all a. -> a -> a -defm.Test.Foo.op1 = /\ a -> (error (a -> a)) "No default method for \"op1\"\n"S -defm.Test.Foo.op2 :: for all a. -> a -> a -defm.Test.Foo.op2 = /\ a -> (error (a -> a)) "No default method for \"op2\"\n"S -Test.Foo.op1 :: for all a. -> a -> a -Test.Foo.op1 = - /\ a -> \ ds.95 -> - case ds.95 of { - MkTuple2 op1.77 op2.78 -> op1.77 - } -Test.Foo.op2 :: for all a. -> a -> a -Test.Foo.op2 = - /\ a -> \ ds.96 -> - case ds.96 of { - MkTuple2 op1.80 op2.81 -> op2.81 - } -dfun.Test.Foo.Int :: -dfun.Test.Foo.Int = - let dict.89 = dfun.Test.Foo.Int in - let op1.85 = \ x.97 -> (Test.Foo.op2 Int) dict.89 x.97 in - let dict.93 = dfun.Test.Foo.Int in - let op2.86 = \ y.98 -> (Test.Foo.op1 Int) dict.93 y.98 - in MkTuple2! (Int -> Int) (Int -> Int) op1.85 op2.86 -{- end plain CoRec -} + +================================================================================ +Desugared: +Rec { +op1{-r3r,x-} :: + _forall_ + [a{-r3p-}] + => + {Foo{-r3s,x-} a{-r3p-}} -> a{-r3p-} -> a{-r3p-} +{-# L #-} +op1{-r3r,x-} = + _/\_ a{-r3p-} -> \ tpl_B1 :: + {Foo{-r3s,x-} a{-r3p-}} + {-# L #-} + tpl_B1 -> + case tpl_B1 of { PrelTup.(,){-62,p-}{i} tpl_B1 tpl_B2 -> tpl_B1;} +op2{-r3q,x-} :: + _forall_ + [a{-r3p-}] + => + {Foo{-r3s,x-} a{-r3p-}} -> a{-r3p-} -> a{-r3p-} +{-# L #-} +op2{-r3q,x-} = + _/\_ a{-r3p-} -> \ tpl_B1 :: + {Foo{-r3s,x-} a{-r3p-}} + {-# L #-} + tpl_B1 -> + case tpl_B1 of { PrelTup.(,){-62,p-}{i} tpl_B1 tpl_B2 -> tpl_B2;} +$mop1{-rn8,x-} :: + _forall_ + [a{-r3p-}] + => + {Foo{-r3s,x-} a{-r3p-}} -> a{-r3p-} -> a{-r3p-} +{-# L #-} +$mop1{-rn8,x-} = + _/\_ a{-anB-} -> \ d.Foo_anu :: + {Foo{-r3s,x-} a{-anB-}} + {-# L #-} + d.Foo_anu -> + GHCerr.noDefaultMethodError{-8k,p-} + _@_ (a{-anB-} -> a{-anB-}) _string_ "Class Foo Method op1" +$mop2{-rn7,x-} :: + _forall_ + [a{-r3p-}] + => + {Foo{-r3s,x-} a{-r3p-}} -> a{-r3p-} -> a{-r3p-} +{-# L #-} +$mop2{-rn7,x-} = + _/\_ a{-anB-} -> \ d.Foo_anE :: + {Foo{-r3s,x-} a{-anB-}} + {-# L #-} + d.Foo_anE -> + GHCerr.noDefaultMethodError{-8k,p-} + _@_ (a{-anB-} -> a{-anB-}) _string_ "Class Foo Method op2" +op2_aq8 :: + PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-} +{-# L #-} +op2_aq8 = + op2_aqv +op1_aqd :: + PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-} +{-# L #-} +op1_aqd = + op1_aqm +op1_an6 :: + PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-} +{-# L #-} +op1_an6 = + \ x_r3i :: + PrelBase.Int{-3g,p-} + {-# L #-} + x_r3i -> + op2_aq8 + x_r3i +op1_aqm :: + PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-} +{-# L #-} +op1_aqm = + op1_an6 +op2_anj :: + PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-} +{-# L #-} +op2_anj = + \ y_r3m :: + PrelBase.Int{-3g,p-} + {-# L #-} + y_r3m -> + op1_aqd + y_r3m +op2_aqv :: + PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-} +{-# L #-} +op2_aqv = + op2_anj +d.Foo_an3 :: + {Foo{-r3s,x-} PrelBase.Int{-3g,p-}} +{-# L #-} +d.Foo_an3 = + PrelTup.(,){-62,p-}{i} + {_@_ (PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-}) + _@_ (PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-}) + op1_aqm + op2_aqv} +$d1{-rqE,x-} :: + {Foo{-r3s,x-} PrelBase.Int{-3g,p-}} +{-# L #-} +$d1{-rqE,x-} = + d.Foo_an3 +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds035.stderr b/ghc/compiler/tests/deSugar/ds035.stderr index bf6c983..1aa6581 100644 --- a/ghc/compiler/tests/deSugar/ds035.stderr +++ b/ghc/compiler/tests/deSugar/ds035.stderr @@ -1,5 +1,24 @@ -"ds035.hs", line 4: undefined value: minusIntPrim -Fail: Compilation errors found +ds035.hs:3: + Type constructor or class not in scope: `Int#' + +ds035.hs:8: + Type constructor or class not in scope: `Int#' + +ds035.hs:4: + Value not in scope: `==#' + +ds035.hs:6: + Value not in scope: `minusInt#' + +ds035.hs:10: + Value not in scope: `+#' + +ds035.hs:18: + Value not in scope: `+#' + +ds035.hs:3: + Type constructor or class not in scope: `Int#' + -ghc: execution of the Haskell compiler had trouble +Compilation had errors diff --git a/ghc/compiler/tests/deSugar/ds036.stderr b/ghc/compiler/tests/deSugar/ds036.stderr index 3fa73ea..615b7df 100644 --- a/ghc/compiler/tests/deSugar/ds036.stderr +++ b/ghc/compiler/tests/deSugar/ds036.stderr @@ -1,145 +1,539 @@ +ds036.hs:44: + Warning: Possibly incomplete patterns + in the definition of function `kh' +ds036.hs:22: + Warning: Possibly incomplete patterns + in the definition of function `brack'' + + +================================================================================ Desugared: -Test2.brack' :: for all a. -> a -> a -> Int -> [a] -> ([a], [a]) -Test2.brack' = - /\ a -> \ dict.124 -> - let dict.119 = dict.124 in - let dict.96 = dfun.Num.Int in - let dict.97 = dfun.Eq.Int in - let dict.104 = dfun.Num.Int in - let dict.105 = dfun.Ord.Int in - let dict.113 = dfun.Num.Int in - let dict.114 = dfun.Ord.Int in - let - brack'.92 = - \ open.64 close.63 ds.148 xs.65 -> - let - fail.149 = - (error ([a], [a])) - "\"ds036.hs\", line 24: pattern-matching failure [function binding]\n"S in - let - fail.151 = - let n.150 = MkInt! 1# - in - case (geInt ds.148 (MkInt! 1#)) of { - True -> - let n.67 = minusInt ds.148 (MkInt! 1#) - in - case xs.65 of { - Nil -> - let close.66 = close.63 in - let open.68 = open.64 - in MkTuple2! [a] [a] (Nil! a) (Nil! a) - (:) h.70 t.73 -> - let close.69 = close.63 in - let open.72 = open.64 - in - case - ((== a) dict.119 h.70 open.72) - of { - True -> - MkTuple2! - [a] [a] (Nil! a) (Nil! a) - False -> fail.149 - } - } - False -> fail.149 - } - in - case ds.148 of { - MkInt ds.152 -> - case ds.152 of { - 0# -> MkTuple2! [a] [a] (Nil! a) xs.65 - _ -> fail.151 - } - } - in brack'.92 -Test2.kh :: - for all d, e. -> -> -> -> d -> e -> e -Test2.kh = - /\ t141 t145 -> \ dict.147 dict.146 dict.143 dict.142 -> - let dict.138 = dict.146 in - let dict.136 = dict.138 in - let dict.133 = dict.147 in - let dict.129 = dict.142 in - let dict.130 = dict.143 in - let - kh.126 = - \ n.74 x.75 -> - let - fail.154 = - (error t145) - "\"ds036.hs\", line 45: pattern-matching failure [function binding]\n"S in - let n.157 = (fromInteger t141) dict.129 (MkInteger! 2##) - in +Rec { +d.Num_aZF :: + {PrelBase.Num{-2c,p-} PrelBase.Int{-3g,p-}} +{-# L #-} +d.Num_aZF = + PrelBase.$d3{-rbz,p-} +fromInt_a19P :: + PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-} +{-# L #-} +fromInt_a19P = + PrelBase.fromInt{-8R,p-} + _@_ PrelBase.Int{-3g,p-} d.Num_aZF +lit_a1a1 :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a1a1 = + let { + ds_d1aS :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1aS = + PrelBase.I#{-5b,p-}{i} + 0 + } in + fromInt_a19P + ds_d1aS +d.Eq_aZI :: + {PrelBase.Eq{-23,p-} PrelBase.Int{-3g,p-}} +{-# L #-} +d.Eq_aZI = + PrelBase.$d7{-rc5,p-} +==_a1a0 :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Bool{-34,p-} +{-# L #-} +==_a1a0 = + PrelBase.=={-8Y,p-} + _@_ PrelBase.Int{-3g,p-} d.Eq_aZI +fromInt_a19Z :: + PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-} +{-# L #-} +fromInt_a19Z = + fromInt_a19P +lit_a19Y :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_a19Y = + let { + ds_d1bg :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1bg = + PrelBase.I#{-5b,p-}{i} + 1 + } in + fromInt_a19Z + ds_d1bg +d.Ord_aZM :: + {PrelBase.Ord{-2d,p-} PrelBase.Int{-3g,p-}} +{-# L #-} +d.Ord_aZM = + PrelBase.$d6{-rc4,p-} +>=_a19X :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Bool{-34,p-} +{-# L #-} +>=_a19X = + PrelBase.>={-8Z,p-} + _@_ PrelBase.Int{-3g,p-} d.Ord_aZM +d.Num_aZP :: + {PrelBase.Num{-2c,p-} PrelBase.Int{-3g,p-}} +{-# L #-} +d.Num_aZP = + d.Num_aZF +-_a19W :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} +{-# L #-} +-_a19W = + PrelBase.-{-817,p-} + _@_ PrelBase.Int{-3g,p-} d.Num_aZP +kh{-r3g,x-} :: + _forall_ + [t{-aYd-}] + => + {PrelBase.Num{-2c,p-} t{-aYd-}} + -> {PrelBase.Ord{-2d,p-} t{-aYd-}} + -> t{-aYd-} + -> t{-aYd-} + -> t{-aYd-} +{-# L #-} +kh{-r3g,x-} = + _/\_ t{-aYd-} -> \ d.Num_aYs :: + {PrelBase.Num{-2c,p-} t{-aYd-}} + {-# L #-} + d.Num_aYs d.Ord_aYu :: + {PrelBase.Ord{-2d,p-} t{-aYd-}} + {-# L #-} + d.Ord_aYu -> + let { + fromInt_a1cx :: + PrelBase.Int{-3g,p-} -> t{-aYd-} + {-# L #-} + fromInt_a1cx = + PrelBase.fromInt{-8R,p-} + _@_ t{-aYd-} d.Num_aYs } in + let { lit_a1cw :: + t{-aYd-} + {-# L #-} + lit_a1cw = + let { + ds_d1cN :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1cN = + PrelBase.I#{-5b,p-}{i} + 2 + } in + fromInt_a1cx + ds_d1cN + } in + let { + >=_a1cv :: + t{-aYd-} -> t{-aYd-} -> PrelBase.Bool{-34,p-} + {-# L #-} + >=_a1cv = + PrelBase.>={-8Z,p-} + _@_ t{-aYd-} d.Ord_aYu } in + let { + d.Num_aYw :: + {PrelBase.Num{-2c,p-} t{-aYd-}} + {-# L #-} + d.Num_aYw = + d.Num_aYs } in + let { + -_a1cu :: + t{-aYd-} -> t{-aYd-} -> t{-aYd-} + {-# L #-} + -_a1cu = + PrelBase.-{-817,p-} + _@_ t{-aYd-} d.Num_aYw } in + let { + d.Ord_aYy :: + {PrelBase.Ord{-2d,p-} t{-aYd-}} + {-# L #-} + d.Ord_aYy = + d.Ord_aYu } in + let { + >_a1ct :: + t{-aYd-} -> t{-aYd-} -> PrelBase.Bool{-34,p-} + {-# L #-} + >_a1ct = + PrelBase.>{-rdf,p-} + _@_ t{-aYd-} d.Ord_aYy } in + let { + d.Num_aYA :: + {PrelBase.Num{-2c,p-} t{-aYd-}} + {-# L #-} + d.Num_aYA = + d.Num_aYs } in + let { + *_a1cs :: + t{-aYd-} -> t{-aYd-} -> t{-aYd-} + {-# L #-} + *_a1cs = + PrelBase.*{-rd8,p-} + _@_ t{-aYd-} d.Num_aYA } in + let { + lit_a1cr :: + t{-aYd-} + {-# L #-} + lit_a1cr = + lit_a1cw } in + let { + fromInt_a1cq :: + PrelBase.Int{-3g,p-} -> t{-aYd-} + {-# L #-} + fromInt_a1cq = + fromInt_a1cx } in + let { lit_a1cp :: + t{-aYd-} + {-# L #-} + lit_a1cp = + let { + ds_d1dC :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1dC = + PrelBase.I#{-5b,p-}{i} + 1 + } in + fromInt_a1cq + ds_d1dC + } in + let { + >=_a1co :: + t{-aYd-} -> t{-aYd-} -> PrelBase.Bool{-34,p-} + {-# L #-} + >=_a1co = + >=_a1cv } in + let { + -_a1cn :: + t{-aYd-} -> t{-aYd-} -> t{-aYd-} + {-# L #-} + -_a1cn = + -_a1cu } in + let { + lit_a1cm :: + t{-aYd-} + {-# L #-} + lit_a1cm = + lit_a1cp } in + let { + >=_a1cl :: + t{-aYd-} -> t{-aYd-} -> PrelBase.Bool{-34,p-} + {-# L #-} + >=_a1cl = + >=_a1cv } in + let { + -_a1ck :: + t{-aYd-} -> t{-aYd-} -> t{-aYd-} + {-# L #-} + -_a1ck = + -_a1cu + } in + \ ds_d1e9 :: + t{-aYd-} + {-# L #-} + ds_d1e9 x_r3H :: + t{-aYd-} + {-# L #-} + x_r3H -> + let { + fail_d1em :: + t{-aYd-} + {-# L #-} + fail_d1em = + GHCerr.patError{-8r,p-} + _@_ t{-aYd-} _string_ "ds036.hs:44|function `kh'" } in + let { + fail_d1fO :: + t{-aYd-} + {-# L #-} + fail_d1fO = case - ((>= t141) - dict.130 - n.74 - ((fromInteger t141) dict.129 (MkInteger! 2##))) + (\ ds_d1eg :: + t{-aYd-} + {-# L #-} + ds_d1eg -> + >=_a1co + ds_d1eg lit_a1cp) + ds_d1e9 of { - True -> - let - n.74 = - (- t141) - dict.129 - n.74 - ((fromInteger t141) - dict.129 (MkInteger! 2##)) - in - case ((> t145) dict.133 x.75 n.74) of { - True -> - (* t145) - dict.136 - x.75 - ((fromInteger t145) - dict.138 (MkInteger! 2##)) - False -> fail.154 - } - False -> - let - x.156 = (fromInteger t141) dict.142 (MkInteger! 1##) - in + PrelBase.True{-5E,p-}{i} -> + let { + x_r3J :: + t{-aYd-} + {-# L #-} + x_r3J = + (\ ds_d1eG :: + t{-aYd-} + {-# L #-} + ds_d1eG -> + -_a1cn + ds_d1eG lit_a1cp) + ds_d1e9 + } in case - ((>= t141) - dict.143 - n.74 - ((fromInteger t141) - dict.142 (MkInteger! 1##))) + (\ ds_d1eW :: + t{-aYd-} + {-# L #-} + ds_d1eW -> + >=_a1cl + ds_d1eW lit_a1cm) + x_r3H of { - True -> - let - x.77 = - (- t141) - dict.142 - n.74 - ((fromInteger t141) - dict.142 (MkInteger! 1##)) in - let - m.155 = - (fromInteger t145) - dict.146 (MkInteger! 1##) - in + PrelBase.True{-5E,p-}{i} -> + (\ ds_d1fk :: + t{-aYd-} + {-# L #-} + ds_d1fk -> + -_a1ck + ds_d1fk lit_a1cm) + x_r3H; + PrelBase.False{-58,p-}{i} -> + fail_d1em; + }; + PrelBase.False{-58,p-}{i} -> + fail_d1em; + } + } in + case + (\ ds_d1fI :: + t{-aYd-} + {-# L #-} + ds_d1fI -> + >=_a1cv + ds_d1fI lit_a1cw) + ds_d1e9 + of { + PrelBase.True{-5E,p-}{i} -> + let { + n_r3F :: + t{-aYd-} + {-# L #-} + n_r3F = + (\ ds_d1g8 :: + t{-aYd-} + {-# L #-} + ds_d1g8 -> + -_a1cu + ds_d1g8 lit_a1cw) + ds_d1e9 + } in + case + >_a1ct + x_r3H n_r3F + of { + PrelBase.True{-5E,p-}{i} -> + *_a1cs + x_r3H lit_a1cr; + PrelBase.False{-58,p-}{i} -> + fail_d1fO; + }; + PrelBase.False{-58,p-}{i} -> + fail_d1fO; + } +brack'{-r3f,x-} :: + _forall_ + [a{-aYI-}] + => + {PrelBase.Eq{-23,p-} a{-aYI-}} + -> a{-aYI-} + -> a{-aYI-} + -> PrelBase.Int{-3g,p-} + -> [a{-aYI-}] + -> ([a{-aYI-}], [a{-aYI-}]) +{-# L #-} +brack'{-r3f,x-} = + _/\_ a{-aYI-} -> \ d.Eq_aZs :: + {PrelBase.Eq{-23,p-} a{-aYI-}} + {-# L #-} + d.Eq_aZs -> + let { + lit_a1h1 :: + PrelBase.Int{-3g,p-} + {-# L #-} + lit_a1h1 = + lit_a19Y } in + let { + >=_a1h0 :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Bool{-34,p-} + {-# L #-} + >=_a1h0 = + >=_a19X } in + let { + -_a1gZ :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + {-# L #-} + -_a1gZ = + -_a19W } in + let { + d.Eq_aZC :: + {PrelBase.Eq{-23,p-} a{-aYI-}} + {-# L #-} + d.Eq_aZC = + d.Eq_aZs } in + let { + ==_a1gY :: + a{-aYI-} -> a{-aYI-} -> PrelBase.Bool{-34,p-} + {-# L #-} + ==_a1gY = + PrelBase.=={-8Y,p-} + _@_ a{-aYI-} d.Eq_aZC + } in + \ open_r3i :: + a{-aYI-} + {-# L #-} + open_r3i close_r3k :: + a{-aYI-} + {-# L #-} + close_r3k ds_d1hB :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1hB xs_r3n :: + [a{-aYI-}] + {-# L #-} + xs_r3n -> + let { + fail_d1hO :: + ([a{-aYI-}], [a{-aYI-}]) + {-# L #-} + fail_d1hO = + GHCerr.patError{-8r,p-} + _@_ ([a{-aYI-}], [a{-aYI-}]) + _string_ "ds036.hs:22|function `brack''" } in + let { + fail_d1jT :: + ([a{-aYI-}], [a{-aYI-}]) + {-# L #-} + fail_d1jT = + case + (\ ds_d1hI :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1hI -> + >=_a19X + ds_d1hI lit_a19Y) + ds_d1hB + of { + PrelBase.True{-5E,p-}{i} -> + let { + n_r3t :: + PrelBase.Int{-3g,p-} + {-# L #-} + n_r3t = + (\ ds_d1i8 :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d1i8 -> + -_a19W + ds_d1i8 lit_a19Y) + ds_d1hB + } in + case xs_r3n of { + PrelBase.[]{-5i,p-}{i} -> + let { + close_r3r :: + a{-aYI-} + {-# L #-} + close_r3r = + close_r3k } in + let { + open_r3p :: + a{-aYI-} + {-# L #-} + open_r3p = + open_r3i } in + let { + ds_d1iz :: + [a{-aYI-}] + {-# L #-} + ds_d1iz = + PrelBase.[]{-5i,p-}{i} + _@_ a{-aYI-} } in + let { + ds_d1iD :: + [a{-aYI-}] + {-# L #-} + ds_d1iD = + PrelBase.[]{-5i,p-}{i} + _@_ a{-aYI-} + } in + PrelTup.(,){-62,p-}{i} + {_@_ [a{-aYI-}] _@_ [a{-aYI-}] ds_d1iz ds_d1iD}; + PrelBase.:{-55,p-}{i} h_r3C t_r3D -> + let { + n_r3A :: + PrelBase.Int{-3g,p-} + {-# L #-} + n_r3A = + n_r3t } in + let { + close_r3y :: + a{-aYI-} + {-# L #-} + close_r3y = + close_r3k } in + let { + open_r3w :: + a{-aYI-} + {-# L #-} + open_r3w = + open_r3i + } in case - ((>= t145) - dict.147 - x.75 - ((fromInteger t145) - dict.146 (MkInteger! 1##))) + ==_a1gY + h_r3C open_r3w of { - True -> - let - m.76 = - (- t145) - dict.146 - x.75 - ((fromInteger t145) - dict.146 - (MkInteger! 1##)) - in m.76 - False -> fail.154 - } - False -> fail.154 - } + PrelBase.True{-5E,p-}{i} -> + let { + ds_d1ju :: + [a{-aYI-}] + {-# L #-} + ds_d1ju = + PrelBase.[]{-5i,p-}{i} + _@_ a{-aYI-} } in + let { + ds_d1jy :: + [a{-aYI-}] + {-# L #-} + ds_d1jy = + PrelBase.[]{-5i,p-}{i} + _@_ a{-aYI-} + } in + PrelTup.(,){-62,p-}{i} + {_@_ [a{-aYI-}] _@_ [a{-aYI-}] ds_d1ju ds_d1jy}; + PrelBase.False{-58,p-}{i} -> + fail_d1hO; + }; + }; + PrelBase.False{-58,p-}{i} -> + fail_d1hO; } - in kh.126 - + } in + case ds_d1hB of { PrelBase.I#{-5b,p-}{i} ds_d1k2 -> + case# ds_d1k2 of { + 0 -> + let { + ds_d1kh :: + [a{-aYI-}] + {-# L #-} + ds_d1kh = + PrelBase.[]{-5i,p-}{i} + _@_ a{-aYI-} + } in + PrelTup.(,){-62,p-}{i} + {_@_ [a{-aYI-}] _@_ [a{-aYI-}] ds_d1kh xs_r3n}; + ds_d1kt -> + fail_d1jT; + };} +end Rec } diff --git a/ghc/compiler/tests/deSugar/ds037.stderr b/ghc/compiler/tests/deSugar/ds037.stderr index e69de29..cb76a7e 100644 --- a/ghc/compiler/tests/deSugar/ds037.stderr +++ b/ghc/compiler/tests/deSugar/ds037.stderr @@ -0,0 +1,189 @@ + + +================================================================================ +Desugared: +Rec { +d.Num_aXF :: + {PrelBase.Num{-2c,p-} PrelBase.Int{-3g,p-}} +{-# L #-} +d.Num_aXF = + PrelBase.$d3{-rbd,p-} ++_aZO :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} +{-# L #-} ++_aZO = + PrelBase.+{-r3m,p-} + _@_ PrelBase.Int{-3g,p-} d.Num_aXF +d.Num_aXJ :: + {PrelBase.Num{-2c,p-} PrelBase.Int{-3g,p-}} +{-# L #-} +d.Num_aXJ = + d.Num_aXF +fromInt_aZN :: + PrelBase.Int{-3g,p-} -> PrelBase.Int{-3g,p-} +{-# L #-} +fromInt_aZN = + PrelBase.fromInt{-8R,p-} + _@_ PrelBase.Int{-3g,p-} d.Num_aXJ +lit_aZM :: + PrelBase.Int{-3g,p-} +{-# L #-} +lit_aZM = + let { + ds_d123 :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d123 = + PrelBase.I#{-5b,p-}{i} + 1 + } in + fromInt_aZN + ds_d123 +ds_d11F :: + _forall_ + [b{-aXa-}] + => + (PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> (b{-aXa-}, PrelBase.Int{-3g,p-}), PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> (b{-aXa-}, PrelBase.Int{-3g,p-})) +{-# L #-} +ds_d11F = + _/\_ b{-aXa-} -> + _letrec_ { + +_aZQ :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + {-# L #-} + +_aZQ = + +_aZO; + lit_aZP :: + PrelBase.Int{-3g,p-} + {-# L #-} + lit_aZP = + lit_aZM; + f_aWT :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> (b{-aXa-}, PrelBase.Int{-3g,p-}) + {-# L #-} + f_aWT = + \ x_r3e :: + PrelBase.Int{-3g,p-} + {-# L #-} + x_r3e y_r3g :: + PrelBase.Int{-3g,p-} + {-# L #-} + y_r3g -> + let { ds_d12N :: + b{-aXa-} + {-# L #-} + ds_d12N = + let { + ds_d133 :: + (b{-aXa-}, PrelBase.Int{-3g,p-}) + {-# L #-} + ds_d133 = + g_aWU + y_r3g x_r3e + } in + PrelTup.fst{-riN,p-} + _@_ PrelBase.Int{-3g,p-} _@_ b{-aXa-} ds_d133 + } in + let { + ds_d12R :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d12R = + +_aZO + x_r3e lit_aZM + } in + PrelTup.(,){-62,p-}{i} + {_@_ b{-aXa-} _@_ PrelBase.Int{-3g,p-} ds_d12N ds_d12R}; + g_aWU :: + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> (b{-aXa-}, PrelBase.Int{-3g,p-}) + {-# L #-} + g_aWU = + \ x_r3j :: + PrelBase.Int{-3g,p-} + {-# L #-} + x_r3j y_r3l :: + PrelBase.Int{-3g,p-} + {-# L #-} + y_r3l -> + let { ds_d13B :: + b{-aXa-} + {-# L #-} + ds_d13B = + let { + ds_d13R :: + (b{-aXa-}, PrelBase.Int{-3g,p-}) + {-# L #-} + ds_d13R = + f_aWT + x_r3j y_r3l + } in + PrelTup.fst{-riN,p-} + _@_ PrelBase.Int{-3g,p-} _@_ b{-aXa-} ds_d13R + } in + let { + ds_d13F :: + PrelBase.Int{-3g,p-} + {-# L #-} + ds_d13F = + +_aZQ + y_r3l lit_aZP + } in + PrelTup.(,){-62,p-}{i} + {_@_ b{-aXa-} _@_ PrelBase.Int{-3g,p-} ds_d13B ds_d13F}; + } in + PrelTup.(,){-62,p-}{i} + {_@_ (PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> (b{-aXa-}, PrelBase.Int{-3g,p-})) + _@_ (PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> (b{-aXa-}, PrelBase.Int{-3g,p-})) + f_aWT + g_aWU} +f{-r3o,x-} :: + _forall_ + [b{-aXa-}] + => + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> (b{-aXa-}, PrelBase.Int{-3g,p-}) +{-# L #-} +f{-r3o,x-} = + _/\_ b{-aXa-} -> + case + ds_d11F + _@_ b{-aXa-} + of { + PrelTup.(,){-62,p-}{i} ds_d14B ds_d14C -> + ds_d14B;} +g{-r3n,x-} :: + _forall_ + [b{-aXa-}] + => + PrelBase.Int{-3g,p-} + -> PrelBase.Int{-3g,p-} + -> (b{-aXa-}, PrelBase.Int{-3g,p-}) +{-# L #-} +g{-r3n,x-} = + _/\_ b{-aXa-} -> + case + ds_d11F + _@_ b{-aXa-} + of { + PrelTup.(,){-62,p-}{i} ds_d14S ds_d14R -> + ds_d14R;} +end Rec } + +NOTE: Simplifier still going after 4 iterations; bailing out. diff --git a/ghc/compiler/tests/deSugar/ds038.stderr b/ghc/compiler/tests/deSugar/ds038.stderr index e69de29..a45cd41 100644 --- a/ghc/compiler/tests/deSugar/ds038.stderr +++ b/ghc/compiler/tests/deSugar/ds038.stderr @@ -0,0 +1,5 @@ + +ds038.hs:4: Module Main must include a definition for `Main.main' + + +Compilation had errors diff --git a/ghc/compiler/tests/deSugar/ds039.stderr b/ghc/compiler/tests/deSugar/ds039.stderr index e69de29..1ff3f31 100644 --- a/ghc/compiler/tests/deSugar/ds039.stderr +++ b/ghc/compiler/tests/deSugar/ds039.stderr @@ -0,0 +1,8 @@ + + +================================================================================ +Desugared: +{-# L #-} +f = _/\_ t{-amG-} -> + PrelBase.: + _@_ t{-amG-} diff --git a/ghc/compiler/tests/deSugar/ds040.stderr b/ghc/compiler/tests/deSugar/ds040.stderr index e69de29..0fe36a3 100644 --- a/ghc/compiler/tests/deSugar/ds040.stderr +++ b/ghc/compiler/tests/deSugar/ds040.stderr @@ -0,0 +1,9 @@ + +ds040.hs:4: + Data constructor not in scope: `AppendChan' + +ds040.hs:4: + Value not in scope: `stdout' + + +Compilation had errors diff --git a/ghc/compiler/tests/deriving/Makefile b/ghc/compiler/tests/deriving/Makefile index b07508f..e64a923 100644 --- a/ghc/compiler/tests/deriving/Makefile +++ b/ghc/compiler/tests/deriving/Makefile @@ -1,7 +1,20 @@ -TOP = ../../../.. -GhcRunTestRules = YES -# These options apply to all tests -RUNSTDTEST_OPTS = -noC -ddump-tc -dcore-lint -hi -include $(TOP)/ghc/mk/ghc.mk +TOP = ../../.. +include $(TOP)/mk/boilerplate.mk + +HS_SRCS = $(wildcard *.hs) + +SRC_RUNTEST_OPTS += -o1 $*.stdout -o2 $*.stderr -x 0 +HC_OPTS += -noC -ddump-tc -dcore-lint -hi + +drv004_RUNTEST_OPTS = -x 1 +drv007_RUNTEST_OPTS = -x 1 + +%.o : %.hs + +%.o : %.hs + $(RUNTEST) $(HC) $(RUNTEST_OPTS) $(HC_OPTS) -c $< -o $@ -osuf $(subst .,,$(suffix $@)) + +all :: $(HS_OBJS) + +include $(TOP)/mk/target.mk -runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs)) diff --git a/ghc/compiler/tests/deriving/drv001.stderr b/ghc/compiler/tests/deriving/drv001.stderr index e69de29..e1e3a0e 100644 --- a/ghc/compiler/tests/deriving/drv001.stderr +++ b/ghc/compiler/tests/deriving/drv001.stderr @@ -0,0 +1,514 @@ + + +================================================================================ +Typechecked: +{- nonrec -} +{- nonrec -} +E1{-r3K,x-}{i} = + _/\_ a{-r3A-} -> + E1{-r3K,x-}{i} + {_@_ a{-r3A-}} +{- nonrec -} +D1{-r6,x-}{i} = + _/\_ b{-r3C-} -> + D1{-r6,x-}{i} + {_@_ b{-r3C-}} +D2{-r5,x-}{i} = + _/\_ b{-r3C-} -> \ tpl_B1 -> + D2{-r5,x-}{i} + {_@_ b{-r3C-} tpl_B1} +{- nonrec -} +C1{-rb,x-}{i} = + _/\_ a{-r3H-} b{-r3I-} -> \ tpl_B1 -> + C1{-rb,x-}{i} + {_@_ a{-r3H-} _@_ b{-r3I-} tpl_B1} +C2{-ra,x-}{i} = + _/\_ a{-r3H-} b{-r3I-} -> \ tpl_B1 -> + C2{-ra,x-}{i} + {_@_ a{-r3H-} _@_ b{-r3I-} tpl_B1} +C3{-rd,x-}{i} = + _/\_ a{-r3H-} b{-r3I-} -> \ tpl_B1 -> + C3{-rd,x-}{i} + {_@_ a{-r3H-} _@_ b{-r3I-} tpl_B1} +{- rec -} +AbsBinds [a{-a1fw-}] [] [([a{-a1fw-}], $d3{-r1fM,x-}, d.Eval_a15O)] + d.Eval_a15O = + ({-dict-} [] []) +{- rec -} +AbsBinds [b{-a1fx-}] [] [([b{-a1fx-}], $d4{-r1ge,x-}, d.Eval_a15U)] + d.Eval_a15U = + ({-dict-} [] []) +{- rec -} +AbsBinds +[a{-a1fy-}, b{-a1fz-}] +[] +[([a{-a1fy-}, b{-a1fz-}], $d5{-r1gf,x-}, d.Eval_a161)] + d.Eval_a161 = + ({-dict-} [] []) +{- rec -} +AbsBinds +[b{-a178-}] +[d.Eq_a17C] +[([b{-a178-}], $d6{-r1gg,x-}, d.Read_a167)] + d.Eq_a17Y = + PrelBase.$d7{-rc5,p-} + d.Eq_a17Z = + d.Eq_a17C + d.Read_a17W = + $d7{-r1gl,x-} + [PrelBase.Int{-3g,p-}, b{-a178-}] + [d.Eq_a17Y, d.Eq_a17Z] + readsPrec_a1gk = + PrelRead.readsPrec{-rlS,p-} + (X{-r3N,x-} PrelBase.Int{-3g,p-} b{-a178-}) + d.Read_a17W + readsPrec_a1gj = + readsPrec_a1gi + AbsBinds [] [] [([], readsPrec_a1gi, readsPrec_a16a)] + ==_a1gp = + ==_a1gc + >>=_a1go = + >>=_a1gb + return_a1gn = + return_a1ga + zero_a1gm = + zero_a1g9 + readsPrec_a16a + a_r12Z b_r131 + = ++_a1gd + (Y{-r3M,x-} b{-a178-}, PrelBase.String{-rdl,p-}) + (PrelRead.readParen{-rmu,p-} + (Y{-r3M,x-} b{-a178-}) + PrelBase.False{-58,p-}{i} + \ c_r133 -> [ (D1{-r6,x-}{i} + b{-a178-}, + d_r135) | + ("D1", d_r135) <- PrelRead.lex{-rmh,p-} + c_r133 + ] + b_r131) + (PrelRead.readParen{-rmu,p-} + (Y{-r3M,x-} b{-a178-}) + a_r12Z >_a1g8 lit_a1g6 + \ c_r137 -> [ (D2{-r5,x-}{i} + b{-a178-} + a1_r13b, + b1_r13c) | + ("D2", d_r139) <- PrelRead.lex{-rmh,p-} + c_r137, (a1_r13b, b1_r13c) <- readsPrec_a1gk + lit_a1g4 + d_r139 + ] + b_r131) + AbsBinds [] [] [([], readList_a1gh, readList_a17x)] + readList_a17x + = PrelRead.readList__{-rjw,p-} + (Y{-r3M,x-} b{-a178-}) + readsPrec_a1gj + lit_a1g2 + d.Read_a167 = + ({-dict-} [] [readsPrec_a1gi, readList_a1gh]) +{- rec -} +AbsBinds +[a{-a1ah-}, b{-a1ai-}] +[d.Eq_a1aM, d.Eq_a1aN] +[([a{-a1ah-}, b{-a1ai-}], $d7{-r1gl,x-}, d.Read_a18a)] + d.Eq_a1b3 = + d.Eq_a1aM + d.Read_a1b1 = + $d1{-r1gw,x-} + a{-a1ah-} + d.Eq_a1b3 + readsPrec_a1gv = + PrelRead.readsPrec{-rlS,p-} + (T{-r3L,x-} a{-a1ah-}) + d.Read_a1b1 + d.Eq_a1be = + d.Eq_a1aN + d.Read_a1bc = + $d6{-r1gg,x-} + b{-a1ai-} + d.Eq_a1be + readsPrec_a1gu = + PrelRead.readsPrec{-rlS,p-} + (Y{-r3M,x-} b{-a1ai-}) + d.Read_a1bc + d.Eq_a1bi = + d.Eq_a1aN + d.Eq_a1bj = + d.Eq_a1aM + d.Read_a1bg = + $d7{-r1gl,x-} + [b{-a1ai-}, a{-a1ah-}] + [d.Eq_a1bi, d.Eq_a1bj] + readsPrec_a1gt = + PrelRead.readsPrec{-rlS,p-} + (X{-r3N,x-} b{-a1ai-} a{-a1ah-}) + d.Read_a1bg + readsPrec_a1gs = + readsPrec_a1gr + AbsBinds [] [] [([], readsPrec_a1gr, readsPrec_a18d)] + ++_a1gL = + ++_a1g1 + >_a1gK = + >_a1g0 + lit_a1gJ = + lit_a1fZ + ==_a1gI = + ==_a1fY + lit_a1gH = + lit_a1fX + >>=_a1gG = + >>=_a1fW + return_a1gF = + return_a1fV + zero_a1gE = + zero_a1fU + >_a1gD = + >_a1g0 + lit_a1gC = + lit_a1fZ + ==_a1gB = + ==_a1fY + lit_a1gA = + lit_a1fX + >>=_a1gz = + >>=_a1fW + return_a1gy = + return_a1fV + zero_a1gx = + zero_a1fU + readsPrec_a18d + a_r13j b_r13l + = ++_a1g1 + (X{-r3N,x-} a{-a1ah-} b{-a1ai-}, PrelBase.String{-rdl,p-}) + (PrelRead.readParen{-rmu,p-} + (X{-r3N,x-} a{-a1ah-} b{-a1ai-}) + a_r13j >_a1g0 lit_a1fZ + \ c_r13n -> [ (C1{-rb,x-}{i} + [a{-a1ah-}, b{-a1ai-}] + a1_r13r, + b1_r13s) | + ("C1", d_r13p) <- PrelRead.lex{-rmh,p-} + c_r13n, (a1_r13r, b1_r13s) <- readsPrec_a1gv + lit_a1fX + d_r13p + ] + b_r13l) + (++_a1gL + (X{-r3N,x-} a{-a1ah-} b{-a1ai-}, PrelBase.String{-rdl,p-}) + (PrelRead.readParen{-rmu,p-} + (X{-r3N,x-} a{-a1ah-} b{-a1ai-}) + a_r13j >_a1gK lit_a1gJ + \ c_r13u -> [ (C2{-ra,x-}{i} + [a{-a1ah-}, b{-a1ai-}] + a1_r13y, + b1_r13z) | + ("C2", d_r13w) <- PrelRead.lex{-rmh,p-} + c_r13u, (a1_r13y, b1_r13z) <- readsPrec_a1gu + lit_a1gH + d_r13w + ] + b_r13l) + (PrelRead.readParen{-rmu,p-} + (X{-r3N,x-} a{-a1ah-} b{-a1ai-}) + a_r13j >_a1gD lit_a1gC + \ c_r13B -> [ (C3{-rd,x-}{i} + [a{-a1ah-}, b{-a1ai-}] + a1_r13F, + b1_r13G) | + ("C3", d_r13D) <- PrelRead.lex{-rmh,p-} + c_r13B, (a1_r13F, b1_r13G) <- readsPrec_a1gt + lit_a1gA + d_r13D + ] + b_r13l)) + AbsBinds [] [] [([], readList_a1gq, readList_a1aH)] + readList_a1aH + = PrelRead.readList__{-rjw,p-} + (X{-r3N,x-} a{-a1ah-} b{-a1ai-}) + readsPrec_a1gs + lit_a1fT + d.Read_a18a = + ({-dict-} [] [readsPrec_a1gr, readList_a1gq]) +{- rec -} +AbsBinds +[b{-a1bz-}] +[d.Eq_a1c4] +[([b{-a1bz-}], $d8{-r1gM,x-}, d.Show_a1bs)] + d.Eq_a1cg = + PrelBase.$d7{-rc5,p-} + d.Eq_a1ch = + d.Eq_a1c4 + d.Show_a1ce = + $d9{-r1gR,x-} + [PrelBase.Int{-3g,p-}, b{-a1bz-}] + [d.Eq_a1cg, d.Eq_a1ch] + showsPrec_a1gQ = + PrelBase.showsPrec{-rdi,p-} + (X{-r3N,x-} PrelBase.Int{-3g,p-} b{-a1bz-}) + d.Show_a1ce + showsPrec_a1gP = + showsPrec_a1gO + AbsBinds [] [] [([], showsPrec_a1gO, showsPrec_a1bv)] + lit_a1gS = + lit_a1fR + showsPrec_a1bv + a_r13N D1{-r6,x-}{i} + = PrelBase.showString{-rhV,p-} + "D1" + showsPrec_a1bv + a_r13Q (D2{-r5,x-}{i} b1_r13S) + = PrelBase.showParen{-rhS,p-} + a_r13Q >=_a1fS lit_a1fR + PrelBase..{-rd1,p-} + [PrelBase.String{-rdl,p-}, PrelBase.String{-rdl,p-}, PrelBase.String{-rdl,p-}] + PrelBase.showString{-rhV,p-} + "D2 " + showsPrec_a1gQ + lit_a1gS b1_r13S + AbsBinds [] [] [([], showList_a1gN, showList_a1bZ)] + showList_a1bZ + = PrelBase.showList__{-r3J,p-} + (Y{-r3M,x-} b{-a1bz-}) + showsPrec_a1gP + lit_a1fQ + d.Show_a1bs = + ({-dict-} [] [showsPrec_a1gO, showList_a1gN]) +{- rec -} +AbsBinds +[a{-a1cA-}, b{-a1cD-}] +[d.Eq_a1dJ, d.Eq_a1dK] +[([a{-a1cA-}, b{-a1cD-}], $d9{-r1gR,x-}, d.Show_a1cr)] + d.Eq_a1dW = + d.Eq_a1dJ + d.Show_a1dU = + $d2{-r1gZ,x-} + a{-a1cA-} + d.Eq_a1dW + showsPrec_a1gY = + PrelBase.showsPrec{-rdi,p-} + (T{-r3L,x-} a{-a1cA-}) + d.Show_a1dU + d.Eq_a1e0 = + d.Eq_a1dK + d.Show_a1dY = + $d8{-r1gM,x-} + b{-a1cD-} + d.Eq_a1e0 + showsPrec_a1gX = + PrelBase.showsPrec{-rdi,p-} + (Y{-r3M,x-} b{-a1cD-}) + d.Show_a1dY + d.Eq_a1e4 = + d.Eq_a1dK + d.Eq_a1e5 = + d.Eq_a1dJ + d.Show_a1e2 = + $d9{-r1gR,x-} + [b{-a1cD-}, a{-a1cA-}] + [d.Eq_a1e4, d.Eq_a1e5] + showsPrec_a1gW = + PrelBase.showsPrec{-rdi,p-} + (X{-r3N,x-} b{-a1cD-} a{-a1cA-}) + d.Show_a1e2 + showsPrec_a1gV = + showsPrec_a1gU + AbsBinds [] [] [([], showsPrec_a1gU, showsPrec_a1cu)] + lit_a1h6 = + lit_a1fO + >=_a1h5 = + >=_a1fP + lit_a1h4 = + lit_a1fO + lit_a1h3 = + lit_a1fO + >=_a1h2 = + >=_a1fP + lit_a1h1 = + lit_a1fO + lit_a1h0 = + lit_a1fO + showsPrec_a1cu + a_r13Z (C1{-rb,x-}{i} b1_r141) + = PrelBase.showParen{-rhS,p-} + a_r13Z >=_a1fP lit_a1fO + PrelBase..{-rd1,p-} + [PrelBase.String{-rdl,p-}, PrelBase.String{-rdl,p-}, PrelBase.String{-rdl,p-}] + PrelBase.showString{-rhV,p-} + "C1 " + showsPrec_a1gY + lit_a1h6 b1_r141 + showsPrec_a1cu + a_r143 (C2{-ra,x-}{i} b1_r145) + = PrelBase.showParen{-rhS,p-} + a_r143 >=_a1h5 lit_a1h4 + PrelBase..{-rd1,p-} + [PrelBase.String{-rdl,p-}, PrelBase.String{-rdl,p-}, PrelBase.String{-rdl,p-}] + PrelBase.showString{-rhV,p-} + "C2 " + showsPrec_a1gX + lit_a1h3 b1_r145 + showsPrec_a1cu + a_r147 (C3{-rd,x-}{i} b1_r149) + = PrelBase.showParen{-rhS,p-} + a_r147 >=_a1h2 lit_a1h1 + PrelBase..{-rd1,p-} + [PrelBase.String{-rdl,p-}, PrelBase.String{-rdl,p-}, PrelBase.String{-rdl,p-}] + PrelBase.showString{-rhV,p-} + "C3 " + showsPrec_a1gW + lit_a1h0 b1_r149 + AbsBinds [] [] [([], showList_a1gT, showList_a1dE)] + showList_a1dE + = PrelBase.showList__{-r3J,p-} + (X{-r3N,x-} a{-a1cA-} b{-a1cD-}) + showsPrec_a1gV + lit_a1fN + d.Show_a1cr = + ({-dict-} [] [showsPrec_a1gU, showList_a1gT]) +{- rec -} +AbsBinds +[a{-a1ek-}] +[d.Eq_a1es] +[([a{-a1ek-}], $d1{-r1gw,x-}, d.Read_a1ee)] + d.Read_a1ew = + d.Read_a1ee + $mreadList_a1h8 = + PrelRead.$mreadList{-rlO,p-} + (T{-r3L,x-} a{-a1ek-}) + d.Read_a1ew + AbsBinds [] [] [([], readsPrec_a1h7, readsPrec_a1eh)] + readsPrec_a1eh + = IOBase.error{-87,p-} + (PrelBase.Int{-3g,p-} + -> PrelBase.String{-rdl,p-} + -> [(T{-r3L,x-} a{-a1ek-}, PrelBase.String{-rdl,p-})]) + "read" + AbsBinds [] [] [([], readList_a1en, readList_a1ep)] + readList_a1ep + = $mreadList_a1h8 + d.Read_a1ee = + ({-dict-} [] [readsPrec_a1h7, readList_a1en]) +{- rec -} +AbsBinds +[a{-a1eJ-}] +[d.Eq_a1eR] +[([a{-a1eJ-}], $d2{-r1gZ,x-}, d.Show_a1eD)] + d.Show_a1eV = + d.Show_a1eD + $mshowList_a1ha = + PrelBase.$mshowList{-rcA,p-} + (T{-r3L,x-} a{-a1eJ-}) + d.Show_a1eV + AbsBinds [] [] [([], showsPrec_a1h9, showsPrec_a1eG)] + showsPrec_a1eG + = IOBase.error{-87,p-} + (PrelBase.Int{-3g,p-} + -> T{-r3L,x-} a{-a1eJ-} + -> PrelBase.String{-rdl,p-} + -> PrelBase.String{-rdl,p-}) + "show" + AbsBinds [] [] [([], showList_a1eM, showList_a1eO)] + showList_a1eO + = $mshowList_a1ha + d.Show_a1eD = + ({-dict-} [] [showsPrec_a1h9, showList_a1eM]) +{- nonrec -} +d.MonadPlus_a1eY = + PrelBase.$d22{-rbr,p-} +++_a1gd = + PrelBase.++{-rfN,p-} + PrelBase.[]{-3j,p-} + d.MonadPlus_a1eY +d.Eq_a1f3 = + PrelBase.$d33{-rbD,p-} +d.Eq_a1f1 = + PrelBase.$d27{-rbw,p-} + PrelBase.Char{-38,p-} + d.Eq_a1f3 +==_a1gc = + PrelBase.=={-8Y,p-} + [PrelBase.Char{-38,p-}] + d.Eq_a1f1 +d.Monad_a1f6 = + PrelBase.$d24{-rbt,p-} +>>=_a1gb = + PrelBase.>>={-811,p-} + PrelBase.[]{-3j,p-} + d.Monad_a1f6 +d.Monad_a1f9 = + d.Monad_a1f6 +return_a1ga = + PrelBase.return{-816,p-} + PrelBase.[]{-3j,p-} + d.Monad_a1f9 +d.MonadZero_a1fb = + PrelBase.$d23{-rbs,p-} +zero_a1g9 = + PrelBase.zero{-810,p-} + PrelBase.[]{-3j,p-} + d.MonadZero_a1fb +d.Ord_a1fe = + PrelBase.$d6{-rc4,p-} +>_a1g8 = + PrelBase.>{-rdf,p-} + PrelBase.Int{-3g,p-} + d.Ord_a1fe +d.Num_a1fi = + PrelBase.$d3{-rbz,p-} +fromInt_a1g7 = + PrelBase.fromInt{-8R,p-} + PrelBase.Int{-3g,p-} + d.Num_a1fi +lit_a1g6 = + fromInt_a1g7 + PrelBase.I#{-5b,p-}{i} + 9# +fromInt_a1g5 = + fromInt_a1g7 +lit_a1g4 = + fromInt_a1g5 + PrelBase.I#{-5b,p-}{i} + 10# +fromInt_a1g3 = + fromInt_a1g7 +lit_a1g2 = + fromInt_a1g3 + PrelBase.I#{-5b,p-}{i} + 0# +++_a1g1 = + ++_a1gd +>_a1g0 = + >_a1g8 +lit_a1fZ = + lit_a1g6 +==_a1fY = + ==_a1gc +lit_a1fX = + lit_a1g4 +>>=_a1fW = + >>=_a1gb +return_a1fV = + return_a1ga +zero_a1fU = + zero_a1g9 +lit_a1fT = + lit_a1g2 +d.Ord_a1fn = + d.Ord_a1fe +>=_a1fS = + PrelBase.>={-8Z,p-} + PrelBase.Int{-3g,p-} + d.Ord_a1fn +lit_a1fR = + lit_a1g4 +lit_a1fQ = + lit_a1g2 +>=_a1fP = + >=_a1fS +lit_a1fO = + lit_a1g4 +lit_a1fN = + lit_a1g2 +ghc: module version changed to 1; reason: no old .hi file diff --git a/ghc/compiler/tests/deriving/drv002.stderr b/ghc/compiler/tests/deriving/drv002.stderr index e69de29..0a9d5ef 100644 --- a/ghc/compiler/tests/deriving/drv002.stderr +++ b/ghc/compiler/tests/deriving/drv002.stderr @@ -0,0 +1,303 @@ + + +================================================================================ +Typechecked: +{- nonrec -} +{- nonrec -} +E1{-r3B,x-}{i} = + _/\_ a{-r3t-} -> + E1{-r3B,x-}{i} + {_@_ a{-r3t-}} +{- nonrec -} +C1{-r6,x-}{i} = + _/\_ a{-r3v-} b{-r3w-} -> \ tpl_B1 -> + C1{-r6,x-}{i} + {_@_ a{-r3v-} _@_ b{-r3w-} tpl_B1} +C2{-r5,x-}{i} = + _/\_ a{-r3v-} b{-r3w-} -> \ tpl_B1 -> + C2{-r5,x-}{i} + {_@_ a{-r3v-} _@_ b{-r3w-} tpl_B1} +{- rec -} +AbsBinds [a{-a1a9-}] [] [([a{-a1a9-}], $d3{-r1ag,x-}, d.Eval_a14Q)] + d.Eval_a14Q = + ({-dict-} [] []) +{- rec -} +AbsBinds +[a{-a1aa-}, b{-a1ab-}] +[] +[([a{-a1aa-}, b{-a1ab-}], $d4{-r1aw,x-}, d.Eval_a14X)] + d.Eval_a14X = + ({-dict-} [] []) +{- rec -} +AbsBinds +[a{-a16r-}, b{-a16s-}] +[d.Eq_a16W] +[([a{-a16r-}, b{-a16s-}], $d5{-r1ax,x-}, d.Read_a154)] + d.Eq_a17c = + d.Eq_a16W + d.Read_a17a = + $d1{-r1aD,x-} + a{-a16r-} + d.Eq_a17c + readsPrec_a1aC = + PrelRead.readsPrec{-r62,p-} + (T{-r3C,x-} a{-a16r-}) + d.Read_a17a + d.Eq_a17p = + d.Eq_a16W + d.Eq_a17n = + PrelBase.$d27{-rf7,p-} + a{-a16r-} + d.Eq_a17p + d.Read_a17l = + $d5{-r1ax,x-} + [[a{-a16r-}], [b{-a16s-}]] + d.Eq_a17n + readsPrec_a1aB = + PrelRead.readsPrec{-r62,p-} + (Z{-r3D,x-} [a{-a16r-}] [b{-a16s-}]) + d.Read_a17l + readsPrec_a1aA = + readsPrec_a1az + AbsBinds [] [] [([], readsPrec_a1az, readsPrec_a157)] + >_a1aK = + >_a1au + lit_a1aJ = + lit_a1as + ==_a1aI = + ==_a1ar + lit_a1aH = + lit_a1ap + >>=_a1aG = + >>=_a1ao + return_a1aF = + return_a1an + zero_a1aE = + zero_a1am + readsPrec_a157 + a_r12I b_r12K + = ++_a1av + (Z{-r3D,x-} a{-a16r-} b{-a16s-}, PrelBase.String{-r7r,p-}) + (PrelRead.readParen{-r6E,p-} + (Z{-r3D,x-} a{-a16r-} b{-a16s-}) + a_r12I >_a1au lit_a1as + \ c_r12M -> [ (C1{-r6,x-}{i} + [a{-a16r-}, b{-a16s-}] + a1_r12Q, + b1_r12R) | + ("C1", d_r12O) <- PrelRead.lex{-r6r,p-} + c_r12M, (a1_r12Q, b1_r12R) <- readsPrec_a1aC + lit_a1ap + d_r12O + ] + b_r12K) + (PrelRead.readParen{-r6E,p-} + (Z{-r3D,x-} a{-a16r-} b{-a16s-}) + a_r12I >_a1aK lit_a1aJ + \ c_r12T -> [ (C2{-r5,x-}{i} + [a{-a16r-}, b{-a16s-}] + a1_r12X, + b1_r12Y) | + ("C2", d_r12V) <- PrelRead.lex{-r6r,p-} + c_r12T, (a1_r12X, b1_r12Y) <- readsPrec_a1aB + lit_a1aH + d_r12V + ] + b_r12K) + AbsBinds [] [] [([], readList_a1ay, readList_a16R)] + readList_a16R + = PrelRead.readList__{-r3A,p-} + (Z{-r3D,x-} a{-a16r-} b{-a16s-}) + readsPrec_a1aA + lit_a1ak + d.Read_a154 = + ({-dict-} [] [readsPrec_a1az, readList_a1ay]) +{- rec -} +AbsBinds +[a{-a17H-}, b{-a17K-}] +[d.Eq_a18v] +[([a{-a17H-}, b{-a17K-}], $d6{-r1aL,x-}, d.Show_a17y)] + d.Eq_a18H = + d.Eq_a18v + d.Show_a18F = + $d2{-r1aR,x-} + a{-a17H-} + d.Eq_a18H + showsPrec_a1aQ = + PrelBase.showsPrec{-rgT,p-} + (T{-r3C,x-} a{-a17H-}) + d.Show_a18F + d.Eq_a18N = + d.Eq_a18v + d.Eq_a18L = + PrelBase.$d27{-rf7,p-} + a{-a17H-} + d.Eq_a18N + d.Show_a18J = + $d6{-r1aL,x-} + [[a{-a17H-}], [b{-a17K-}]] + d.Eq_a18L + showsPrec_a1aP = + PrelBase.showsPrec{-rgT,p-} + (Z{-r3D,x-} [a{-a17H-}] [b{-a17K-}]) + d.Show_a18J + showsPrec_a1aO = + showsPrec_a1aN + AbsBinds [] [] [([], showsPrec_a1aN, showsPrec_a17B)] + lit_a1aV = + lit_a1ai + >=_a1aU = + >=_a1aj + lit_a1aT = + lit_a1ai + lit_a1aS = + lit_a1ai + showsPrec_a17B + a_r135 (C1{-r6,x-}{i} b1_r137) + = PrelBase.showParen{-rlt,p-} + a_r135 >=_a1aj lit_a1ai + PrelBase..{-rgC,p-} + [PrelBase.String{-r7r,p-}, PrelBase.String{-r7r,p-}, PrelBase.String{-r7r,p-}] + PrelBase.showString{-rlw,p-} + "C1 " + showsPrec_a1aQ + lit_a1aV b1_r137 + showsPrec_a17B + a_r139 (C2{-r5,x-}{i} b1_r13b) + = PrelBase.showParen{-rlt,p-} + a_r139 >=_a1aU lit_a1aT + PrelBase..{-rgC,p-} + [PrelBase.String{-r7r,p-}, PrelBase.String{-r7r,p-}, PrelBase.String{-r7r,p-}] + PrelBase.showString{-rlw,p-} + "C2 " + showsPrec_a1aP + lit_a1aS b1_r13b + AbsBinds [] [] [([], showList_a1aM, showList_a18q)] + showList_a18q + = PrelBase.showList__{-rlr,p-} + (Z{-r3D,x-} a{-a17H-} b{-a17K-}) + showsPrec_a1aO + lit_a1ah + d.Show_a17y = + ({-dict-} [] [showsPrec_a1aN, showList_a1aM]) +{- rec -} +AbsBinds +[a{-a191-}] +[d.Eq_a199] +[([a{-a191-}], $d1{-r1aD,x-}, d.Read_a18V)] + d.Read_a19d = + d.Read_a18V + $mreadList_a1aX = + PrelRead.$mreadList{-r5Y,p-} + (T{-r3C,x-} a{-a191-}) + d.Read_a19d + AbsBinds [] [] [([], readsPrec_a1aW, readsPrec_a18Y)] + readsPrec_a18Y + = IOBase.error{-87,p-} + (PrelBase.Int{-3g,p-} + -> PrelBase.String{-r7r,p-} + -> [(T{-r3C,x-} a{-a191-}, PrelBase.String{-r7r,p-})]) + "read" + AbsBinds [] [] [([], readList_a194, readList_a196)] + readList_a196 + = $mreadList_a1aX + d.Read_a18V = + ({-dict-} [] [readsPrec_a1aW, readList_a194]) +{- rec -} +AbsBinds +[a{-a19q-}] +[d.Eq_a19y] +[([a{-a19q-}], $d2{-r1aR,x-}, d.Show_a19k)] + d.Show_a19C = + d.Show_a19k + $mshowList_a1aZ = + PrelBase.$mshowList{-rgb,p-} + (T{-r3C,x-} a{-a19q-}) + d.Show_a19C + AbsBinds [] [] [([], showsPrec_a1aY, showsPrec_a19n)] + showsPrec_a19n + = IOBase.error{-87,p-} + (PrelBase.Int{-3g,p-} + -> T{-r3C,x-} a{-a19q-} + -> PrelBase.String{-r7r,p-} + -> PrelBase.String{-r7r,p-}) + "show" + AbsBinds [] [] [([], showList_a19t, showList_a19v)] + showList_a19v + = $mshowList_a1aZ + d.Show_a19k = + ({-dict-} [] [showsPrec_a1aY, showList_a19t]) +{- nonrec -} +d.MonadPlus_a19F = + PrelBase.$d22{-rf2,p-} +++_a1av = + PrelBase.++{-rjn,p-} + PrelBase.[]{-3j,p-} + d.MonadPlus_a19F +d.Ord_a19I = + PrelBase.$d6{-rfF,p-} +>_a1au = + PrelBase.>{-rgQ,p-} + PrelBase.Int{-3g,p-} + d.Ord_a19I +d.Num_a19M = + PrelBase.$d3{-rfa,p-} +fromInt_a1at = + PrelBase.fromInt{-8R,p-} + PrelBase.Int{-3g,p-} + d.Num_a19M +lit_a1as = + fromInt_a1at + PrelBase.I#{-5b,p-}{i} + 9# +d.Eq_a19R = + PrelBase.$d33{-rfe,p-} +d.Eq_a19P = + PrelBase.$d27{-rf7,p-} + PrelBase.Char{-38,p-} + d.Eq_a19R +==_a1ar = + PrelBase.=={-8Y,p-} + [PrelBase.Char{-38,p-}] + d.Eq_a19P +fromInt_a1aq = + fromInt_a1at +lit_a1ap = + fromInt_a1aq + PrelBase.I#{-5b,p-}{i} + 10# +d.Monad_a19V = + PrelBase.$d24{-rf4,p-} +>>=_a1ao = + PrelBase.>>={-811,p-} + PrelBase.[]{-3j,p-} + d.Monad_a19V +d.Monad_a19Y = + d.Monad_a19V +return_a1an = + PrelBase.return{-816,p-} + PrelBase.[]{-3j,p-} + d.Monad_a19Y +d.MonadZero_a1a0 = + PrelBase.$d23{-rf3,p-} +zero_a1am = + PrelBase.zero{-810,p-} + PrelBase.[]{-3j,p-} + d.MonadZero_a1a0 +fromInt_a1al = + fromInt_a1at +lit_a1ak = + fromInt_a1al + PrelBase.I#{-5b,p-}{i} + 0# +d.Ord_a1a4 = + d.Ord_a19I +>=_a1aj = + PrelBase.>={-8Z,p-} + PrelBase.Int{-3g,p-} + d.Ord_a1a4 +lit_a1ai = + lit_a1ap +lit_a1ah = + lit_a1ak +ghc: module version changed to 1; reason: no old .hi file diff --git a/ghc/compiler/tests/deriving/drv003.stderr b/ghc/compiler/tests/deriving/drv003.stderr index e69de29..592f2e6 100644 --- a/ghc/compiler/tests/deriving/drv003.stderr +++ b/ghc/compiler/tests/deriving/drv003.stderr @@ -0,0 +1,184 @@ + + +================================================================================ +Typechecked: +{- nonrec -} +MkBar{-r3E,x-}{i} = + _/\_ a{-r3u-} -> \ tpl_B1 tpl_B2 -> + MkBar{-r3E,x-}{i} + {_@_ a{-r3u-} tpl_B1 tpl_B2} +{- nonrec -} +MkFoo{-r3G,x-}{i} = + _/\_ a{-r3z-} -> \ tpl_B1 tpl_B2 -> + MkFoo{-r3G,x-}{i} + {_@_ a{-r3z-} tpl_B1 tpl_B2} +{- nonrec -} +C1{-r9,x-}{i} = + _/\_ a{-r3B-} b{-r3C-} -> \ tpl_B1 tpl_B2 -> + C1{-r9,x-}{i} + {_@_ a{-r3B-} _@_ b{-r3C-} tpl_B1 tpl_B2} +C2{-r8,x-}{i} = + _/\_ a{-r3B-} b{-r3C-} -> \ tpl_B1 tpl_B2 -> + C2{-r8,x-}{i} + {_@_ a{-r3B-} _@_ b{-r3C-} tpl_B1 tpl_B2} +C3{-rb,x-}{i} = + _/\_ a{-r3B-} b{-r3C-} -> \ tpl_B1 -> + C3{-rb,x-}{i} + {_@_ a{-r3B-} _@_ b{-r3C-} tpl_B1} +{- nonrec -} +{- nonrec -} +{- rec -} +AbsBinds +[a{-aHF-}, b{-aHG-}] +[d.Eq_aIL, d.Ping_aIM, d.Eq_aIN, d.Ping_aIO] +[([a{-aHF-}, b{-aHG-}], $d3{-rKF,x-}, d.Eq_aHt)] + d.Eq_aIU = + d.Eq_aIL + d.Eq_aIS = + $d2{-rKO,x-} + a{-aHF-} + d.Eq_aIU + ==_aKN = + PrelBase.=={-8Y,p-} + (Foo{-r3H,x-} a{-aHF-}) + d.Eq_aIS + d.Ping_aIY = + d.Ping_aIO + d.Eq_aIW = + $d1{-rKP,x-} + b{-aHG-} + d.Ping_aIY + ==_aKM = + PrelBase.=={-8Y,p-} + (Bar{-r3F,x-} b{-aHG-}) + d.Eq_aIW + d.Eq_aJ4 = + d.Eq_aIN + d.Ping_aJ5 = + d.Ping_aIO + d.Eq_aJ6 = + d.Eq_aIL + d.Ping_aJ7 = + d.Ping_aIM + d.Eq_aJ2 = + $d3{-rKF,x-} + [b{-aHG-}, a{-aHF-}] + [d.Eq_aJ4, d.Ping_aJ5, d.Eq_aJ6, d.Ping_aJ7] + ==_aKL = + PrelBase.=={-8Y,p-} + (T{-r3I,x-} b{-aHG-} a{-aHF-}) + d.Eq_aJ2 + d.Eq_aJb = + d.Eq_aIL + d.Ping_aJc = + d.Ping_aIM + d.Eq_aJd = + d.Eq_aIL + d.Ping_aJe = + d.Ping_aIM + d.Eq_aJ9 = + $d3{-rKF,x-} + [a{-aHF-}, a{-aHF-}] + [d.Eq_aJb, d.Ping_aJc, d.Eq_aJd, d.Ping_aJe] + ==_aKK = + PrelBase.=={-8Y,p-} + (T{-r3I,x-} a{-aHF-} a{-aHF-}) + d.Eq_aJ9 + ==_aKJ = + ==_aKI + AbsBinds [] [] [([], ==_aKI, ==_aHw)] + ==_aHw + (C1{-r9,x-}{i} a1_rGO a2_rGP) (C1{-r9,x-}{i} b1_rGR b2_rGS) + = (a1_rGO ==_aKN b1_rGR) + PrelBase.&&{-rcW,p-} (a2_rGP ==_aKM b2_rGS) + ==_aHw + (C2{-r8,x-}{i} a1_rGU a2_rGV) (C2{-r8,x-}{i} b1_rGX b2_rGY) + = (a1_rGU ==_aKG b1_rGX) + PrelBase.&&{-rcW,p-} (a2_rGV ==_aKL b2_rGY) + ==_aHw + (C3{-rb,x-}{i} a1_rH0) (C3{-rb,x-}{i} b1_rH2) + = a1_rH0 ==_aKK b1_rH2 + ==_aHw + a_rH4 b_rH6 + = PrelBase.False{-58,p-}{i} + AbsBinds [] [] [([], /=_aKH, /=_aIE)] + /=_aIE + a_rHa b_rHc + = PrelBase.not{-r3D,p-} + ==_aKJ + a_rHa b_rHc + d.Eq_aHt = + ({-dict-} [] [==_aKI, /=_aKH]) +{- rec -} +AbsBinds [a{-aKB-}] [] [([a{-aKB-}], $d4{-rKR,x-}, d.Eval_aJo)] + d.Eval_aJo = + ({-dict-} [] []) +{- rec -} +AbsBinds [a{-aKC-}] [] [([a{-aKC-}], $d5{-rKT,x-}, d.Eval_aJu)] + d.Eval_aJu = + ({-dict-} [] []) +{- rec -} +AbsBinds +[a{-aKD-}, b{-aKE-}] +[] +[([a{-aKD-}, b{-aKE-}], $d6{-rKV,x-}, d.Eval_aJB)] + d.Eval_aJB = + ({-dict-} [] []) +{- rec -} +AbsBinds +[b{-aJO-}] +[d.Ping_aJX] +[([b{-aJO-}], $d1{-rKP,x-}, d.Eq_aJH)] + d.Eq_aK1 = + d.Eq_aJH + $m==_aKX = + PrelBase.$m=={-rcc,p-} + (Bar{-r3F,x-} b{-aJO-}) + d.Eq_aK1 + d.Eq_aK3 = + d.Eq_aJH + $m/=_aKW = + PrelBase.$m/={-rc9,p-} + (Bar{-r3F,x-} b{-aJO-}) + d.Eq_aK3 + AbsBinds [] [] [([], ==_aJJ, ==_aJL)] + ==_aJL + = $m==_aKX + AbsBinds [] [] [([], /=_aJS, /=_aJU)] + /=_aJU + = $m/=_aKW + d.Eq_aJH = + ({-dict-} [] [==_aJJ, /=_aJS]) +{- rec -} +AbsBinds +[a{-aKh-}] +[d.Eq_aKq] +[([a{-aKh-}], $d2{-rKO,x-}, d.Eq_aKa)] + d.Eq_aKu = + d.Eq_aKa + $m==_aKZ = + PrelBase.$m=={-rcc,p-} + (Foo{-r3H,x-} a{-aKh-}) + d.Eq_aKu + d.Eq_aKw = + d.Eq_aKa + $m/=_aKY = + PrelBase.$m/={-rc9,p-} + (Foo{-r3H,x-} a{-aKh-}) + d.Eq_aKw + AbsBinds [] [] [([], ==_aKc, ==_aKe)] + ==_aKe + = $m==_aKZ + AbsBinds [] [] [([], /=_aKl, /=_aKn)] + /=_aKn + = $m/=_aKY + d.Eq_aKa = + ({-dict-} [] [==_aKc, /=_aKl]) +{- nonrec -} +d.Eq_aKA = + PrelBase.$d7{-rc2,p-} +==_aKG = + PrelBase.=={-8Y,p-} + PrelBase.Int{-3g,p-} + d.Eq_aKA +ghc: module version changed to 1; reason: no old .hi file diff --git a/ghc/compiler/tests/deriving/drv004.stderr b/ghc/compiler/tests/deriving/drv004.stderr index e69de29..f54e1f7 100644 --- a/ghc/compiler/tests/deriving/drv004.stderr +++ b/ghc/compiler/tests/deriving/drv004.stderr @@ -0,0 +1,9 @@ + +drv004.hs:5: No instance for: + `PrelBase.Eq (Foo a{-aIX-} b{-aIY-})' + drv004.hs:5: + in an instance declaration + When checking superclass constraints of an instance declaration + + +Compilation had errors diff --git a/ghc/compiler/tests/deriving/drv005.stderr b/ghc/compiler/tests/deriving/drv005.stderr index e69de29..af453f9 100644 --- a/ghc/compiler/tests/deriving/drv005.stderr +++ b/ghc/compiler/tests/deriving/drv005.stderr @@ -0,0 +1,188 @@ + + +================================================================================ +Typechecked: +{- nonrec -} +Foo1{-r4,x-}{i} = + Foo1{-r4,x-}{i} + {} +Foo2{-r3,x-}{i} = + Foo2{-r3,x-}{i} + {} +Foo3{-r6,x-}{i} = + Foo3{-r6,x-}{i} + {} +Foo4{-r8,x-}{i} = + Foo4{-r8,x-}{i} + {} +Foo5{-ra,x-}{i} = + Foo5{-ra,x-}{i} + {} +Foo6{-rc,x-}{i} = + Foo6{-rc,x-}{i} + {} +Foo7{-re,x-}{i} = + Foo7{-re,x-}{i} + {} +Foo8{-rg,x-}{i} = + Foo8{-rg,x-}{i} + {} +{- rec -} +AbsBinds [] [] [([], $d1{-rJK,x-}, d.Enum_aHX)] + map_aJU = + map_aJP + AbsBinds [] [] [([], toEnum_aJT, toEnum_aI0)] + toEnum_aI0 + a_rH5 = tag2con_Foo#_rGH + a_rH5 + AbsBinds [] [] [([], fromEnum_aJS, fromEnum_aI5)] + fromEnum_aI5 + a_rHp = case + con2tag_Foo#_rGJ + a_rHp + of + a#_rHr -> PrelBase.I#{-5b,p-}{i} + a#_rHr + AbsBinds [] [] [([], enumFrom_aJR, enumFrom_aIc)] + enumFrom_aIc + a_rH9 = case + con2tag_Foo#_rGJ + a_rH9 + of + a#_rHb -> map_aJP + [PrelBase.Int{-3g,p-}, Foo{-rZ,x-}] + tag2con_Foo#_rGH + enumFromTo_aJO + PrelBase.I#{-5b,p-}{i} + a#_rHb + maxtag_Foo#_rGI + AbsBinds [] [] [([], enumFromThen_aJQ, enumFromThen_aIA)] + enumFromThen_aIA + a_rHf b_rHh + = case + con2tag_Foo#_rGJ + a_rHf + of + a#_rHj -> case + con2tag_Foo#_rGJ + b_rHh + of + b#_rHl -> map_aJU + [PrelBase.Int{-3g,p-}, Foo{-rZ,x-}] + tag2con_Foo#_rGH + enumFromThenTo_aJN + PrelBase.I#{-5b,p-}{i} + a#_rHj + PrelBase.I#{-5b,p-}{i} + b#_rHl + maxtag_Foo#_rGI + AbsBinds [] [] [([], enumFromTo_aJ1, enumFromTo_aJ3)] + enumFromTo_aJ3 + = $menumFromTo_aJM + AbsBinds [] [] [([], enumFromThenTo_aJa, enumFromThenTo_aJc)] + enumFromThenTo_aJc + = $menumFromThenTo_aJL + d.Enum_aHX = + ({-dict-} + [] + [toEnum_aJT, fromEnum_aJS, enumFrom_aJR, enumFromThen_aJQ, enumFromTo_aJ1, enumFromThenTo_aJa]) +{- rec -} +AbsBinds [] [] [([], $d2{-rJW,x-}, d.Eval_aJw)] + d.Eval_aJw = + ({-dict-} [] []) +{- nonrec -} +d.Functor_aJy = + PrelBase.$d25{-rbd,p-} +map_aJP = + PrelBase.map{-rY,p-} + PrelBase.[]{-3j,p-} + d.Functor_aJy +d.Enum_aJB = + PrelBase.$d5{-rbE,p-} +enumFromTo_aJO = + PrelBase.enumFromTo{-8W,p-} + PrelBase.Int{-3g,p-} + d.Enum_aJB +d.Enum_aJE = + d.Enum_aJB +enumFromThenTo_aJN = + PrelBase.enumFromThenTo{-8X,p-} + PrelBase.Int{-3g,p-} + d.Enum_aJE +d.Enum_aJG = + $d1{-rJK,x-} +$menumFromTo_aJM = + PrelBase.$menumFromTo{-rc8,p-} + Foo{-rZ,x-} + d.Enum_aJG +d.Enum_aJJ = + d.Enum_aJG +$menumFromThenTo_aJL = + PrelBase.$menumFromThenTo{-rc7,p-} + Foo{-rZ,x-} + d.Enum_aJJ +{- nonrec -} +AbsBinds [] [] [([], con2tag_Foo#_rGJ, con2tag_Foo#_aHG)] + con2tag_Foo#_aHG + Foo1{-r4,x-}{i} + = 0# + con2tag_Foo#_aHG + Foo2{-r3,x-}{i} + = 1# + con2tag_Foo#_aHG + Foo3{-r6,x-}{i} + = 2# + con2tag_Foo#_aHG + Foo4{-r8,x-}{i} + = 3# + con2tag_Foo#_aHG + Foo5{-ra,x-}{i} + = 4# + con2tag_Foo#_aHG + Foo6{-rc,x-}{i} + = 5# + con2tag_Foo#_aHG + Foo7{-re,x-}{i} + = 6# + con2tag_Foo#_aHG + Foo8{-rg,x-}{i} + = 7# +{- nonrec -} +{- nonrec -} +AbsBinds [] [] [([], maxtag_Foo#_rGI, maxtag_Foo#_aHK)] + maxtag_Foo#_aHK + = PrelBase.I#{-5b,p-}{i} + 7# +{- nonrec -} +{- nonrec -} +AbsBinds [] [] [([], tag2con_Foo#_rGH, tag2con_Foo#_aHO)] + tag2con_Foo#_aHO + (PrelBase.I#{-5b,p-}{i} 0#) + = Foo1{-r4,x-}{i} + tag2con_Foo#_aHO + (PrelBase.I#{-5b,p-}{i} 1#) + = Foo2{-r3,x-}{i} + tag2con_Foo#_aHO + (PrelBase.I#{-5b,p-}{i} 2#) + = Foo3{-r6,x-}{i} + tag2con_Foo#_aHO + (PrelBase.I#{-5b,p-}{i} 3#) + = Foo4{-r8,x-}{i} + tag2con_Foo#_aHO + (PrelBase.I#{-5b,p-}{i} 4#) + = Foo5{-ra,x-}{i} + tag2con_Foo#_aHO + (PrelBase.I#{-5b,p-}{i} 5#) + = Foo6{-rc,x-}{i} + tag2con_Foo#_aHO + (PrelBase.I#{-5b,p-}{i} 6#) + = Foo7{-re,x-}{i} + tag2con_Foo#_aHO + (PrelBase.I#{-5b,p-}{i} 7#) + = Foo8{-rg,x-}{i} + tag2con_Foo#_aHO + _ = IOBase.error{-87,p-} + Foo{-rZ,x-} + "Urk! in TcGenDeriv" +{- nonrec -} +ghc: module version changed to 1; reason: no old .hi file diff --git a/ghc/compiler/tests/deriving/drv006.hs b/ghc/compiler/tests/deriving/drv006.hs index 029f67a..b21d9f2 100644 --- a/ghc/compiler/tests/deriving/drv006.hs +++ b/ghc/compiler/tests/deriving/drv006.hs @@ -4,6 +4,6 @@ module ShouldSucceed where import Ix data Foo = Foo1 | Foo2 | Foo3 | Foo4 | Foo5 | Foo6 | Foo7 | Foo8 - deriving Ix + deriving (Eq, Ord, Ix, Show) data Bar a b = MkBar a Int b Integer a diff --git a/ghc/compiler/tests/deriving/drv006.stderr b/ghc/compiler/tests/deriving/drv006.stderr index e69de29..4d1f585 100644 --- a/ghc/compiler/tests/deriving/drv006.stderr +++ b/ghc/compiler/tests/deriving/drv006.stderr @@ -0,0 +1,405 @@ + + +================================================================================ +Typechecked: +{- nonrec -} +{- nonrec -} +MkBar{-r4H,x-}{i} = + _/\_ a{-r4B-} b{-r4C-} -> \ tpl_B1 tpl_B2 tpl_B3 tpl_B4 tpl_B5 -> + MkBar{-r4H,x-}{i} + {_@_ a{-r4B-} _@_ b{-r4C-} tpl_B1 tpl_B2 tpl_B3 tpl_B4 tpl_B5} +{- nonrec -} +Foo1{-r4t,x-}{i} = + Foo1{-r4t,x-}{i} + {} +Foo2{-r4s,x-}{i} = + Foo2{-r4s,x-}{i} + {} +Foo3{-r4u,x-}{i} = + Foo3{-r4u,x-}{i} + {} +Foo4{-r4v,x-}{i} = + Foo4{-r4v,x-}{i} + {} +Foo5{-r4w,x-}{i} = + Foo5{-r4w,x-}{i} + {} +Foo6{-r4x,x-}{i} = + Foo6{-r4x,x-}{i} + {} +Foo7{-r4y,x-}{i} = + Foo7{-r4y,x-}{i} + {} +Foo8{-r4z,x-}{i} = + Foo8{-r4z,x-}{i} + {} +{- rec -} +AbsBinds [] [] [([], $d1{-r193,x-}, d.Eq_a14i)] + ==_a19a = + ==_a199 + AbsBinds [] [] [([], ==_a199, ==_a14l)] + ==_a14l + a_r10n b_r10p + = case + con2tag_Foo#_r101 + a_r10n + of + a#_r10r -> case + con2tag_Foo#_r101 + b_r10p + of + b#_r10t -> if a#_r10r GHC.==#{-79,p-}{I} b#_r10t then + PrelBase.True{-5E,p-}{i} + else + PrelBase.False{-58,p-}{i} + AbsBinds [] [] [([], /=_a198, /=_a14x)] + /=_a14x + a_r10x b_r10z + = PrelBase.not{-rho,p-} + ==_a19a + a_r10x b_r10z + d.Eq_a14i = + ({-dict-} [] [==_a199, /=_a198]) +{- rec -} +AbsBinds +[a{-a191-}, b{-a192-}] +[] +[([a{-a191-}, b{-a192-}], $d2{-r19b,x-}, d.Eval_a14N)] + d.Eval_a14N = + ({-dict-} [] []) +{- rec -} +AbsBinds [] [] [([], $d3{-r19c,x-}, d.Eval_a14S)] + d.Eval_a14S = + ({-dict-} [] []) +{- rec -} +AbsBinds [] [] [([], $d4{-r19d,x-}, d.Ord_a14X)] + d.Eq_a16H = + $d1{-r193,x-} + compare_a19q = + compare_a19k + compare_a19p = + compare_a19k + compare_a19o = + compare_a19k + compare_a19n = + compare_a19k + compare_a19m = + compare_a19k + compare_a19l = + compare_a19k + AbsBinds [] [] [([], compare_a19k, compare_a150)] + compare_a150 + a_r11y b_r11A + = case + con2tag_Foo#_r101 + a_r11y + of + a#_r11G -> case + con2tag_Foo#_r101 + b_r11A + of + b#_r11I -> if a#_r11G GHC.==#{-79,p-}{I} b#_r11I then + PrelBase.EQ{-rbX,p-}{i} + else + if a#_r11G GHC.<#{-7b,p-}{I} b#_r11I then + PrelBase.LT{-rbY,p-}{i} + else + PrelBase.GT{-rbZ,p-}{i} + where + {- nonrec -} + AbsBinds + [t{-a15e-}, t{-a15g-}] + [] + [([t{-a15e-}, t{-a15g-}], cmp_eq_r11C, cmp_eq_a154)] + cmp_eq_a154 + _ _ = PrelBase.EQ{-rbX,p-}{i} + {- nonrec -} + AbsBinds [] [] [([], <_a19j, <_a15q)] + <_a15q + a_r10G b_r10I + = case + compare_a19q + a_r10G b_r10I + of + PrelBase.LT{-rbY,p-}{i} + -> PrelBase.True{-5E,p-}{i} + PrelBase.EQ{-rbX,p-}{i} + -> PrelBase.False{-58,p-}{i} + PrelBase.GT{-rbZ,p-}{i} + -> PrelBase.False{-58,p-}{i} + AbsBinds [] [] [([], <=_a19i, <=_a15D)] + <=_a15D + a_r10P b_r10R + = case + compare_a19p + a_r10P b_r10R + of + PrelBase.LT{-rbY,p-}{i} + -> PrelBase.True{-5E,p-}{i} + PrelBase.EQ{-rbX,p-}{i} + -> PrelBase.True{-5E,p-}{i} + PrelBase.GT{-rbZ,p-}{i} + -> PrelBase.False{-58,p-}{i} + AbsBinds [] [] [([], >=_a19h, >=_a15Q)] + >=_a15Q + a_r10Y b_r110 + = case + compare_a19o + a_r10Y b_r110 + of + PrelBase.LT{-rbY,p-}{i} + -> PrelBase.False{-58,p-}{i} + PrelBase.EQ{-rbX,p-}{i} + -> PrelBase.True{-5E,p-}{i} + PrelBase.GT{-rbZ,p-}{i} + -> PrelBase.True{-5E,p-}{i} + AbsBinds [] [] [([], >_a19g, >_a163)] + >_a163 + a_r117 b_r119 + = case + compare_a19n + a_r117 b_r119 + of + PrelBase.LT{-rbY,p-}{i} + -> PrelBase.False{-58,p-}{i} + PrelBase.EQ{-rbX,p-}{i} + -> PrelBase.False{-58,p-}{i} + PrelBase.GT{-rbZ,p-}{i} + -> PrelBase.True{-5E,p-}{i} + AbsBinds [] [] [([], max_a19f, max_a16g)] + max_a16g + a_r11g b_r11i + = case + compare_a19m + a_r11g b_r11i + of + PrelBase.LT{-rbY,p-}{i} + -> b_r11i + PrelBase.EQ{-rbX,p-}{i} + -> a_r11g + PrelBase.GT{-rbZ,p-}{i} + -> a_r11g + AbsBinds [] [] [([], min_a19e, min_a16v)] + min_a16v + a_r11p b_r11r + = case + compare_a19l + a_r11p b_r11r + of + PrelBase.LT{-rbY,p-}{i} + -> a_r11p + PrelBase.EQ{-rbX,p-}{i} + -> b_r11r + PrelBase.GT{-rbZ,p-}{i} + -> b_r11r + d.Ord_a14X = + ({-dict-} + [d.Eq_a16H] + [compare_a19k, <_a19j, <=_a19i, >=_a19h, >_a19g, max_a19f, min_a19e]) +{- rec -} +AbsBinds [] [] [([], $d5{-r19r,x-}, d.Show_a16O)] + showsPrec_a19u = + showsPrec_a19t + AbsBinds [] [] [([], showsPrec_a19t, showsPrec_a16R)] + showsPrec_a16R + a_r11N Foo1{-r4t,x-}{i} + = PrelBase.showString{-rjF,p-} + "Foo1" + showsPrec_a16R + a_r11Q Foo2{-r4s,x-}{i} + = PrelBase.showString{-rjF,p-} + "Foo2" + showsPrec_a16R + a_r11T Foo3{-r4u,x-}{i} + = PrelBase.showString{-rjF,p-} + "Foo3" + showsPrec_a16R + a_r11W Foo4{-r4v,x-}{i} + = PrelBase.showString{-rjF,p-} + "Foo4" + showsPrec_a16R + a_r11Z Foo5{-r4w,x-}{i} + = PrelBase.showString{-rjF,p-} + "Foo5" + showsPrec_a16R + a_r122 Foo6{-r4x,x-}{i} + = PrelBase.showString{-rjF,p-} + "Foo6" + showsPrec_a16R + a_r125 Foo7{-r4y,x-}{i} + = PrelBase.showString{-rjF,p-} + "Foo7" + showsPrec_a16R + a_r128 Foo8{-r4z,x-}{i} + = PrelBase.showString{-rjF,p-} + "Foo8" + AbsBinds [] [] [([], showList_a19s, showList_a173)] + showList_a173 + = PrelBase.showList__{-r4G,p-} + Foo{-r4J,x-} + showsPrec_a19u + lit_a196 + d.Show_a16O = + ({-dict-} [] [showsPrec_a19t, showList_a19s]) +{- rec -} +AbsBinds [] [] [([], $d6{-r19v,x-}, d.Ix_a17k)] + d.Show_a18G = + $d5{-r19r,x-} + d.Ord_a18H = + $d4{-r19d,x-} + inRange_a19z = + inRange_a19w + AbsBinds [] [] [([], range_a19y, range_a17n)] + range_a17n + (a_r12g, b_r12h) + = case + con2tag_Foo#_r101 + a_r12g + of + a#_r12j -> case + con2tag_Foo#_r101 + b_r12h + of + b#_r12l -> map_a195 + [PrelBase.Int{-3g,p-}, Foo{-r4J,x-}] + tag2con_Foo#_rZZ + enumFromTo_a194 + PrelBase.I#{-5b,p-}{i} + a#_r12j + PrelBase.I#{-5b,p-}{i} + b#_r12l + AbsBinds [] [] [([], index_a19x, index_a17V)] + index_a17V + (c_r12p@(a_r12q, b_r12r)) d_r12t + = if inRange_a19z + c_r12p d_r12t then + case + con2tag_Foo#_r101 + a_r12q + of + a#_r12v -> case + con2tag_Foo#_r101 + d_r12t + of + d#_r12x -> case d#_r12x GHC.-#{-7E,p-}{I} a#_r12v of + c_r12z -> PrelBase.I#{-5b,p-}{i} + c_r12z + else + IOBase.error{-87,p-} + PrelBase.Int{-3g,p-} + "Ix.Foo.index: out of range\n" + AbsBinds [] [] [([], inRange_a19w, inRange_a18o)] + inRange_a18o + (a_r12D, b_r12E) c_r12G + = case + con2tag_Foo#_r101 + a_r12D + of + a#_r12I -> case + con2tag_Foo#_r101 + b_r12E + of + b#_r12K -> case + con2tag_Foo#_r101 + c_r12G + of + c#_r12M -> if c#_r12M + GHC.>=#{-78,p-}{I} a#_r12I then + c#_r12M + GHC.<=#{-7c,p-}{I} b#_r12K + else + PrelBase.False{-58,p-}{i} + d.Ix_a17k = + ({-dict-} + [d.Show_a18G, d.Ord_a18H] + [range_a19y, index_a19x, inRange_a19w]) +{- nonrec -} +d.Num_a18U = + PrelBase.$d3{-rdj,p-} +fromInt_a197 = + PrelBase.fromInt{-8R,p-} + PrelBase.Int{-3g,p-} + d.Num_a18U +lit_a196 = + fromInt_a197 + PrelBase.I#{-5b,p-}{i} + 0# +d.Functor_a18X = + PrelBase.$d25{-rde,p-} +map_a195 = + PrelBase.map{-reK,p-} + PrelBase.[]{-3j,p-} + d.Functor_a18X +d.Enum_a190 = + PrelBase.$d5{-rdF,p-} +enumFromTo_a194 = + PrelBase.enumFromTo{-8W,p-} + PrelBase.Int{-3g,p-} + d.Enum_a190 +{- nonrec -} +AbsBinds [] [] [([], con2tag_Foo#_r101, con2tag_Foo#_a141)] + con2tag_Foo#_a141 + Foo1{-r4t,x-}{i} + = 0# + con2tag_Foo#_a141 + Foo2{-r4s,x-}{i} + = 1# + con2tag_Foo#_a141 + Foo3{-r4u,x-}{i} + = 2# + con2tag_Foo#_a141 + Foo4{-r4v,x-}{i} + = 3# + con2tag_Foo#_a141 + Foo5{-r4w,x-}{i} + = 4# + con2tag_Foo#_a141 + Foo6{-r4x,x-}{i} + = 5# + con2tag_Foo#_a141 + Foo7{-r4y,x-}{i} + = 6# + con2tag_Foo#_a141 + Foo8{-r4z,x-}{i} + = 7# +{- nonrec -} +{- nonrec -} +AbsBinds [] [] [([], maxtag_Foo#_r100, maxtag_Foo#_a145)] + maxtag_Foo#_a145 + = PrelBase.I#{-5b,p-}{i} + 7# +{- nonrec -} +{- nonrec -} +AbsBinds [] [] [([], tag2con_Foo#_rZZ, tag2con_Foo#_a149)] + tag2con_Foo#_a149 + (PrelBase.I#{-5b,p-}{i} 0#) + = Foo1{-r4t,x-}{i} + tag2con_Foo#_a149 + (PrelBase.I#{-5b,p-}{i} 1#) + = Foo2{-r4s,x-}{i} + tag2con_Foo#_a149 + (PrelBase.I#{-5b,p-}{i} 2#) + = Foo3{-r4u,x-}{i} + tag2con_Foo#_a149 + (PrelBase.I#{-5b,p-}{i} 3#) + = Foo4{-r4v,x-}{i} + tag2con_Foo#_a149 + (PrelBase.I#{-5b,p-}{i} 4#) + = Foo5{-r4w,x-}{i} + tag2con_Foo#_a149 + (PrelBase.I#{-5b,p-}{i} 5#) + = Foo6{-r4x,x-}{i} + tag2con_Foo#_a149 + (PrelBase.I#{-5b,p-}{i} 6#) + = Foo7{-r4y,x-}{i} + tag2con_Foo#_a149 + (PrelBase.I#{-5b,p-}{i} 7#) + = Foo8{-r4z,x-}{i} + tag2con_Foo#_a149 + _ = IOBase.error{-87,p-} + Foo{-r4J,x-} + "Urk! in TcGenDeriv" +{- nonrec -} + +NOTE: Simplifier still going after 4 iterations; bailing out. +ghc: module version changed to 1; reason: no old .hi file diff --git a/ghc/compiler/tests/deriving/drv007.stderr b/ghc/compiler/tests/deriving/drv007.stderr index e69de29..5648ec0 100644 --- a/ghc/compiler/tests/deriving/drv007.stderr +++ b/ghc/compiler/tests/deriving/drv007.stderr @@ -0,0 +1,13 @@ + +drv007.hs:2: No instance for class + `PrelBase.Eq' + at type + `PrelBase.Int -> PrelBase.Int' + +drv007.hs:4: No instance for: + `PrelBase.Eq (PrelBase.Int -> PrelBase.Int)' + drv007.hs:4: + at a use of an overloaded identifier: `PrelBase.==' + + +Compilation had errors diff --git a/ghc/compiler/tests/printing/Makefile b/ghc/compiler/tests/printing/Makefile index bc227b9..bc76d45 100644 --- a/ghc/compiler/tests/printing/Makefile +++ b/ghc/compiler/tests/printing/Makefile @@ -1,10 +1,19 @@ -TOP = ../../../.. -GhcRunTestRules = YES -include $(TOP)/ghc/mk/ghc.mk +TOP = ../../.. +include $(TOP)/mk/boilerplate.mk -runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs)) +HS_SRCS = $(wildcard *.hs) + +SRC_RUNTEST_OPTS += -accept-output -o1 $*.stdout -o2 $*.stderr -x 0 +HC_OPTS += -noC -ddump-tc -dcore-lint -hi + +%.o : %.hs + +%.o : %.hs + $(RUNTEST) $(HC) $(RUNTEST_OPTS) $(HC_OPTS) -c $< -o $@ -osuf $(subst .,,$(suffix $@)) + +all :: $(HS_OBJS) + +print002_HC_OPTS = -fno-implicit-prelude -dppr-user -ddump-rdr -ddump-tc + +include $(TOP)/mk/target.mk -print001_flags = -noC -hi -print002_flags = -noC -fno-implicit-prelude -dppr-user -ddump-rif2hs -ddump-tc -hi -print003_flags = -noC -hi -print004_flags = -noC -hi diff --git a/ghc/compiler/tests/printing/Print001.hs b/ghc/compiler/tests/printing/Print001.hs index efe63d4..0b39384 100644 --- a/ghc/compiler/tests/printing/Print001.hs +++ b/ghc/compiler/tests/printing/Print001.hs @@ -2,6 +2,8 @@ module Print001 where +import Ix + data Foo d e f = MkFoo [((d->Int)->d)->e] (d->e, e->e) () data Bar a = BarNil | BarCon (Foo a a a) (Bar a) diff --git a/ghc/compiler/tests/printing/Print001.stderr b/ghc/compiler/tests/printing/Print001.stderr index 2cf5b13..4df3273 100644 --- a/ghc/compiler/tests/printing/Print001.stderr +++ b/ghc/compiler/tests/printing/Print001.stderr @@ -1,10 +1,97 @@ -=-=-=-=-=INTERFACE STARTS HERE=-=-=-=-= Print001 -interface Print001 where -f :: Eq a => (a -> b -> c) -> a -> b -> c {-# ARITY _ = 2 #-} -f2 :: (Eq a, Ord a, Ix c) => (a -> b -> c) -> a -> b -> c {-# ARITY _ = 4 #-} -g :: Foo Int (b -> a) (b -> [(b, Double, Int)]) -> Float {-# ARITY _ = 1 #-} -mkFoo :: [((a -> Int) -> a) -> b] -> (a -> b, b -> b) -> () -> Foo a b c {-# ARITY _ = 3 #-} -data Bar a = BarNil | BarCon (Foo a a a) (Bar a) -data Foo a b c = MkFoo [((a -> Int) -> a) -> b] (a -> b, b -> b) () -=-=-=-=-=INTERFACE STOPS HERE=-=-=-=-= + +================================================================================ +Typechecked: +{- nonrec -} +{- nonrec -} +{- nonrec -} +BarNil{-r4r,x-}{i} = + _/\_ a{-r4O-} -> + BarNil{-r4r,x-}{i} + {_@_ a{-r4O-}} +BarCon{-r4q,x-}{i} = + _/\_ a{-r4O-} -> \ tpl_B1 tpl_B2 -> + BarCon{-r4q,x-}{i} + {_@_ a{-r4O-} tpl_B1 tpl_B2} +{- nonrec -} +MkFoo{-r4U,x-}{i} = + _/\_ d{-r4Q-} e{-r4R-} f{-r4S-} -> \ tpl_B1 tpl_B2 tpl_B3 -> + MkFoo{-r4U,x-}{i} + {_@_ d{-r4Q-} _@_ e{-r4R-} _@_ f{-r4S-} tpl_B1 tpl_B2 tpl_B3} +{- rec -} +AbsBinds [a{-a15E-}] [] [([a{-a15E-}], $d1{-r15L,x-}, d.Eval_a15s)] + d.Eval_a15s = + ({-dict-} [] []) +{- rec -} +AbsBinds +[d{-a15F-}, e{-a15H-}, f{-a15G-}] +[] +[([d{-a15F-}, e{-a15H-}, f{-a15G-}], $d2{-r15P,x-}, d.Eval_a15A)] + d.Eval_a15A = + ({-dict-} [] []) +{- nonrec -} +d.Fractional_a15D = + PrelNum.$d23{-rIo,p-} +fromRational_a15N = + PrelNum.fromRational{-8T,p-} + PrelBase.Float{-3c,p-} + d.Fractional_a15D +lit_a15M = + fromRational_a15N + 2.0000000000000000 +{- nonrec -} +AbsBinds +[a{-a14B-}, b{-a14C-}] +[] +[([b{-a14C-}, a{-a14B-}], g{-r4F,x-}, g_a14y)] + g_a14y + x_r4M = lit_a15M +{- nonrec -} +{- nonrec -} +AbsBinds +[a{-a14R-}, b{-a14S-}, c{-a14T-}] +[d.Eq_a14V, d.Ord_a14W, d.Ix_a14X] +[([a{-a14R-}, b{-a14S-}, c{-a14T-}], f2{-r4E,x-}, f2_a14O)] + f2_a14O + x_r4K = x_r4K +{- nonrec -} +{- nonrec -} +AbsBinds +[a{-a158-}, b{-a159-}, c{-a15a-}] +[d.Eq_a15c] +[([a{-a158-}, b{-a159-}, c{-a15a-}], f{-r4D,x-}, f_a155)] + f_a155 + x_r4I = x_r4I +{- nonrec -} +{- nonrec -} +AbsBinds +[d{-a15i-}, e{-a15k-}, f{-a15m-}] +[] +[([d{-a15i-}, e{-a15k-}, f{-a15m-}], mkFoo{-r4G,x-}, mkFoo_a15e)] + mkFoo_a15e + = MkFoo{-r4U,x-}{i} + [d{-a15i-}, e{-a15k-}, f{-a15m-}] +{- nonrec -} +ghc: module version changed to 1; reason: no old .hi file +_interface_ Print001 1 +_instance_modules_ +ArrBase IO PrelNum +_usages_ +Ix 1 :: $d3 1 $d4 1 $d5 1 $d6 1 $d7 1 $d8 1 $d9 1 $minRange 1 $mindex 1 $mrange 1 Ix 1; +PrelBase 1 :: $d1 1 $d10 1 $d11 1 $d13 1 $d14 1 $d15 1 $d2 1 $d21 1 $d26 1 $d27 1 $d3 1 $d30 1 $d31 1 $d32 1 $d33 1 $d34 1 $d37 1 $d38 1 $d39 1 $d40 1 $d41 1 $d42 1 $d44 1 $d45 1 $d46 1 $d49 1 $d5 1 $d50 1 $d51 1 $d54 1 $d55 1 $d6 1 $d7 1 $d8 1 $m* 1 $m+ 1 $m- 1 $m/= 1 $m< 1 $m<= 1 $m== 1 $m> 1 $m>= 1 $mabs 1 $mcompare 1 $menumFrom 1 $menumFromThen 1 $menumFromThenTo 1 $menumFromTo 1 $mfromEnum 1 $mfromInt 1 $mfromInteger 1 $mmax 1 $mmin 1 $mnegate 1 $mshowList 1 $mshowsPrec 1 $msignum 1 $mtoEnum 1 Enum 1 Eq 1 Eval 1 Num 1 Ord 1 Ordering 1 Show 1 String 1; +PrelNum 1 :: $d1 1 $d10 1 $d14 1 $d15 1 $d16 1 $d17 1 $d18 1 $d19 1 $d2 1 $d23 1 $d24 1 $d25 1 $d26 1 $d27 1 $d28 1 $d29 1 $d30 1 $d31 1 $d32 1 $d33 1 $d34 1 $d35 1 $d36 1 $d37 1 $d38 1 $d39 1 $d4 1 $d5 1 $d6 1 $d7 1 $d8 1 $d9 1 $m/ 1 $mdiv 1 $mdivMod 1 $mfromRational 1 $mmod 1 $mquot 1 $mquotRem 1 $mrecip 1 $mrem 1 $mtoInt 1 $mtoInteger 1 $mtoRational 1 Fractional 1 Integral 1 Ratio 1 Rational 1 Real 1; +PrelTup 1 :: $d10 1 $d13 1 $d14 1 $d3 1 $d4 1 $d49 1 $d50 1 $d9 1; +_exports_ +Print001 f f2 g mkFoo Bar(BarNil BarCon) Foo(MkFoo); +_instances_ +instance _forall_ [a] => {PrelBase.Eval (Bar a)} = $d1; +instance _forall_ [a b c] => {PrelBase.Eval (Foo a b c)} = $d2; +_declarations_ +1 $d1 _:_ _forall_ [a] => {PrelBase.Eval (Bar a)} ;; +1 $d2 _:_ _forall_ [a b c] => {PrelBase.Eval (Foo a b c)} ;; +1 data Bar r4O = BarNil | BarCon (Foo r4O r4O r4O) (Bar r4O) ; +1 data Foo r4Q r4R r4S = MkFoo [((r4Q -> PrelBase.Int) -> r4Q) -> r4R] (r4Q -> r4R, r4R -> r4R) PrelBase.() ; +1 f _:_ _forall_ [a b c] {PrelBase.Eq a} => (a -> b -> c) -> a -> b -> c ;; +1 f2 _:_ _forall_ [a b c] {PrelBase.Eq a, PrelBase.Ord a, Ix.Ix c} => (a -> b -> c) -> a -> b -> c ;; +1 g _:_ _forall_ [a b] => Foo PrelBase.Int (b -> a) (b -> [(b, PrelBase.Double, PrelBase.Int)]) -> PrelBase.Float ;; +1 mkFoo _:_ _forall_ [a b c] => [((a -> PrelBase.Int) -> a) -> b] -> (a -> b, b -> b) -> PrelBase.() -> Foo a b c ;; diff --git a/ghc/compiler/tests/printing/Print002.stderr b/ghc/compiler/tests/printing/Print002.stderr index fac05ef..f87250e 100644 --- a/ghc/compiler/tests/printing/Print002.stderr +++ b/ghc/compiler/tests/printing/Print002.stderr @@ -1,272 +1,589 @@ -Parsed, Haskellised: -module Print002 where -infixr 9 . -infixr 8 ^ -infixr 8 ^^ -infixr 3 && -infixr 2 || -infixr 0 $ -infixl 9 ! -infixl 9 // -infix 1 := -infix 6 :+ -infixr 8 ** -infixl 7 * -infixl 7 / -infixl 7 `quot` -infixl 7 `rem` -infixl 7 `div` -infixl 7 `mod` -infixl 6 + -infixl 6 - -infix 4 == -infix 4 /= -infix 4 < -infix 4 <= -infix 4 >= -infix 4 > -infixl 9 !! -infix 5 \\ -infix 4 `elem` -infix 4 `notElem` -infixl 7 % -data Foo a b c - = MkFoo1 a a - | (:##) b c - | MkFoo3 b b - | (:***) c c - deriving (Eq, Ord) -class Bar a where - meth1 :: a -> a -> Bool - ///// :: a -> a -> Bool - meth2 :: a -> b -> Bool -class Bar a => Bar2 a where -f1 x y = x `MkFoo1` y -f1a x y = MkFoo1 x y -f2 x y = (:##) x y -f2a x y = x :## y -(....) - x y = MkFoo3 x y -(.....) - x y = x `MkFoo3` y -(<<<<) - x y = x :*** y -(<<<<) - x y = (:***) x y -f3a x y = meth1 x y -f3b x y = x `meth1` y -f3c x y = (/////) x y -f3d x y = x ///// y + +================================================================================ Typechecked: -meth1 = meth1 -(/////) = (/////) -meth2 = meth2 -defm.Print002.Bar.meth1 = - (error) "No default method for \"Print002.Bar.defm.Print002.Bar.meth1\"\n" -defm.Print002.Bar.///// = - (error) "No default method for \"Print002.Bar.defm.Print002.Bar./////\"\n" -defm.Print002.Bar.meth2 = - (error) "No default method for \"Print002.Bar.defm.Print002.Bar.meth2\"\n" -sdsel.Print002.Bar2.Print002.Bar = d.Print002.Bar.t443 +{- nonrec -} +{- nonrec -} +MkFoo1{-rk,x-}{i} = + _/\_ a{-r4z-} b{-r4A-} c{-r4B-} -> \ tpl_B1 tpl_B2 -> + MkFoo1{-rk,x-}{i} + {_@_ a{-r4z-} _@_ b{-r4A-} _@_ c{-r4B-} tpl_B1 tpl_B2} +:##{-rj,x-}{i} = + _/\_ a{-r4z-} b{-r4A-} c{-r4B-} -> \ tpl_B1 tpl_B2 -> + :##{-rj,x-}{i} + {_@_ a{-r4z-} _@_ b{-r4A-} _@_ c{-r4B-} tpl_B1 tpl_B2} +MkFoo3{-rm,x-}{i} = + _/\_ a{-r4z-} b{-r4A-} c{-r4B-} -> \ tpl_B1 tpl_B2 -> + MkFoo3{-rm,x-}{i} + {_@_ a{-r4z-} _@_ b{-r4A-} _@_ c{-r4B-} tpl_B1 tpl_B2} +:***{-ro,x-}{i} = + _/\_ a{-r4z-} b{-r4A-} c{-r4B-} -> \ tpl_B1 tpl_B2 -> + :***{-ro,x-}{i} + {_@_ a{-r4z-} _@_ b{-r4A-} _@_ c{-r4B-} tpl_B1 tpl_B2} +{- nonrec -} +scsel_Bar2Print002Bar{-aVQ,x-} = + _/\_ a{-r4n-} -> \ tpl_B1 -> + tpl_B1 +{- nonrec -} +{- nonrec -} +meth1{-r4R,x-} = + _/\_ a{-r4q-} -> \ tpl_B1 -> + case tpl_B1 of { PrelTup.(,,){-63,p-}{i} tpl_B1 tpl_B2 tpl_B3 -> + tpl_B1;} +/////{-r4Q,x-} = + _/\_ a{-r4q-} -> \ tpl_B1 -> + case tpl_B1 of { PrelTup.(,,){-63,p-}{i} tpl_B1 tpl_B2 tpl_B3 -> + tpl_B2;} +meth2{-r4P,x-} = + _/\_ a{-r4q-} -> \ tpl_B1 -> + case tpl_B1 of { PrelTup.(,,){-63,p-}{i} tpl_B1 tpl_B2 tpl_B3 -> + tpl_B3;} +{- nonrec -} AbsBinds -[a, b, c] -[d.Eq.t192, d.Eq.t193, d.Eq.t194] -[(d.Eq.t195, dfun.Eq.Print002.Foo)] - (d.Eq.t268, d.Eq.t192) - (==.t212, (==)) - (==.t209, (==.t212)) - (d.Eq.t269, d.Eq.t194) - (==.t229, (==)) - (d.Eq.t270, d.Eq.t193) - (==.t226, (==)) - (==.t246, (==.t226)) - (==.t243, (==.t226)) - (==.t263, (==.t229)) - (==.t260, (==.t229)) - d.Eq.t195 = ({-dict-} [] [==, /=]) - (==) :: Foo a b c -> Foo a b c -> Bool - (==) (MkFoo1 a1 a2) (MkFoo1 b1 b2) - = (a1 ==.t209 b1) && (a2 ==.t212 b2) - (==) (:## a1 a2) (:## b1 b2) - = (a1 ==.t226 b1) && (a2 ==.t229 b2) - (==) (MkFoo3 a1 a2) (MkFoo3 b1 b2) - = (a1 ==.t243 b1) && (a2 ==.t246 b2) - (==) (:*** a1 a2) (:*** b1 b2) - = (a1 ==.t260 b1) && (a2 ==.t263 b2) - (==) a b = False - (/=) = defm./= +[a{-aVq-}] +[d.Bar_aVj] +[([a{-aVq-}], $mmeth1{-rLc,x-}, meth1_aVl)] + AbsBinds [] [] [([], meth1_aVl, meth1_aVn)] + meth1_aVn + = GHCerr.noDefaultMethodError{-8k,p-} + (a{-aVq-} -> a{-aVq-} -> PrelBase.Bool{-34,p-}) + "Class Bar Method meth1" AbsBinds -[a, b, c] -[d.Ord.t275, d.Ord.t276, d.Ord.t277, d.Eq.t274] -[(d.Ord.t278, dfun.Ord.Print002.Foo)] - (d.Ord.t425, d.Ord.t278) - (cmp3.t290, cmp3) - (cmp3.t295, cmp3.t290) - (cmp3.t300, cmp3.t290) - (cmp3.t305, cmp3.t290) - (d.Ord.t426, d.Ord.t425) - (cmp3.t310, cmp3) - (cmp3.t315, cmp3.t310) - (d.Ord.t422, d.Ord.t275) - (d.Ord.t423, d.Ord.t276) - (d.Ord.t424, d.Ord.t277) - d.Ord.t278 = ({-dict-} [d.Eq.t274] [<, <=, >=, >, max, min, cmp3]) - (<) :: Foo a b c -> Foo a b c -> Bool - (<) a b = cmp3.t290 True False False a b - (<=) :: Foo a b c -> Foo a b c -> Bool - (<=) a b = cmp3.t295 True True False a b - (>=) :: Foo a b c -> Foo a b c -> Bool - (>=) a b = cmp3.t300 False True True a b - (>) :: Foo a b c -> Foo a b c -> Bool - (>) a b = cmp3.t305 False False True a b - max :: Foo a b c -> Foo a b c -> Foo a b c - max a b = cmp3.t310 b a a a b - min :: Foo a b c -> Foo a b c -> Foo a b c - min a b = cmp3.t315 a a b a b - cmp3 = - let - AbsBinds [tt316] [] [(cmp3, cmp3)] - cmp3 :: tt316 -> tt316 -> tt316 -> Foo a b c -> Foo a b c -> tt316 - cmp3 lt eq gt a b - = case (con2tag.Foo) a of - a# -> case (con2tag.Foo) b of - b# -> if a# `eqInt` b# then - if a# `ltInt` b# then - lt - else - gt - else - cmp3eq.t48.t419 lt eq gt a b - where - AbsBinds - [a, b, c, tt400] - [d.Ord.t402, d.Ord.t404, d.Ord.t403] - [(cmp3eq, cmp3eq)] - (cmp3.t344, cmp3) - (cmp3.t341, cmp3.t344) - (cmp3.t363, cmp3) - (cmp3.t360, cmp3) - (cmp3.t382, cmp3.t360) - (cmp3.t379, cmp3.t360) - (cmp3.t401, cmp3.t363) - (cmp3.t398, cmp3.t363) - cmp3eq :: - tt400 - -> tt400 - -> tt400 - -> Foo a b c -> Foo a b c -> tt400 - cmp3eq - lt eq gt (MkFoo1 a1 a2) (MkFoo1 b1 b2) - = cmp3.t341 - lt - (cmp3.t344 lt eq gt a2 b2) - gt - a1 - b1 - cmp3eq - lt eq gt (:## a1 a2) (:## b1 b2) - = cmp3.t360 - lt - (cmp3.t363 lt eq gt a2 b2) - gt - a1 - b1 - cmp3eq - lt eq gt (MkFoo3 a1 a2) (MkFoo3 b1 b2) - = cmp3.t379 - lt - (cmp3.t382 lt eq gt a2 b2) - gt - a1 - b1 - cmp3eq - lt eq gt (:*** a1 a2) (:*** b1 b2) - = cmp3.t398 - lt - (cmp3.t401 lt eq gt a2 b2) - gt - a1 - b1 - cmp3eq.t48.t419 = cmp3eq - in cmp3 -AbsBinds [a, b, c] [] [(f1, f1)] - f1 :: a -> a -> Foo a b c - f1 x y = (MkFoo1) x y -AbsBinds [a, b, c] [] [(f1a, f1a)] - f1a :: a -> a -> Foo a b c - f1a x y = (MkFoo1) x y -AbsBinds [a, b, c] [] [(f2, f2)] - f2 :: b -> c -> Foo a b c - f2 x y = ((:##)) x y -AbsBinds [a, b, c] [] [(f2a, f2a)] - f2a :: b -> c -> Foo a b c - f2a x y = ((:##)) x y -AbsBinds [a, b, c] [] [(...., ....)] - (....) :: b -> b -> Foo a b c - (....) - x y = (MkFoo3) x y -AbsBinds [a, b, c] [] [(....., .....)] - (.....) :: b -> b -> Foo a b c - (.....) - x y = (MkFoo3) x y -AbsBinds [a, b, c] [] [(<<<<, <<<<)] - (<<<<) :: c -> c -> Foo a b c - (<<<<) - x y = ((:***)) x y - (<<<<) - x y = ((:***)) x y -AbsBinds [a] [d.Print002.Bar.t143] [(f3a, f3a)] - (Print002.Bar.meth1.t142, meth1) - f3a :: a -> a -> Bool - f3a x y = Print002.Bar.meth1.t142 x y -AbsBinds [a] [d.Print002.Bar.t151] [(f3b, f3b)] - (Print002.Bar.meth1.t149, meth1) - f3b :: a -> a -> Bool - f3b x y = x `Print002.Bar.meth1.t149` y -AbsBinds [a] [d.Print002.Bar.t158] [(f3c, f3c)] - (Print002.Bar./////.t157, (/////)) - f3c :: a -> a -> Bool - f3c x y = Print002.Bar./////.t157 x y -AbsBinds [a] [d.Print002.Bar.t166] [(f3d, f3d)] - (Print002.Bar./////.t164, (/////)) - f3d :: a -> a -> Bool - f3d x y = x `Print002.Bar./////.t164` y -AbsBinds [a, b, c] [] [(con2tag.Foo, con2tag.Foo)] - con2tag.Foo :: Foo a b c -> IntPrim - con2tag.Foo - (MkFoo1 _ _) - = 0# - con2tag.Foo - (:## _ _) - = 1# - con2tag.Foo - (MkFoo3 _ _) - = 2# - con2tag.Foo - (:*** _ _) - = 3# - -=-=-=-=-=INTERFACE STARTS HERE=-=-=-=-= Print002 -interface Print002 where -(....) :: b -> b -> Foo a b c {-# ARITY _ = 2 #-} -(.....) :: b -> b -> Foo a b c {-# ARITY _ = 2 #-} -(<<<<) :: c -> c -> Foo a b c {-# ARITY _ = 2 #-} -f1 :: a -> a -> Foo a b c {-# ARITY _ = 2 #-} -f1a :: a -> a -> Foo a b c {-# ARITY _ = 2 #-} -f2 :: b -> c -> Foo a b c {-# ARITY _ = 2 #-} -f2a :: b -> c -> Foo a b c {-# ARITY _ = 2 #-} -f3a :: Bar a => a -> a -> Bool {-# ARITY _ = 1 #-} -f3b :: Bar a => a -> a -> Bool {-# ARITY _ = 1 #-} -f3c :: Bar a => a -> a -> Bool {-# ARITY _ = 1 #-} -f3d :: Bar a => a -> a -> Bool {-# ARITY _ = 1 #-} -class Bar a where - meth1 :: a -> a -> Bool - (/////) :: a -> a -> Bool - meth2 :: a -> b -> Bool -class (Bar a) => Bar2 a -data Foo a b c = MkFoo1 a a | (:##) b c | MkFoo3 b b | (:***) c c -instance (Eq a, Eq b, Eq c) => Eq (Foo a b c) -instance (Ord a, Ord b, Ord c) => Ord (Foo a b c) -=-=-=-=-=INTERFACE STOPS HERE=-=-=-=-= - +[a{-aVq-}] +[d.Bar_aVt] +[([a{-aVq-}], $m/////{-rLb,x-}, /////_aVv)] + AbsBinds [] [] [([], /////_aVv, /////_aVx)] + /////_aVx + = GHCerr.noDefaultMethodError{-8k,p-} + (a{-aVq-} -> a{-aVq-} -> PrelBase.Bool{-34,p-}) + "Class Bar Method /////" +AbsBinds +[a{-aVq-}] +[d.Bar_aVC] +[([a{-aVq-}], $mmeth2{-rLa,x-}, meth2_aVF)] + AbsBinds [b{-aVM-}] [] [([b{-aVM-}], meth2_aVF, meth2_aVI)] + meth2_aVI + = GHCerr.noDefaultMethodError{-8k,p-} + (a{-aVq-} -> b{-aVM-} -> PrelBase.Bool{-34,p-}) + "Class Bar Method meth2" +{- rec -} +AbsBinds +[a{-aOK-}, b{-aON-}, c{-aOQ-}] +[d.Eq_aQB, d.Eq_aQC, d.Eq_aQD] +[([a{-aOK-}, b{-aON-}, c{-aOQ-}], $d1{-rVR,x-}, d.Eq_aOA)] + d.Eq_aQH = + d.Eq_aQB + ==_aVX = + PrelBase.=={-8Y,p-} + a{-aOK-} + d.Eq_aQH + d.Eq_aQJ = + d.Eq_aQC + ==_aVW = + PrelBase.=={-8Y,p-} + b{-aON-} + d.Eq_aQJ + d.Eq_aQL = + d.Eq_aQD + ==_aVV = + PrelBase.=={-8Y,p-} + c{-aOQ-} + d.Eq_aQL + ==_aVU = + ==_aVT + AbsBinds [] [] [([], ==_aVT, ==_aOD)] + ==_aW2 = + ==_aVX + ==_aW1 = + ==_aVW + ==_aW0 = + ==_aVW + ==_aVZ = + ==_aVV + ==_aVY = + ==_aVV + ==_aOD + (MkFoo1{-rk,x-}{i} a1_rIv a2_rIw) (MkFoo1{-rk,x-}{i} b1_rIy b2_rIz) + = (a1_rIv ==_aVX b1_rIy) + PrelBase.&&{-re5,p-} (a2_rIw ==_aW2 b2_rIz) + ==_aOD + (:##{-rj,x-}{i} a1_rIB a2_rIC) (:##{-rj,x-}{i} b1_rIE b2_rIF) + = (a1_rIB ==_aVW b1_rIE) + PrelBase.&&{-re5,p-} (a2_rIC ==_aVV b2_rIF) + ==_aOD + (MkFoo3{-rm,x-}{i} a1_rIH a2_rII) (MkFoo3{-rm,x-}{i} b1_rIK b2_rIL) + = (a1_rIH ==_aW1 b1_rIK) + PrelBase.&&{-re5,p-} (a2_rII ==_aW0 b2_rIL) + ==_aOD + (:***{-ro,x-}{i} a1_rIN a2_rIO) (:***{-ro,x-}{i} b1_rIQ b2_rIR) + = (a1_rIN ==_aVZ b1_rIQ) + PrelBase.&&{-re5,p-} (a2_rIO ==_aVY b2_rIR) + ==_aOD + a_rIT b_rIV + = PrelBase.False{-58,p-}{i} + AbsBinds [] [] [([], /=_aVS, /=_aQu)] + /=_aQu + a_rIZ b_rJ1 + = PrelBase.not{-rgK,p-} + ==_aVU + a_rIZ b_rJ1 + d.Eq_aOA = + ({-dict-} [] [==_aVT, /=_aVS]) +{- rec -} +AbsBinds +[a{-aVN-}, b{-aVP-}, c{-aVO-}] +[] +[([a{-aVN-}, b{-aVP-}, c{-aVO-}], $d2{-rW3,x-}, d.Eval_aQW)] + d.Eval_aQW = + ({-dict-} [] []) +{- rec -} +AbsBinds +[a{-aRa-}, b{-aRb-}, c{-aRc-}] +[d.Ord_aV0, d.Ord_aV1, d.Ord_aV2, d.Eq_aV3] +[([a{-aRa-}, b{-aRb-}, c{-aRc-}], $d3{-rW4,x-}, d.Ord_aR4)] + d.Eq_aV4 = + d.Eq_aV3 + d.Ord_aTL = + d.Ord_aV0 + d.Ord_aTM = + d.Ord_aV1 + d.Ord_aTN = + d.Ord_aV2 + compare_aWh = + compare_aWb + compare_aWg = + compare_aWb + compare_aWf = + compare_aWb + compare_aWe = + compare_aWb + compare_aWd = + compare_aWb + compare_aWc = + compare_aWb + AbsBinds [] [] [([], compare_aWb, compare_aR7)] + compare_aR7 + a_rJZ b_rK1 + = case + con2tag_Foo#_rIm + [c{-aRc-}, a{-aRa-}, b{-aRb-}] + a_rJZ + of + a#_rKT -> case + con2tag_Foo#_rIm + [c{-aRc-}, a{-aRa-}, b{-aRb-}] + b_rK1 + of + b#_rKV -> if a#_rKT GHC.==#{-79,p-}{I} b#_rKV then + case + cmp_eq_aWi + a_rJZ b_rK1 + of + PrelBase.LT{-rc8,p-}{i} + -> PrelBase.LT{-rc8,p-}{i} + PrelBase.EQ{-r4C,p-}{i} + -> PrelBase.EQ{-r4C,p-}{i} + PrelBase.GT{-rc9,p-}{i} + -> PrelBase.GT{-rc9,p-}{i} + else + if a#_rKT GHC.<#{-7b,p-}{I} b#_rKV then + PrelBase.LT{-rc8,p-}{i} + else + PrelBase.GT{-rc9,p-}{i} + where + {- nonrec -} + AbsBinds + [c{-aST-}, a{-aT4-}, b{-aT5-}] + [d.Ord_aTe, d.Ord_aTg, d.Ord_aTi] + [([c{-aST-}, a{-aT4-}, b{-aT5-}], cmp_eq_rK3, cmp_eq_aRg)] + compare_aWq = + PrelBase.compare{-rei,p-} + a{-aT4-} + d.Ord_aTe + compare_aWp = + compare_aWq + compare_aWo = + PrelBase.compare{-rei,p-} + b{-aT5-} + d.Ord_aTg + compare_aWn = + PrelBase.compare{-rei,p-} + c{-aST-} + d.Ord_aTi + compare_aWm = + compare_aWo + compare_aWl = + compare_aWo + compare_aWk = + compare_aWn + compare_aWj = + compare_aWn + cmp_eq_aRg + (MkFoo1{-rk,x-}{i} a1_rK5 a2_rK6) (MkFoo1{-rk,x-}{i} b1_rK8 b2_rK9) + = case + compare_aWq + a1_rK5 b1_rK8 + of + PrelBase.LT{-rc8,p-}{i} + -> PrelBase.LT{-rc8,p-}{i} + PrelBase.EQ{-r4C,p-}{i} + -> case + compare_aWp + a2_rK6 b2_rK9 + of + PrelBase.LT{-rc8,p-}{i} + -> PrelBase.LT{-rc8,p-}{i} + PrelBase.EQ{-r4C,p-}{i} + -> PrelBase.EQ{-r4C,p-}{i} + PrelBase.GT{-rc9,p-}{i} + -> PrelBase.GT{-rc9,p-}{i} + PrelBase.GT{-rc9,p-}{i} + -> PrelBase.GT{-rc9,p-}{i} + cmp_eq_aRg + (:##{-rj,x-}{i} a1_rKh a2_rKi) (:##{-rj,x-}{i} b1_rKk b2_rKl) + = case + compare_aWo + a1_rKh b1_rKk + of + PrelBase.LT{-rc8,p-}{i} + -> PrelBase.LT{-rc8,p-}{i} + PrelBase.EQ{-r4C,p-}{i} + -> case + compare_aWn + a2_rKi b2_rKl + of + PrelBase.LT{-rc8,p-}{i} + -> PrelBase.LT{-rc8,p-}{i} + PrelBase.EQ{-r4C,p-}{i} + -> PrelBase.EQ{-r4C,p-}{i} + PrelBase.GT{-rc9,p-}{i} + -> PrelBase.GT{-rc9,p-}{i} + PrelBase.GT{-rc9,p-}{i} + -> PrelBase.GT{-rc9,p-}{i} + cmp_eq_aRg + (MkFoo3{-rm,x-}{i} a1_rKt a2_rKu) (MkFoo3{-rm,x-}{i} b1_rKw b2_rKx) + = case + compare_aWm + a1_rKt b1_rKw + of + PrelBase.LT{-rc8,p-}{i} + -> PrelBase.LT{-rc8,p-}{i} + PrelBase.EQ{-r4C,p-}{i} + -> case + compare_aWl + a2_rKu b2_rKx + of + PrelBase.LT{-rc8,p-}{i} + -> PrelBase.LT{-rc8,p-}{i} + PrelBase.EQ{-r4C,p-}{i} + -> PrelBase.EQ{-r4C,p-}{i} + PrelBase.GT{-rc9,p-}{i} + -> PrelBase.GT{-rc9,p-}{i} + PrelBase.GT{-rc9,p-}{i} + -> PrelBase.GT{-rc9,p-}{i} + cmp_eq_aRg + (:***{-ro,x-}{i} a1_rKF a2_rKG) (:***{-ro,x-}{i} b1_rKI b2_rKJ) + = case + compare_aWk + a1_rKF b1_rKI + of + PrelBase.LT{-rc8,p-}{i} + -> PrelBase.LT{-rc8,p-}{i} + PrelBase.EQ{-r4C,p-}{i} + -> case + compare_aWj + a2_rKG b2_rKJ + of + PrelBase.LT{-rc8,p-}{i} + -> PrelBase.LT{-rc8,p-}{i} + PrelBase.EQ{-r4C,p-}{i} + -> PrelBase.EQ{-r4C,p-}{i} + PrelBase.GT{-rc9,p-}{i} + -> PrelBase.GT{-rc9,p-}{i} + PrelBase.GT{-rc9,p-}{i} + -> PrelBase.GT{-rc9,p-}{i} + cmp_eq_aRg + _ _ = IOBase.error{-87,p-} + PrelBase.Ordering{-3o,p-} + "Urk! in TcGenDeriv" + {- nonrec -} + cmp_eq_aWi = + cmp_eq_rK3 + [c{-aRc-}, a{-aRa-}, b{-aRb-}] + [d.Ord_aTL, d.Ord_aTM, d.Ord_aTN] + AbsBinds [] [] [([], <_aWa, <_aTR)] + <_aTR + a_rJ7 b_rJ9 + = case + compare_aWh + a_rJ7 b_rJ9 + of + PrelBase.LT{-rc8,p-}{i} + -> PrelBase.True{-5E,p-}{i} + PrelBase.EQ{-r4C,p-}{i} + -> PrelBase.False{-58,p-}{i} + PrelBase.GT{-rc9,p-}{i} + -> PrelBase.False{-58,p-}{i} + AbsBinds [] [] [([], <=_aW9, <=_aU3)] + <=_aU3 + a_rJg b_rJi + = case + compare_aWg + a_rJg b_rJi + of + PrelBase.LT{-rc8,p-}{i} + -> PrelBase.True{-5E,p-}{i} + PrelBase.EQ{-r4C,p-}{i} + -> PrelBase.True{-5E,p-}{i} + PrelBase.GT{-rc9,p-}{i} + -> PrelBase.False{-58,p-}{i} + AbsBinds [] [] [([], >=_aW8, >=_aUf)] + >=_aUf + a_rJp b_rJr + = case + compare_aWf + a_rJp b_rJr + of + PrelBase.LT{-rc8,p-}{i} + -> PrelBase.False{-58,p-}{i} + PrelBase.EQ{-r4C,p-}{i} + -> PrelBase.True{-5E,p-}{i} + PrelBase.GT{-rc9,p-}{i} + -> PrelBase.True{-5E,p-}{i} + AbsBinds [] [] [([], >_aW7, >_aUr)] + >_aUr + a_rJy b_rJA + = case + compare_aWe + a_rJy b_rJA + of + PrelBase.LT{-rc8,p-}{i} + -> PrelBase.False{-58,p-}{i} + PrelBase.EQ{-r4C,p-}{i} + -> PrelBase.False{-58,p-}{i} + PrelBase.GT{-rc9,p-}{i} + -> PrelBase.True{-5E,p-}{i} + AbsBinds [] [] [([], max_aW6, max_aUD)] + max_aUD + a_rJH b_rJJ + = case + compare_aWd + a_rJH b_rJJ + of + PrelBase.LT{-rc8,p-}{i} + -> b_rJJ + PrelBase.EQ{-r4C,p-}{i} + -> a_rJH + PrelBase.GT{-rc9,p-}{i} + -> a_rJH + AbsBinds [] [] [([], min_aW5, min_aUQ)] + min_aUQ + a_rJQ b_rJS + = case + compare_aWc + a_rJQ b_rJS + of + PrelBase.LT{-rc8,p-}{i} + -> a_rJQ + PrelBase.EQ{-r4C,p-}{i} + -> b_rJS + PrelBase.GT{-rc9,p-}{i} + -> b_rJS + d.Ord_aR4 = + ({-dict-} + [d.Eq_aV4] + [compare_aWb, <_aWa, <=_aW9, >=_aW8, >_aW7, max_aW6, min_aW5]) +{- nonrec -} +{- nonrec -} +AbsBinds +[a{-aLh-}] +[d.Bar_aLn] +[([a{-aLh-}], f3d{-r4D,x-}, f3d_aL9)] + /////_aWr = + /////{-r4Q,x-} + a{-aLh-} + d.Bar_aLn + f3d_aL9 + x_r4j y_r4l + = x_r4j /////_aWr y_r4l +{- nonrec -} +{- nonrec -} +AbsBinds +[a{-aLu-}] +[d.Bar_aLA] +[([a{-aLu-}], f3c{-r4E,x-}, f3c_aLp)] + /////_aWs = + /////{-r4Q,x-} + a{-aLu-} + d.Bar_aLA + f3c_aLp + x_r4f y_r4h + = /////_aWs + x_r4f y_r4h +{- nonrec -} +{- nonrec -} +AbsBinds +[a{-aLH-}] +[d.Bar_aLN] +[([a{-aLH-}], f3b{-r4F,x-}, f3b_aLC)] + meth1_aWt = + meth1{-r4R,x-} + a{-aLH-} + d.Bar_aLN + f3b_aLC + x_r4b y_r4d + = x_r4b meth1_aWt y_r4d +{- nonrec -} +{- nonrec -} +AbsBinds +[a{-aLU-}] +[d.Bar_aM0] +[([a{-aLU-}], f3a{-r4G,x-}, f3a_aLP)] + meth1_aWu = + meth1{-r4R,x-} + a{-aLU-} + d.Bar_aM0 + f3a_aLP + x_r47 y_r49 + = meth1_aWu + x_r47 y_r49 +{- nonrec -} +{- nonrec -} +AbsBinds +[c{-aMk-}, a{-aMn-}, b{-aMo-}] +[] +[([c{-aMk-}, a{-aMn-}, b{-aMo-}], <<<<{-r4H,x-}, <<<<_aM2)] + <<<<_aM2 + x_r3Z y_r41 + = :***{-ro,x-}{i} + [a{-aMn-}, b{-aMo-}, c{-aMk-}] + x_r3Z y_r41 + <<<<_aM2 + x_r43 y_r45 + = :***{-ro,x-}{i} + [a{-aMn-}, b{-aMo-}, c{-aMk-}] + x_r43 y_r45 +{- nonrec -} +{- nonrec -} +AbsBinds +[b{-aMw-}, a{-aMA-}, c{-aMC-}] +[] +[([b{-aMw-}, a{-aMA-}, c{-aMC-}], .....{-r4I,x-}, ....._aMq)] + ....._aMq + x_r3V y_r3X + = MkFoo3{-rm,x-}{i} + [a{-aMA-}, b{-aMw-}, c{-aMC-}] + x_r3V y_r3X +{- nonrec -} +{- nonrec -} +AbsBinds +[b{-aMK-}, a{-aMO-}, c{-aMQ-}] +[] +[([b{-aMK-}, a{-aMO-}, c{-aMQ-}], ....{-r4J,x-}, ...._aME)] + ...._aME + x_r3R y_r3T + = MkFoo3{-rm,x-}{i} + [a{-aMO-}, b{-aMK-}, c{-aMQ-}] + x_r3R y_r3T +{- nonrec -} +{- nonrec -} +AbsBinds +[b{-aMY-}, c{-aN1-}, a{-aN4-}] +[] +[([b{-aMY-}, c{-aN1-}, a{-aN4-}], f2a{-r4K,x-}, f2a_aMS)] + f2a_aMS + x_r3N y_r3P + = :##{-rj,x-}{i} + [a{-aN4-}, b{-aMY-}, c{-aN1-}] + x_r3N y_r3P +{- nonrec -} +{- nonrec -} +AbsBinds +[b{-aNc-}, c{-aNf-}, a{-aNi-}] +[] +[([b{-aNc-}, c{-aNf-}, a{-aNi-}], f2{-r4L,x-}, f2_aN6)] + f2_aN6 + x_r3J y_r3L + = :##{-rj,x-}{i} + [a{-aNi-}, b{-aNc-}, c{-aNf-}] + x_r3J y_r3L +{- nonrec -} +{- nonrec -} +AbsBinds +[a{-aNp-}, b{-aNu-}, c{-aNw-}] +[] +[([a{-aNp-}, b{-aNu-}, c{-aNw-}], f1a{-r4M,x-}, f1a_aNk)] + f1a_aNk + x_r3F y_r3H + = MkFoo1{-rk,x-}{i} + [a{-aNp-}, b{-aNu-}, c{-aNw-}] + x_r3F y_r3H +{- nonrec -} +{- nonrec -} +AbsBinds +[a{-aND-}, b{-aNI-}, c{-aNK-}] +[] +[([a{-aND-}, b{-aNI-}, c{-aNK-}], f1{-r4N,x-}, f1_aNy)] + f1_aNy + x_r3B y_r3D + = MkFoo1{-rk,x-}{i} + [a{-aND-}, b{-aNI-}, c{-aNK-}] + x_r3B y_r3D +{- nonrec -} +{- nonrec -} +AbsBinds +[c{-aOo-}, a{-aOr-}, b{-aOs-}] +[] +[([c{-aOo-}, a{-aOr-}, b{-aOs-}], + con2tag_Foo#_rIm, + con2tag_Foo#_aNM)] + con2tag_Foo#_aNM + (MkFoo1{-rk,x-}{i} _ _) + = 0# + con2tag_Foo#_aNM + (:##{-rj,x-}{i} _ _) + = 1# + con2tag_Foo#_aNM + (MkFoo3{-rm,x-}{i} _ _) + = 2# + con2tag_Foo#_aNM + (:***{-ro,x-}{i} _ _) + = 3# +{- nonrec -} +Print002.hs:35: + Warning: Pattern match(es) completely overlapped + in the definition of function `<<<<' +ghc: module version changed to 1; reason: no old .hi file +_interface_ Print002 1 +_instance_modules_ +ArrBase IO PrelNum +_usages_ +PrelBase 1 :: $d14 1 $d15 1 $d32 1 $d34 1 $d37 1 $d39 1 $d41 1 $d45 1 $d46 1 $d49 1 $d51 1 $d6 1 $d7 1 $m/= 1 $m< 1 $m<= 1 $m== 1 $m> 1 $m>= 1 $mcompare 1 $mmax 1 $mmin 1 && 1 . 1 not 1 Eq 1 Eval 1 Ord 1 Ordering 1; +PrelNum 1 :: $d17 1 $d18 1; +_exports_ +Print002 .... ..... <<<< f1 f1a f2 f2a f3a f3b f3c f3d Bar(meth1 ///// meth2) Bar2 Foo(MkFoo1 :## MkFoo3 :***); +_instances_ +instance _forall_ [a b c] {PrelBase.Eq a, PrelBase.Eq b, PrelBase.Eq c} => {PrelBase.Eq (Foo a b c)} = $d1; +instance _forall_ [a b c] => {PrelBase.Eval (Foo a b c)} = $d2; +instance _forall_ [a b c] {PrelBase.Ord a, PrelBase.Ord b, PrelBase.Ord c} => {PrelBase.Ord (Foo a b c)} = $d3; +_declarations_ +1 $d1 _:_ _forall_ [a b c] {PrelBase.Eq a, PrelBase.Eq b, PrelBase.Eq c} => {PrelBase.Eq (Foo a b c)} ;; +1 $d2 _:_ _forall_ [a b c] => {PrelBase.Eval (Foo a b c)} ;; +1 $d3 _:_ _forall_ [a b c] {PrelBase.Ord a, PrelBase.Ord b, PrelBase.Ord c, PrelBase.Eq (Foo a b c)} => {PrelBase.Ord (Foo a b c)} ;; +1 $m///// _:_ _forall_ [a] {Bar a} => a -> a -> PrelBase.Bool ;; +1 $mmeth1 _:_ _forall_ [a] {Bar a} => a -> a -> PrelBase.Bool ;; +1 $mmeth2 _:_ _forall_ [a] {Bar a} => _forall_ [b] => a -> b -> PrelBase.Bool ;; +1 .... _:_ _forall_ [a b c] => a -> a -> Foo b a c ;; +1 ..... _:_ _forall_ [a b c] => a -> a -> Foo b a c ;; +1 <<<< _:_ _forall_ [a b c] => a -> a -> Foo b c a ;; +1 class Bar r4q where {meth1 :: r4q -> r4q -> PrelBase.Bool; ///// :: r4q -> r4q -> PrelBase.Bool; meth2 :: _forall_ [r4w] => r4q -> r4w -> PrelBase.Bool} ; +class {Bar r4n} => Bar2 r4n ; +1 data Foo r4z r4A r4B = MkFoo1 r4z r4z | :## r4A r4B | MkFoo3 r4A r4A | :*** r4B r4B ; +1 f1 _:_ _forall_ [a b c] => a -> a -> Foo a b c ;; +1 f1a _:_ _forall_ [a b c] => a -> a -> Foo a b c ;; +1 f2 _:_ _forall_ [a b c] => a -> b -> Foo c a b ;; +1 f2a _:_ _forall_ [a b c] => a -> b -> Foo c a b ;; +1 f3a _:_ _forall_ [a] {Bar a} => a -> a -> PrelBase.Bool ;; +1 f3b _:_ _forall_ [a] {Bar a} => a -> a -> PrelBase.Bool ;; +1 f3c _:_ _forall_ [a] {Bar a} => a -> a -> PrelBase.Bool ;; +1 f3d _:_ _forall_ [a] {Bar a} => a -> a -> PrelBase.Bool ;; diff --git a/ghc/compiler/tests/printing/Print003.stderr b/ghc/compiler/tests/printing/Print003.stderr index e69de29..7ad6eea 100644 --- a/ghc/compiler/tests/printing/Print003.stderr +++ b/ghc/compiler/tests/printing/Print003.stderr @@ -0,0 +1,44 @@ + + +================================================================================ +Typechecked: +{- nonrec -} +bitRsh{-r3h,x-} = + _/\_ a{-r3f-} -> \ tpl_B1 -> + case tpl_B1 of { PrelTup.(,){-62,p-}{i} tpl_B1 tpl_B2 -> tpl_B1;} +bitLsh{-r3g,x-} = + _/\_ a{-r3f-} -> \ tpl_B1 -> + case tpl_B1 of { PrelTup.(,){-62,p-}{i} tpl_B1 tpl_B2 -> tpl_B2;} +{- nonrec -} +AbsBinds +[a{-anm-}] +[d.Bits_anf] +[([a{-anm-}], $mbitRsh{-rnw,x-}, bitRsh_anh)] + AbsBinds [] [] [([], bitRsh_anh, bitRsh_anj)] + bitRsh_anj + = GHCerr.noDefaultMethodError{-8k,p-} + (a{-anm-} -> PrelBase.Int{-3g,p-} -> a{-anm-}) + "Class Bits Method bitRsh" +AbsBinds +[a{-anm-}] +[d.Bits_anp] +[([a{-anm-}], $mbitLsh{-rnx,x-}, bitLsh_anr)] + AbsBinds [] [] [([], bitLsh_anr, bitLsh_ant)] + bitLsh_ant + = GHCerr.noDefaultMethodError{-8k,p-} + (a{-anm-} -> PrelBase.Int{-3g,p-} -> a{-anm-}) + "Class Bits Method bitLsh" +{- nonrec -} +ghc: module version changed to 1; reason: no old .hi file +_interface_ Word 1 +_instance_modules_ +ArrBase IO PrelNum +_exports_ +Word Bits(bitRsh bitLsh); +_fixities_ +infixl 8 bitLsh; +infixl 8 bitRsh; +_declarations_ +1 $mbitLsh _:_ _forall_ [a] {Bits a} => a -> PrelBase.Int -> a ;; +1 $mbitRsh _:_ _forall_ [a] {Bits a} => a -> PrelBase.Int -> a ;; +1 class Bits r3f where {bitRsh :: r3f -> PrelBase.Int -> r3f; bitLsh :: r3f -> PrelBase.Int -> r3f} ; diff --git a/ghc/compiler/tests/printing/Print004.hs b/ghc/compiler/tests/printing/Print004.hs index 2ea3a20..a496159 100644 --- a/ghc/compiler/tests/printing/Print004.hs +++ b/ghc/compiler/tests/printing/Print004.hs @@ -11,8 +11,8 @@ module ExportOpaque( OpaqueType ) where -data OpaqueType a = Con (FunnyInternalType a) deriving(Text) +data OpaqueType a = Con (FunnyInternalType a) deriving(Show) data FunnyInternalType a = Junk11 | Junk2 -instance Ord a => Text (FunnyInternalType a) +instance Ord a => Show (FunnyInternalType a) diff --git a/ghc/compiler/tests/printing/Print004.stderr b/ghc/compiler/tests/printing/Print004.stderr index e69de29..be79adb 100644 --- a/ghc/compiler/tests/printing/Print004.stderr +++ b/ghc/compiler/tests/printing/Print004.stderr @@ -0,0 +1,134 @@ + + +================================================================================ +Typechecked: +{- nonrec -} +{- nonrec -} +Con{-r6v,l-}{i} = + _/\_ a{-r6C-} -> \ tpl_B1 -> + Con{-r6v,l-}{i} + {_@_ a{-r6C-} tpl_B1} +{- nonrec -} +Junk11{-r4,l-}{i} = + _/\_ a{-r6A-} -> + Junk11{-r4,l-}{i} + {_@_ a{-r6A-}} +Junk2{-r3,l-}{i} = + _/\_ a{-r6A-} -> + Junk2{-r3,l-}{i} + {_@_ a{-r6A-}} +{- rec -} +AbsBinds [a{-aLt-}] [] [([a{-aLt-}], $d2{-rLv,x-}, d.Eval_aJU)] + d.Eval_aJU = + ({-dict-} [] []) +{- rec -} +AbsBinds [a{-aLu-}] [] [([a{-aLu-}], $d3{-rLD,x-}, d.Eval_aK0)] + d.Eval_aK0 = + ({-dict-} [] []) +{- rec -} +AbsBinds +[a{-aKf-}] +[d.Ord_aKF] +[([a{-aKf-}], $d4{-rLE,x-}, d.Show_aK6)] + d.Ord_aKR = + d.Ord_aKF + d.Show_aKP = + $d1{-rLJ,x-} + a{-aKf-} + d.Ord_aKR + showsPrec_aLI = + PrelBase.showsPrec{-r5t,p-} + (FunnyInternalType{-r6u,l-} a{-aKf-}) + d.Show_aKP + showsPrec_aLH = + showsPrec_aLG + AbsBinds [] [] [([], showsPrec_aLG, showsPrec_aK9)] + lit_aLK = + lit_aLA + showsPrec_aK9 + a_rJ8 (Con{-r6v,l-}{i} b1_rJa) + = PrelBase.showParen{-r61,p-} + a_rJ8 >=_aLC lit_aLA + PrelBase..{-r6d,p-} + [PrelBase.String{-r5q,p-}, PrelBase.String{-r5q,p-}, PrelBase.String{-r5q,p-}] + PrelBase.showString{-r60,p-} + "Con " + showsPrec_aLI + lit_aLK b1_rJa + AbsBinds [] [] [([], showList_aLF, showList_aKA)] + showList_aKA + = PrelBase.showList__{-r6F,p-} + (OpaqueType{-r6,x-} a{-aKf-}) + showsPrec_aLH + lit_aLw + d.Show_aK6 = + ({-dict-} [] [showsPrec_aLG, showList_aLF]) +{- rec -} +AbsBinds +[a{-aL6-}] +[d.Ord_aLf] +[([a{-aL6-}], $d1{-rLJ,x-}, d.Show_aKZ)] + d.Show_aLj = + d.Show_aKZ + $mshowsPrec_aLM = + PrelBase.$mshowsPrec{-rfh,p-} + (FunnyInternalType{-r6u,l-} a{-aL6-}) + d.Show_aLj + d.Show_aLl = + d.Show_aKZ + $mshowList_aLL = + PrelBase.$mshowList{-rfg,p-} + (FunnyInternalType{-r6u,l-} a{-aL6-}) + d.Show_aLl + AbsBinds [] [] [([], showsPrec_aL1, showsPrec_aL3)] + showsPrec_aL3 + = $mshowsPrec_aLM + AbsBinds [] [] [([], showList_aLa, showList_aLc)] + showList_aLc + = $mshowList_aLL + d.Show_aKZ = + ({-dict-} [] [showsPrec_aL1, showList_aLa]) +{- nonrec -} +d.Ord_aLo = + PrelBase.$d6{-reK,p-} +>=_aLC = + PrelBase.>={-8Z,p-} + PrelBase.Int{-3g,p-} + d.Ord_aLo +d.Num_aLs = + PrelBase.$d3{-ref,p-} +fromInt_aLB = + PrelBase.fromInt{-8R,p-} + PrelBase.Int{-3g,p-} + d.Num_aLs +lit_aLA = + fromInt_aLB + PrelBase.I#{-5b,p-}{i} + 10# +fromInt_aLz = + fromInt_aLB +lit_aLw = + fromInt_aLz + PrelBase.I#{-5b,p-}{i} + 0# +ghc: module version changed to 1; reason: no old .hi file +_interface_ ExportOpaque 1 +_instance_modules_ +ArrBase IO PrelNum +_usages_ +PrelBase 1 :: $d1 1 $d11 1 $d14 1 $d15 1 $d2 1 $d21 1 $d26 1 $d27 1 $d3 1 $d32 1 $d33 1 $d34 1 $d37 1 $d38 1 $d39 1 $d41 1 $d42 1 $d44 1 $d45 1 $d46 1 $d49 1 $d50 1 $d51 1 $d54 1 $d55 1 $d6 1 $d7 1 $d8 1 $m* 1 $m+ 1 $m- 1 $m/= 1 $m< 1 $m<= 1 $m== 1 $m> 1 $m>= 1 $mabs 1 $mcompare 1 $mfromInt 1 $mfromInteger 1 $mmax 1 $mmin 1 $mnegate 1 $mshowList 1 $mshowsPrec 1 $msignum 1 . 1 showList__ 1 showParen 1 showSpace 1 showString 1 Eq 1 Eval 1 Num 1 Ord 1 Ordering 1 Show 1 ShowS 1 String 1; +PrelNum 1 :: $d10 1 $d16 1 $d17 1 $d18 1 $d29 1 $d33 1 $d34 1 $d35 1; +_exports_ +ExportOpaque OpaqueType; +_instances_ +instance _forall_ [a] {PrelBase.Ord a} => {PrelBase.Show (FunnyInternalType a)} = $d1; +instance _forall_ [a] => {PrelBase.Eval (OpaqueType a)} = $d2; +instance _forall_ [a] => {PrelBase.Eval (FunnyInternalType a)} = $d3; +instance _forall_ [a] {PrelBase.Ord a} => {PrelBase.Show (OpaqueType a)} = $d4; +_declarations_ +1 $d1 _:_ _forall_ [a] {PrelBase.Ord a} => {PrelBase.Show (FunnyInternalType a)} ;; +1 $d2 _:_ _forall_ [a] => {PrelBase.Eval (OpaqueType a)} ;; +1 $d3 _:_ _forall_ [a] => {PrelBase.Eval (FunnyInternalType a)} ;; +1 $d4 _:_ _forall_ [a] {PrelBase.Ord a} => {PrelBase.Show (OpaqueType a)} ;; +1 data FunnyInternalType r6A = Junk11 | Junk2 ; +1 data OpaqueType r6C = Con (FunnyInternalType r6C) ; diff --git a/ghc/compiler/tests/reader/Makefile b/ghc/compiler/tests/reader/Makefile index d974058..fe5fca9 100644 --- a/ghc/compiler/tests/reader/Makefile +++ b/ghc/compiler/tests/reader/Makefile @@ -1,9 +1,22 @@ -TOP = ../../../.. -GhcRunTestRules = YES -include $(TOP)/ghc/mk/ghc.mk +TOP = ../../.. +include $(TOP)/mk/boilerplate.mk -runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs)) -read001_flags = -noC -ddump-rif2hs -read002_flags = -noC -ddump-rif2hs -read004_flags = -noC -fno-implicit-prelude -ddump-rif2hs +HS_SRCS = $(wildcard *.hs) +SRC_RUNTEST_OPTS += -accept-output -o1 $*.stdout -o2 $*.stderr -x 1 +HC_OPTS += -noC -dcore-lint + +read002_RUNTEST_OPTS = -x 0 + +%.o : %.hs + +%.o : %.hs + $(RUNTEST) $(HC) $(RUNTEST_OPTS) $(HC_OPTS) -c $< -o $@ -osuf $(subst .,,$(suffix $@)) + +all :: $(HS_OBJS) + +read001_HC_OPTS = -noC -ddump-rdr +read002_HC_OPTS = -noC -ddump-rdr +read004_HC_OPTS = -noC -fno-implicit-prelude -ddump-rdr + +include $(TOP)/mk/target.mk diff --git a/ghc/compiler/tests/reader/expr001.stderr b/ghc/compiler/tests/reader/expr001.stderr index e69de29..3701c35 100644 --- a/ghc/compiler/tests/reader/expr001.stderr +++ b/ghc/compiler/tests/reader/expr001.stderr @@ -0,0 +1,6 @@ + +expr001.hs:10: + Value not in scope: `c' + + +Compilation had errors diff --git a/ghc/compiler/tests/reader/read001.hs b/ghc/compiler/tests/reader/read001.hs index 4a97768..dc434eb 100644 --- a/ghc/compiler/tests/reader/read001.hs +++ b/ghc/compiler/tests/reader/read001.hs @@ -1,4 +1,4 @@ --- this module supposedly includes one of each Haskell construct +--!!! this module supposedly includes one of each Haskell construct -- HsImpExp stuff diff --git a/ghc/compiler/tests/reader/read001.stderr b/ghc/compiler/tests/reader/read001.stderr index 997116b..4a188c3 100644 --- a/ghc/compiler/tests/reader/read001.stderr +++ b/ghc/compiler/tests/reader/read001.stderr @@ -1,593 +1 @@ -Parsed, Haskellised: -module OneOfEverything ( - fixn, - FooData, - FooDataB(..), - FooDataC(..), - EqTree(EqLeaf, EqBranch), - EqClass(..), - OrdClass(orda, ordb), - OneC.., - OneOfEverything.. - ) where -import Prelude {- - interface Prelude where - import PreludeBuiltin ( trace, Char ) - import PreludeCore ( Bool, String, ReadS, ShowS, Text ) - import PreludeRatio ( - %, numerator, denominator, approxRational ) - import PreludeComplex ( - realPart, - imagPart, - conjugate, - mkPolar, - cis, - polar, - magnitude, - phase ) - import PreludeList ( - head, - last, - tail, - init, - null, - \\, - genericLength, - length, - !!, - filter, - partition, - foldl1, - scanl, - scanl1, - foldr1, - scanr, - scanr1, - iterate, - repeat, - cycle, - take, - drop, - splitAt, - takeWhile, - dropWhile, - span, - break, - lines, - words, - unlines, - unwords, - nub, - reverse, - and, - or, - any, - all, - elem, - notElem, - sum, - product, - sums, - products, - maximum, - minimum, - concat, - transpose, - zip, - zip3, - zip4, - zip5, - zip6, - zip7, - zipWith, - zipWith3, - zipWith4, - zipWith5, - zipWith6, - zipWith7, - unzip, - unzip3, - unzip4, - unzip5, - unzip6, - unzip7 ) - import PreludeArray ( - array, - listArray, - !, - bounds, - indices, - elems, - assocs, - accumArray, - //, - accum, - amap, - ixmap ) - import PreludeText ( - reads, - shows, - show, - read, - showChar, - readLitChar, - showLitChar, - readSigned, - showSigned, - readDec, - showInt, - readFloat, - showFloat ) - import PreludeIO ( - stdin, - stdout, - stderr, - stdecho, - done, - readFile, - writeFile, - appendFile, - readBinFile, - writeBinFile, - appendBinFile, - deleteFile, - statusFile, - readChan, - appendChan, - readBinChan, - appendBinChan, - statusChan, - echo, - getArgs, - getProgName, - getEnv, - setEnv, - abort, - exit, - print, - prints, - interact ) - instance (Eq a, Eq b) => Eq (a, b) - instance (Ord a, Ord b) => Ord (a, b) - instance (Ix a, Ix b) => Ix (a, b) - instance (Text a, Text b) => Text (a, b) - instance (Binary a, Binary b) => Binary (a, b) - instance (Eq a, Eq b, Eq c) => Eq (a, b, c) - instance (Ord a, Ord b, Ord c) => Ord (a, b, c) - instance (Ix a, Ix b, Ix c) => Ix (a, b, c) - instance (Text a, Text b, Text c) => Text (a, b, c) - instance (Binary a, Binary b, Binary c) => Binary (a, b, c) - instance (Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d) - instance (Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d) - instance (Ix a, Ix b, Ix c, Ix d) => Ix (a, b, c, d) - instance (Text a, Text b, Text c, Text d) => Text (a, b, c, d) - instance (Binary a, Binary b, Binary c, Binary d) => Binary (a, - b, - c, - d) - ^ :: (Num b, Integral a) => b -> a -> b - ^^ :: (Fractional b, Integral a) => b -> a -> b - appendBin :: Bin -> Bin -> Bin - asTypeOf :: a -> a -> a - atan2 :: RealFloat a => a -> a -> a - chr :: Int -> Char - fromIntegral :: (Integral a, Num b) => a -> b - fromRealFrac :: (RealFrac a, Fractional b) => a -> b - gcd :: Integral a => a -> a -> a - isAlpha :: Char -> Bool - isAlphanum :: Char -> Bool - isAscii :: Char -> Bool - isControl :: Char -> Bool - isDigit :: Char -> Bool - isLower :: Char -> Bool - isNullBin :: Bin -> Bool - isPrint :: Char -> Bool - isSpace :: Char -> Bool - isUpper :: Char -> Bool - lcm :: Integral a => a -> a -> a - maxChar :: Char - maxInt :: Int - minChar :: Char - minInt :: Int - nullBin :: Bin - ord :: Char -> Int - subtract :: Num a => a -> a -> a - toLower :: Char -> Char - toUpper :: Char -> Char - until :: (a -> Bool) -> (a -> a) -> a -> a - trace :: String -> a -> a - % :: Integral a => a -> a -> Ratio a - numerator :: Integral a => Ratio a -> a - denominator :: Integral a => Ratio a -> a - approxRational :: RealFrac a => a -> a -> Rational - cis :: RealFloat a => a -> Complex a - conjugate :: RealFloat a => Complex a -> Complex a - imagPart :: RealFloat a => Complex a -> a - magnitude :: RealFloat a => Complex a -> a - mkPolar :: RealFloat a => a -> a -> Complex a - phase :: RealFloat a => Complex a -> a - polar :: RealFloat a => Complex a -> (a, a) - realPart :: RealFloat a => Complex a -> a - !! :: Integral a => [b] -> a -> b - \\ :: Eq a => [a] -> [a] -> [a] - all :: (a -> Bool) -> [a] -> Bool - and :: [Bool] -> Bool - any :: (a -> Bool) -> [a] -> Bool - break :: (a -> Bool) -> [a] -> ([a], [a]) - concat :: [[a]] -> [a] - cycle :: [a] -> [a] - drop :: Integral a => a -> [b] -> [b] - dropWhile :: (a -> Bool) -> [a] -> [a] - elem :: Eq a => a -> [a] -> Bool - filter :: (a -> Bool) -> [a] -> [a] - foldl1 :: (a -> a -> a) -> [a] -> a - foldr1 :: (a -> a -> a) -> [a] -> a - genericLength :: Num b => [a] -> b - head :: [a] -> a - init :: [a] -> [a] - iterate :: (a -> a) -> a -> [a] - last :: [a] -> a - length :: [a] -> Int - lines :: [Char] -> [[Char]] - maximum :: Ord a => [a] -> a - minimum :: Ord a => [a] -> a - notElem :: Eq a => a -> [a] -> Bool - nub :: Eq a => [a] -> [a] - null :: [a] -> Bool - or :: [Bool] -> Bool - partition :: (a -> Bool) -> [a] -> ([a], [a]) - product :: Num a => [a] -> a - products :: Num a => [a] -> [a] - repeat :: a -> [a] - reverse :: [a] -> [a] - scanl :: (b -> a -> b) -> b -> [a] -> [b] - scanl1 :: (a -> a -> a) -> [a] -> [a] - scanr :: (a -> b -> b) -> b -> [a] -> [b] - scanr1 :: (a -> a -> a) -> [a] -> [a] - span :: (a -> Bool) -> [a] -> ([a], [a]) - splitAt :: Integral a => a -> [b] -> ([b], [b]) - sum :: Num a => [a] -> a - sums :: Num a => [a] -> [a] - tail :: [a] -> [a] - take :: Integral a => a -> [b] -> [b] - takeWhile :: (a -> Bool) -> [a] -> [a] - transpose :: [[a]] -> [[a]] - unlines :: [[Char]] -> [Char] - unwords :: [[Char]] -> [Char] - unzip :: [(a, b)] -> ([a], [b]) - unzip3 :: [(a, b, c)] -> ([a], [b], [c]) - unzip4 :: [(a, b, c, d)] -> ([a], [b], [c], [d]) - unzip5 :: [(a, b, c, d, e)] -> ([a], [b], [c], [d], [e]) - unzip6 :: [(a, b, c, d, e, f)] -> ([a], [b], [c], [d], [e], [f]) - unzip7 :: - [(a, b, c, d, e, f, g)] - -> ([a], [b], [c], [d], [e], [f], [g]) - words :: [Char] -> [[Char]] - zip :: [a] -> [b] -> [(a, b)] - zip3 :: [a] -> [b] -> [c] -> [(a, b, c)] - zip4 :: [a] -> [b] -> [c] -> [d] -> [(a, b, c, d)] - zip5 :: [a] -> [b] -> [c] -> [d] -> [e] -> [(a, b, c, d, e)] - zip6 :: - [a] - -> [b] -> [c] -> [d] -> [e] -> [f] -> [(a, b, c, d, e, f)] - zip7 :: - [a] - -> [b] - -> [c] - -> [d] -> [e] -> [f] -> [g] -> [(a, b, c, d, e, f, g)] - zipWith :: (a -> b -> c) -> [a] -> [b] -> [c] - zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] - zipWith4 :: - (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e] - zipWith5 :: - (a -> b -> c -> d -> e -> f) - -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] - zipWith6 :: - (a -> b -> c -> d -> e -> f -> g) - -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] - zipWith7 :: - (a -> b -> c -> d -> e -> f -> g -> h) - -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h] - ! :: Ix a => Array a b -> a -> b - // :: Ix a => Array a b -> [Assoc a b] -> Array a b - accum :: - Ix b => (c -> a -> c) - -> Array b c -> [Assoc b a] -> Array b c - accumArray :: - Ix b => (c -> a -> c) - -> c -> (b, b) -> [Assoc b a] -> Array b c - amap :: Ix b => (a -> c) -> Array b a -> Array b c - array :: Ix a => (a, a) -> [Assoc a b] -> Array a b - assocs :: Ix a => Array a b -> [Assoc a b] - bounds :: Ix b => Array b a -> (b, b) - elems :: Ix a => Array a b -> [b] - indices :: Ix b => Array b a -> [b] - ixmap :: - (Ix b, Ix a) => (b, b) -> (b -> a) -> Array a c -> Array b c - listArray :: Ix a => (a, a) -> [b] -> Array a b - read :: Text a => [Char] -> a - readDec :: Integral a => [Char] -> [(a, [Char])] - readFloat :: RealFloat a => [Char] -> [(a, [Char])] - readLitChar :: [Char] -> [(Char, [Char])] - readSigned :: - Real a => ([Char] -> [(a, [Char])]) - -> [Char] -> [(a, [Char])] - reads :: Text a => [Char] -> [(a, [Char])] - show :: Text a => a -> [Char] - showChar :: Char -> [Char] -> [Char] - showFloat :: RealFloat a => a -> [Char] -> [Char] - showInt :: Integral a => a -> [Char] -> [Char] - showLitChar :: Char -> [Char] -> [Char] - showSigned :: - Real a => (a -> [Char] -> [Char]) - -> Int -> a -> [Char] -> [Char] - shows :: Text a => a -> [Char] -> [Char] - abort :: IOError -> [Response] -> [Request] - appendBinChan :: - [Char] - -> Bin - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - appendBinFile :: - [Char] - -> Bin - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - appendChan :: - [Char] - -> [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - appendFile :: - [Char] - -> [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - binDispatch :: - (IOError -> [Response] -> a) - -> (Bin -> [Response] -> a) -> [Response] -> a - deleteFile :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - done :: [Response] -> [Request] - echo :: - Bool - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - exit :: IOError -> [Response] -> [Request] - getArgs :: - (IOError -> [Response] -> [Request]) - -> ([[Char]] -> [Response] -> [Request]) - -> [Response] -> [Request] - getEnv :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Char] -> [Response] -> [Request]) - -> [Response] -> [Request] - getProgName :: - (IOError -> [Response] -> [Request]) - -> ([Char] -> [Response] -> [Request]) - -> [Response] -> [Request] - interact :: ([Char] -> [Char]) -> [Response] -> [Request] - print :: Text a => a -> [Response] -> [Request] - prints :: Text a => a -> [Char] -> [Response] -> [Request] - readBinChan :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> (Bin -> [Response] -> [Request]) - -> [Response] -> [Request] - readBinFile :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> (Bin -> [Response] -> [Request]) - -> [Response] -> [Request] - readChan :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Char] -> [Response] -> [Request]) - -> [Response] -> [Request] - readFile :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Char] -> [Response] -> [Request]) - -> [Response] -> [Request] - setEnv :: - [Char] - -> [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - statusChan :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Char] -> [Response] -> [Request]) - -> [Response] -> [Request] - statusFile :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Char] -> [Response] -> [Request]) - -> [Response] -> [Request] - stdecho :: [Char] - stderr :: [Char] - stdin :: [Char] - stdout :: [Char] - strDispatch :: - (IOError -> [Response] -> a) - -> ([Char] -> [Response] -> a) -> [Response] -> a - strListDispatch :: - (IOError -> [Response] -> a) - -> ([[Char]] -> [Response] -> a) -> [Response] -> a - succDispatch :: - (IOError -> [Response] -> a) - -> ([Response] -> a) -> [Response] -> a - writeBinFile :: - [Char] - -> Bin - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - writeFile :: - [Char] - -> [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - -} -import OneA {- - interface OneA where - import OneB ( fB ) renaming (fB to fBa) - type SynA = Float - data DataAA - data Ord a => DataAB a - = ConAB1 a - | ConAB2 - deriving (Text) - class Ord a => ClassA a where - clsA :: a -> String - instance ClassA Int - fA :: a -> a - -} -renaming (fA to renamedA) -import OneB {- - interface OneB where - fB :: a -> a - -} - (fB) -import OneC {- - interface OneC where - fC :: a -> a - -} - hiding (fC) -import OneC {- - interface OneC where - fC :: a -> a - -} - hiding (fC) -renaming (fc to renamedC) -infixr 9 . -infixr 8 ^ -infixr 8 ^^ -infixr 3 && -infixr 2 || -infixr 0 $ -infixl 9 ! -infixl 9 // -infix 1 := -infix 6 :+ -infixr 8 ** -infixl 7 * -infixl 7 / -infixl 7 `quot` -infixl 7 `rem` -infixl 7 `div` -infixl 7 `mod` -infixl 6 + -infixl 6 - -infix 4 == -infix 4 /= -infix 4 < -infix 4 <= -infix 4 >= -infix 4 > -infixl 9 !! -infix 5 \\ -infix 4 `elem` -infix 4 `notElem` -infixl 7 % -infix 6 `fixn` -infixl 7 +# -infixr 8 `fixr` -type Pair a b = (a, b) -data FooData - = FooCon Int -data FooDataB - = FooConB Double -data Eq a => EqTree a - = EqLeaf a - | EqBranch (EqLeaf a) (EqLeaf a) -class Eq a => EqClass a where - eqc :: a -> Char - eqc x = '?' -class Ord a => OrdClass a where - orda :: a -> Char - ordb :: a -> Char - ordc :: a -> Char -instance Eq a => EqClass EqTree a where - eqc x = 'a' -default (Integer, Rational) -bindwith :: (OrdClass a, OrdClass b) => a -> b -> b -g :: (Num a, Eq b) => Foo a -> [b] -> (a, a, a) -> b -{- rec -} -fixn x y = x -fixl x y = x -fixr x y = x -singlebind - x = x -bindwith - a b = b -reca a = recb a -recb a = reca a -~(a, b, c) - | nullity b = a - | nullity c = a - | otherwise = a - where - {- rec -} - nullity = null -mat a b c d | foof a b = d - | foof a c = d - | foof b c = d - where - {- rec -} - foof a b = a == b -expr a b c d = ((((((((a + ((:) a b)) + (a : b)) - + (((1 - 'c') - "abc") - 1.2929999999999999)) - + ((\ x y z -> x) 42)) - + ((9 *))) - + ((* 8))) - + (case x of - [] | null x -> 99 - | otherwise -> 98 - | True -> 97 - where - {- rec -} - null x = False)) - + ([ z | z <- c, isSpace z ])) - + (let - {- rec -} - y = foo - in (((((((y + ([1, 2, 3, 4])) + ((4, 3, 2, 1))) - + ((4 :: Num a => a))) - + (if 42 == 42.000000000000000 then 1 else 4)) - + ([ 1 .. ])) - + ([ 2, 4 .. ])) - + ([ 3 .. 5 ])) - + ([ 4, 8 .. 999 ])) -f _ - x - 1 - 1.9299999999999999 - 'c' - "dog" - ~y - (z@(Foo a b)) - (c Bar d) - [1, 2] - (3, 4) - (n+42) = y -g x y z = head y - -Enter trace(0): -doRenamings:tossing them away -Exit trace(0) - -Unknown name in export list: FooDataC -"read001.hs", line 38: undefined type constructor: EqLeaf -"read001.hs", line 38: undefined type constructor: EqLeaf -"read001.hs", line 112: undefined type constructor: Foo -"read001.hs", line 95: undefined value: x -"read001.hs", line 95: undefined value: x -"read001.hs", line 95: undefined value: foo -"read001.hs", line 107: undefined value: Foo -"read001.hs", line 107: undefined value: Bar -Fail: Compilation errors found - -ghc: execution of the Haskell compiler had trouble +read001.hs:13:9: parse error on input: "OneC.." diff --git a/ghc/compiler/tests/reader/read002.hs b/ghc/compiler/tests/reader/read002.hs index 9cc2153..b11f397 100644 --- a/ghc/compiler/tests/reader/read002.hs +++ b/ghc/compiler/tests/reader/read002.hs @@ -1,4 +1,5 @@ --!!! tests fixity reading and printing +module Reader where infixl 1 `f` infixr 2 \\\ diff --git a/ghc/compiler/tests/reader/read002.stderr b/ghc/compiler/tests/reader/read002.stderr index f8a8600..aeb88ae 100644 --- a/ghc/compiler/tests/reader/read002.stderr +++ b/ghc/compiler/tests/reader/read002.stderr @@ -1,466 +1,16 @@ -Parsed, Haskellised: -module Main where -import Prelude {- - interface Prelude where - import PreludeBuiltin ( trace, Char ) - import PreludeCore ( Bool, String, ReadS, ShowS, Text ) - import PreludeRatio ( - %, numerator, denominator, approxRational ) - import PreludeComplex ( - realPart, - imagPart, - conjugate, - mkPolar, - cis, - polar, - magnitude, - phase ) - import PreludeList ( - head, - last, - tail, - init, - null, - \\, - genericLength, - length, - !!, - filter, - partition, - foldl1, - scanl, - scanl1, - foldr1, - scanr, - scanr1, - iterate, - repeat, - cycle, - take, - drop, - splitAt, - takeWhile, - dropWhile, - span, - break, - lines, - words, - unlines, - unwords, - nub, - reverse, - and, - or, - any, - all, - elem, - notElem, - sum, - product, - sums, - products, - maximum, - minimum, - concat, - transpose, - zip, - zip3, - zip4, - zip5, - zip6, - zip7, - zipWith, - zipWith3, - zipWith4, - zipWith5, - zipWith6, - zipWith7, - unzip, - unzip3, - unzip4, - unzip5, - unzip6, - unzip7 ) - import PreludeArray ( - array, - listArray, - !, - bounds, - indices, - elems, - assocs, - accumArray, - //, - accum, - amap, - ixmap ) - import PreludeText ( - reads, - shows, - show, - read, - showChar, - readLitChar, - showLitChar, - readSigned, - showSigned, - readDec, - showInt, - readFloat, - showFloat ) - import PreludeIO ( - stdin, - stdout, - stderr, - stdecho, - done, - readFile, - writeFile, - appendFile, - readBinFile, - writeBinFile, - appendBinFile, - deleteFile, - statusFile, - readChan, - appendChan, - readBinChan, - appendBinChan, - statusChan, - echo, - getArgs, - getProgName, - getEnv, - setEnv, - abort, - exit, - print, - prints, - interact ) - instance (Eq a, Eq b) => Eq (a, b) - instance (Ord a, Ord b) => Ord (a, b) - instance (Ix a, Ix b) => Ix (a, b) - instance (Text a, Text b) => Text (a, b) - instance (Binary a, Binary b) => Binary (a, b) - instance (Eq a, Eq b, Eq c) => Eq (a, b, c) - instance (Ord a, Ord b, Ord c) => Ord (a, b, c) - instance (Ix a, Ix b, Ix c) => Ix (a, b, c) - instance (Text a, Text b, Text c) => Text (a, b, c) - instance (Binary a, Binary b, Binary c) => Binary (a, b, c) - instance (Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d) - instance (Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d) - instance (Ix a, Ix b, Ix c, Ix d) => Ix (a, b, c, d) - instance (Text a, Text b, Text c, Text d) => Text (a, b, c, d) - instance (Binary a, Binary b, Binary c, Binary d) => Binary (a, - b, - c, - d) - ^ :: (Num b, Integral a) => b -> a -> b - ^^ :: (Fractional b, Integral a) => b -> a -> b - appendBin :: Bin -> Bin -> Bin - asTypeOf :: a -> a -> a - atan2 :: RealFloat a => a -> a -> a - chr :: Int -> Char - fromIntegral :: (Integral a, Num b) => a -> b - fromRealFrac :: (RealFrac a, Fractional b) => a -> b - gcd :: Integral a => a -> a -> a - isAlpha :: Char -> Bool - isAlphanum :: Char -> Bool - isAscii :: Char -> Bool - isControl :: Char -> Bool - isDigit :: Char -> Bool - isLower :: Char -> Bool - isNullBin :: Bin -> Bool - isPrint :: Char -> Bool - isSpace :: Char -> Bool - isUpper :: Char -> Bool - lcm :: Integral a => a -> a -> a - maxChar :: Char - maxInt :: Int - minChar :: Char - minInt :: Int - nullBin :: Bin - ord :: Char -> Int - subtract :: Num a => a -> a -> a - toLower :: Char -> Char - toUpper :: Char -> Char - until :: (a -> Bool) -> (a -> a) -> a -> a - trace :: String -> a -> a - % :: Integral a => a -> a -> Ratio a - numerator :: Integral a => Ratio a -> a - denominator :: Integral a => Ratio a -> a - approxRational :: RealFrac a => a -> a -> Rational - cis :: RealFloat a => a -> Complex a - conjugate :: RealFloat a => Complex a -> Complex a - imagPart :: RealFloat a => Complex a -> a - magnitude :: RealFloat a => Complex a -> a - mkPolar :: RealFloat a => a -> a -> Complex a - phase :: RealFloat a => Complex a -> a - polar :: RealFloat a => Complex a -> (a, a) - realPart :: RealFloat a => Complex a -> a - !! :: Integral a => [b] -> a -> b - \\ :: Eq a => [a] -> [a] -> [a] - all :: (a -> Bool) -> [a] -> Bool - and :: [Bool] -> Bool - any :: (a -> Bool) -> [a] -> Bool - break :: (a -> Bool) -> [a] -> ([a], [a]) - concat :: [[a]] -> [a] - cycle :: [a] -> [a] - drop :: Integral a => a -> [b] -> [b] - dropWhile :: (a -> Bool) -> [a] -> [a] - elem :: Eq a => a -> [a] -> Bool - filter :: (a -> Bool) -> [a] -> [a] - foldl1 :: (a -> a -> a) -> [a] -> a - foldr1 :: (a -> a -> a) -> [a] -> a - genericLength :: Num b => [a] -> b - head :: [a] -> a - init :: [a] -> [a] - iterate :: (a -> a) -> a -> [a] - last :: [a] -> a - length :: [a] -> Int - lines :: [Char] -> [[Char]] - maximum :: Ord a => [a] -> a - minimum :: Ord a => [a] -> a - notElem :: Eq a => a -> [a] -> Bool - nub :: Eq a => [a] -> [a] - null :: [a] -> Bool - or :: [Bool] -> Bool - partition :: (a -> Bool) -> [a] -> ([a], [a]) - product :: Num a => [a] -> a - products :: Num a => [a] -> [a] - repeat :: a -> [a] - reverse :: [a] -> [a] - scanl :: (b -> a -> b) -> b -> [a] -> [b] - scanl1 :: (a -> a -> a) -> [a] -> [a] - scanr :: (a -> b -> b) -> b -> [a] -> [b] - scanr1 :: (a -> a -> a) -> [a] -> [a] - span :: (a -> Bool) -> [a] -> ([a], [a]) - splitAt :: Integral a => a -> [b] -> ([b], [b]) - sum :: Num a => [a] -> a - sums :: Num a => [a] -> [a] - tail :: [a] -> [a] - take :: Integral a => a -> [b] -> [b] - takeWhile :: (a -> Bool) -> [a] -> [a] - transpose :: [[a]] -> [[a]] - unlines :: [[Char]] -> [Char] - unwords :: [[Char]] -> [Char] - unzip :: [(a, b)] -> ([a], [b]) - unzip3 :: [(a, b, c)] -> ([a], [b], [c]) - unzip4 :: [(a, b, c, d)] -> ([a], [b], [c], [d]) - unzip5 :: [(a, b, c, d, e)] -> ([a], [b], [c], [d], [e]) - unzip6 :: [(a, b, c, d, e, f)] -> ([a], [b], [c], [d], [e], [f]) - unzip7 :: - [(a, b, c, d, e, f, g)] - -> ([a], [b], [c], [d], [e], [f], [g]) - words :: [Char] -> [[Char]] - zip :: [a] -> [b] -> [(a, b)] - zip3 :: [a] -> [b] -> [c] -> [(a, b, c)] - zip4 :: [a] -> [b] -> [c] -> [d] -> [(a, b, c, d)] - zip5 :: [a] -> [b] -> [c] -> [d] -> [e] -> [(a, b, c, d, e)] - zip6 :: - [a] - -> [b] -> [c] -> [d] -> [e] -> [f] -> [(a, b, c, d, e, f)] - zip7 :: - [a] - -> [b] - -> [c] - -> [d] -> [e] -> [f] -> [g] -> [(a, b, c, d, e, f, g)] - zipWith :: (a -> b -> c) -> [a] -> [b] -> [c] - zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] - zipWith4 :: - (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e] - zipWith5 :: - (a -> b -> c -> d -> e -> f) - -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] - zipWith6 :: - (a -> b -> c -> d -> e -> f -> g) - -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] - zipWith7 :: - (a -> b -> c -> d -> e -> f -> g -> h) - -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h] - ! :: Ix a => Array a b -> a -> b - // :: Ix a => Array a b -> [Assoc a b] -> Array a b - accum :: - Ix b => (c -> a -> c) - -> Array b c -> [Assoc b a] -> Array b c - accumArray :: - Ix b => (c -> a -> c) - -> c -> (b, b) -> [Assoc b a] -> Array b c - amap :: Ix b => (a -> c) -> Array b a -> Array b c - array :: Ix a => (a, a) -> [Assoc a b] -> Array a b - assocs :: Ix a => Array a b -> [Assoc a b] - bounds :: Ix b => Array b a -> (b, b) - elems :: Ix a => Array a b -> [b] - indices :: Ix b => Array b a -> [b] - ixmap :: - (Ix b, Ix a) => (b, b) -> (b -> a) -> Array a c -> Array b c - listArray :: Ix a => (a, a) -> [b] -> Array a b - read :: Text a => [Char] -> a - readDec :: Integral a => [Char] -> [(a, [Char])] - readFloat :: RealFloat a => [Char] -> [(a, [Char])] - readLitChar :: [Char] -> [(Char, [Char])] - readSigned :: - Real a => ([Char] -> [(a, [Char])]) - -> [Char] -> [(a, [Char])] - reads :: Text a => [Char] -> [(a, [Char])] - show :: Text a => a -> [Char] - showChar :: Char -> [Char] -> [Char] - showFloat :: RealFloat a => a -> [Char] -> [Char] - showInt :: Integral a => a -> [Char] -> [Char] - showLitChar :: Char -> [Char] -> [Char] - showSigned :: - Real a => (a -> [Char] -> [Char]) - -> Int -> a -> [Char] -> [Char] - shows :: Text a => a -> [Char] -> [Char] - abort :: IOError -> [Response] -> [Request] - appendBinChan :: - [Char] - -> Bin - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - appendBinFile :: - [Char] - -> Bin - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - appendChan :: - [Char] - -> [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - appendFile :: - [Char] - -> [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - binDispatch :: - (IOError -> [Response] -> a) - -> (Bin -> [Response] -> a) -> [Response] -> a - deleteFile :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - done :: [Response] -> [Request] - echo :: - Bool - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - exit :: IOError -> [Response] -> [Request] - getArgs :: - (IOError -> [Response] -> [Request]) - -> ([[Char]] -> [Response] -> [Request]) - -> [Response] -> [Request] - getEnv :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Char] -> [Response] -> [Request]) - -> [Response] -> [Request] - getProgName :: - (IOError -> [Response] -> [Request]) - -> ([Char] -> [Response] -> [Request]) - -> [Response] -> [Request] - interact :: ([Char] -> [Char]) -> [Response] -> [Request] - print :: Text a => a -> [Response] -> [Request] - prints :: Text a => a -> [Char] -> [Response] -> [Request] - readBinChan :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> (Bin -> [Response] -> [Request]) - -> [Response] -> [Request] - readBinFile :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> (Bin -> [Response] -> [Request]) - -> [Response] -> [Request] - readChan :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Char] -> [Response] -> [Request]) - -> [Response] -> [Request] - readFile :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Char] -> [Response] -> [Request]) - -> [Response] -> [Request] - setEnv :: - [Char] - -> [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - statusChan :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Char] -> [Response] -> [Request]) - -> [Response] -> [Request] - statusFile :: - [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Char] -> [Response] -> [Request]) - -> [Response] -> [Request] - stdecho :: [Char] - stderr :: [Char] - stdin :: [Char] - stdout :: [Char] - strDispatch :: - (IOError -> [Response] -> a) - -> ([Char] -> [Response] -> a) -> [Response] -> a - strListDispatch :: - (IOError -> [Response] -> a) - -> ([[Char]] -> [Response] -> a) -> [Response] -> a - succDispatch :: - (IOError -> [Response] -> a) - -> ([Response] -> a) -> [Response] -> a - writeBinFile :: - [Char] - -> Bin - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - writeFile :: - [Char] - -> [Char] - -> (IOError -> [Response] -> [Request]) - -> ([Response] -> [Request]) -> [Response] -> [Request] - -} -infixr 9 . -infixr 8 ^ -infixr 8 ^^ -infixr 3 && -infixr 2 || -infixr 0 $ -infixl 9 ! -infixl 9 // -infix 1 := -infix 6 :+ -infixr 8 ** -infixl 7 * -infixl 7 / -infixl 7 `quot` -infixl 7 `rem` -infixl 7 `div` -infixl 7 `mod` -infixl 6 + -infixl 6 - -infix 4 == -infix 4 /= -infix 4 < -infix 4 <= -infix 4 >= -infix 4 > -infixl 9 !! -infix 5 \\ -infix 4 `elem` -infix 4 `notElem` -infixl 7 % -infixl 1 `f` + + +================================================================================ +Reader: +module Reader where +infixl 1 f infixr 2 \\\ -infix 3 :==> -infix 4 `MkFoo` -data Foo - = MkFoo Int - | (:==>) Float Double -\\\ :: Eq a => [a] -> [a] -> [a] +infix 3 :==> +infix 4 MkFoo {- rec -} -f x y = x -(\\\) - xs ys = xs - +\\\ :: + _forall_ [] {Eq a} => [a] -> [a] -> [a] +f x y = x +\\\ xs ys = xs +data Foo = + MkFoo Int | Float :==> Double diff --git a/ghc/compiler/tests/reader/read003.hs b/ghc/compiler/tests/reader/read003.hs index 0bb8a24..a986760 100644 --- a/ghc/compiler/tests/reader/read003.hs +++ b/ghc/compiler/tests/reader/read003.hs @@ -1,3 +1,6 @@ +--!!! Irrefutable patterns + guards +module Read003 where + ~(a,b,c) | nullity b = a | nullity c = a | otherwise = a diff --git a/ghc/compiler/tests/reader/read003.stderr b/ghc/compiler/tests/reader/read003.stderr index e69de29..9a2e662 100644 --- a/ghc/compiler/tests/reader/read003.stderr +++ b/ghc/compiler/tests/reader/read003.stderr @@ -0,0 +1,21 @@ + +read003.hs:8: Cannot construct the infinite type (occur check) + `t{-aK8-}' = `(t{-aK8-}, t{-aKb-}, t{-aKe-})' + Expected: `(t{-aK8-}, [a{-aKm-}], [a{-aKo-}])' + Inferred: `t{-aK8-}' + In a pattern binding: + ~(`a', `b', `c') + | [`nullity + b'] = + `a' + | [`nullity + c'] = + `a' + | [`PrelBase.otherwise'] = + `a' + where + `nullity' + = `PrelList.null' + + +Compilation had errors diff --git a/ghc/compiler/tests/reader/read004.hs b/ghc/compiler/tests/reader/read004.hs index 77ab5a0..d02f7f4 100644 --- a/ghc/compiler/tests/reader/read004.hs +++ b/ghc/compiler/tests/reader/read004.hs @@ -1,37 +1,36 @@ --!!! string gaps --!!! +module Main(main) where ----------- -main = appendChan stdout "\ +main = putStr "\ \Some girls give me money\n\ \Some girls buy me clothes\n\ \..." - exit done ----------- -main2 = appendChan stdout "\ +main2 = putStr "\ \ \ -..." exit done +..." ----------- -main3 = appendChan stdout "\ +main3 = putStr "\ \Some girls give me money\n\ -- and here is a comment \Some girls buy me clothes\n\ \..." - exit done ----------- -main3 = appendChan stdout "\ +main3 = putStr "\ {- and here is a nested {- comment -} -} @@ -40,4 +39,3 @@ main3 = appendChan stdout "\ \Some girls buy me clothes\n\ \..." - exit done diff --git a/ghc/compiler/tests/reader/read004.stderr b/ghc/compiler/tests/reader/read004.stderr index e69de29..e4c1f75 100644 --- a/ghc/compiler/tests/reader/read004.stderr +++ b/ghc/compiler/tests/reader/read004.stderr @@ -0,0 +1,2 @@ +read004.hs:19:1: Illegal character: `.' in a string gap +read004.hs:19:1: on input: "." -- 1.7.10.4