summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/simplCore/should_compile/spec-inline.stderr-ghc-7.0
blob: dd3a7eb44a1beeee68de70c8835b6bedabe85ea3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154

==================== 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 [] 1 2}]
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 [] 1 2}]
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.Bool.False ->
        case GHC.Prim.<# sc1 100 of _ {
          GHC.Bool.False ->
            case GHC.Prim.<# sc1 500 of _ {
              GHC.Bool.False ->
                Roman.foo_$s$wgo (GHC.Prim.+# a a) (GHC.Prim.-# sc1 1);
              GHC.Bool.True -> Roman.foo_$s$wgo a (GHC.Prim.-# sc1 3)
            };
          GHC.Bool.True -> Roman.foo_$s$wgo sc (GHC.Prim.-# sc1 2)
        };
      GHC.Bool.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 [6 3] 37 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` (CoUnsafe 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.Bool.False ->
                case GHC.Prim.<# x2 100 of _ {
                  GHC.Bool.False ->
                    case GHC.Prim.<# x2 500 of _ {
                      GHC.Bool.False ->
                        Roman.foo_$s$wgo (GHC.Prim.+# a a) (GHC.Prim.-# x2 1);
                      GHC.Bool.True -> Roman.foo_$s$wgo a (GHC.Prim.-# x2 3)
                    };
                  GHC.Bool.True -> Roman.foo_$s$wgo ipv (GHC.Prim.-# x2 2)
                };
              GHC.Bool.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