Skip to content

NumDecimals extension not suggested in error message

Summary

When trying to use an e-notation literal like 1e6 to specify a Integer value the error message does not suggest using the NumDecimals language extension.

Steps to reproduce

$ ghci
> 1e6 :: Integer

Expected behavior

The error message

<interactive>:1:1: error:
     No instance for (Fractional Integer)
        arising from the literal ‘1e6’
     In the expression: 1e6 :: Integer
      In an equation for ‘it’: it = 1e6 :: Integer

Environment

  • GHC version used: 9.2.7

Optional:

  • Operating System: OpenBSD
  • System Architecture: x86_64
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information