diff options
11 files changed, 68 insertions, 104 deletions
diff --git a/libraries/array b/libraries/array -Subproject 3b750b3eeb02051520f1b149f0171baba951f54 +Subproject 0b23a9b9a0a8e89336687aa318d9142e2f542db diff --git a/testsuite/tests/simplCore/should_compile/T3717.stderr b/testsuite/tests/simplCore/should_compile/T3717.stderr index d466e32e8d..9515266807 100644 --- a/testsuite/tests/simplCore/should_compile/T3717.stderr +++ b/testsuite/tests/simplCore/should_compile/T3717.stderr @@ -3,12 +3,12 @@ Result size of Tidy Core = {terms: 22, types: 10, coercions: 0} Rec { -$wfoo [InlPrag=[0], Occ=LoopBreaker] :: Int# -> Int# +T3717.$wfoo [InlPrag=[0], Occ=LoopBreaker] :: Int# -> Int# [GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,1*U>] -$wfoo = +T3717.$wfoo = \ (ww :: Int#) -> case ww of ds { - __DEFAULT -> $wfoo (-# ds 1#); + __DEFAULT -> T3717.$wfoo (-# ds 1#); 0# -> 0# } end Rec } @@ -23,12 +23,12 @@ foo [InlPrag=INLINE[0]] :: Int -> Int Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) Tmpl= \ (w [Occ=Once!] :: Int) -> case w of _ [Occ=Dead] { I# ww1 [Occ=Once] -> - case $wfoo ww1 of ww2 { __DEFAULT -> I# ww2 } + case T3717.$wfoo ww1 of ww2 { __DEFAULT -> I# ww2 } }}] foo = \ (w :: Int) -> case w of _ [Occ=Dead] { I# ww1 -> - case $wfoo ww1 of ww2 { __DEFAULT -> I# ww2 } + case T3717.$wfoo ww1 of ww2 { __DEFAULT -> I# ww2 } } diff --git a/testsuite/tests/simplCore/should_compile/T3772.stdout b/testsuite/tests/simplCore/should_compile/T3772.stdout index 9fbf470712..3d236823a6 100644 --- a/testsuite/tests/simplCore/should_compile/T3772.stdout +++ b/testsuite/tests/simplCore/should_compile/T3772.stdout @@ -3,13 +3,13 @@ Result size of Tidy Core = {terms: 26, types: 11, coercions: 0} Rec { -$wxs :: GHC.Prim.Int# -> () +$wxs :: Int# -> () [GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,1*U>] $wxs = - \ (ww :: GHC.Prim.Int#) -> + \ (ww :: Int#) -> case ww of ds1 { - __DEFAULT -> $wxs (GHC.Prim.-# ds1 1#); - 1# -> GHC.Tuple.() + __DEFAULT -> $wxs (-# ds1 1#); + 1# -> () } end Rec } @@ -17,10 +17,9 @@ foo [InlPrag=NOINLINE] :: Int -> () [GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,1*U(U)>] foo = \ (n :: Int) -> - case n of _ [Occ=Dead] { GHC.Types.I# y -> - case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# 0# y) - of _ [Occ=Dead] { - False -> GHC.Tuple.(); + case n of _ [Occ=Dead] { I# y -> + case tagToEnum# @ Bool (<# 0# y) of _ [Occ=Dead] { + False -> (); True -> $wxs y } } diff --git a/testsuite/tests/simplCore/should_compile/T4908.stderr b/testsuite/tests/simplCore/should_compile/T4908.stderr index fcaf84346e..ee3418c5bf 100644 --- a/testsuite/tests/simplCore/should_compile/T4908.stderr +++ b/testsuite/tests/simplCore/should_compile/T4908.stderr @@ -11,9 +11,9 @@ T4908.f_$s$wf = __DEFAULT -> case sc2 of ds1 { __DEFAULT -> T4908.f_$s$wf (-# ds 1#) sc1 ds1; - 0# -> GHC.Types.True + 0# -> True }; - 0# -> GHC.Types.True + 0# -> True } end Rec } @@ -32,11 +32,11 @@ T4908.$wf = case b of _ [Occ=Dead] { I# ds1 -> case ds1 of ds2 { __DEFAULT -> T4908.f_$s$wf (-# ds 1#) a ds2; - 0# -> GHC.Types.True + 0# -> True } } }; - 0# -> GHC.Types.True + 0# -> True } f [InlPrag=INLINE[0]] :: Int -> (Int, Int) -> Bool @@ -57,7 +57,7 @@ f = ------ Local rules for imported ids -------- "SC:$wf0" [0] forall (sc :: Int#) (sc1 :: Int) (sc2 :: Int#). - T4908.$wf sc (sc1, GHC.Types.I# sc2) + T4908.$wf sc (sc1, I# sc2) = T4908.f_$s$wf sc sc1 sc2 diff --git a/testsuite/tests/simplCore/should_compile/T4930.stderr b/testsuite/tests/simplCore/should_compile/T4930.stderr index 7ad4affe5e..faf513477d 100644 --- a/testsuite/tests/simplCore/should_compile/T4930.stderr +++ b/testsuite/tests/simplCore/should_compile/T4930.stderr @@ -4,7 +4,7 @@ Result size of Tidy Core = {terms: 23, types: 11, coercions: 0} lvl :: [Char] [GblId, Str=DmdType] -lvl = GHC.CString.unpackCString# "Too small"# +lvl = unpackCString# "Too small"# T4930.foo1 :: Int [GblId, Str=DmdType b] @@ -18,19 +18,17 @@ foo :: Int -> Int WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) Tmpl= \ (n [Occ=Once!] :: Int) -> - case n of _ [Occ=Dead] { GHC.Types.I# x -> - case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# x 5#) - of _ [Occ=Dead] { - False -> GHC.Types.I# (GHC.Prim.+# x 5#); + case n of _ [Occ=Dead] { I# x -> + case tagToEnum# @ Bool (<# x 5#) of _ [Occ=Dead] { + False -> I# (+# x 5#); True -> T4930.foo1 } }}] foo = \ (n :: Int) -> - case n of _ [Occ=Dead] { GHC.Types.I# x -> - case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# x 5#) - of _ [Occ=Dead] { - False -> GHC.Types.I# (GHC.Prim.+# x 5#); + case n of _ [Occ=Dead] { I# x -> + case tagToEnum# @ Bool (<# x 5#) of _ [Occ=Dead] { + False -> I# (+# x 5#); True -> T4930.foo1 } } diff --git a/testsuite/tests/simplCore/should_compile/T5366.stdout b/testsuite/tests/simplCore/should_compile/T5366.stdout index df0f9ba05d..1c8efbb821 100644 --- a/testsuite/tests/simplCore/should_compile/T5366.stdout +++ b/testsuite/tests/simplCore/should_compile/T5366.stdout @@ -1 +1 @@ - case ds of _ [Occ=Dead] { Bar dt dt1 -> GHC.Types.I# dt } + \ (ds :: Bar) -> case ds of _ [Occ=Dead] { Bar dt dt1 -> I# dt } diff --git a/testsuite/tests/simplCore/should_compile/T7360.stderr b/testsuite/tests/simplCore/should_compile/T7360.stderr index 23344080df..dcd562444e 100644 --- a/testsuite/tests/simplCore/should_compile/T7360.stderr +++ b/testsuite/tests/simplCore/should_compile/T7360.stderr @@ -11,20 +11,14 @@ T7360.$WFoo3 [InlPrag=INLINE] :: Int -> Foo WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=False,boring_ok=False) Tmpl= \ (dt [Occ=Once!] :: Int) -> - case dt of _ [Occ=Dead] { GHC.Types.I# dt [Occ=Once] -> - T7360.Foo3 dt - }}] + case dt of _ [Occ=Dead] { I# dt [Occ=Once] -> T7360.Foo3 dt }}] T7360.$WFoo3 = \ (dt [Occ=Once!] :: Int) -> - case dt of _ [Occ=Dead] { GHC.Types.I# dt [Occ=Once] -> - T7360.Foo3 dt - } + case dt of _ [Occ=Dead] { I# dt [Occ=Once] -> T7360.Foo3 dt } fun1 [InlPrag=NOINLINE] :: Foo -> () [GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,1*U>] -fun1 = - \ (x :: Foo) -> - case x of _ [Occ=Dead] { __DEFAULT -> GHC.Tuple.() } +fun1 = \ (x :: Foo) -> case x of _ [Occ=Dead] { __DEFAULT -> () } T7360.fun4 :: () [GblId, @@ -39,7 +33,7 @@ T7360.fun3 :: Int Str=DmdType m, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] -T7360.fun3 = GHC.Types.I# 0# +T7360.fun3 = I# 0# fun2 :: forall a. [a] -> ((), Int) [GblId, @@ -53,9 +47,7 @@ fun2 :: forall a. [a] -> ((), Int) case x of wild { [] -> T7360.fun3; : _ [Occ=Dead] _ [Occ=Dead] -> - case GHC.List.$wlenAcc @ a wild 0# of ww2 { __DEFAULT -> - GHC.Types.I# ww2 - } + case GHC.List.$wlenAcc @ a wild 0# of ww2 { __DEFAULT -> I# ww2 } })}] fun2 = \ (@ a) (x :: [a]) -> @@ -63,9 +55,7 @@ fun2 = case x of wild { [] -> T7360.fun3; : ds ds1 -> - case GHC.List.$wlenAcc @ a wild 0# of ww2 { __DEFAULT -> - GHC.Types.I# ww2 - } + case GHC.List.$wlenAcc @ a wild 0# of ww2 { __DEFAULT -> I# ww2 } }) diff --git a/testsuite/tests/simplCore/should_compile/T7865.stdout b/testsuite/tests/simplCore/should_compile/T7865.stdout index 56419a939c..80171b499f 100644 --- a/testsuite/tests/simplCore/should_compile/T7865.stdout +++ b/testsuite/tests/simplCore/should_compile/T7865.stdout @@ -1,4 +1,4 @@ expensive [InlPrag=NOINLINE] :: Int -> Int expensive = - case expensive sc of _ [Occ=Dead] { GHC.Types.I# x -> - (case expensive x of _ [Occ=Dead] { GHC.Types.I# x1 -> + a = case expensive sc of _ [Occ=Dead] { I# x -> I# (*# x 2#) } } in + (case expensive x of _ [Occ=Dead] { I# x1 -> I# (*# x1 2#) }, x) diff --git a/testsuite/tests/simplCore/should_compile/T9400.stderr b/testsuite/tests/simplCore/should_compile/T9400.stderr index 938a07204b..2600dd00ba 100644 --- a/testsuite/tests/simplCore/should_compile/T9400.stderr +++ b/testsuite/tests/simplCore/should_compile/T9400.stderr @@ -29,8 +29,7 @@ main = @ () @ () (putStrLn (unpackCString# "efg"#)) - (Control.Exception.Base.patError - @ (IO ()) "T9400.hs:(17,5)-(18,29)|case"#)))) + (patError @ (IO ()) "T9400.hs:(17,5)-(18,29)|case"#)))) diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr index c12b33e0a8..4bc2226554 100644 --- a/testsuite/tests/simplCore/should_compile/spec-inline.stderr +++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr @@ -5,43 +5,32 @@ Result size of Tidy Core = {terms: 162, types: 61, coercions: 0} Roman.foo3 :: Int [GblId, Str=DmdType b] Roman.foo3 = - Control.Exception.Base.patError - @ Int "spec-inline.hs:(19,5)-(29,25)|function go"# + patError @ Int "spec-inline.hs:(19,5)-(29,25)|function go"# Rec { -Roman.foo_$s$wgo [Occ=LoopBreaker] - :: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int# +Roman.foo_$s$wgo [Occ=LoopBreaker] :: Int# -> Int# -> Int# [GblId, Arity=2, Caf=NoCafRefs, Str=DmdType <L,U><L,U>] Roman.foo_$s$wgo = - \ (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#) -> + \ (sc :: Int#) (sc1 :: Int#) -> let { - a :: GHC.Prim.Int# + a :: Int# [LclId, Str=DmdType] - a = - GHC.Prim.+# - (GHC.Prim.+# - (GHC.Prim.+# - (GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# sc1 sc1) sc1) sc1) sc1) - sc1) - sc1 } in - case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<=# sc 0#) - of _ [Occ=Dead] { + a = +# (+# (+# (+# (+# (+# sc1 sc1) sc1) sc1) sc1) sc1) sc1 } in + case tagToEnum# @ Bool (<=# sc 0#) of _ [Occ=Dead] { False -> - case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# sc 100#) - of _ [Occ=Dead] { + case tagToEnum# @ Bool (<# sc 100#) of _ [Occ=Dead] { False -> - case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# sc 500#) - of _ [Occ=Dead] { - False -> Roman.foo_$s$wgo (GHC.Prim.-# sc 1#) (GHC.Prim.+# a a); - True -> Roman.foo_$s$wgo (GHC.Prim.-# sc 3#) a + case tagToEnum# @ Bool (<# sc 500#) of _ [Occ=Dead] { + False -> Roman.foo_$s$wgo (-# sc 1#) (+# a a); + True -> Roman.foo_$s$wgo (-# sc 3#) a }; - True -> Roman.foo_$s$wgo (GHC.Prim.-# sc 2#) sc1 + True -> Roman.foo_$s$wgo (-# sc 2#) sc1 }; True -> 0# } end Rec } -Roman.$wgo [InlPrag=[0]] :: Maybe Int -> Maybe Int -> GHC.Prim.Int# +Roman.$wgo [InlPrag=[0]] :: Maybe Int -> Maybe Int -> Int# [GblId, Arity=2, Str=DmdType <S,1*U><S,1*U>, @@ -52,33 +41,24 @@ Roman.$wgo = case w1 of _ [Occ=Dead] { Nothing -> case Roman.foo3 of wild1 { }; Just x -> - case x of _ [Occ=Dead] { GHC.Types.I# ipv -> + case x of _ [Occ=Dead] { I# ipv -> let { - a :: GHC.Prim.Int# + a :: Int# [LclId, Str=DmdType] - a = - GHC.Prim.+# - (GHC.Prim.+# - (GHC.Prim.+# - (GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# ipv ipv) ipv) ipv) ipv) - ipv) - ipv } in + a = +# (+# (+# (+# (+# (+# ipv ipv) ipv) ipv) ipv) ipv) ipv } in case w of _ [Occ=Dead] { Nothing -> Roman.foo_$s$wgo 10# a; Just n -> - case n of _ [Occ=Dead] { GHC.Types.I# x2 -> - case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<=# x2 0#) - of _ [Occ=Dead] { + case n of _ [Occ=Dead] { I# x2 -> + case tagToEnum# @ Bool (<=# x2 0#) of _ [Occ=Dead] { False -> - case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# x2 100#) - of _ [Occ=Dead] { + case tagToEnum# @ Bool (<# x2 100#) of _ [Occ=Dead] { False -> - case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# x2 500#) - of _ [Occ=Dead] { - False -> Roman.foo_$s$wgo (GHC.Prim.-# x2 1#) (GHC.Prim.+# a a); - True -> Roman.foo_$s$wgo (GHC.Prim.-# x2 3#) a + case tagToEnum# @ Bool (<# x2 500#) of _ [Occ=Dead] { + False -> Roman.foo_$s$wgo (-# x2 1#) (+# a a); + True -> Roman.foo_$s$wgo (-# x2 3#) a }; - True -> Roman.foo_$s$wgo (GHC.Prim.-# x2 2#) ipv + True -> Roman.foo_$s$wgo (-# x2 2#) ipv }; True -> 0# } @@ -95,10 +75,10 @@ Roman.foo_go [InlPrag=INLINE[0]] :: Maybe Int -> Maybe Int -> Int WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False) Tmpl= \ (w [Occ=Once] :: Maybe Int) (w1 [Occ=Once] :: Maybe Int) -> - case Roman.$wgo w w1 of ww { __DEFAULT -> GHC.Types.I# ww }}] + case Roman.$wgo w w1 of ww { __DEFAULT -> I# ww }}] Roman.foo_go = \ (w :: Maybe Int) (w1 :: Maybe Int) -> - case Roman.$wgo w w1 of ww { __DEFAULT -> GHC.Types.I# ww } + case Roman.$wgo w w1 of ww { __DEFAULT -> I# ww } Roman.foo2 :: Int [GblId, @@ -106,7 +86,7 @@ Roman.foo2 :: Int Str=DmdType m, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] -Roman.foo2 = GHC.Types.I# 6# +Roman.foo2 = I# 6# Roman.foo1 :: Maybe Int [GblId, @@ -114,32 +94,31 @@ Roman.foo1 :: Maybe Int Str=DmdType m2, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] -Roman.foo1 = GHC.Base.Just @ Int Roman.foo2 +Roman.foo1 = Just @ Int Roman.foo2 foo :: Int -> Int [GblId, Arity=1, Caf=NoCafRefs, - Str=DmdType <S,1*U>m, + Str=DmdType <S,1*U(U)>m, Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) Tmpl= \ (n [Occ=Once!] :: Int) -> - case n of n1 { GHC.Types.I# _ [Occ=Dead] -> - Roman.foo_go (GHC.Base.Just @ Int n1) Roman.foo1 + case n of n1 { I# _ [Occ=Dead] -> + Roman.foo_go (Just @ Int n1) Roman.foo1 }}] foo = \ (n :: Int) -> - case n of _ [Occ=Dead] { GHC.Types.I# ipv -> - case Roman.foo_$s$wgo ipv 6# of ww { __DEFAULT -> GHC.Types.I# ww } + case n of _ [Occ=Dead] { I# ipv -> + case Roman.foo_$s$wgo ipv 6# of ww { __DEFAULT -> I# ww } } ------ Local rules for imported ids -------- "SC:$wgo0" [0] - forall (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#). - Roman.$wgo (GHC.Base.Just @ Int (GHC.Types.I# sc)) - (GHC.Base.Just @ Int (GHC.Types.I# sc1)) + forall (sc :: Int#) (sc1 :: Int#). + Roman.$wgo (Just @ Int (I# sc)) (Just @ Int (I# sc1)) = Roman.foo_$s$wgo sc sc1 diff --git a/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr b/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr index 41cc7cc47d..da367d227d 100644 --- a/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr +++ b/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr @@ -28,8 +28,7 @@ TcCoercibleFail.hs:16:8: TcCoercibleFail.hs:18:8: Couldn't match representation of type ‘Int’ with that of ‘Down Int’ Relevant role signatures: type role Down representational - The data constructor ‘Data.Ord.Down’ - of newtype ‘Down’ is not in scope + The data constructor ‘Down’ of newtype ‘Down’ is not in scope In the expression: coerce In the expression: coerce $ one :: Down Int In an equation for ‘foo4’: foo4 = coerce $ one :: Down Int |