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 |
Data.Metrology.Unsafe
Contents
Description
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.
Constructors
Qu n |
Instances
Eq n => Eq (Qu ([] (Factor *)) 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 ([] (Factor *)) 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) | |
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 |