| Copyright | (c) 2018 Cedric Liegeois |
|---|---|
| License | BSD3 |
| Maintainer | Cedric Liegeois <ofmooseandmen@yahoo.fr> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Data.Geo.Jord.Length
Description
Types and functions for working with (signed) lengths in metres, kilometres or nautical miles.
Synopsis
- data Length
- feet :: Double -> Length
- kilometres :: Double -> Length
- metres :: Double -> Length
- nauticalMiles :: Double -> Length
- readLength :: String -> Length
- readLengthE :: String -> Either String Length
- readLengthF :: MonadFail m => String -> m Length
- toFeet :: Length -> Double
- toKilometres :: Length -> Double
- toMetres :: Length -> Double
- toNauticalMiles :: Length -> Double
The Length type
A length with a resolution of 1 millimetre.
Smart constructors
Read
readLength :: String -> Length Source #
readLengthE :: String -> Either String Length Source #
Same as readLength but returns a Either.
readLengthF :: MonadFail m => String -> m Length Source #
Same as readLength but returns a MonadFail.
Conversions
toKilometres :: Length -> Double Source #
toKilometres l converts l to kilometres.
toNauticalMiles :: Length -> Double Source #
toNauticalMiles l converts l to nautical miles.