dimensional-tf-0.3.0.2: Statically checked physical dimensions, implemented using type families.

CopyrightCopyright (C) 2006-2013 Bjorn Buckwalter
LicenseBSD3
Maintainerbjorn.buckwalter@gmail.com
StabilityStable
PortabilityGHC only?
Safe HaskellNone
LanguageHaskell98

Numeric.Units.Dimensional.TF

Description

Please refer to the literate Haskell code for documentation of both API and implementation.

Documentation

newtype Dimensional v d a Source

Constructors

Dimensional a 

Instances

Functor Dimensionless 
(Show d, Show a) => Show (Quantity d a) 
Typeable (* -> * -> * -> *) Dimensional 
Enum a => Enum (Dimensional v d a) 
Eq a => Eq (Dimensional v d a) 
Ord a => Ord (Dimensional v d a) 

data DUnit Source

Instances

(*~) :: Num a => a -> Unit d a -> Quantity d a infixl 7 Source

(/~) :: Fractional a => Quantity d a -> Unit d a -> a infixl 7 Source

data Dim l m t i th n j Source

Instances

Functor Dimensionless 
Typeable (* -> * -> * -> * -> * -> * -> * -> *) Dim 
(NumType l, NumType m, NumType t, NumType i, NumType th, NumType n, NumType j) => Show (Dim l m t i th n j) 
type Root (Dim l m t i th n j) x = Dim (Div l x) (Div m x) (Div t x) (Div i x) (Div th x) (Div n x) (Div j x) 
type Pow (Dim l m t i th n j) x = Dim (Mul l x) (Mul m x) (Mul t x) (Mul i x) (Mul th x) (Mul n x) (Mul j x) 
type Div (Dim l m t i th n j) (Dim l' m' t' i' th' n' j') = Dim (Sub l l') (Sub m m') (Sub t t') (Sub i i') (Sub th th') (Sub n n') (Sub j j') 
type Mul (Dim l m t i th n j) (Dim l' m' t' i' th' n' j') = Dim (Add l l') (Add m m') (Add t t') (Add i i') (Add th th') (Add n n') (Add j j') 

type family Mul a b Source

Instances

type Mul (Dim l m t i th n j) (Dim l' m' t' i' th' n' j') = Dim (Add l l') (Add m m') (Add t t') (Add i i') (Add th th') (Add n n') (Add j j') 

type family Div a b Source

Instances

type Div (Dim l m t i th n j) (Dim l' m' t' i' th' n' j') = Dim (Sub l l') (Sub m m') (Sub t t') (Sub i i') (Sub th th') (Sub n n') (Sub j j') 

type family Pow d x Source

Instances

type Pow (Dim l m t i th n j) x = Dim (Mul l x) (Mul m x) (Mul t x) (Mul i x) (Mul th x) (Mul n x) (Mul j x) 

type family Root d x Source

Instances

type Root (Dim l m t i th n j) x = Dim (Div l x) (Div m x) (Div t x) (Div i x) (Div th x) (Div n x) (Div j x) 

(*) :: Num a => Dimensional v d a -> Dimensional v d' a -> Dimensional v (Mul d d') a infixl 7 Source

(/) :: Fractional a => Dimensional v d a -> Dimensional v d' a -> Dimensional v (Div d d') a infixl 7 Source

(^) :: (Fractional a, NumType n) => Dimensional v d a -> n -> Dimensional v (Pow d n) a infixr 8 Source

(^+) :: (Num a, NumType n) => Dimensional v d a -> n -> Dimensional v (Pow d n) a infixr 8 Source

negate :: Num a => Quantity d a -> Quantity d a Source

(+) :: Num a => Quantity d a -> Quantity d a -> Quantity d a infixl 6 Source

(-) :: Num a => Quantity d a -> Quantity d a -> Quantity d a infixl 6 Source

abs :: Num a => Quantity d a -> Quantity d a Source

nroot :: (Floating a, NumType n) => n -> Dimensional v d a -> Dimensional v (Root d n) a Source

(^/) :: (Floating a, NumType n) => Dimensional v d a -> n -> Dimensional v (Root d n) a infixr 8 Source

(*~~) :: (Functor f, Num a) => f a -> Unit d a -> f (Quantity d a) infixl 7 Source

(/~~) :: (Functor f, Fractional a) => f (Quantity d a) -> Unit d a -> f a infixl 7 Source

sum :: forall d a. Num a => [Quantity d a] -> Quantity d a Source

one :: Num a => Unit DOne a Source

_0 :: Num a => Quantity d a Source

prefix :: Num a => a -> Unit d a -> Unit d a Source