HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Moduleghc-10.0.0.20260917GHC2024

GHC.Types.Literal.Floating

  • 3 types
  • 23 values
datadata LitFloating
#

Represents a known Float# or Double# literal on the target machine.

Instances6Eq, Data, Ord, Show, NFData, Binary
  • Eq LitFloatingDefined in ghc-10.0.0.20260917 · GHC.Types.Literal.Floating

    This instance intentionally disagrees with the equality predicate (==) on Float or Double values: It is reflexive even on NaNs and distinguishes between positive and negative zero. Use litFloatingComparisonOp if you need to match Float or Double.

  • Data LitFloatingDefined in ghc-10.0.0.20260917 · GHC.Types.Literal.Floating
  • Ord LitFloatingDefined in ghc-10.0.0.20260917 · GHC.Types.Literal.Floating

    The ordering represented by this instance is pretty arbitrary and may change without notice. Do not rely on its behavior!

  • Show LitFloatingDefined in ghc-10.0.0.20260917 · GHC.Types.Literal.Floating
  • NFData LitFloatingDefined in ghc-10.0.0.20260917 · GHC.Types.Literal.Floating
  • Binary LitFloatingDefined in ghc-10.0.0.20260917 · GHC.Types.Literal.Floating

Arithmetic on floating-point literals

16 declarations
valueisFiniteLF :: LitFloating -> Bool
#

Returns True if its argument represents a real number, and False if its argument represents a NaN or an infinity.