Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- newtype T u a = Cons a
- fromNumber :: a -> Scalar a
- toNumber :: Scalar a -> a
- fromNumberWithDimension :: C u => u -> a -> T u a
- toNumberWithDimension :: C u => u -> T u a -> a
- (&*&) :: (C u, C v, C a) => T u a -> T v a -> T (Mul u v) a
- (&/&) :: (C u, C v, C a) => T u a -> T v a -> T (Mul u (Recip v)) a
- mulToScalar :: (C u, C a) => T u a -> T (Recip u) a -> a
- divToScalar :: (C u, C a) => T u a -> T u a -> a
- cancelToScalar :: C u => T (Mul u (Recip u)) a -> a
- recip :: (C u, C a) => T u a -> T (Recip u) a
- unrecip :: (C u, C a) => T (Recip u) a -> T u a
- sqr :: (C u, C a) => T u a -> T (Sqr u) a
- sqrt :: (C u, C a) => T (Sqr u) a -> T u a
- abs :: (C u, C a) => T u a -> T u a
- absSignum :: (C u, C a) => T u a -> (T u a, a)
- scale :: (C u, C a) => a -> T u a -> T u a
- (*&) :: (C u, C a) => a -> T u a -> T u a
- rewriteDimension :: (C u, C v) => (u -> v) -> T u a -> T v a
- type Scalar a = T Scalar a
- type Length a = T Length a
- type Time a = T Time a
- type Mass a = T Mass a
- type Charge a = T Charge a
- type Angle a = T Angle a
- type Temperature a = T Temperature a
- type Information a = T Information a
- type Frequency a = T Frequency a
- type Voltage a = T Voltage a
- scalar :: a -> Scalar a
- length :: a -> Length a
- time :: a -> Time a
- mass :: a -> Mass a
- charge :: a -> Charge a
- frequency :: a -> Frequency a
- angle :: a -> Angle a
- temperature :: a -> Temperature a
- information :: a -> Information a
- voltage :: a -> Voltage a
Number type
Cons a |
Instances
(C u, C a b) => C a (T u b) Source # | |
(IsScalar u, C a b) => C a (T u b) Source # | |
Defined in Number.DimensionTerm | |
Eq a => Eq (T u a) Source # | |
Ord a => Ord (T u a) Source # | |
(C u, Show a) => Show (T u a) Source # | |
NFData a => NFData (T u a) Source # | |
Defined in Number.DimensionTerm | |
(C u, Random a) => Random (T u a) Source # | |
(C u, C a) => C (T u a) Source # | |
(IsScalar u, C a) => C (T u a) Source # | |
(IsScalar u, C a) => C (T u a) Source # | |
fromNumber :: a -> Scalar a Source #
fromNumberWithDimension :: C u => u -> a -> T u a Source #
toNumberWithDimension :: C u => u -> T u a -> a Source #
Example constructors
type Temperature a = T Temperature a Source #
type Information a = T Information a Source #
temperature :: a -> Temperature a Source #
information :: a -> Information a Source #