Safe Haskell | None |
---|---|
Language | Haskell98 |
Physical expressions track the operations made on physical values so we are able to give detailed information on how to resolve unit violations.
Synopsis
- data T a v = Cons (Term a v) v
- data Term a v
- fromValue :: v -> T a v
- makeLine :: Int -> String -> String
- showUnitError :: Show v => Bool -> Int -> v -> T a v -> String
- lift :: (v -> v) -> T a v -> T a v
- fromScalar :: (Show v, C a v) => a -> T a v
- scalarMap :: (Show v, C a v) => (a -> a) -> T a v -> T a v
- scalarMap2 :: (Show v, C a v) => (a -> a -> a) -> T a v -> T a v -> T a v
Documentation
A value of type T
stores information on how to resolve unit violations.
The main application of the module are certainly
Number.Physical type instances
but in principle it can also be applied to other occasionally scalar types.
Instances
(C a v, Show v) => C a (T a v) Source # | |
Defined in Number.OccasionallyScalarExpression | |
Eq v => Eq (T a v) Source # | |
Ord v => Ord (T a v) Source # | |
Show v => Show (T a v) Source # | |
C v => C (T a v) Source # | |
C v => C (T a v) Source # | |
C v => C (T a v) Source # | |
C v => C (T a v) Source # | |
C v => C (T a v) Source # | |
(C a, C v, Show v, C a v) => C (T a v) Source # | |
(C a, C v, Show v, C a v) => C (T a v) Source # | |
Defined in Number.OccasionallyScalarExpression exp :: T a v -> T a v Source # log :: T a v -> T a v Source # logBase :: T a v -> T a v -> T a v Source # (**) :: T a v -> T a v -> T a v Source # sin :: T a v -> T a v Source # cos :: T a v -> T a v Source # tan :: T a v -> T a v Source # asin :: T a v -> T a v Source # acos :: T a v -> T a v Source # atan :: T a v -> T a v Source # sinh :: T a v -> T a v Source # cosh :: T a v -> T a v Source # tanh :: T a v -> T a v Source # asinh :: T a v -> T a v Source # |