License | BSD-style |
---|---|
Maintainer | Foundation |
Safe Haskell | None |
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
Integral Literal support
e.g. 123 :: Integer 123 :: Word8
fromInteger :: Integer -> a #
Instances
class Fractional a where #
Fractional Literal support
e.g. 1.2 :: Double 0.03 :: Float
fromRational :: Rational -> a #
Instances
Fractional Double # | |
Defined in Basement.Compat.NumLiteral fromRational :: Rational -> Double # | |
Fractional Float # | |
Defined in Basement.Compat.NumLiteral fromRational :: Rational -> Float # | |
Fractional Rational # | |
Defined in Basement.Compat.NumLiteral fromRational :: Rational -> Rational # | |
Fractional CFloat # | |
Defined in Basement.Compat.NumLiteral fromRational :: Rational -> CFloat # | |
Fractional CDouble # | |
Defined in Basement.Compat.NumLiteral fromRational :: Rational -> CDouble # |
class HasNegation a where #
Negation support
e.g. -(f x)