Copyright | (C) 2013 Richard Eisenberg |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Richard Eisenberg (eir@cis.upenn.edu) |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Unsafe |
Language | Haskell2010 |
This module exports the constructor of the Qu
type. This allows you
to write code that takes creates and reads quantities at will,
which may lead to dimension unsafety. Use at your peril.
The Dim
type
Qu
adds a dimensional annotation to its numerical value type
n
. This is the representation for all quantities.
Qu n |
Eq n => Eq (Qu d l n) | |
Floating n => Floating (Qu ([] (Factor *)) l n) | |
Fractional n => Fractional (Qu ([] (Factor *)) l n) | |
Num n => Num (Qu ([] (Factor *)) l n) | |
Ord n => Ord (Qu d l n) | |
Real n => Real (Qu ([] (Factor *)) l n) | |
RealFloat n => RealFloat (Qu ([] (Factor *)) l n) | |
RealFrac n => RealFrac (Qu ([] (Factor *)) l n) | |
(ShowUnitFactor (LookupList dims lcsu), Show n) => Show (Qu dims lcsu n) | |
ValidDL d l => Quantity (Qu d l n) | |
type QuantityUnit (Qu d l n) = UnitOfDimFactors d l | |
type QuantityLCSU (Qu d l n) = l | |
type QuantityRep (Qu d l n) = n | |
type (Qu d l n) %^ z = Qu ((@*) d z) l n | |
type (Qu d1 l n) %/ (Qu d2 l n) = Qu ((@-) d1 d2) l n | |
type (Qu d1 l n) %* (Qu d2 l n) = Qu ((@+) d1 d2) l n |