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

Number.DimensionTerm

Description

Synopsis

Number type

newtype T u a Source #

Constructors

Cons a 

Instances

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

Defined in Number.DimensionTerm

Methods

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

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

Defined in Number.DimensionTerm

Methods

toScalar :: T u b -> a Source #

toMaybeScalar :: T u b -> Maybe a Source #

fromScalar :: a -> T u b Source #

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

Defined in Number.DimensionTerm

Methods

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

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

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

Defined in Number.DimensionTerm

Methods

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

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

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

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

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

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

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

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

Defined in Number.DimensionTerm

Methods

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

show :: T u a -> String #

showList :: [T u a] -> ShowS #

NFData a => NFData (T u a) Source # 
Instance details

Defined in Number.DimensionTerm

Methods

rnf :: T u a -> () #

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

Defined in Number.DimensionTerm

Methods

randomR :: RandomGen g => (T u a, T u a) -> g -> (T u a, g) #

random :: RandomGen g => g -> (T u a, g) #

randomRs :: RandomGen g => (T u a, T u a) -> g -> [T u a] #

randoms :: RandomGen g => g -> [T u a] #

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

Defined in Number.DimensionTerm

Methods

zero :: T u a Source #

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

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

negate :: T u a -> T u a Source #

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

Defined in Number.DimensionTerm

Methods

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

one :: T u a Source #

fromInteger :: Integer -> T u a Source #

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

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

Defined in Number.DimensionTerm

Methods

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

recip :: T u a -> T u a Source #

fromRational' :: Rational -> T u a Source #

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

fromNumberWithDimension :: C u => u -> a -> T u a Source #

toNumberWithDimension :: C u => u -> T u a -> a Source #

(&*&) :: (C u, C v, C a) => T u a -> T v a -> T (Mul u v) a infixl 7 Source #

(&/&) :: (C u, C v, C a) => T u a -> T v a -> T (Mul u (Recip v)) a infixl 7 Source #

mulToScalar :: (C u, C a) => T u a -> T (Recip u) a -> a Source #

divToScalar :: (C u, C a) => T u a -> T u a -> a Source #

cancelToScalar :: C u => T (Mul u (Recip u)) a -> a Source #

recip :: (C u, C a) => T u a -> T (Recip u) a Source #

unrecip :: (C u, C a) => T (Recip u) a -> T u a Source #

sqr :: (C u, C a) => T u a -> T (Sqr u) a Source #

sqrt :: (C u, C a) => T (Sqr u) a -> T u a Source #

abs :: (C u, C a) => T u a -> T u a Source #

absSignum :: (C u, C a) => T u a -> (T u a, a) Source #

scale :: (C u, C a) => a -> T u a -> T u a Source #

(*&) :: (C u, C a) => a -> T u a -> T u a infixl 7 Source #

rewriteDimension :: (C u, C v) => (u -> v) -> T u a -> T v a Source #

Example constructors

type Scalar a = T Scalar a Source #

type Length a = T Length a Source #

type Time a = T Time a Source #

type Mass a = T Mass a Source #

type Charge a = T Charge a Source #

type Angle a = T Angle a Source #

type Voltage a = T Voltage a Source #

scalar :: a -> Scalar a Source #

length :: a -> Length a Source #

time :: a -> Time a Source #

mass :: a -> Mass a Source #

charge :: a -> Charge a Source #

angle :: a -> Angle a Source #