HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

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

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