summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/spec-inline.stderr
blob: 17d3dbbdc5e133b8df9d29fcba987dd0b8e03ae9 (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

==================== Tidy Core ====================
Result size of Tidy Core = {terms: 172, types: 64, coercions: 0}

-- RHS size: {terms: 2, types: 0, coercions: 0}
Roman.$trModule2 :: TrName
[GblId,
 Caf=NoCafRefs,
 Str=DmdType m1,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}]
Roman.$trModule2 = TrNameS "main"#

-- RHS size: {terms: 2, types: 0, coercions: 0}
Roman.$trModule1 :: TrName
[GblId,
 Caf=NoCafRefs,
 Str=DmdType m1,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}]
Roman.$trModule1 = TrNameS "Roman"#

-- RHS size: {terms: 3, types: 0, coercions: 0}
Roman.$trModule :: Module
[GblId[ReflectionId],
 Caf=NoCafRefs,
 Str=DmdType m,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Roman.$trModule = Module Roman.$trModule2 Roman.$trModule1

-- RHS size: {terms: 2, types: 1, coercions: 0}
Roman.foo3 :: Int
[GblId, Str=DmdType b]
Roman.foo3 =
  patError @ Int "spec-inline.hs:(19,5)-(29,25)|function go"#

Rec {
-- RHS size: {terms: 55, types: 9, coercions: 0}
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 :: Int#) (sc1 :: Int#) ->
    let {
      a :: Int#
      [LclId, Str=DmdType]
      a = +# (+# (+# (+# (+# (+# sc sc) sc) sc) sc) sc) sc } in
    case tagToEnum# @ Bool (<=# sc1 0#) of _ [Occ=Dead] {
      False ->
        case tagToEnum# @ Bool (<# sc1 100#) of _ [Occ=Dead] {
          False ->
            case tagToEnum# @ Bool (<# sc1 500#) of _ [Occ=Dead] {
              False -> Roman.foo_$s$wgo (+# a a) (-# sc1 1#);
              True -> Roman.foo_$s$wgo a (-# sc1 3#)
            };
          True -> Roman.foo_$s$wgo sc (-# sc1 2#)
        };
      True -> 0#
    }
end Rec }

-- RHS size: {terms: 74, types: 22, coercions: 0}
Roman.$wgo [InlPrag=[0]] :: Maybe Int -> Maybe Int -> Int#
[GblId,
 Arity=2,
 Str=DmdType <S,1*U><S,1*U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 30] 256 0}]
Roman.$wgo =
  \ (w :: Maybe Int) (w1 :: Maybe Int) ->
    case w1 of _ [Occ=Dead] {
      Nothing -> case Roman.foo3 of wild1 { };
      Just x ->
        case x of _ [Occ=Dead] { I# ipv ->
        let {
          a :: Int#
          [LclId, Str=DmdType]
          a = +# (+# (+# (+# (+# (+# ipv ipv) ipv) ipv) ipv) ipv) ipv } in
        case w of _ [Occ=Dead] {
          Nothing -> Roman.foo_$s$wgo a 10#;
          Just n ->
            case n of _ [Occ=Dead] { I# x2 ->
            case tagToEnum# @ Bool (<=# x2 0#) of _ [Occ=Dead] {
              False ->
                case tagToEnum# @ Bool (<# x2 100#) of _ [Occ=Dead] {
                  False ->
                    case tagToEnum# @ Bool (<# x2 500#) of _ [Occ=Dead] {
                      False -> Roman.foo_$s$wgo (+# a a) (-# x2 1#);
                      True -> Roman.foo_$s$wgo a (-# x2 3#)
                    };
                  True -> Roman.foo_$s$wgo ipv (-# x2 2#)
                };
              True -> 0#
            }
            }
        }
        }
    }

-- RHS size: {terms: 9, types: 5, coercions: 0}
Roman.foo_go [InlPrag=INLINE[0]] :: Maybe Int -> Maybe Int -> Int
[GblId,
 Arity=2,
 Str=DmdType <S,1*U><S,1*U>m,
 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= \ (w [Occ=Once] :: Maybe Int) (w1 [Occ=Once] :: Maybe Int) ->
                 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 -> I# ww }

-- RHS size: {terms: 2, types: 0, coercions: 0}
Roman.foo2 :: Int
[GblId,
 Caf=NoCafRefs,
 Str=DmdType m,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Roman.foo2 = I# 6#

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

-- RHS size: {terms: 11, types: 4, coercions: 0}
foo :: Int -> Int
[GblId,
 Arity=1,
 Caf=NoCafRefs,
 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 { I# _ [Occ=Dead] ->
                 Roman.foo_go (Just @ Int n1) Roman.foo1
                 }}]
foo =
  \ (n :: Int) ->
    case n of _ [Occ=Dead] { I# ipv ->
    case Roman.foo_$s$wgo 6# ipv of ww { __DEFAULT -> I# ww }
    }


------ Local rules for imported ids --------
"SC:$wgo0" [0]
    forall (sc :: Int#) (sc1 :: Int#).
      Roman.$wgo (Just @ Int (I# sc1)) (Just @ Int (I# sc))
      = Roman.foo_$s$wgo sc sc1