diff options
author | David Terei <davidterei@gmail.com> | 2011-07-20 11:09:03 -0700 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2011-07-20 11:26:35 -0700 |
commit | 16514f272fb42af6e9c7674a9bd6c9dce369231f (patch) | |
tree | e4f332b45fe65e2a7a2451be5674f887b42bf199 /testsuite/tests/simplCore/should_compile/spec-inline.stderr | |
parent | ebd422aed41048476aa61dd4c520d43becd78682 (diff) | |
download | haskell-16514f272fb42af6e9c7674a9bd6c9dce369231f.tar.gz |
Move tests from tests/ghc-regress/* to just tests/*
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/spec-inline.stderr')
-rw-r--r-- | testsuite/tests/simplCore/should_compile/spec-inline.stderr | 152 |
1 files changed, 152 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr new file mode 100644 index 0000000000..cd5d922ffc --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr @@ -0,0 +1,152 @@ + +==================== Tidy Core ==================== +Roman.foo2 :: GHC.Types.Int +[GblId, + Caf=NoCafRefs, + Str=DmdType m, + Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, + ConLike=True, Cheap=True, Expandable=True, + Guidance=IF_ARGS [] 10 110}] +Roman.foo2 = GHC.Types.I# 6 + +Roman.foo1 :: Data.Maybe.Maybe GHC.Types.Int +[GblId, + Caf=NoCafRefs, + Str=DmdType, + Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, + ConLike=True, Cheap=True, Expandable=True, + Guidance=IF_ARGS [] 10 110}] +Roman.foo1 = Data.Maybe.Just @ GHC.Types.Int Roman.foo2 + +Roman.foo3 :: GHC.Types.Int +[GblId, Str=DmdType b] +Roman.foo3 = + Control.Exception.Base.patError + @ GHC.Types.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# +[GblId, Arity=2, Caf=NoCafRefs, Str=DmdType LL] +Roman.foo_$s$wgo = + \ (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#) -> + let { + a [Dmd=Just L] :: GHC.Prim.Int# + [LclId, Str=DmdType] + a = + GHC.Prim.+# + (GHC.Prim.+# + (GHC.Prim.+# + (GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# sc sc) sc) sc) sc) + sc) + sc } in + case GHC.Prim.<=# sc1 0 of _ { + GHC.Types.False -> + case GHC.Prim.<# sc1 100 of _ { + GHC.Types.False -> + case GHC.Prim.<# sc1 500 of _ { + GHC.Types.False -> + Roman.foo_$s$wgo (GHC.Prim.+# a a) (GHC.Prim.-# sc1 1); + GHC.Types.True -> Roman.foo_$s$wgo a (GHC.Prim.-# sc1 3) + }; + GHC.Types.True -> Roman.foo_$s$wgo sc (GHC.Prim.-# sc1 2) + }; + GHC.Types.True -> 0 + } +end Rec } + +Roman.$wgo + :: Data.Maybe.Maybe GHC.Types.Int + -> Data.Maybe.Maybe GHC.Types.Int -> GHC.Prim.Int# +[GblId, + Arity=2, + Str=DmdType SS, + Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True, + ConLike=True, Cheap=True, Expandable=True, + Guidance=IF_ARGS [60 30] 253 0}] +Roman.$wgo = + \ (w :: Data.Maybe.Maybe GHC.Types.Int) + (w1 :: Data.Maybe.Maybe GHC.Types.Int) -> + case w1 of _ { + Data.Maybe.Nothing -> + Roman.foo3 + `cast` (UnsafeCo GHC.Types.Int GHC.Prim.Int# + :: GHC.Types.Int ~ GHC.Prim.Int#); + Data.Maybe.Just x -> + case x of _ { GHC.Types.I# ipv -> + let { + a [Dmd=Just L] :: GHC.Prim.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 + case w of _ { + Data.Maybe.Nothing -> Roman.foo_$s$wgo a 10; + Data.Maybe.Just n -> + case n of _ { GHC.Types.I# x2 -> + case GHC.Prim.<=# x2 0 of _ { + GHC.Types.False -> + case GHC.Prim.<# x2 100 of _ { + GHC.Types.False -> + case GHC.Prim.<# x2 500 of _ { + GHC.Types.False -> + Roman.foo_$s$wgo (GHC.Prim.+# a a) (GHC.Prim.-# x2 1); + GHC.Types.True -> Roman.foo_$s$wgo a (GHC.Prim.-# x2 3) + }; + GHC.Types.True -> Roman.foo_$s$wgo ipv (GHC.Prim.-# x2 2) + }; + GHC.Types.True -> 0 + } + } + } + } + } + +Roman.foo_go [InlPrag=INLINE[0]] + :: Data.Maybe.Maybe GHC.Types.Int + -> Data.Maybe.Maybe GHC.Types.Int -> GHC.Types.Int +[GblId, + Arity=2, + Str=DmdType SSm, + Unf=Unf{Src=Worker=Roman.$wgo, TopLvl=True, Arity=2, Value=True, + ConLike=True, Cheap=True, Expandable=True, + Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) + Tmpl= \ (w [Occ=Once] :: Data.Maybe.Maybe GHC.Types.Int) + (w1 [Occ=Once] :: Data.Maybe.Maybe GHC.Types.Int) -> + case Roman.$wgo w w1 of ww { __DEFAULT -> GHC.Types.I# ww }}] +Roman.foo_go = + \ (w :: Data.Maybe.Maybe GHC.Types.Int) + (w1 :: Data.Maybe.Maybe GHC.Types.Int) -> + case Roman.$wgo w w1 of ww { __DEFAULT -> GHC.Types.I# ww } + +Roman.foo :: GHC.Types.Int -> GHC.Types.Int +[GblId, + Arity=1, + Caf=NoCafRefs, + Str=DmdType S(A)m, + Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, + ConLike=True, Cheap=True, Expandable=True, + Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) + Tmpl= \ (n [Occ=Once!] :: GHC.Types.Int) -> + case n of n1 { GHC.Types.I# _ -> + Roman.foo_go (Data.Maybe.Just @ GHC.Types.Int n1) Roman.foo1 + }}] +Roman.foo = + \ (n :: GHC.Types.Int) -> + case n of _ { GHC.Types.I# ipv -> + case Roman.foo_$s$wgo 6 ipv of ww { __DEFAULT -> GHC.Types.I# ww } + } + + +------ Local rules for imported ids -------- +"SC:$wgo0" [ALWAYS] + forall (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#). + Roman.$wgo (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc1)) + (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc)) + = Roman.foo_$s$wgo sc sc1 + + |