Copyright | (c) 2018 Cedric Liegeois |
---|---|

License | BSD3 |

Maintainer | Cedric Liegeois <ofmooseandmen@yahoo.fr> |

Stability | experimental |

Portability | portable |

Safe Haskell | Safe |

Language | Haskell2010 |

Types and functions for working with speed in metres per second, kilometres per hour, miles per hour, knots or feet per second.

## Synopsis

- data Speed
- metresPerSecond :: Double -> Speed
- kilometresPerHour :: Double -> Speed
- milesPerHour :: Double -> Speed
- knots :: Double -> Speed
- feetPerSecond :: Double -> Speed
- readSpeed :: String -> Speed
- readSpeedE :: String -> Either String Speed
- readSpeedF :: MonadFail m => String -> m Speed
- toMetresPerSecond :: Speed -> Double
- toKilometresPerHour :: Speed -> Double
- toMilesPerHour :: Speed -> Double
- toKnots :: Speed -> Double
- toFeetPerSecond :: Speed -> Double

# The

`Speed`

type

A speed with a resolution of 1 millimetre per hour.

# Smart constructors

# Read

# Conversions

toMetresPerSecond :: Speed -> Double Source #

`toMetresPerSecond s`

converts `s`

to metres per second.

toKilometresPerHour :: Speed -> Double Source #

`toKilometresPerHour s`

converts `s`

to kilometres per hour.

toMilesPerHour :: Speed -> Double Source #

`toMilesPerHour s`

converts `s`

to miles per hour.

toFeetPerSecond :: Speed -> Double Source #

`toFeetPerSecond s`

converts `s`

to feet per second.