summaryrefslogtreecommitdiff
path: root/testsuite/tests/numeric/should_compile/T14465.stdout
blob: 1eb5182a6ce468d2336dc82d257d18c0032c8055 (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

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

-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
ten :: Natural
[GblId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
ten = 10

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

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

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

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

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

-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
M.minusOne1 :: Natural
[GblId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
M.minusOne1 = 1

-- RHS size: {terms: 11, types: 6, coercions: 0, joins: 0/0}
minusOne :: Natural
[GblId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,
         WorkFree=True, Expandable=False, Guidance=IF_ARGS [] 40 0}]
minusOne
  = case M.minusOne1 of {
      NatS# ds1 ->
        case ds1 of {
          __DEFAULT -> GHC.Natural.underflowError @Natural;
          0## -> GHC.Natural.zero
        };
      NatJ# ipv -> GHC.Natural.underflowError @Natural
    }

-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
twoTimesTwo :: Natural
[GblId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
twoTimesTwo = 4

-- RHS size: {terms: 4, types: 1, coercions: 0, joins: 0/0}
plusOne :: Natural -> Natural
[GblId,
 Arity=1,
 Str=<S,U>,
 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] :: Natural) -> plusNatural n M.minusOne1}]
plusOne = \ (n :: Natural) -> plusNatural n M.minusOne1

-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
one :: Natural
[GblId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True)}]
one = M.minusOne1