numeric-prelude-0.4.4: An experimental alternative hierarchy of numeric type classes
Safe HaskellNone
LanguageHaskell98

MathObj.Wrapper.NumericPrelude

Description

A wrapper that provides instances of Haskell 98 and NumericPrelude numeric type classes for types that have NumericPrelude instances.

Synopsis

Documentation

newtype T a Source #

This makes a type usable with Haskell98 type classes that was initially implemented for NumericPrelude typeclasses. E.g. if a is in class C, then T a is both in class Num and in C.

You can even lift container types. If Polynomial a is in C for all types a that are in C, then T (Polynomial (MathObj.Wrapper.Haskell98.T a)) is in Num for all types a that are in Num.

Constructors

Cons 

Fields

Instances

Instances details
Functor T Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

fmap :: (a -> b) -> T a -> T b #

(<$) :: a -> T b -> T a #

Bounded a => Bounded (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

minBound :: T a #

maxBound :: T a #

Enum a => Enum (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

succ :: T a -> T a #

pred :: T a -> T a #

toEnum :: Int -> T a #

fromEnum :: T a -> Int #

enumFrom :: T a -> [T a] #

enumFromThen :: T a -> T a -> [T a] #

enumFromTo :: T a -> T a -> [T a] #

enumFromThenTo :: T a -> T a -> T a -> [T a] #

Eq a => Eq (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

(==) :: T a -> T a -> Bool #

(/=) :: T a -> T a -> Bool #

(C a, C a, Eq a, Show a) => Floating (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

pi :: T a #

exp :: T a -> T a #

log :: T a -> T a #

sqrt :: T a -> T a #

(**) :: T a -> T a -> T a #

logBase :: T a -> T a -> T a #

sin :: T a -> T a #

cos :: T a -> T a #

tan :: T a -> T a #

asin :: T a -> T a #

acos :: T a -> T a #

atan :: T a -> T a #

sinh :: T a -> T a #

cosh :: T a -> T a #

tanh :: T a -> T a #

asinh :: T a -> T a #

acosh :: T a -> T a #

atanh :: T a -> T a #

log1p :: T a -> T a #

expm1 :: T a -> T a #

log1pexp :: T a -> T a #

log1mexp :: T a -> T a #

(C a, C a, Eq a, Show a) => Fractional (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

(/) :: T a -> T a -> T a #

recip :: T a -> T a #

fromRational :: Rational -> T a #

(C a, C a, C a, Ord a, Enum a, Show a) => Integral (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

quot :: T a -> T a -> T a #

rem :: T a -> T a -> T a #

div :: T a -> T a -> T a #

mod :: T a -> T a -> T a #

quotRem :: T a -> T a -> (T a, T a) #

divMod :: T a -> T a -> (T a, T a) #

toInteger :: T a -> Integer #

(C a, C a, Eq a, Show a) => Num (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

(+) :: T a -> T a -> T a #

(-) :: T a -> T a -> T a #

(*) :: T a -> T a -> T a #

negate :: T a -> T a #

abs :: T a -> T a #

signum :: T a -> T a #

fromInteger :: Integer -> T a #

Ord a => Ord (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

compare :: T a -> T a -> Ordering #

(<) :: T a -> T a -> Bool #

(<=) :: T a -> T a -> Bool #

(>) :: T a -> T a -> Bool #

(>=) :: T a -> T a -> Bool #

max :: T a -> T a -> T a #

min :: T a -> T a -> T a #

(C a, C a, Ord a, Show a) => Real (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

toRational :: T a -> Rational #

(C a, C a, C a, C a, Ord a, Show a) => RealFloat (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

floatRadix :: T a -> Integer #

floatDigits :: T a -> Int #

floatRange :: T a -> (Int, Int) #

decodeFloat :: T a -> (Integer, Int) #

encodeFloat :: Integer -> Int -> T a #

exponent :: T a -> Int #

significand :: T a -> T a #

scaleFloat :: Int -> T a -> T a #

isNaN :: T a -> Bool #

isInfinite :: T a -> Bool #

isDenormalized :: T a -> Bool #

isNegativeZero :: T a -> Bool #

isIEEE :: T a -> Bool #

atan2 :: T a -> T a -> T a #

(C a, C a, C a, C a, Ord a, Show a) => RealFrac (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

properFraction :: Integral b => T a -> (b, T a) #

truncate :: Integral b => T a -> b #

round :: Integral b => T a -> b #

ceiling :: Integral b => T a -> b #

floor :: Integral b => T a -> b #

Show a => Show (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

showsPrec :: Int -> T a -> ShowS #

show :: T a -> String #

showList :: [T a] -> ShowS #

Ix a => Ix (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

range :: (T a, T a) -> [T a] #

index :: (T a, T a) -> T a -> Int #

unsafeIndex :: (T a, T a) -> T a -> Int #

inRange :: (T a, T a) -> T a -> Bool #

rangeSize :: (T a, T a) -> Int #

unsafeRangeSize :: (T a, T a) -> Int #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

zero :: T a Source #

(+) :: T a -> T a -> T a Source #

(-) :: T a -> T a -> T a Source #

negate :: T a -> T a Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

isZero :: T a -> Bool Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

(*) :: T a -> T a -> T a Source #

one :: T a Source #

fromInteger :: Integer -> T a Source #

(^) :: T a -> Integer -> T a Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

div :: T a -> T a -> T a Source #

mod :: T a -> T a -> T a Source #

divMod :: T a -> T a -> (T a, T a) Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

isUnit :: T a -> Bool Source #

stdAssociate :: T a -> T a Source #

stdUnit :: T a -> T a Source #

stdUnitInv :: T a -> T a Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

extendedGCD :: T a -> T a -> (T a, (T a, T a)) Source #

gcd :: T a -> T a -> T a Source #

lcm :: T a -> T a -> T a Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

differentiate :: T a -> T a Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

abs :: T a -> T a Source #

signum :: T a -> T a Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

(/) :: T a -> T a -> T a Source #

recip :: T a -> T a Source #

fromRational' :: Rational -> T a Source #

(^-) :: T a -> Integer -> T a Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

toRational :: T a -> Rational Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

quot :: T a -> T a -> T a Source #

rem :: T a -> T a -> T a Source #

quotRem :: T a -> T a -> (T a, T a) Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

toInteger :: T a -> Integer Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

sqrt :: T a -> T a Source #

root :: Integer -> T a -> T a Source #

(^/) :: T a -> Rational -> T a Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

pi :: T a Source #

exp :: T a -> T a Source #

log :: T a -> T a Source #

logBase :: T a -> T a -> T a Source #

(**) :: T a -> T a -> T a Source #

sin :: T a -> T a Source #

cos :: T a -> T a Source #

tan :: T a -> T a Source #

asin :: T a -> T a Source #

acos :: T a -> T a Source #

atan :: T a -> T a Source #

sinh :: T a -> T a Source #

cosh :: T a -> T a Source #

tanh :: T a -> T a Source #

asinh :: T a -> T a Source #

acosh :: T a -> T a Source #

atanh :: T a -> T a Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

splitFraction :: C b => T a -> (b, T a) Source #

fraction :: T a -> T a Source #

ceiling :: C b => T a -> b Source #

floor :: C b => T a -> b Source #

truncate :: C b => T a -> b Source #

round :: C b => T a -> b Source #

(C a, C a) => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

atan2 :: T a -> T a -> T a Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

radix :: T a -> Integer Source #

digits :: T a -> Int Source #

range :: T a -> (Int, Int) Source #

decode :: T a -> (Integer, Int) Source #

encode :: Integer -> Int -> T a Source #

exponent :: T a -> Int Source #

significand :: T a -> T a Source #

scale :: Int -> T a -> T a Source #

isNaN :: T a -> Bool Source #

isInfinite :: T a -> Bool Source #

isDenormalized :: T a -> Bool Source #

isNegativeZero :: T a -> Bool Source #

isIEEE :: T a -> Bool Source #

C a v => C (T a) (T v) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

(*>) :: T a -> T v -> T v Source #

C a v => C (T a) (T v) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

C a v => C (T a) (T v) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

(</>) :: T v -> T v -> T a Source #

C a v => C (T a) (T v) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

toScalar :: T v -> T a Source #

toMaybeScalar :: T v -> Maybe (T a) Source #

fromScalar :: T a -> T v Source #

C a v => C (T a) (T v) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

norm :: T v -> T a Source #

C a v => C (T a) (T v) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

norm :: T v -> T a Source #

C a v => C (T a) (T v) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

norm :: T v -> T a Source #

Sqr a v => Sqr (T a) (T v) Source # 
Instance details

Defined in MathObj.Wrapper.NumericPrelude

Methods

normSqr :: T v -> T a Source #

lift1 :: (a -> b) -> T a -> T b Source #

lift2 :: (a -> b -> c) -> T a -> T b -> T c Source #