License | BSD-style |
---|---|
Maintainer | Foundation |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Literal support for Integral and Fractional
Synopsis
- class Integral a where
- fromInteger :: Integer -> a
- class Fractional a where
- fromRational :: Rational -> a
- class HasNegation a where
- negate :: a -> a
Documentation
class Integral a where Source #
Integral Literal support
e.g. 123 :: Integer 123 :: Word8
fromInteger :: Integer -> a Source #
Instances
class Fractional a where Source #
Fractional Literal support
e.g. 1.2 :: Double 0.03 :: Float
fromRational :: Rational -> a Source #
Instances
Fractional CDouble Source # | |
Defined in Basement.Compat.NumLiteral fromRational :: Rational -> CDouble Source # | |
Fractional CFloat Source # | |
Defined in Basement.Compat.NumLiteral fromRational :: Rational -> CFloat Source # | |
Fractional Rational Source # | |
Defined in Basement.Compat.NumLiteral fromRational :: Rational -> Rational Source # | |
Fractional Double Source # | |
Defined in Basement.Compat.NumLiteral fromRational :: Rational -> Double Source # | |
Fractional Float Source # | |
Defined in Basement.Compat.NumLiteral fromRational :: Rational -> Float Source # |
class HasNegation a where Source #
Negation support
e.g. -(f x)