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

==================== Tidy Core ====================
Result size of Tidy Core
  = {terms: 150, types: 60, coercions: 0, joins: 0/0}

-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Roman.$trModule4 :: GHC.Prim.Addr#
[GblId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Roman.$trModule4 = "main"#

-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Roman.$trModule3 :: GHC.Types.TrName
[GblId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
Roman.$trModule3 = GHC.Types.TrNameS Roman.$trModule4

-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Roman.$trModule2 :: GHC.Prim.Addr#
[GblId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
Roman.$trModule2 = "Roman"#

-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Roman.$trModule1 :: GHC.Types.TrName
[GblId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
Roman.$trModule1 = GHC.Types.TrNameS Roman.$trModule2

-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Roman.$trModule :: GHC.Types.Module
[GblId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
Roman.$trModule
  = GHC.Types.Module Roman.$trModule3 Roman.$trModule1

-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
lvl :: GHC.Prim.Addr#
[GblId, Unf=OtherCon []]
lvl = "spec-inline.hs:(19,5)-(29,25)|function go"#

-- RHS size: {terms: 2, types: 2, coercions: 0, joins: 0/0}
Roman.foo3 :: ()
[GblId, Str=b, Cpr=b]
Roman.foo3
  = Control.Exception.Base.patError @GHC.Types.LiftedRep @() lvl

Rec {
-- RHS size: {terms: 40, types: 5, coercions: 0, joins: 0/0}
Roman.foo_$s$wgo [Occ=LoopBreaker]
  :: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[GblId, Arity=2, Str=<A><L>, Unf=OtherCon []]
Roman.foo_$s$wgo
  = \ (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#) ->
      case GHC.Prim.<=# sc1 0# of {
        __DEFAULT ->
          case GHC.Prim.<# sc1 100# of {
            __DEFAULT ->
              case GHC.Prim.<# sc1 500# of {
                __DEFAULT ->
                  Roman.foo_$s$wgo (GHC.Prim.*# 14# sc) (GHC.Prim.-# sc1 1#);
                1# -> Roman.foo_$s$wgo (GHC.Prim.*# 7# sc) (GHC.Prim.-# sc1 3#)
              };
            1# -> Roman.foo_$s$wgo sc (GHC.Prim.-# sc1 2#)
          };
        1# -> 0#
      }
end Rec }

-- RHS size: {terms: 61, types: 18, coercions: 0, joins: 0/0}
Roman.$wgo [InlPrag=[2]] :: Maybe Int -> Maybe Int -> GHC.Prim.Int#
[GblId[StrictWorker([!, !])],
 Arity=2,
 Str=<1L><1L>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [61 30] 249 0}]
Roman.$wgo
  = \ (u :: Maybe Int) (ds :: Maybe Int) ->
      case ds of {
        Nothing -> case Roman.foo3 of wild1 { };
        Just x ->
          case x of { GHC.Types.I# ipv ->
          case u of {
            Nothing -> Roman.foo_$s$wgo (GHC.Prim.*# 7# ipv) 10#;
            Just n ->
              case n of { GHC.Types.I# x2 ->
              case GHC.Prim.<=# x2 0# of {
                __DEFAULT ->
                  case GHC.Prim.<# x2 100# of {
                    __DEFAULT ->
                      case GHC.Prim.<# x2 500# of {
                        __DEFAULT ->
                          Roman.foo_$s$wgo (GHC.Prim.*# 14# ipv) (GHC.Prim.-# x2 1#);
                        1# -> Roman.foo_$s$wgo (GHC.Prim.*# 7# ipv) (GHC.Prim.-# x2 3#)
                      };
                    1# -> Roman.foo_$s$wgo ipv (GHC.Prim.-# x2 2#)
                  };
                1# -> 0#
              }
              }
          }
          }
      }

-- RHS size: {terms: 9, types: 5, coercions: 0, joins: 0/0}
Roman.foo_go [InlPrag=[2]] :: Maybe Int -> Maybe Int -> Int
[GblId[StrictWorker([!, !])],
 Arity=2,
 Str=<1L><1L>,
 Cpr=1,
 Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False)
         Tmpl= \ (u [Occ=Once1] :: Maybe Int)
                 (ds [Occ=Once1] :: Maybe Int) ->
                 case Roman.$wgo u ds of ww [Occ=Once1] { __DEFAULT ->
                 GHC.Types.I# ww
                 }}]
Roman.foo_go
  = \ (u :: Maybe Int) (ds :: Maybe Int) ->
      case Roman.$wgo u ds of ww { __DEFAULT -> GHC.Types.I# ww }

-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Roman.foo2 :: Int
[GblId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
Roman.foo2 = GHC.Types.I# 6#

-- RHS size: {terms: 2, types: 1, coercions: 0, joins: 0/0}
Roman.foo1 :: Maybe Int
[GblId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
Roman.foo1 = GHC.Maybe.Just @Int Roman.foo2

-- RHS size: {terms: 11, types: 4, coercions: 0, joins: 0/0}
foo :: Int -> Int
[GblId,
 Arity=1,
 Str=<1!P(L)>,
 Cpr=1,
 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=Once1!] :: Int) ->
                 case n of n1 [Occ=Once1] { GHC.Types.I# _ [Occ=Dead] ->
                 Roman.foo_go (GHC.Maybe.Just @Int n1) Roman.foo1
                 }}]
foo
  = \ (n :: 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" [2]
    forall (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#).
      Roman.$wgo (GHC.Maybe.Just @Int (GHC.Types.I# sc1))
                 (GHC.Maybe.Just @Int (GHC.Types.I# sc))
      = Roman.foo_$s$wgo sc sc1