ghc-10.0.0.20260917: The GHC API
Safe HaskellNone
LanguageGHC2024

GHC.Types.Literal.Floating

Synopsis

Documentation

data LitFloating Source #

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

Instances

Instances details
NFData LitFloating Source # 
Instance details

Defined in GHC.Types.Literal.Floating

Methods

rnf :: LitFloating -> () Source #

Binary LitFloating Source # 
Instance details

Defined in GHC.Types.Literal.Floating

Eq LitFloating Source #

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.

Instance details

Defined in GHC.Types.Literal.Floating

Ord LitFloating Source #

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

Instance details

Defined in GHC.Types.Literal.Floating

Data LitFloating Source # 
Instance details

Defined in GHC.Types.Literal.Floating

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LitFloating -> c LitFloating Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LitFloating Source #

toConstr :: LitFloating -> Constr Source #

dataTypeOf :: LitFloating -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LitFloating) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LitFloating) Source #

gmapT :: (forall b. Data b => b -> b) -> LitFloating -> LitFloating Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LitFloating -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LitFloating -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> LitFloating -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LitFloating -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LitFloating -> m LitFloating Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LitFloating -> m LitFloating Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LitFloating -> m LitFloating Source #

Show LitFloating Source # 
Instance details

Defined in GHC.Types.Literal.Floating

data LitFloatingType Source #

Constructors

LitFloat 
LitDouble 

Instances

Instances details
NFData LitFloatingType Source # 
Instance details

Defined in GHC.Types.Literal.Floating

Methods

rnf :: LitFloatingType -> () Source #

Eq LitFloatingType Source # 
Instance details

Defined in GHC.Types.Literal.Floating

Ord LitFloatingType Source # 
Instance details

Defined in GHC.Types.Literal.Floating

Data LitFloatingType Source # 
Instance details

Defined in GHC.Types.Literal.Floating

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LitFloatingType -> c LitFloatingType Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LitFloatingType Source #

toConstr :: LitFloatingType -> Constr Source #

dataTypeOf :: LitFloatingType -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LitFloatingType) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LitFloatingType) Source #

gmapT :: (forall b. Data b => b -> b) -> LitFloatingType -> LitFloatingType Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LitFloatingType -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LitFloatingType -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> LitFloatingType -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LitFloatingType -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LitFloatingType -> m LitFloatingType Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LitFloatingType -> m LitFloatingType Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LitFloatingType -> m LitFloatingType Source #

Show LitFloatingType Source # 
Instance details

Defined in GHC.Types.Literal.Floating

unsafeLitFloatingToRational :: LitFloating -> Rational Source #

Attempts to convert a LitFloating to a rational number.

Returns nonsense if its argument is a NaN or an infinity. Equates 0.0 with -0.0.

Arithmetic on floating-point literals

litFloatingComparisonOp :: ConstantFoldingPrecision -> (forall t. Ord t => t -> t -> res) -> LitFloating -> LitFloating -> res Source #

isPositiveLF :: LitFloating -> Bool Source #

Is this a positive floating-point value?

Handles negative zero, infinities and signed NaNs.

isFiniteLF :: LitFloating -> Bool Source #

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