Safe Haskell | None |
---|
- class Distance d where
- data Microinch
- data Mil
- data Line
- data Barleycorn
- data Finger
- data Inch
- data Nail
- data Palm
- data Hand
- data Link
- data Span
- data Foot
- data Cubit
- data Yard
- data Ell
- data Fathom
- data Perch
- data Rod
- data Chain
- data Furlong
- data Mile
- data League
- data Angstrom
- data Nanometer
- data Micrometer
- data Millimeter
- data Centimeter
- data Decimeter
- data Meter
- data Decameter
- data Hectometer
- data Kilometer
- data AU
- data Lightyear
- data Parsec
- addDist :: (Distance a, Distance b, Distance c) => a -> b -> c
- subDist :: (Distance a, Distance b, Distance c) => a -> b -> c
- convertDist :: (Distance a, Distance b) => a -> b
Documentation
A generic class that defines all the units of measure in running. The base unit of meters was chosen because Metric is orders more sane than the English system
Converts the given unit of distance into meters
fromMeters :: Meter -> dSource
Converts the given number of meters into the unit of measure
Yields the given distance as a float
Unit Definitions
English, Ascending
data Barleycorn Source
Metric Ascending
data Micrometer Source
data Millimeter Source
data Centimeter Source
data Hectometer Source
addDist :: (Distance a, Distance b, Distance c) => a -> b -> cSource
Functions
Add two distances together to get a common distance
subDist :: (Distance a, Distance b, Distance c) => a -> b -> cSource
Find the difference between two distcances
convertDist :: (Distance a, Distance b) => a -> bSource
Convert one distance to another.