diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-02-11 09:41:44 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-06-17 16:22:03 -0400 |
commit | 96aa57878fd6e6a7b92e841a0df8b5255a559c97 (patch) | |
tree | da1dabadf29c6b681682a4577b4ca08e29bc44a5 /compiler/GHC/Core.hs | |
parent | 9f96bc127d6231b5e76bbab442244eb303b08867 (diff) | |
download | haskell-96aa57878fd6e6a7b92e841a0df8b5255a559c97.tar.gz |
Update compiler
Thanks to ghc-bignum, the compiler can be simplified:
* Types and constructors of Integer and Natural can be wired-in. It
means that we don't have to query them from interfaces. It also means
that numeric literals don't have to carry their type with them.
* The same code is used whatever ghc-bignum backend is enabled. In
particular, conversion of bignum literals into final Core expressions
is now much more straightforward. Bignum closure inspection too.
* GHC itself doesn't depend on any integer-* package anymore
* The `integerLibrary` setting is gone.
Diffstat (limited to 'compiler/GHC/Core.hs')
-rw-r--r-- | compiler/GHC/Core.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/GHC/Core.hs b/compiler/GHC/Core.hs index 5653a71af2..7cc8d968b6 100644 --- a/compiler/GHC/Core.hs +++ b/compiler/GHC/Core.hs @@ -345,9 +345,10 @@ We have one literal, a literal Integer, that is lifted, and we don't allow in a LitAlt, because LitAlt cases don't do any evaluation. Also (see #5603) if you say case 3 of - S# x -> ... - J# _ _ -> ... -(where S#, J# are the constructors for Integer) we don't want the + IS x -> ... + IP _ -> ... + IN _ -> ... +(where IS, IP, IN are the constructors for Integer) we don't want the simplifier calling findAlt with argument (LitAlt 3). No no. Integer literals are an opaque encoding of an algebraic data type, not of an unlifted literal, like all the others. |