NumericPrelude-0.0: An experimental alternative hierarchy of numeric type classesContentsIndex
Number.OccasionallyScalarExpression
Portabilitymulti-type parameter classes (vector space)
Stabilityprovisional
Maintainernumericprelude@henning-thielemann.de
Description
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
= Const
| Add (T a v) (T a v)
| Mul (T a v) (T a v)
| Div (T a v) (T 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
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
data T a v
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.
Constructors
Cons (Term a v) v
show/hide Instances
(C a v, Show v) => C a (T a v)
C v => C (T a v)
C v => C (T a v)
C v => C (T a v)
C v => C (T a v)
(C a, C v, Show v, C a v) => C (T a v)
(C a, C v, Show v, C a v) => C (T a v)
Eq v => Eq (T a v)
Ord v => Ord (T a v)
Real v => Real (T a v)
Show v => Show (T a v)
data Term a v
Constructors
Const
Add (T a v) (T a v)
Mul (T a v) (T a v)
Div (T a v) (T 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
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
Produced by Haddock version 0.7