Skip to content

Canonicalize bignum literals (#20245)

Sylvain Henry requested to merge hsyl20/ghc:hsyl20/bignat-literas into master

Before this patch Integer and Natural literals were desugared into "real" Core in Core prep. Now we desugar them directly into their final ConApp form in HsToCore. We only keep the double representation for BigNat# (literals larger than a machine Word/Int) which are still desugared in Core prep.

Using the final form directly allows case-of-known-constructor to fire for bignum literals, fixing #20245 (closed).

Edited by Sylvain Henry

Merge request reports