diff options
author | Sylvain Henry <hsyl20@gmail.com> | 2018-06-15 16:23:53 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-06-15 16:23:54 -0400 |
commit | fe770c211631e7b4c9b0b1e88ef9b6046c6585ef (patch) | |
tree | e6a061a92d8d0d71d40c699982ee471627d816e0 /testsuite/tests/simplCore/should_compile/spec-inline.stderr | |
parent | 42f3b53b5bc4674e41f16de08094821fe1aaec00 (diff) | |
download | haskell-fe770c211631e7b4c9b0b1e88ef9b6046c6585ef.tar.gz |
Built-in Natural literals in Core
Add support for built-in Natural literals in Core.
- Replace MachInt,MachWord, LitInteger, etc. with a single LitNumber
constructor with a LitNumType field
- Support built-in Natural literals
- Add desugar warning for negative literals
- Move Maybe(..) from GHC.Base to GHC.Maybe for module dependency
reasons
This patch introduces only a few rules for Natural literals (compared
to Integer's rules). Factorization of the built-in rules for numeric
literals will be done in another patch as this one is already big to
review.
Test Plan:
validate
test build with integer-simple
Reviewers: hvr, bgamari, goldfire, Bodigrim, simonmar
Reviewed By: bgamari
Subscribers: phadej, simonpj, RyanGlScott, carter, hsyl20, rwbarton,
thomie
GHC Trac Issues: #14170, #14465
Differential Revision: https://phabricator.haskell.org/D4212
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/spec-inline.stderr')
-rw-r--r-- | testsuite/tests/simplCore/should_compile/spec-inline.stderr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr index 65dd9a1aa0..9d4869df3f 100644 --- a/testsuite/tests/simplCore/should_compile/spec-inline.stderr +++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr @@ -167,7 +167,7 @@ Roman.foo1 :: Maybe Int Str=m2, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] -Roman.foo1 = GHC.Base.Just @ Int Roman.foo2 +Roman.foo1 = GHC.Maybe.Just @ Int Roman.foo2 -- RHS size: {terms: 11, types: 4, coercions: 0, joins: 0/0} foo :: Int -> Int @@ -180,7 +180,7 @@ foo :: Int -> Int Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) Tmpl= \ (n [Occ=Once!] :: Int) -> case n of n1 [Occ=Once] { GHC.Types.I# _ [Occ=Dead] -> - Roman.foo_go (GHC.Base.Just @ Int n1) Roman.foo1 + Roman.foo_go (GHC.Maybe.Just @ Int n1) Roman.foo1 }}] foo = \ (n :: Int) -> @@ -192,8 +192,8 @@ foo ------ Local rules for imported ids -------- "SC:$wgo0" [2] forall (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#). - Roman.$wgo (GHC.Base.Just @ Int (GHC.Types.I# sc1)) - (GHC.Base.Just @ Int (GHC.Types.I# sc)) + Roman.$wgo (GHC.Maybe.Just @ Int (GHC.Types.I# sc1)) + (GHC.Maybe.Just @ Int (GHC.Types.I# sc)) = Roman.foo_$s$wgo sc sc1 |