ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Types.SaneDouble

Description

Double datatype with saner instances

Synopsis

- newtype SaneDouble = SaneDouble {
  - unSaneDouble :: Double
  }

# Documentation

newtype SaneDouble #

A newtype wrapper around `Double` to ensure we never generate a `Double` that becomes a `NaN`, see instances for details on sanity.

Constructors

SaneDouble |
Fields unSaneDouble :: Double

#### Instances

Instances details

Num SaneDouble # |
Instance details Defined in GHC.Types.SaneDouble Methods (+) :: SaneDouble -> SaneDouble -> SaneDouble # (-) :: SaneDouble -> SaneDouble -> SaneDouble # (*) :: SaneDouble -> SaneDouble -> SaneDouble # negate :: SaneDouble -> SaneDouble # abs :: SaneDouble -> SaneDouble # signum :: SaneDouble -> SaneDouble # fromInteger :: Integer -> SaneDouble #
Fractional SaneDouble # |
Instance details Defined in GHC.Types.SaneDouble Methods (/) :: SaneDouble -> SaneDouble -> SaneDouble # recip :: SaneDouble -> SaneDouble # fromRational :: Rational -> SaneDouble #
Show SaneDouble # |
Instance details Defined in GHC.Types.SaneDouble Methods showsPrec :: Int -> SaneDouble -> ShowS # show :: SaneDouble -> String # showList :: [SaneDouble] -> ShowS #
Binary SaneDouble # |
Instance details Defined in GHC.Types.SaneDouble Methods put_ :: WriteBinHandle -> SaneDouble -> IO () # put :: WriteBinHandle -> SaneDouble -> IO (Bin SaneDouble) # get :: ReadBinHandle -> IO SaneDouble #
Eq SaneDouble # |
Instance details Defined in GHC.Types.SaneDouble Methods (==) :: SaneDouble -> SaneDouble -> Bool # (/=) :: SaneDouble -> SaneDouble -> Bool #
Ord SaneDouble # |
Instance details Defined in GHC.Types.SaneDouble Methods compare :: SaneDouble -> SaneDouble -> Ordering # (<) :: SaneDouble -> SaneDouble -> Bool # (<=) :: SaneDouble -> SaneDouble -> Bool # (>) :: SaneDouble -> SaneDouble -> Bool # (>=) :: SaneDouble -> SaneDouble -> Bool # max :: SaneDouble -> SaneDouble -> SaneDouble # min :: SaneDouble -> SaneDouble -> SaneDouble #