coordinate-0.0.6: A representation of latitude and longitude

Safe HaskellNone

Data.Geo.Coordinate.Seconds

Synopsis

Documentation

data Seconds Source

Instances

Eq Seconds 
Ord Seconds 
Show Seconds

A show instance that prints to 4 decimal places. This is to take floating-point rounding errors into account.

HasSeconds Seconds 

nSeconds :: Prism' Double SecondsSource

A prism on seconds to a double between 0 inclusive and 60 exclusive.

>>> 7 ^? nSeconds
Just (Seconds 7.0000)
>>> 0 ^? nSeconds
Just (Seconds 0.0000)
>>> 59 ^? nSeconds
Just (Seconds 59.0000)
>>> 59.99 ^? nSeconds
Just (Seconds 59.9900)
>>> 60 ^? nSeconds
Nothing
all (\m -> nSeconds # m == n) (n ^? nSeconds)