[Git][ghc/ghc][wip/backports] 7 commits: Bignum: refactor backend modules

Ben Gamari gitlab at gitlab.haskell.org
Tue Sep 29 15:42:04 UTC 2020



Ben Gamari pushed to branch wip/backports at Glasgow Haskell Compiler / GHC


Commits:
6c98a930 by Sylvain Henry at 2020-09-28T08:37:29+02:00
Bignum: refactor backend modules

* move backends into GHC.Num.Backend.*
* split backend selection into GHC.Num.Backend and
  GHC.Num.Backend.Selected to avoid duplication with the Check backend

- - - - -
74f3f581 by Sylvain Henry at 2020-09-28T08:37:29+02:00
Bignum: implement extended GCD (#18427)

- - - - -
ebcc0968 by Sylvain Henry at 2020-09-28T09:56:49+02:00
Bignum: add bigNatFromWordArray

Reimplementation of integer-gmp's byteArrayToBigNat#

- - - - -
edfa896e by Arnaud Spiwack at 2020-09-29T11:41:25-04:00
Pattern guards BindStmt always use multiplicity Many

Fixes #18439 .

The rhs of the pattern guard was consumed with multiplicity one, while
the pattern assumed it was Many. We use Many everywhere instead.

This is behaviour consistent with that of `case` expression. See #18738.

(cherry picked from commit 2707c4eae4cf99e6da2709e128f560d91e468357)

- - - - -
a64ea9d0 by Krzysztof Gogolewski at 2020-09-29T11:41:25-04:00
Disallow linear types in FFI (#18472)

(cherry picked from commit 160fba4aa306c0649c72a6dcd7c98d9782a0e74b)

- - - - -
f8d8c343 by Krzysztof Gogolewski at 2020-09-29T11:41:25-04:00
Various documentation fixes

* Remove UnliftedFFITypes from conf. Some time ago, this extension
  was undocumented and we had to silence a warning.
  This is no longer needed.
* Use r'' in conf.py. This fixes a Sphinx warning:
  WARNING: Support for evaluating Python 2 syntax is deprecated and will be removed in Sphinx 4.0. Convert docs/users_guide/conf.py to Python 3 syntax.
* Mark GHCForeignImportPrim as documented
* Fix formatting in template_haskell.rst
* Remove 'recursive do' from the list of unsupported items in TH

(cherry picked from commit 83407ffc7acc00cc025b9f6ed063add9ab9f9bcc)

- - - - -
90fe5cff by Krzysztof Gogolewski at 2020-09-29T11:41:25-04:00
Fix handling of function coercions (#18747)

This was broken when we added multiplicity to the function type.

(cherry picked from commit e124f2a7d9a5932a4c2383fd3f9dd772b2059885)

- - - - -


30 changed files:

- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Tc/Gen/Foreign.hs
- compiler/GHC/Tc/Gen/Match.hs
- docs/users_guide/conf.py
- docs/users_guide/expected-undocumented-flags.txt
- docs/users_guide/extending_ghc.rst
- docs/users_guide/exts/defer_type_errors.rst
- docs/users_guide/exts/ffi.rst
- docs/users_guide/exts/safe_haskell.rst
- docs/users_guide/exts/template_haskell.rst
- docs/users_guide/exts/typed_holes.rst
- docs/users_guide/using-optimisation.rst
- libraries/ghc-bignum/cbits/gmp_wrappers.c
- libraries/ghc-bignum/ghc-bignum.cabal
- + libraries/ghc-bignum/src/GHC/Num/Backend.hs
- libraries/ghc-bignum/src/GHC/Num/BigNat/Check.hs → libraries/ghc-bignum/src/GHC/Num/Backend/Check.hs
- libraries/ghc-bignum/src/GHC/Num/BigNat/FFI.hs → libraries/ghc-bignum/src/GHC/Num/Backend/FFI.hs
- libraries/ghc-bignum/src/GHC/Num/BigNat/GMP.hs → libraries/ghc-bignum/src/GHC/Num/Backend/GMP.hs
- libraries/ghc-bignum/src/GHC/Num/BigNat/Native.hs → libraries/ghc-bignum/src/GHC/Num/Backend/Native.hs
- + libraries/ghc-bignum/src/GHC/Num/Backend/Selected.hs
- libraries/ghc-bignum/src/GHC/Num/BigNat.hs
- libraries/ghc-bignum/src/GHC/Num/BigNat.hs-boot
- libraries/ghc-bignum/src/GHC/Num/Integer.hs
- + libraries/ghc-bignum/src/GHC/Num/Integer.hs-boot
- libraries/integer-gmp/src/GHC/Integer/GMP/Internals.hs
- testsuite/tests/lib/integer/all.T
- + testsuite/tests/lib/integer/gcdeInteger.hs
- + testsuite/tests/lib/integer/gcdeInteger.stdout
- testsuite/tests/lib/integer/integerGcdExt.hs
- + testsuite/tests/linear/should_fail/LinearFFI.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/409f18b00209b1d4c801fe4d282f1b302ded7105...90fe5cffb0b0ba1ff86b8b9bf5299d0ed8437ad7

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/409f18b00209b1d4c801fe4d282f1b302ded7105...90fe5cffb0b0ba1ff86b8b9bf5299d0ed8437ad7
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200929/b7268592/attachment.html>


More information about the ghc-commits mailing list