{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- |This module defines types for many useful time periods, as well as
-- mechanisms for converting between them.
module Data.Time.Units(
         TimeUnit(..)
       , Attosecond
       , Femtosecond
       , Picosecond
       , Nanosecond
       , Microsecond
       , Millisecond
       , Second
       , Minute
       , Hour
       , Day
       , Week
       , Fortnight
       , addTime
       , subTime
       , convertUnit
       , getCPUTimeWithUnit
       )
 where

import Data.Ix(Ix)
import Data.Data(Data)
import Data.List(isPrefixOf)
import Data.Typeable(Typeable)
import System.CPUTime

-- |A generic class that describes all the units of time. We use microseconds
-- here because that tends to be what GHC (at least) tends to use as its 
-- system-level minimum tick size.
class TimeUnit a where
  -- |Converts the given unit of time into microseconds, flooring the value
  -- if it comes to a fractional number of microseconds. (In other words:
  -- be careful, you may lose precision!)
  toMicroseconds   :: a -> Integer
  -- |Converts the given number of microseconds into the unit of time, flooring
  -- the value if it comes to a fraction number of the given unit. (In other
  -- words: be careful, you may lose precision!)
  fromMicroseconds :: Integer -> a

-- |Add two times together to get a useful third time unit. As per usual,
-- you'll want to make sure that you are careful regarding precision. This
-- function goes through microseconds as an intermediary form.
addTime :: (TimeUnit a, TimeUnit b, TimeUnit c) => a -> b -> c
addTime :: forall a b c. (TimeUnit a, TimeUnit b, TimeUnit c) => a -> b -> c
addTime a
x b
y = Integer -> c
forall a. TimeUnit a => Integer -> a
fromMicroseconds (a -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds a
x Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
+ b -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds b
y)

-- |Subtract the second time from the first, to get a useful third time unit.
-- As per usual, you'll want to make sure that you are careful regarding
-- precision. This function goes through microseconds as an intermediary form.
subTime :: (TimeUnit a, TimeUnit b, TimeUnit c) => a -> b -> c
subTime :: forall a b c. (TimeUnit a, TimeUnit b, TimeUnit c) => a -> b -> c
subTime a
x b
y = Integer -> c
forall a. TimeUnit a => Integer -> a
fromMicroseconds (a -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds a
x Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
- b -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds b
y)

-- |Convert one time unit to another. Note that if you move from a smaller
-- time unit to a larger one, or between two time units smaller than a
-- microsecond, you will lose precision.
convertUnit :: (TimeUnit a, TimeUnit b) => a -> b
convertUnit :: forall a b. (TimeUnit a, TimeUnit b) => a -> b
convertUnit = Integer -> b
forall a. TimeUnit a => Integer -> a
fromMicroseconds (Integer -> b) -> (a -> Integer) -> a -> b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds

-- |Get the current CPU time in your favorite units. This is probably not
-- very useful in itself, but is likely useful for comparison purposes ...
getCPUTimeWithUnit :: TimeUnit a => IO a
getCPUTimeWithUnit :: forall a. TimeUnit a => IO a
getCPUTimeWithUnit =
  (Integer -> a
forall a. TimeUnit a => Integer -> a
fromMicroseconds (Integer -> a) -> (Integer -> Integer) -> Integer -> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Picosecond -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds (Picosecond -> Integer)
-> (Integer -> Picosecond) -> Integer -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Picosecond
Picosecond) (Integer -> a) -> IO Integer -> IO a
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
`fmap` IO Integer
getCPUTime

--

newtype Attosecond  = Attosecond  Integer
 deriving (Int -> Attosecond
Attosecond -> Int
Attosecond -> [Attosecond]
Attosecond -> Attosecond
Attosecond -> Attosecond -> [Attosecond]
Attosecond -> Attosecond -> Attosecond -> [Attosecond]
(Attosecond -> Attosecond)
-> (Attosecond -> Attosecond)
-> (Int -> Attosecond)
-> (Attosecond -> Int)
-> (Attosecond -> [Attosecond])
-> (Attosecond -> Attosecond -> [Attosecond])
-> (Attosecond -> Attosecond -> [Attosecond])
-> (Attosecond -> Attosecond -> Attosecond -> [Attosecond])
-> Enum Attosecond
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: Attosecond -> Attosecond
succ :: Attosecond -> Attosecond
$cpred :: Attosecond -> Attosecond
pred :: Attosecond -> Attosecond
$ctoEnum :: Int -> Attosecond
toEnum :: Int -> Attosecond
$cfromEnum :: Attosecond -> Int
fromEnum :: Attosecond -> Int
$cenumFrom :: Attosecond -> [Attosecond]
enumFrom :: Attosecond -> [Attosecond]
$cenumFromThen :: Attosecond -> Attosecond -> [Attosecond]
enumFromThen :: Attosecond -> Attosecond -> [Attosecond]
$cenumFromTo :: Attosecond -> Attosecond -> [Attosecond]
enumFromTo :: Attosecond -> Attosecond -> [Attosecond]
$cenumFromThenTo :: Attosecond -> Attosecond -> Attosecond -> [Attosecond]
enumFromThenTo :: Attosecond -> Attosecond -> Attosecond -> [Attosecond]
Enum,Attosecond -> Attosecond -> Bool
(Attosecond -> Attosecond -> Bool)
-> (Attosecond -> Attosecond -> Bool) -> Eq Attosecond
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Attosecond -> Attosecond -> Bool
== :: Attosecond -> Attosecond -> Bool
$c/= :: Attosecond -> Attosecond -> Bool
/= :: Attosecond -> Attosecond -> Bool
Eq,Enum Attosecond
Real Attosecond
(Real Attosecond, Enum Attosecond) =>
(Attosecond -> Attosecond -> Attosecond)
-> (Attosecond -> Attosecond -> Attosecond)
-> (Attosecond -> Attosecond -> Attosecond)
-> (Attosecond -> Attosecond -> Attosecond)
-> (Attosecond -> Attosecond -> (Attosecond, Attosecond))
-> (Attosecond -> Attosecond -> (Attosecond, Attosecond))
-> (Attosecond -> Integer)
-> Integral Attosecond
Attosecond -> Integer
Attosecond -> Attosecond -> (Attosecond, Attosecond)
Attosecond -> Attosecond -> Attosecond
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: Attosecond -> Attosecond -> Attosecond
quot :: Attosecond -> Attosecond -> Attosecond
$crem :: Attosecond -> Attosecond -> Attosecond
rem :: Attosecond -> Attosecond -> Attosecond
$cdiv :: Attosecond -> Attosecond -> Attosecond
div :: Attosecond -> Attosecond -> Attosecond
$cmod :: Attosecond -> Attosecond -> Attosecond
mod :: Attosecond -> Attosecond -> Attosecond
$cquotRem :: Attosecond -> Attosecond -> (Attosecond, Attosecond)
quotRem :: Attosecond -> Attosecond -> (Attosecond, Attosecond)
$cdivMod :: Attosecond -> Attosecond -> (Attosecond, Attosecond)
divMod :: Attosecond -> Attosecond -> (Attosecond, Attosecond)
$ctoInteger :: Attosecond -> Integer
toInteger :: Attosecond -> Integer
Integral,Typeable Attosecond
Typeable Attosecond =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Attosecond -> c Attosecond)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Attosecond)
-> (Attosecond -> Constr)
-> (Attosecond -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Attosecond))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Attosecond))
-> ((forall b. Data b => b -> b) -> Attosecond -> Attosecond)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Attosecond -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Attosecond -> r)
-> (forall u. (forall d. Data d => d -> u) -> Attosecond -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Attosecond -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Attosecond -> m Attosecond)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Attosecond -> m Attosecond)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Attosecond -> m Attosecond)
-> Data Attosecond
Attosecond -> Constr
Attosecond -> DataType
(forall b. Data b => b -> b) -> Attosecond -> Attosecond
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Attosecond -> u
forall u. (forall d. Data d => d -> u) -> Attosecond -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Attosecond -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Attosecond -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Attosecond -> m Attosecond
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Attosecond -> m Attosecond
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Attosecond
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Attosecond -> c Attosecond
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Attosecond)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Attosecond)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Attosecond -> c Attosecond
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Attosecond -> c Attosecond
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Attosecond
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Attosecond
$ctoConstr :: Attosecond -> Constr
toConstr :: Attosecond -> Constr
$cdataTypeOf :: Attosecond -> DataType
dataTypeOf :: Attosecond -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Attosecond)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Attosecond)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Attosecond)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Attosecond)
$cgmapT :: (forall b. Data b => b -> b) -> Attosecond -> Attosecond
gmapT :: (forall b. Data b => b -> b) -> Attosecond -> Attosecond
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Attosecond -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Attosecond -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Attosecond -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Attosecond -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Attosecond -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Attosecond -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Attosecond -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Attosecond -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Attosecond -> m Attosecond
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Attosecond -> m Attosecond
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Attosecond -> m Attosecond
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Attosecond -> m Attosecond
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Attosecond -> m Attosecond
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Attosecond -> m Attosecond
Data,Integer -> Attosecond
Attosecond -> Attosecond
Attosecond -> Attosecond -> Attosecond
(Attosecond -> Attosecond -> Attosecond)
-> (Attosecond -> Attosecond -> Attosecond)
-> (Attosecond -> Attosecond -> Attosecond)
-> (Attosecond -> Attosecond)
-> (Attosecond -> Attosecond)
-> (Attosecond -> Attosecond)
-> (Integer -> Attosecond)
-> Num Attosecond
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: Attosecond -> Attosecond -> Attosecond
+ :: Attosecond -> Attosecond -> Attosecond
$c- :: Attosecond -> Attosecond -> Attosecond
- :: Attosecond -> Attosecond -> Attosecond
$c* :: Attosecond -> Attosecond -> Attosecond
* :: Attosecond -> Attosecond -> Attosecond
$cnegate :: Attosecond -> Attosecond
negate :: Attosecond -> Attosecond
$cabs :: Attosecond -> Attosecond
abs :: Attosecond -> Attosecond
$csignum :: Attosecond -> Attosecond
signum :: Attosecond -> Attosecond
$cfromInteger :: Integer -> Attosecond
fromInteger :: Integer -> Attosecond
Num,Eq Attosecond
Eq Attosecond =>
(Attosecond -> Attosecond -> Ordering)
-> (Attosecond -> Attosecond -> Bool)
-> (Attosecond -> Attosecond -> Bool)
-> (Attosecond -> Attosecond -> Bool)
-> (Attosecond -> Attosecond -> Bool)
-> (Attosecond -> Attosecond -> Attosecond)
-> (Attosecond -> Attosecond -> Attosecond)
-> Ord Attosecond
Attosecond -> Attosecond -> Bool
Attosecond -> Attosecond -> Ordering
Attosecond -> Attosecond -> Attosecond
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Attosecond -> Attosecond -> Ordering
compare :: Attosecond -> Attosecond -> Ordering
$c< :: Attosecond -> Attosecond -> Bool
< :: Attosecond -> Attosecond -> Bool
$c<= :: Attosecond -> Attosecond -> Bool
<= :: Attosecond -> Attosecond -> Bool
$c> :: Attosecond -> Attosecond -> Bool
> :: Attosecond -> Attosecond -> Bool
$c>= :: Attosecond -> Attosecond -> Bool
>= :: Attosecond -> Attosecond -> Bool
$cmax :: Attosecond -> Attosecond -> Attosecond
max :: Attosecond -> Attosecond -> Attosecond
$cmin :: Attosecond -> Attosecond -> Attosecond
min :: Attosecond -> Attosecond -> Attosecond
Ord,Num Attosecond
Ord Attosecond
(Num Attosecond, Ord Attosecond) =>
(Attosecond -> Rational) -> Real Attosecond
Attosecond -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: Attosecond -> Rational
toRational :: Attosecond -> Rational
Real,Ord Attosecond
Ord Attosecond =>
((Attosecond, Attosecond) -> [Attosecond])
-> ((Attosecond, Attosecond) -> Attosecond -> Int)
-> ((Attosecond, Attosecond) -> Attosecond -> Int)
-> ((Attosecond, Attosecond) -> Attosecond -> Bool)
-> ((Attosecond, Attosecond) -> Int)
-> ((Attosecond, Attosecond) -> Int)
-> Ix Attosecond
(Attosecond, Attosecond) -> Int
(Attosecond, Attosecond) -> [Attosecond]
(Attosecond, Attosecond) -> Attosecond -> Bool
(Attosecond, Attosecond) -> Attosecond -> Int
forall a.
Ord a =>
((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
$crange :: (Attosecond, Attosecond) -> [Attosecond]
range :: (Attosecond, Attosecond) -> [Attosecond]
$cindex :: (Attosecond, Attosecond) -> Attosecond -> Int
index :: (Attosecond, Attosecond) -> Attosecond -> Int
$cunsafeIndex :: (Attosecond, Attosecond) -> Attosecond -> Int
unsafeIndex :: (Attosecond, Attosecond) -> Attosecond -> Int
$cinRange :: (Attosecond, Attosecond) -> Attosecond -> Bool
inRange :: (Attosecond, Attosecond) -> Attosecond -> Bool
$crangeSize :: (Attosecond, Attosecond) -> Int
rangeSize :: (Attosecond, Attosecond) -> Int
$cunsafeRangeSize :: (Attosecond, Attosecond) -> Int
unsafeRangeSize :: (Attosecond, Attosecond) -> Int
Ix,Typeable)

instance TimeUnit Attosecond where
  toMicroseconds :: Attosecond -> Integer
toMicroseconds (Attosecond Integer
x) = Integer
x Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
`div` (Integer
10 Integer -> Integer -> Integer
forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
12)
  fromMicroseconds :: Integer -> Attosecond
fromMicroseconds Integer
x            = Integer -> Attosecond
Attosecond (Integer
x Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
* (Integer
10 Integer -> Integer -> Integer
forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
12))
instance Show Attosecond where
  show :: Attosecond -> String
show (Attosecond Integer
x) = Integer -> String
forall a. Show a => a -> String
show Integer
x String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"as"
instance Read Attosecond where
  readsPrec :: Int -> ReadS Attosecond
readsPrec = (Integer -> Attosecond) -> String -> Int -> ReadS Attosecond
forall a.
(Integer -> a) -> String -> Int -> String -> [(a, String)]
readUnit Integer -> Attosecond
Attosecond String
"as"

readUnit :: (Integer -> a) -> String ->
            Int -> String ->
            [(a, String)]
readUnit :: forall a.
(Integer -> a) -> String -> Int -> String -> [(a, String)]
readUnit Integer -> a
builder String
unitstr Int
prec String
str = (Integer -> a) -> [(Integer, String)] -> [(a, String)]
forall a. (Integer -> a) -> [(Integer, String)] -> [(a, String)]
processItems Integer -> a
builder (Int -> ReadS Integer
forall a. Read a => Int -> ReadS a
readsPrec Int
prec String
str)
 where
  processItems :: (Integer -> a) -> [(Integer,String)] -> [(a,String)]
  processItems :: forall a. (Integer -> a) -> [(Integer, String)] -> [(a, String)]
processItems Integer -> a
builder  [] = []
  processItems Integer -> a
builder ((Integer
a,String
s):[(Integer, String)]
rest)
    | String
unitstr String -> String -> Bool
forall a. Eq a => [a] -> [a] -> Bool
`isPrefixOf` String
s =
           (Integer -> a
builder Integer
a, Int -> ShowS
forall a. Int -> [a] -> [a]
drop (String -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length String
unitstr) String
s) (a, String) -> [(a, String)] -> [(a, String)]
forall a. a -> [a] -> [a]
: ((Integer -> a) -> [(Integer, String)] -> [(a, String)]
forall a. (Integer -> a) -> [(Integer, String)] -> [(a, String)]
processItems Integer -> a
builder [(Integer, String)]
rest)
        | Bool
otherwise              =
           (Integer -> a) -> [(Integer, String)] -> [(a, String)]
forall a. (Integer -> a) -> [(Integer, String)] -> [(a, String)]
processItems Integer -> a
builder [(Integer, String)]
rest

--

newtype Femtosecond = Femtosecond Integer
 deriving (Int -> Femtosecond
Femtosecond -> Int
Femtosecond -> [Femtosecond]
Femtosecond -> Femtosecond
Femtosecond -> Femtosecond -> [Femtosecond]
Femtosecond -> Femtosecond -> Femtosecond -> [Femtosecond]
(Femtosecond -> Femtosecond)
-> (Femtosecond -> Femtosecond)
-> (Int -> Femtosecond)
-> (Femtosecond -> Int)
-> (Femtosecond -> [Femtosecond])
-> (Femtosecond -> Femtosecond -> [Femtosecond])
-> (Femtosecond -> Femtosecond -> [Femtosecond])
-> (Femtosecond -> Femtosecond -> Femtosecond -> [Femtosecond])
-> Enum Femtosecond
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: Femtosecond -> Femtosecond
succ :: Femtosecond -> Femtosecond
$cpred :: Femtosecond -> Femtosecond
pred :: Femtosecond -> Femtosecond
$ctoEnum :: Int -> Femtosecond
toEnum :: Int -> Femtosecond
$cfromEnum :: Femtosecond -> Int
fromEnum :: Femtosecond -> Int
$cenumFrom :: Femtosecond -> [Femtosecond]
enumFrom :: Femtosecond -> [Femtosecond]
$cenumFromThen :: Femtosecond -> Femtosecond -> [Femtosecond]
enumFromThen :: Femtosecond -> Femtosecond -> [Femtosecond]
$cenumFromTo :: Femtosecond -> Femtosecond -> [Femtosecond]
enumFromTo :: Femtosecond -> Femtosecond -> [Femtosecond]
$cenumFromThenTo :: Femtosecond -> Femtosecond -> Femtosecond -> [Femtosecond]
enumFromThenTo :: Femtosecond -> Femtosecond -> Femtosecond -> [Femtosecond]
Enum,Femtosecond -> Femtosecond -> Bool
(Femtosecond -> Femtosecond -> Bool)
-> (Femtosecond -> Femtosecond -> Bool) -> Eq Femtosecond
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Femtosecond -> Femtosecond -> Bool
== :: Femtosecond -> Femtosecond -> Bool
$c/= :: Femtosecond -> Femtosecond -> Bool
/= :: Femtosecond -> Femtosecond -> Bool
Eq,Enum Femtosecond
Real Femtosecond
(Real Femtosecond, Enum Femtosecond) =>
(Femtosecond -> Femtosecond -> Femtosecond)
-> (Femtosecond -> Femtosecond -> Femtosecond)
-> (Femtosecond -> Femtosecond -> Femtosecond)
-> (Femtosecond -> Femtosecond -> Femtosecond)
-> (Femtosecond -> Femtosecond -> (Femtosecond, Femtosecond))
-> (Femtosecond -> Femtosecond -> (Femtosecond, Femtosecond))
-> (Femtosecond -> Integer)
-> Integral Femtosecond
Femtosecond -> Integer
Femtosecond -> Femtosecond -> (Femtosecond, Femtosecond)
Femtosecond -> Femtosecond -> Femtosecond
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: Femtosecond -> Femtosecond -> Femtosecond
quot :: Femtosecond -> Femtosecond -> Femtosecond
$crem :: Femtosecond -> Femtosecond -> Femtosecond
rem :: Femtosecond -> Femtosecond -> Femtosecond
$cdiv :: Femtosecond -> Femtosecond -> Femtosecond
div :: Femtosecond -> Femtosecond -> Femtosecond
$cmod :: Femtosecond -> Femtosecond -> Femtosecond
mod :: Femtosecond -> Femtosecond -> Femtosecond
$cquotRem :: Femtosecond -> Femtosecond -> (Femtosecond, Femtosecond)
quotRem :: Femtosecond -> Femtosecond -> (Femtosecond, Femtosecond)
$cdivMod :: Femtosecond -> Femtosecond -> (Femtosecond, Femtosecond)
divMod :: Femtosecond -> Femtosecond -> (Femtosecond, Femtosecond)
$ctoInteger :: Femtosecond -> Integer
toInteger :: Femtosecond -> Integer
Integral,Typeable Femtosecond
Typeable Femtosecond =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Femtosecond -> c Femtosecond)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Femtosecond)
-> (Femtosecond -> Constr)
-> (Femtosecond -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Femtosecond))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Femtosecond))
-> ((forall b. Data b => b -> b) -> Femtosecond -> Femtosecond)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Femtosecond -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Femtosecond -> r)
-> (forall u. (forall d. Data d => d -> u) -> Femtosecond -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Femtosecond -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Femtosecond -> m Femtosecond)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Femtosecond -> m Femtosecond)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Femtosecond -> m Femtosecond)
-> Data Femtosecond
Femtosecond -> Constr
Femtosecond -> DataType
(forall b. Data b => b -> b) -> Femtosecond -> Femtosecond
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Femtosecond -> u
forall u. (forall d. Data d => d -> u) -> Femtosecond -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Femtosecond -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Femtosecond -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Femtosecond -> m Femtosecond
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Femtosecond -> m Femtosecond
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Femtosecond
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Femtosecond -> c Femtosecond
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Femtosecond)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Femtosecond)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Femtosecond -> c Femtosecond
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Femtosecond -> c Femtosecond
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Femtosecond
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Femtosecond
$ctoConstr :: Femtosecond -> Constr
toConstr :: Femtosecond -> Constr
$cdataTypeOf :: Femtosecond -> DataType
dataTypeOf :: Femtosecond -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Femtosecond)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Femtosecond)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Femtosecond)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Femtosecond)
$cgmapT :: (forall b. Data b => b -> b) -> Femtosecond -> Femtosecond
gmapT :: (forall b. Data b => b -> b) -> Femtosecond -> Femtosecond
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Femtosecond -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Femtosecond -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Femtosecond -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Femtosecond -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Femtosecond -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Femtosecond -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Femtosecond -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Femtosecond -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Femtosecond -> m Femtosecond
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Femtosecond -> m Femtosecond
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Femtosecond -> m Femtosecond
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Femtosecond -> m Femtosecond
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Femtosecond -> m Femtosecond
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Femtosecond -> m Femtosecond
Data,Integer -> Femtosecond
Femtosecond -> Femtosecond
Femtosecond -> Femtosecond -> Femtosecond
(Femtosecond -> Femtosecond -> Femtosecond)
-> (Femtosecond -> Femtosecond -> Femtosecond)
-> (Femtosecond -> Femtosecond -> Femtosecond)
-> (Femtosecond -> Femtosecond)
-> (Femtosecond -> Femtosecond)
-> (Femtosecond -> Femtosecond)
-> (Integer -> Femtosecond)
-> Num Femtosecond
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: Femtosecond -> Femtosecond -> Femtosecond
+ :: Femtosecond -> Femtosecond -> Femtosecond
$c- :: Femtosecond -> Femtosecond -> Femtosecond
- :: Femtosecond -> Femtosecond -> Femtosecond
$c* :: Femtosecond -> Femtosecond -> Femtosecond
* :: Femtosecond -> Femtosecond -> Femtosecond
$cnegate :: Femtosecond -> Femtosecond
negate :: Femtosecond -> Femtosecond
$cabs :: Femtosecond -> Femtosecond
abs :: Femtosecond -> Femtosecond
$csignum :: Femtosecond -> Femtosecond
signum :: Femtosecond -> Femtosecond
$cfromInteger :: Integer -> Femtosecond
fromInteger :: Integer -> Femtosecond
Num,Eq Femtosecond
Eq Femtosecond =>
(Femtosecond -> Femtosecond -> Ordering)
-> (Femtosecond -> Femtosecond -> Bool)
-> (Femtosecond -> Femtosecond -> Bool)
-> (Femtosecond -> Femtosecond -> Bool)
-> (Femtosecond -> Femtosecond -> Bool)
-> (Femtosecond -> Femtosecond -> Femtosecond)
-> (Femtosecond -> Femtosecond -> Femtosecond)
-> Ord Femtosecond
Femtosecond -> Femtosecond -> Bool
Femtosecond -> Femtosecond -> Ordering
Femtosecond -> Femtosecond -> Femtosecond
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Femtosecond -> Femtosecond -> Ordering
compare :: Femtosecond -> Femtosecond -> Ordering
$c< :: Femtosecond -> Femtosecond -> Bool
< :: Femtosecond -> Femtosecond -> Bool
$c<= :: Femtosecond -> Femtosecond -> Bool
<= :: Femtosecond -> Femtosecond -> Bool
$c> :: Femtosecond -> Femtosecond -> Bool
> :: Femtosecond -> Femtosecond -> Bool
$c>= :: Femtosecond -> Femtosecond -> Bool
>= :: Femtosecond -> Femtosecond -> Bool
$cmax :: Femtosecond -> Femtosecond -> Femtosecond
max :: Femtosecond -> Femtosecond -> Femtosecond
$cmin :: Femtosecond -> Femtosecond -> Femtosecond
min :: Femtosecond -> Femtosecond -> Femtosecond
Ord,Num Femtosecond
Ord Femtosecond
(Num Femtosecond, Ord Femtosecond) =>
(Femtosecond -> Rational) -> Real Femtosecond
Femtosecond -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: Femtosecond -> Rational
toRational :: Femtosecond -> Rational
Real,Ord Femtosecond
Ord Femtosecond =>
((Femtosecond, Femtosecond) -> [Femtosecond])
-> ((Femtosecond, Femtosecond) -> Femtosecond -> Int)
-> ((Femtosecond, Femtosecond) -> Femtosecond -> Int)
-> ((Femtosecond, Femtosecond) -> Femtosecond -> Bool)
-> ((Femtosecond, Femtosecond) -> Int)
-> ((Femtosecond, Femtosecond) -> Int)
-> Ix Femtosecond
(Femtosecond, Femtosecond) -> Int
(Femtosecond, Femtosecond) -> [Femtosecond]
(Femtosecond, Femtosecond) -> Femtosecond -> Bool
(Femtosecond, Femtosecond) -> Femtosecond -> Int
forall a.
Ord a =>
((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
$crange :: (Femtosecond, Femtosecond) -> [Femtosecond]
range :: (Femtosecond, Femtosecond) -> [Femtosecond]
$cindex :: (Femtosecond, Femtosecond) -> Femtosecond -> Int
index :: (Femtosecond, Femtosecond) -> Femtosecond -> Int
$cunsafeIndex :: (Femtosecond, Femtosecond) -> Femtosecond -> Int
unsafeIndex :: (Femtosecond, Femtosecond) -> Femtosecond -> Int
$cinRange :: (Femtosecond, Femtosecond) -> Femtosecond -> Bool
inRange :: (Femtosecond, Femtosecond) -> Femtosecond -> Bool
$crangeSize :: (Femtosecond, Femtosecond) -> Int
rangeSize :: (Femtosecond, Femtosecond) -> Int
$cunsafeRangeSize :: (Femtosecond, Femtosecond) -> Int
unsafeRangeSize :: (Femtosecond, Femtosecond) -> Int
Ix,Typeable)

instance TimeUnit Femtosecond where
  toMicroseconds :: Femtosecond -> Integer
toMicroseconds (Femtosecond Integer
x) = Integer
x Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
`div` (Integer
10 Integer -> Integer -> Integer
forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
9)
  fromMicroseconds :: Integer -> Femtosecond
fromMicroseconds Integer
x             = Integer -> Femtosecond
Femtosecond (Integer
x Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
* (Integer
10 Integer -> Integer -> Integer
forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
9))
instance Show Femtosecond where
  show :: Femtosecond -> String
show (Femtosecond Integer
x) = Integer -> String
forall a. Show a => a -> String
show Integer
x String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"fs"
instance Read Femtosecond where
  readsPrec :: Int -> ReadS Femtosecond
readsPrec = (Integer -> Femtosecond) -> String -> Int -> ReadS Femtosecond
forall a.
(Integer -> a) -> String -> Int -> String -> [(a, String)]
readUnit Integer -> Femtosecond
Femtosecond String
"fs"

--

newtype Picosecond  = Picosecond  Integer
 deriving (Int -> Picosecond
Picosecond -> Int
Picosecond -> [Picosecond]
Picosecond -> Picosecond
Picosecond -> Picosecond -> [Picosecond]
Picosecond -> Picosecond -> Picosecond -> [Picosecond]
(Picosecond -> Picosecond)
-> (Picosecond -> Picosecond)
-> (Int -> Picosecond)
-> (Picosecond -> Int)
-> (Picosecond -> [Picosecond])
-> (Picosecond -> Picosecond -> [Picosecond])
-> (Picosecond -> Picosecond -> [Picosecond])
-> (Picosecond -> Picosecond -> Picosecond -> [Picosecond])
-> Enum Picosecond
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: Picosecond -> Picosecond
succ :: Picosecond -> Picosecond
$cpred :: Picosecond -> Picosecond
pred :: Picosecond -> Picosecond
$ctoEnum :: Int -> Picosecond
toEnum :: Int -> Picosecond
$cfromEnum :: Picosecond -> Int
fromEnum :: Picosecond -> Int
$cenumFrom :: Picosecond -> [Picosecond]
enumFrom :: Picosecond -> [Picosecond]
$cenumFromThen :: Picosecond -> Picosecond -> [Picosecond]
enumFromThen :: Picosecond -> Picosecond -> [Picosecond]
$cenumFromTo :: Picosecond -> Picosecond -> [Picosecond]
enumFromTo :: Picosecond -> Picosecond -> [Picosecond]
$cenumFromThenTo :: Picosecond -> Picosecond -> Picosecond -> [Picosecond]
enumFromThenTo :: Picosecond -> Picosecond -> Picosecond -> [Picosecond]
Enum,Picosecond -> Picosecond -> Bool
(Picosecond -> Picosecond -> Bool)
-> (Picosecond -> Picosecond -> Bool) -> Eq Picosecond
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Picosecond -> Picosecond -> Bool
== :: Picosecond -> Picosecond -> Bool
$c/= :: Picosecond -> Picosecond -> Bool
/= :: Picosecond -> Picosecond -> Bool
Eq,Enum Picosecond
Real Picosecond
(Real Picosecond, Enum Picosecond) =>
(Picosecond -> Picosecond -> Picosecond)
-> (Picosecond -> Picosecond -> Picosecond)
-> (Picosecond -> Picosecond -> Picosecond)
-> (Picosecond -> Picosecond -> Picosecond)
-> (Picosecond -> Picosecond -> (Picosecond, Picosecond))
-> (Picosecond -> Picosecond -> (Picosecond, Picosecond))
-> (Picosecond -> Integer)
-> Integral Picosecond
Picosecond -> Integer
Picosecond -> Picosecond -> (Picosecond, Picosecond)
Picosecond -> Picosecond -> Picosecond
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: Picosecond -> Picosecond -> Picosecond
quot :: Picosecond -> Picosecond -> Picosecond
$crem :: Picosecond -> Picosecond -> Picosecond
rem :: Picosecond -> Picosecond -> Picosecond
$cdiv :: Picosecond -> Picosecond -> Picosecond
div :: Picosecond -> Picosecond -> Picosecond
$cmod :: Picosecond -> Picosecond -> Picosecond
mod :: Picosecond -> Picosecond -> Picosecond
$cquotRem :: Picosecond -> Picosecond -> (Picosecond, Picosecond)
quotRem :: Picosecond -> Picosecond -> (Picosecond, Picosecond)
$cdivMod :: Picosecond -> Picosecond -> (Picosecond, Picosecond)
divMod :: Picosecond -> Picosecond -> (Picosecond, Picosecond)
$ctoInteger :: Picosecond -> Integer
toInteger :: Picosecond -> Integer
Integral,Typeable Picosecond
Typeable Picosecond =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Picosecond -> c Picosecond)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Picosecond)
-> (Picosecond -> Constr)
-> (Picosecond -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Picosecond))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Picosecond))
-> ((forall b. Data b => b -> b) -> Picosecond -> Picosecond)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Picosecond -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Picosecond -> r)
-> (forall u. (forall d. Data d => d -> u) -> Picosecond -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Picosecond -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Picosecond -> m Picosecond)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Picosecond -> m Picosecond)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Picosecond -> m Picosecond)
-> Data Picosecond
Picosecond -> Constr
Picosecond -> DataType
(forall b. Data b => b -> b) -> Picosecond -> Picosecond
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Picosecond -> u
forall u. (forall d. Data d => d -> u) -> Picosecond -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Picosecond -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Picosecond -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Picosecond -> m Picosecond
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Picosecond -> m Picosecond
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Picosecond
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Picosecond -> c Picosecond
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Picosecond)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Picosecond)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Picosecond -> c Picosecond
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Picosecond -> c Picosecond
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Picosecond
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Picosecond
$ctoConstr :: Picosecond -> Constr
toConstr :: Picosecond -> Constr
$cdataTypeOf :: Picosecond -> DataType
dataTypeOf :: Picosecond -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Picosecond)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Picosecond)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Picosecond)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Picosecond)
$cgmapT :: (forall b. Data b => b -> b) -> Picosecond -> Picosecond
gmapT :: (forall b. Data b => b -> b) -> Picosecond -> Picosecond
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Picosecond -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Picosecond -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Picosecond -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Picosecond -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Picosecond -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Picosecond -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Picosecond -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Picosecond -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Picosecond -> m Picosecond
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Picosecond -> m Picosecond
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Picosecond -> m Picosecond
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Picosecond -> m Picosecond
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Picosecond -> m Picosecond
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Picosecond -> m Picosecond
Data,Integer -> Picosecond
Picosecond -> Picosecond
Picosecond -> Picosecond -> Picosecond
(Picosecond -> Picosecond -> Picosecond)
-> (Picosecond -> Picosecond -> Picosecond)
-> (Picosecond -> Picosecond -> Picosecond)
-> (Picosecond -> Picosecond)
-> (Picosecond -> Picosecond)
-> (Picosecond -> Picosecond)
-> (Integer -> Picosecond)
-> Num Picosecond
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: Picosecond -> Picosecond -> Picosecond
+ :: Picosecond -> Picosecond -> Picosecond
$c- :: Picosecond -> Picosecond -> Picosecond
- :: Picosecond -> Picosecond -> Picosecond
$c* :: Picosecond -> Picosecond -> Picosecond
* :: Picosecond -> Picosecond -> Picosecond
$cnegate :: Picosecond -> Picosecond
negate :: Picosecond -> Picosecond
$cabs :: Picosecond -> Picosecond
abs :: Picosecond -> Picosecond
$csignum :: Picosecond -> Picosecond
signum :: Picosecond -> Picosecond
$cfromInteger :: Integer -> Picosecond
fromInteger :: Integer -> Picosecond
Num,Eq Picosecond
Eq Picosecond =>
(Picosecond -> Picosecond -> Ordering)
-> (Picosecond -> Picosecond -> Bool)
-> (Picosecond -> Picosecond -> Bool)
-> (Picosecond -> Picosecond -> Bool)
-> (Picosecond -> Picosecond -> Bool)
-> (Picosecond -> Picosecond -> Picosecond)
-> (Picosecond -> Picosecond -> Picosecond)
-> Ord Picosecond
Picosecond -> Picosecond -> Bool
Picosecond -> Picosecond -> Ordering
Picosecond -> Picosecond -> Picosecond
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Picosecond -> Picosecond -> Ordering
compare :: Picosecond -> Picosecond -> Ordering
$c< :: Picosecond -> Picosecond -> Bool
< :: Picosecond -> Picosecond -> Bool
$c<= :: Picosecond -> Picosecond -> Bool
<= :: Picosecond -> Picosecond -> Bool
$c> :: Picosecond -> Picosecond -> Bool
> :: Picosecond -> Picosecond -> Bool
$c>= :: Picosecond -> Picosecond -> Bool
>= :: Picosecond -> Picosecond -> Bool
$cmax :: Picosecond -> Picosecond -> Picosecond
max :: Picosecond -> Picosecond -> Picosecond
$cmin :: Picosecond -> Picosecond -> Picosecond
min :: Picosecond -> Picosecond -> Picosecond
Ord,Num Picosecond
Ord Picosecond
(Num Picosecond, Ord Picosecond) =>
(Picosecond -> Rational) -> Real Picosecond
Picosecond -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: Picosecond -> Rational
toRational :: Picosecond -> Rational
Real,Ord Picosecond
Ord Picosecond =>
((Picosecond, Picosecond) -> [Picosecond])
-> ((Picosecond, Picosecond) -> Picosecond -> Int)
-> ((Picosecond, Picosecond) -> Picosecond -> Int)
-> ((Picosecond, Picosecond) -> Picosecond -> Bool)
-> ((Picosecond, Picosecond) -> Int)
-> ((Picosecond, Picosecond) -> Int)
-> Ix Picosecond
(Picosecond, Picosecond) -> Int
(Picosecond, Picosecond) -> [Picosecond]
(Picosecond, Picosecond) -> Picosecond -> Bool
(Picosecond, Picosecond) -> Picosecond -> Int
forall a.
Ord a =>
((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
$crange :: (Picosecond, Picosecond) -> [Picosecond]
range :: (Picosecond, Picosecond) -> [Picosecond]
$cindex :: (Picosecond, Picosecond) -> Picosecond -> Int
index :: (Picosecond, Picosecond) -> Picosecond -> Int
$cunsafeIndex :: (Picosecond, Picosecond) -> Picosecond -> Int
unsafeIndex :: (Picosecond, Picosecond) -> Picosecond -> Int
$cinRange :: (Picosecond, Picosecond) -> Picosecond -> Bool
inRange :: (Picosecond, Picosecond) -> Picosecond -> Bool
$crangeSize :: (Picosecond, Picosecond) -> Int
rangeSize :: (Picosecond, Picosecond) -> Int
$cunsafeRangeSize :: (Picosecond, Picosecond) -> Int
unsafeRangeSize :: (Picosecond, Picosecond) -> Int
Ix,Typeable)

instance TimeUnit Picosecond where
  toMicroseconds :: Picosecond -> Integer
toMicroseconds (Picosecond Integer
x) = Integer
x Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
`div` (Integer
10 Integer -> Integer -> Integer
forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
6)
  fromMicroseconds :: Integer -> Picosecond
fromMicroseconds Integer
x            = Integer -> Picosecond
Picosecond (Integer
x Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
* (Integer
10 Integer -> Integer -> Integer
forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
6))
instance Show Picosecond where
  show :: Picosecond -> String
show (Picosecond Integer
x) = Integer -> String
forall a. Show a => a -> String
show Integer
x String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"ps"
instance Read Picosecond where
  readsPrec :: Int -> ReadS Picosecond
readsPrec = (Integer -> Picosecond) -> String -> Int -> ReadS Picosecond
forall a.
(Integer -> a) -> String -> Int -> String -> [(a, String)]
readUnit Integer -> Picosecond
Picosecond String
"ps"

--

newtype Nanosecond  = Nanosecond  Integer
 deriving (Int -> Nanosecond
Nanosecond -> Int
Nanosecond -> [Nanosecond]
Nanosecond -> Nanosecond
Nanosecond -> Nanosecond -> [Nanosecond]
Nanosecond -> Nanosecond -> Nanosecond -> [Nanosecond]
(Nanosecond -> Nanosecond)
-> (Nanosecond -> Nanosecond)
-> (Int -> Nanosecond)
-> (Nanosecond -> Int)
-> (Nanosecond -> [Nanosecond])
-> (Nanosecond -> Nanosecond -> [Nanosecond])
-> (Nanosecond -> Nanosecond -> [Nanosecond])
-> (Nanosecond -> Nanosecond -> Nanosecond -> [Nanosecond])
-> Enum Nanosecond
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: Nanosecond -> Nanosecond
succ :: Nanosecond -> Nanosecond
$cpred :: Nanosecond -> Nanosecond
pred :: Nanosecond -> Nanosecond
$ctoEnum :: Int -> Nanosecond
toEnum :: Int -> Nanosecond
$cfromEnum :: Nanosecond -> Int
fromEnum :: Nanosecond -> Int
$cenumFrom :: Nanosecond -> [Nanosecond]
enumFrom :: Nanosecond -> [Nanosecond]
$cenumFromThen :: Nanosecond -> Nanosecond -> [Nanosecond]
enumFromThen :: Nanosecond -> Nanosecond -> [Nanosecond]
$cenumFromTo :: Nanosecond -> Nanosecond -> [Nanosecond]
enumFromTo :: Nanosecond -> Nanosecond -> [Nanosecond]
$cenumFromThenTo :: Nanosecond -> Nanosecond -> Nanosecond -> [Nanosecond]
enumFromThenTo :: Nanosecond -> Nanosecond -> Nanosecond -> [Nanosecond]
Enum,Nanosecond -> Nanosecond -> Bool
(Nanosecond -> Nanosecond -> Bool)
-> (Nanosecond -> Nanosecond -> Bool) -> Eq Nanosecond
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Nanosecond -> Nanosecond -> Bool
== :: Nanosecond -> Nanosecond -> Bool
$c/= :: Nanosecond -> Nanosecond -> Bool
/= :: Nanosecond -> Nanosecond -> Bool
Eq,Enum Nanosecond
Real Nanosecond
(Real Nanosecond, Enum Nanosecond) =>
(Nanosecond -> Nanosecond -> Nanosecond)
-> (Nanosecond -> Nanosecond -> Nanosecond)
-> (Nanosecond -> Nanosecond -> Nanosecond)
-> (Nanosecond -> Nanosecond -> Nanosecond)
-> (Nanosecond -> Nanosecond -> (Nanosecond, Nanosecond))
-> (Nanosecond -> Nanosecond -> (Nanosecond, Nanosecond))
-> (Nanosecond -> Integer)
-> Integral Nanosecond
Nanosecond -> Integer
Nanosecond -> Nanosecond -> (Nanosecond, Nanosecond)
Nanosecond -> Nanosecond -> Nanosecond
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: Nanosecond -> Nanosecond -> Nanosecond
quot :: Nanosecond -> Nanosecond -> Nanosecond
$crem :: Nanosecond -> Nanosecond -> Nanosecond
rem :: Nanosecond -> Nanosecond -> Nanosecond
$cdiv :: Nanosecond -> Nanosecond -> Nanosecond
div :: Nanosecond -> Nanosecond -> Nanosecond
$cmod :: Nanosecond -> Nanosecond -> Nanosecond
mod :: Nanosecond -> Nanosecond -> Nanosecond
$cquotRem :: Nanosecond -> Nanosecond -> (Nanosecond, Nanosecond)
quotRem :: Nanosecond -> Nanosecond -> (Nanosecond, Nanosecond)
$cdivMod :: Nanosecond -> Nanosecond -> (Nanosecond, Nanosecond)
divMod :: Nanosecond -> Nanosecond -> (Nanosecond, Nanosecond)
$ctoInteger :: Nanosecond -> Integer
toInteger :: Nanosecond -> Integer
Integral,Typeable Nanosecond
Typeable Nanosecond =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Nanosecond -> c Nanosecond)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Nanosecond)
-> (Nanosecond -> Constr)
-> (Nanosecond -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Nanosecond))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Nanosecond))
-> ((forall b. Data b => b -> b) -> Nanosecond -> Nanosecond)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Nanosecond -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Nanosecond -> r)
-> (forall u. (forall d. Data d => d -> u) -> Nanosecond -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Nanosecond -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Nanosecond -> m Nanosecond)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Nanosecond -> m Nanosecond)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Nanosecond -> m Nanosecond)
-> Data Nanosecond
Nanosecond -> Constr
Nanosecond -> DataType
(forall b. Data b => b -> b) -> Nanosecond -> Nanosecond
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Nanosecond -> u
forall u. (forall d. Data d => d -> u) -> Nanosecond -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Nanosecond -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Nanosecond -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Nanosecond -> m Nanosecond
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Nanosecond -> m Nanosecond
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Nanosecond
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Nanosecond -> c Nanosecond
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Nanosecond)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Nanosecond)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Nanosecond -> c Nanosecond
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Nanosecond -> c Nanosecond
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Nanosecond
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Nanosecond
$ctoConstr :: Nanosecond -> Constr
toConstr :: Nanosecond -> Constr
$cdataTypeOf :: Nanosecond -> DataType
dataTypeOf :: Nanosecond -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Nanosecond)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Nanosecond)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Nanosecond)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Nanosecond)
$cgmapT :: (forall b. Data b => b -> b) -> Nanosecond -> Nanosecond
gmapT :: (forall b. Data b => b -> b) -> Nanosecond -> Nanosecond
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Nanosecond -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Nanosecond -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Nanosecond -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Nanosecond -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Nanosecond -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Nanosecond -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Nanosecond -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Nanosecond -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Nanosecond -> m Nanosecond
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Nanosecond -> m Nanosecond
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Nanosecond -> m Nanosecond
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Nanosecond -> m Nanosecond
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Nanosecond -> m Nanosecond
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Nanosecond -> m Nanosecond
Data,Integer -> Nanosecond
Nanosecond -> Nanosecond
Nanosecond -> Nanosecond -> Nanosecond
(Nanosecond -> Nanosecond -> Nanosecond)
-> (Nanosecond -> Nanosecond -> Nanosecond)
-> (Nanosecond -> Nanosecond -> Nanosecond)
-> (Nanosecond -> Nanosecond)
-> (Nanosecond -> Nanosecond)
-> (Nanosecond -> Nanosecond)
-> (Integer -> Nanosecond)
-> Num Nanosecond
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: Nanosecond -> Nanosecond -> Nanosecond
+ :: Nanosecond -> Nanosecond -> Nanosecond
$c- :: Nanosecond -> Nanosecond -> Nanosecond
- :: Nanosecond -> Nanosecond -> Nanosecond
$c* :: Nanosecond -> Nanosecond -> Nanosecond
* :: Nanosecond -> Nanosecond -> Nanosecond
$cnegate :: Nanosecond -> Nanosecond
negate :: Nanosecond -> Nanosecond
$cabs :: Nanosecond -> Nanosecond
abs :: Nanosecond -> Nanosecond
$csignum :: Nanosecond -> Nanosecond
signum :: Nanosecond -> Nanosecond
$cfromInteger :: Integer -> Nanosecond
fromInteger :: Integer -> Nanosecond
Num,Eq Nanosecond
Eq Nanosecond =>
(Nanosecond -> Nanosecond -> Ordering)
-> (Nanosecond -> Nanosecond -> Bool)
-> (Nanosecond -> Nanosecond -> Bool)
-> (Nanosecond -> Nanosecond -> Bool)
-> (Nanosecond -> Nanosecond -> Bool)
-> (Nanosecond -> Nanosecond -> Nanosecond)
-> (Nanosecond -> Nanosecond -> Nanosecond)
-> Ord Nanosecond
Nanosecond -> Nanosecond -> Bool
Nanosecond -> Nanosecond -> Ordering
Nanosecond -> Nanosecond -> Nanosecond
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Nanosecond -> Nanosecond -> Ordering
compare :: Nanosecond -> Nanosecond -> Ordering
$c< :: Nanosecond -> Nanosecond -> Bool
< :: Nanosecond -> Nanosecond -> Bool
$c<= :: Nanosecond -> Nanosecond -> Bool
<= :: Nanosecond -> Nanosecond -> Bool
$c> :: Nanosecond -> Nanosecond -> Bool
> :: Nanosecond -> Nanosecond -> Bool
$c>= :: Nanosecond -> Nanosecond -> Bool
>= :: Nanosecond -> Nanosecond -> Bool
$cmax :: Nanosecond -> Nanosecond -> Nanosecond
max :: Nanosecond -> Nanosecond -> Nanosecond
$cmin :: Nanosecond -> Nanosecond -> Nanosecond
min :: Nanosecond -> Nanosecond -> Nanosecond
Ord,Num Nanosecond
Ord Nanosecond
(Num Nanosecond, Ord Nanosecond) =>
(Nanosecond -> Rational) -> Real Nanosecond
Nanosecond -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: Nanosecond -> Rational
toRational :: Nanosecond -> Rational
Real,Ord Nanosecond
Ord Nanosecond =>
((Nanosecond, Nanosecond) -> [Nanosecond])
-> ((Nanosecond, Nanosecond) -> Nanosecond -> Int)
-> ((Nanosecond, Nanosecond) -> Nanosecond -> Int)
-> ((Nanosecond, Nanosecond) -> Nanosecond -> Bool)
-> ((Nanosecond, Nanosecond) -> Int)
-> ((Nanosecond, Nanosecond) -> Int)
-> Ix Nanosecond
(Nanosecond, Nanosecond) -> Int
(Nanosecond, Nanosecond) -> [Nanosecond]
(Nanosecond, Nanosecond) -> Nanosecond -> Bool
(Nanosecond, Nanosecond) -> Nanosecond -> Int
forall a.
Ord a =>
((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
$crange :: (Nanosecond, Nanosecond) -> [Nanosecond]
range :: (Nanosecond, Nanosecond) -> [Nanosecond]
$cindex :: (Nanosecond, Nanosecond) -> Nanosecond -> Int
index :: (Nanosecond, Nanosecond) -> Nanosecond -> Int
$cunsafeIndex :: (Nanosecond, Nanosecond) -> Nanosecond -> Int
unsafeIndex :: (Nanosecond, Nanosecond) -> Nanosecond -> Int
$cinRange :: (Nanosecond, Nanosecond) -> Nanosecond -> Bool
inRange :: (Nanosecond, Nanosecond) -> Nanosecond -> Bool
$crangeSize :: (Nanosecond, Nanosecond) -> Int
rangeSize :: (Nanosecond, Nanosecond) -> Int
$cunsafeRangeSize :: (Nanosecond, Nanosecond) -> Int
unsafeRangeSize :: (Nanosecond, Nanosecond) -> Int
Ix,Typeable)

instance TimeUnit Nanosecond where
  toMicroseconds :: Nanosecond -> Integer
toMicroseconds (Nanosecond Integer
x) = Integer
x Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
`div` (Integer
10 Integer -> Integer -> Integer
forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
3)
  fromMicroseconds :: Integer -> Nanosecond
fromMicroseconds Integer
x            = Integer -> Nanosecond
Nanosecond (Integer
x Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
* (Integer
10 Integer -> Integer -> Integer
forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
3))
instance Show Nanosecond where
  show :: Nanosecond -> String
show (Nanosecond Integer
x) = Integer -> String
forall a. Show a => a -> String
show Integer
x String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"ns"
instance Read Nanosecond where
  readsPrec :: Int -> ReadS Nanosecond
readsPrec = (Integer -> Nanosecond) -> String -> Int -> ReadS Nanosecond
forall a.
(Integer -> a) -> String -> Int -> String -> [(a, String)]
readUnit Integer -> Nanosecond
Nanosecond String
"ns"

--

newtype Microsecond = Microsecond Integer
 deriving (Int -> Microsecond
Microsecond -> Int
Microsecond -> [Microsecond]
Microsecond -> Microsecond
Microsecond -> Microsecond -> [Microsecond]
Microsecond -> Microsecond -> Microsecond -> [Microsecond]
(Microsecond -> Microsecond)
-> (Microsecond -> Microsecond)
-> (Int -> Microsecond)
-> (Microsecond -> Int)
-> (Microsecond -> [Microsecond])
-> (Microsecond -> Microsecond -> [Microsecond])
-> (Microsecond -> Microsecond -> [Microsecond])
-> (Microsecond -> Microsecond -> Microsecond -> [Microsecond])
-> Enum Microsecond
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: Microsecond -> Microsecond
succ :: Microsecond -> Microsecond
$cpred :: Microsecond -> Microsecond
pred :: Microsecond -> Microsecond
$ctoEnum :: Int -> Microsecond
toEnum :: Int -> Microsecond
$cfromEnum :: Microsecond -> Int
fromEnum :: Microsecond -> Int
$cenumFrom :: Microsecond -> [Microsecond]
enumFrom :: Microsecond -> [Microsecond]
$cenumFromThen :: Microsecond -> Microsecond -> [Microsecond]
enumFromThen :: Microsecond -> Microsecond -> [Microsecond]
$cenumFromTo :: Microsecond -> Microsecond -> [Microsecond]
enumFromTo :: Microsecond -> Microsecond -> [Microsecond]
$cenumFromThenTo :: Microsecond -> Microsecond -> Microsecond -> [Microsecond]
enumFromThenTo :: Microsecond -> Microsecond -> Microsecond -> [Microsecond]
Enum,Microsecond -> Microsecond -> Bool
(Microsecond -> Microsecond -> Bool)
-> (Microsecond -> Microsecond -> Bool) -> Eq Microsecond
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Microsecond -> Microsecond -> Bool
== :: Microsecond -> Microsecond -> Bool
$c/= :: Microsecond -> Microsecond -> Bool
/= :: Microsecond -> Microsecond -> Bool
Eq,Enum Microsecond
Real Microsecond
(Real Microsecond, Enum Microsecond) =>
(Microsecond -> Microsecond -> Microsecond)
-> (Microsecond -> Microsecond -> Microsecond)
-> (Microsecond -> Microsecond -> Microsecond)
-> (Microsecond -> Microsecond -> Microsecond)
-> (Microsecond -> Microsecond -> (Microsecond, Microsecond))
-> (Microsecond -> Microsecond -> (Microsecond, Microsecond))
-> (Microsecond -> Integer)
-> Integral Microsecond
Microsecond -> Integer
Microsecond -> Microsecond -> (Microsecond, Microsecond)
Microsecond -> Microsecond -> Microsecond
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: Microsecond -> Microsecond -> Microsecond
quot :: Microsecond -> Microsecond -> Microsecond
$crem :: Microsecond -> Microsecond -> Microsecond
rem :: Microsecond -> Microsecond -> Microsecond
$cdiv :: Microsecond -> Microsecond -> Microsecond
div :: Microsecond -> Microsecond -> Microsecond
$cmod :: Microsecond -> Microsecond -> Microsecond
mod :: Microsecond -> Microsecond -> Microsecond
$cquotRem :: Microsecond -> Microsecond -> (Microsecond, Microsecond)
quotRem :: Microsecond -> Microsecond -> (Microsecond, Microsecond)
$cdivMod :: Microsecond -> Microsecond -> (Microsecond, Microsecond)
divMod :: Microsecond -> Microsecond -> (Microsecond, Microsecond)
$ctoInteger :: Microsecond -> Integer
toInteger :: Microsecond -> Integer
Integral,Typeable Microsecond
Typeable Microsecond =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Microsecond -> c Microsecond)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Microsecond)
-> (Microsecond -> Constr)
-> (Microsecond -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Microsecond))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Microsecond))
-> ((forall b. Data b => b -> b) -> Microsecond -> Microsecond)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Microsecond -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Microsecond -> r)
-> (forall u. (forall d. Data d => d -> u) -> Microsecond -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Microsecond -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Microsecond -> m Microsecond)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Microsecond -> m Microsecond)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Microsecond -> m Microsecond)
-> Data Microsecond
Microsecond -> Constr
Microsecond -> DataType
(forall b. Data b => b -> b) -> Microsecond -> Microsecond
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Microsecond -> u
forall u. (forall d. Data d => d -> u) -> Microsecond -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Microsecond -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Microsecond -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Microsecond -> m Microsecond
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Microsecond -> m Microsecond
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Microsecond
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Microsecond -> c Microsecond
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Microsecond)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Microsecond)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Microsecond -> c Microsecond
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Microsecond -> c Microsecond
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Microsecond
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Microsecond
$ctoConstr :: Microsecond -> Constr
toConstr :: Microsecond -> Constr
$cdataTypeOf :: Microsecond -> DataType
dataTypeOf :: Microsecond -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Microsecond)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Microsecond)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Microsecond)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Microsecond)
$cgmapT :: (forall b. Data b => b -> b) -> Microsecond -> Microsecond
gmapT :: (forall b. Data b => b -> b) -> Microsecond -> Microsecond
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Microsecond -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Microsecond -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Microsecond -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Microsecond -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Microsecond -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Microsecond -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Microsecond -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Microsecond -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Microsecond -> m Microsecond
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Microsecond -> m Microsecond
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Microsecond -> m Microsecond
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Microsecond -> m Microsecond
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Microsecond -> m Microsecond
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Microsecond -> m Microsecond
Data,Integer -> Microsecond
Microsecond -> Microsecond
Microsecond -> Microsecond -> Microsecond
(Microsecond -> Microsecond -> Microsecond)
-> (Microsecond -> Microsecond -> Microsecond)
-> (Microsecond -> Microsecond -> Microsecond)
-> (Microsecond -> Microsecond)
-> (Microsecond -> Microsecond)
-> (Microsecond -> Microsecond)
-> (Integer -> Microsecond)
-> Num Microsecond
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: Microsecond -> Microsecond -> Microsecond
+ :: Microsecond -> Microsecond -> Microsecond
$c- :: Microsecond -> Microsecond -> Microsecond
- :: Microsecond -> Microsecond -> Microsecond
$c* :: Microsecond -> Microsecond -> Microsecond
* :: Microsecond -> Microsecond -> Microsecond
$cnegate :: Microsecond -> Microsecond
negate :: Microsecond -> Microsecond
$cabs :: Microsecond -> Microsecond
abs :: Microsecond -> Microsecond
$csignum :: Microsecond -> Microsecond
signum :: Microsecond -> Microsecond
$cfromInteger :: Integer -> Microsecond
fromInteger :: Integer -> Microsecond
Num,Eq Microsecond
Eq Microsecond =>
(Microsecond -> Microsecond -> Ordering)
-> (Microsecond -> Microsecond -> Bool)
-> (Microsecond -> Microsecond -> Bool)
-> (Microsecond -> Microsecond -> Bool)
-> (Microsecond -> Microsecond -> Bool)
-> (Microsecond -> Microsecond -> Microsecond)
-> (Microsecond -> Microsecond -> Microsecond)
-> Ord Microsecond
Microsecond -> Microsecond -> Bool
Microsecond -> Microsecond -> Ordering
Microsecond -> Microsecond -> Microsecond
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Microsecond -> Microsecond -> Ordering
compare :: Microsecond -> Microsecond -> Ordering
$c< :: Microsecond -> Microsecond -> Bool
< :: Microsecond -> Microsecond -> Bool
$c<= :: Microsecond -> Microsecond -> Bool
<= :: Microsecond -> Microsecond -> Bool
$c> :: Microsecond -> Microsecond -> Bool
> :: Microsecond -> Microsecond -> Bool
$c>= :: Microsecond -> Microsecond -> Bool
>= :: Microsecond -> Microsecond -> Bool
$cmax :: Microsecond -> Microsecond -> Microsecond
max :: Microsecond -> Microsecond -> Microsecond
$cmin :: Microsecond -> Microsecond -> Microsecond
min :: Microsecond -> Microsecond -> Microsecond
Ord,Num Microsecond
Ord Microsecond
(Num Microsecond, Ord Microsecond) =>
(Microsecond -> Rational) -> Real Microsecond
Microsecond -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: Microsecond -> Rational
toRational :: Microsecond -> Rational
Real,Ord Microsecond
Ord Microsecond =>
((Microsecond, Microsecond) -> [Microsecond])
-> ((Microsecond, Microsecond) -> Microsecond -> Int)
-> ((Microsecond, Microsecond) -> Microsecond -> Int)
-> ((Microsecond, Microsecond) -> Microsecond -> Bool)
-> ((Microsecond, Microsecond) -> Int)
-> ((Microsecond, Microsecond) -> Int)
-> Ix Microsecond
(Microsecond, Microsecond) -> Int
(Microsecond, Microsecond) -> [Microsecond]
(Microsecond, Microsecond) -> Microsecond -> Bool
(Microsecond, Microsecond) -> Microsecond -> Int
forall a.
Ord a =>
((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
$crange :: (Microsecond, Microsecond) -> [Microsecond]
range :: (Microsecond, Microsecond) -> [Microsecond]
$cindex :: (Microsecond, Microsecond) -> Microsecond -> Int
index :: (Microsecond, Microsecond) -> Microsecond -> Int
$cunsafeIndex :: (Microsecond, Microsecond) -> Microsecond -> Int
unsafeIndex :: (Microsecond, Microsecond) -> Microsecond -> Int
$cinRange :: (Microsecond, Microsecond) -> Microsecond -> Bool
inRange :: (Microsecond, Microsecond) -> Microsecond -> Bool
$crangeSize :: (Microsecond, Microsecond) -> Int
rangeSize :: (Microsecond, Microsecond) -> Int
$cunsafeRangeSize :: (Microsecond, Microsecond) -> Int
unsafeRangeSize :: (Microsecond, Microsecond) -> Int
Ix,Typeable)

instance TimeUnit Microsecond where
  toMicroseconds :: Microsecond -> Integer
toMicroseconds (Microsecond Integer
x) = Integer
x
  fromMicroseconds :: Integer -> Microsecond
fromMicroseconds Integer
x             = Integer -> Microsecond
Microsecond Integer
x
instance Show Microsecond where
  show :: Microsecond -> String
show (Microsecond Integer
x) = Integer -> String
forall a. Show a => a -> String
show Integer
x String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"µs"
instance Read Microsecond where
  readsPrec :: Int -> ReadS Microsecond
readsPrec = (Integer -> Microsecond) -> String -> Int -> ReadS Microsecond
forall a.
(Integer -> a) -> String -> Int -> String -> [(a, String)]
readUnit Integer -> Microsecond
Microsecond String
"µs"

--

newtype Millisecond  = Millisecond  Integer
 deriving (Int -> Millisecond
Millisecond -> Int
Millisecond -> [Millisecond]
Millisecond -> Millisecond
Millisecond -> Millisecond -> [Millisecond]
Millisecond -> Millisecond -> Millisecond -> [Millisecond]
(Millisecond -> Millisecond)
-> (Millisecond -> Millisecond)
-> (Int -> Millisecond)
-> (Millisecond -> Int)
-> (Millisecond -> [Millisecond])
-> (Millisecond -> Millisecond -> [Millisecond])
-> (Millisecond -> Millisecond -> [Millisecond])
-> (Millisecond -> Millisecond -> Millisecond -> [Millisecond])
-> Enum Millisecond
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: Millisecond -> Millisecond
succ :: Millisecond -> Millisecond
$cpred :: Millisecond -> Millisecond
pred :: Millisecond -> Millisecond
$ctoEnum :: Int -> Millisecond
toEnum :: Int -> Millisecond
$cfromEnum :: Millisecond -> Int
fromEnum :: Millisecond -> Int
$cenumFrom :: Millisecond -> [Millisecond]
enumFrom :: Millisecond -> [Millisecond]
$cenumFromThen :: Millisecond -> Millisecond -> [Millisecond]
enumFromThen :: Millisecond -> Millisecond -> [Millisecond]
$cenumFromTo :: Millisecond -> Millisecond -> [Millisecond]
enumFromTo :: Millisecond -> Millisecond -> [Millisecond]
$cenumFromThenTo :: Millisecond -> Millisecond -> Millisecond -> [Millisecond]
enumFromThenTo :: Millisecond -> Millisecond -> Millisecond -> [Millisecond]
Enum,Millisecond -> Millisecond -> Bool
(Millisecond -> Millisecond -> Bool)
-> (Millisecond -> Millisecond -> Bool) -> Eq Millisecond
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Millisecond -> Millisecond -> Bool
== :: Millisecond -> Millisecond -> Bool
$c/= :: Millisecond -> Millisecond -> Bool
/= :: Millisecond -> Millisecond -> Bool
Eq,Enum Millisecond
Real Millisecond
(Real Millisecond, Enum Millisecond) =>
(Millisecond -> Millisecond -> Millisecond)
-> (Millisecond -> Millisecond -> Millisecond)
-> (Millisecond -> Millisecond -> Millisecond)
-> (Millisecond -> Millisecond -> Millisecond)
-> (Millisecond -> Millisecond -> (Millisecond, Millisecond))
-> (Millisecond -> Millisecond -> (Millisecond, Millisecond))
-> (Millisecond -> Integer)
-> Integral Millisecond
Millisecond -> Integer
Millisecond -> Millisecond -> (Millisecond, Millisecond)
Millisecond -> Millisecond -> Millisecond
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: Millisecond -> Millisecond -> Millisecond
quot :: Millisecond -> Millisecond -> Millisecond
$crem :: Millisecond -> Millisecond -> Millisecond
rem :: Millisecond -> Millisecond -> Millisecond
$cdiv :: Millisecond -> Millisecond -> Millisecond
div :: Millisecond -> Millisecond -> Millisecond
$cmod :: Millisecond -> Millisecond -> Millisecond
mod :: Millisecond -> Millisecond -> Millisecond
$cquotRem :: Millisecond -> Millisecond -> (Millisecond, Millisecond)
quotRem :: Millisecond -> Millisecond -> (Millisecond, Millisecond)
$cdivMod :: Millisecond -> Millisecond -> (Millisecond, Millisecond)
divMod :: Millisecond -> Millisecond -> (Millisecond, Millisecond)
$ctoInteger :: Millisecond -> Integer
toInteger :: Millisecond -> Integer
Integral,Typeable Millisecond
Typeable Millisecond =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Millisecond -> c Millisecond)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Millisecond)
-> (Millisecond -> Constr)
-> (Millisecond -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Millisecond))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Millisecond))
-> ((forall b. Data b => b -> b) -> Millisecond -> Millisecond)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Millisecond -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Millisecond -> r)
-> (forall u. (forall d. Data d => d -> u) -> Millisecond -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Millisecond -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Millisecond -> m Millisecond)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Millisecond -> m Millisecond)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Millisecond -> m Millisecond)
-> Data Millisecond
Millisecond -> Constr
Millisecond -> DataType
(forall b. Data b => b -> b) -> Millisecond -> Millisecond
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Millisecond -> u
forall u. (forall d. Data d => d -> u) -> Millisecond -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Millisecond -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Millisecond -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Millisecond -> m Millisecond
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Millisecond -> m Millisecond
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Millisecond
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Millisecond -> c Millisecond
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Millisecond)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Millisecond)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Millisecond -> c Millisecond
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Millisecond -> c Millisecond
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Millisecond
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Millisecond
$ctoConstr :: Millisecond -> Constr
toConstr :: Millisecond -> Constr
$cdataTypeOf :: Millisecond -> DataType
dataTypeOf :: Millisecond -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Millisecond)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Millisecond)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Millisecond)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Millisecond)
$cgmapT :: (forall b. Data b => b -> b) -> Millisecond -> Millisecond
gmapT :: (forall b. Data b => b -> b) -> Millisecond -> Millisecond
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Millisecond -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Millisecond -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Millisecond -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Millisecond -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Millisecond -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Millisecond -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Millisecond -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Millisecond -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Millisecond -> m Millisecond
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Millisecond -> m Millisecond
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Millisecond -> m Millisecond
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Millisecond -> m Millisecond
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Millisecond -> m Millisecond
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Millisecond -> m Millisecond
Data,Integer -> Millisecond
Millisecond -> Millisecond
Millisecond -> Millisecond -> Millisecond
(Millisecond -> Millisecond -> Millisecond)
-> (Millisecond -> Millisecond -> Millisecond)
-> (Millisecond -> Millisecond -> Millisecond)
-> (Millisecond -> Millisecond)
-> (Millisecond -> Millisecond)
-> (Millisecond -> Millisecond)
-> (Integer -> Millisecond)
-> Num Millisecond
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: Millisecond -> Millisecond -> Millisecond
+ :: Millisecond -> Millisecond -> Millisecond
$c- :: Millisecond -> Millisecond -> Millisecond
- :: Millisecond -> Millisecond -> Millisecond
$c* :: Millisecond -> Millisecond -> Millisecond
* :: Millisecond -> Millisecond -> Millisecond
$cnegate :: Millisecond -> Millisecond
negate :: Millisecond -> Millisecond
$cabs :: Millisecond -> Millisecond
abs :: Millisecond -> Millisecond
$csignum :: Millisecond -> Millisecond
signum :: Millisecond -> Millisecond
$cfromInteger :: Integer -> Millisecond
fromInteger :: Integer -> Millisecond
Num,Eq Millisecond
Eq Millisecond =>
(Millisecond -> Millisecond -> Ordering)
-> (Millisecond -> Millisecond -> Bool)
-> (Millisecond -> Millisecond -> Bool)
-> (Millisecond -> Millisecond -> Bool)
-> (Millisecond -> Millisecond -> Bool)
-> (Millisecond -> Millisecond -> Millisecond)
-> (Millisecond -> Millisecond -> Millisecond)
-> Ord Millisecond
Millisecond -> Millisecond -> Bool
Millisecond -> Millisecond -> Ordering
Millisecond -> Millisecond -> Millisecond
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Millisecond -> Millisecond -> Ordering
compare :: Millisecond -> Millisecond -> Ordering
$c< :: Millisecond -> Millisecond -> Bool
< :: Millisecond -> Millisecond -> Bool
$c<= :: Millisecond -> Millisecond -> Bool
<= :: Millisecond -> Millisecond -> Bool
$c> :: Millisecond -> Millisecond -> Bool
> :: Millisecond -> Millisecond -> Bool
$c>= :: Millisecond -> Millisecond -> Bool
>= :: Millisecond -> Millisecond -> Bool
$cmax :: Millisecond -> Millisecond -> Millisecond
max :: Millisecond -> Millisecond -> Millisecond
$cmin :: Millisecond -> Millisecond -> Millisecond
min :: Millisecond -> Millisecond -> Millisecond
Ord,Num Millisecond
Ord Millisecond
(Num Millisecond, Ord Millisecond) =>
(Millisecond -> Rational) -> Real Millisecond
Millisecond -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: Millisecond -> Rational
toRational :: Millisecond -> Rational
Real,Ord Millisecond
Ord Millisecond =>
((Millisecond, Millisecond) -> [Millisecond])
-> ((Millisecond, Millisecond) -> Millisecond -> Int)
-> ((Millisecond, Millisecond) -> Millisecond -> Int)
-> ((Millisecond, Millisecond) -> Millisecond -> Bool)
-> ((Millisecond, Millisecond) -> Int)
-> ((Millisecond, Millisecond) -> Int)
-> Ix Millisecond
(Millisecond, Millisecond) -> Int
(Millisecond, Millisecond) -> [Millisecond]
(Millisecond, Millisecond) -> Millisecond -> Bool
(Millisecond, Millisecond) -> Millisecond -> Int
forall a.
Ord a =>
((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
$crange :: (Millisecond, Millisecond) -> [Millisecond]
range :: (Millisecond, Millisecond) -> [Millisecond]
$cindex :: (Millisecond, Millisecond) -> Millisecond -> Int
index :: (Millisecond, Millisecond) -> Millisecond -> Int
$cunsafeIndex :: (Millisecond, Millisecond) -> Millisecond -> Int
unsafeIndex :: (Millisecond, Millisecond) -> Millisecond -> Int
$cinRange :: (Millisecond, Millisecond) -> Millisecond -> Bool
inRange :: (Millisecond, Millisecond) -> Millisecond -> Bool
$crangeSize :: (Millisecond, Millisecond) -> Int
rangeSize :: (Millisecond, Millisecond) -> Int
$cunsafeRangeSize :: (Millisecond, Millisecond) -> Int
unsafeRangeSize :: (Millisecond, Millisecond) -> Int
Ix,Typeable)

instance TimeUnit Millisecond where
  toMicroseconds :: Millisecond -> Integer
toMicroseconds (Millisecond Integer
x) = Integer
x Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
* (Integer
10 Integer -> Integer -> Integer
forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
3)
  fromMicroseconds :: Integer -> Millisecond
fromMicroseconds Integer
x             = Integer -> Millisecond
Millisecond (Integer
x Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
`div` (Integer
10 Integer -> Integer -> Integer
forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
3))
instance Show Millisecond where
  show :: Millisecond -> String
show (Millisecond Integer
x) = Integer -> String
forall a. Show a => a -> String
show Integer
x String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"ms"
instance Read Millisecond where
  readsPrec :: Int -> ReadS Millisecond
readsPrec = (Integer -> Millisecond) -> String -> Int -> ReadS Millisecond
forall a.
(Integer -> a) -> String -> Int -> String -> [(a, String)]
readUnit Integer -> Millisecond
Millisecond String
"ms"

--

newtype Second      = Second      Integer
 deriving (Int -> Second
Second -> Int
Second -> [Second]
Second -> Second
Second -> Second -> [Second]
Second -> Second -> Second -> [Second]
(Second -> Second)
-> (Second -> Second)
-> (Int -> Second)
-> (Second -> Int)
-> (Second -> [Second])
-> (Second -> Second -> [Second])
-> (Second -> Second -> [Second])
-> (Second -> Second -> Second -> [Second])
-> Enum Second
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: Second -> Second
succ :: Second -> Second
$cpred :: Second -> Second
pred :: Second -> Second
$ctoEnum :: Int -> Second
toEnum :: Int -> Second
$cfromEnum :: Second -> Int
fromEnum :: Second -> Int
$cenumFrom :: Second -> [Second]
enumFrom :: Second -> [Second]
$cenumFromThen :: Second -> Second -> [Second]
enumFromThen :: Second -> Second -> [Second]
$cenumFromTo :: Second -> Second -> [Second]
enumFromTo :: Second -> Second -> [Second]
$cenumFromThenTo :: Second -> Second -> Second -> [Second]
enumFromThenTo :: Second -> Second -> Second -> [Second]
Enum,Second -> Second -> Bool
(Second -> Second -> Bool)
-> (Second -> Second -> Bool) -> Eq Second
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Second -> Second -> Bool
== :: Second -> Second -> Bool
$c/= :: Second -> Second -> Bool
/= :: Second -> Second -> Bool
Eq,Enum Second
Real Second
(Real Second, Enum Second) =>
(Second -> Second -> Second)
-> (Second -> Second -> Second)
-> (Second -> Second -> Second)
-> (Second -> Second -> Second)
-> (Second -> Second -> (Second, Second))
-> (Second -> Second -> (Second, Second))
-> (Second -> Integer)
-> Integral Second
Second -> Integer
Second -> Second -> (Second, Second)
Second -> Second -> Second
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: Second -> Second -> Second
quot :: Second -> Second -> Second
$crem :: Second -> Second -> Second
rem :: Second -> Second -> Second
$cdiv :: Second -> Second -> Second
div :: Second -> Second -> Second
$cmod :: Second -> Second -> Second
mod :: Second -> Second -> Second
$cquotRem :: Second -> Second -> (Second, Second)
quotRem :: Second -> Second -> (Second, Second)
$cdivMod :: Second -> Second -> (Second, Second)
divMod :: Second -> Second -> (Second, Second)
$ctoInteger :: Second -> Integer
toInteger :: Second -> Integer
Integral,Typeable Second
Typeable Second =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Second -> c Second)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Second)
-> (Second -> Constr)
-> (Second -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Second))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Second))
-> ((forall b. Data b => b -> b) -> Second -> Second)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Second -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Second -> r)
-> (forall u. (forall d. Data d => d -> u) -> Second -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Second -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Second -> m Second)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Second -> m Second)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Second -> m Second)
-> Data Second
Second -> Constr
Second -> DataType
(forall b. Data b => b -> b) -> Second -> Second
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Second -> u
forall u. (forall d. Data d => d -> u) -> Second -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Second -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Second -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Second -> m Second
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Second -> m Second
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Second
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Second -> c Second
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Second)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Second)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Second -> c Second
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Second -> c Second
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Second
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Second
$ctoConstr :: Second -> Constr
toConstr :: Second -> Constr
$cdataTypeOf :: Second -> DataType
dataTypeOf :: Second -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Second)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Second)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Second)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Second)
$cgmapT :: (forall b. Data b => b -> b) -> Second -> Second
gmapT :: (forall b. Data b => b -> b) -> Second -> Second
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Second -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Second -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Second -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Second -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Second -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Second -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Second -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Second -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Second -> m Second
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Second -> m Second
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Second -> m Second
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Second -> m Second
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Second -> m Second
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Second -> m Second
Data,Integer -> Second
Second -> Second
Second -> Second -> Second
(Second -> Second -> Second)
-> (Second -> Second -> Second)
-> (Second -> Second -> Second)
-> (Second -> Second)
-> (Second -> Second)
-> (Second -> Second)
-> (Integer -> Second)
-> Num Second
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: Second -> Second -> Second
+ :: Second -> Second -> Second
$c- :: Second -> Second -> Second
- :: Second -> Second -> Second
$c* :: Second -> Second -> Second
* :: Second -> Second -> Second
$cnegate :: Second -> Second
negate :: Second -> Second
$cabs :: Second -> Second
abs :: Second -> Second
$csignum :: Second -> Second
signum :: Second -> Second
$cfromInteger :: Integer -> Second
fromInteger :: Integer -> Second
Num,Eq Second
Eq Second =>
(Second -> Second -> Ordering)
-> (Second -> Second -> Bool)
-> (Second -> Second -> Bool)
-> (Second -> Second -> Bool)
-> (Second -> Second -> Bool)
-> (Second -> Second -> Second)
-> (Second -> Second -> Second)
-> Ord Second
Second -> Second -> Bool
Second -> Second -> Ordering
Second -> Second -> Second
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Second -> Second -> Ordering
compare :: Second -> Second -> Ordering
$c< :: Second -> Second -> Bool
< :: Second -> Second -> Bool
$c<= :: Second -> Second -> Bool
<= :: Second -> Second -> Bool
$c> :: Second -> Second -> Bool
> :: Second -> Second -> Bool
$c>= :: Second -> Second -> Bool
>= :: Second -> Second -> Bool
$cmax :: Second -> Second -> Second
max :: Second -> Second -> Second
$cmin :: Second -> Second -> Second
min :: Second -> Second -> Second
Ord,Num Second
Ord Second
(Num Second, Ord Second) => (Second -> Rational) -> Real Second
Second -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: Second -> Rational
toRational :: Second -> Rational
Real,Ord Second
Ord Second =>
((Second, Second) -> [Second])
-> ((Second, Second) -> Second -> Int)
-> ((Second, Second) -> Second -> Int)
-> ((Second, Second) -> Second -> Bool)
-> ((Second, Second) -> Int)
-> ((Second, Second) -> Int)
-> Ix Second
(Second, Second) -> Int
(Second, Second) -> [Second]
(Second, Second) -> Second -> Bool
(Second, Second) -> Second -> Int
forall a.
Ord a =>
((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
$crange :: (Second, Second) -> [Second]
range :: (Second, Second) -> [Second]
$cindex :: (Second, Second) -> Second -> Int
index :: (Second, Second) -> Second -> Int
$cunsafeIndex :: (Second, Second) -> Second -> Int
unsafeIndex :: (Second, Second) -> Second -> Int
$cinRange :: (Second, Second) -> Second -> Bool
inRange :: (Second, Second) -> Second -> Bool
$crangeSize :: (Second, Second) -> Int
rangeSize :: (Second, Second) -> Int
$cunsafeRangeSize :: (Second, Second) -> Int
unsafeRangeSize :: (Second, Second) -> Int
Ix,Typeable)

instance TimeUnit Second where
  toMicroseconds :: Second -> Integer
toMicroseconds (Second Integer
x) = Integer
x Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
* (Integer
10 Integer -> Integer -> Integer
forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
6)
  fromMicroseconds :: Integer -> Second
fromMicroseconds Integer
x        = Integer -> Second
Second (Integer
x Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
`div` (Integer
10 Integer -> Integer -> Integer
forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
6))
instance Show Second where
  show :: Second -> String
show (Second Integer
x) = Integer -> String
forall a. Show a => a -> String
show Integer
x String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"s"
instance Read Second where
  readsPrec :: Int -> ReadS Second
readsPrec = (Integer -> Second) -> String -> Int -> ReadS Second
forall a.
(Integer -> a) -> String -> Int -> String -> [(a, String)]
readUnit Integer -> Second
Second String
"s"

--

newtype Minute      = Minute      Integer
 deriving (Int -> Minute
Minute -> Int
Minute -> [Minute]
Minute -> Minute
Minute -> Minute -> [Minute]
Minute -> Minute -> Minute -> [Minute]
(Minute -> Minute)
-> (Minute -> Minute)
-> (Int -> Minute)
-> (Minute -> Int)
-> (Minute -> [Minute])
-> (Minute -> Minute -> [Minute])
-> (Minute -> Minute -> [Minute])
-> (Minute -> Minute -> Minute -> [Minute])
-> Enum Minute
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: Minute -> Minute
succ :: Minute -> Minute
$cpred :: Minute -> Minute
pred :: Minute -> Minute
$ctoEnum :: Int -> Minute
toEnum :: Int -> Minute
$cfromEnum :: Minute -> Int
fromEnum :: Minute -> Int
$cenumFrom :: Minute -> [Minute]
enumFrom :: Minute -> [Minute]
$cenumFromThen :: Minute -> Minute -> [Minute]
enumFromThen :: Minute -> Minute -> [Minute]
$cenumFromTo :: Minute -> Minute -> [Minute]
enumFromTo :: Minute -> Minute -> [Minute]
$cenumFromThenTo :: Minute -> Minute -> Minute -> [Minute]
enumFromThenTo :: Minute -> Minute -> Minute -> [Minute]
Enum,Minute -> Minute -> Bool
(Minute -> Minute -> Bool)
-> (Minute -> Minute -> Bool) -> Eq Minute
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Minute -> Minute -> Bool
== :: Minute -> Minute -> Bool
$c/= :: Minute -> Minute -> Bool
/= :: Minute -> Minute -> Bool
Eq,Enum Minute
Real Minute
(Real Minute, Enum Minute) =>
(Minute -> Minute -> Minute)
-> (Minute -> Minute -> Minute)
-> (Minute -> Minute -> Minute)
-> (Minute -> Minute -> Minute)
-> (Minute -> Minute -> (Minute, Minute))
-> (Minute -> Minute -> (Minute, Minute))
-> (Minute -> Integer)
-> Integral Minute
Minute -> Integer
Minute -> Minute -> (Minute, Minute)
Minute -> Minute -> Minute
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: Minute -> Minute -> Minute
quot :: Minute -> Minute -> Minute
$crem :: Minute -> Minute -> Minute
rem :: Minute -> Minute -> Minute
$cdiv :: Minute -> Minute -> Minute
div :: Minute -> Minute -> Minute
$cmod :: Minute -> Minute -> Minute
mod :: Minute -> Minute -> Minute
$cquotRem :: Minute -> Minute -> (Minute, Minute)
quotRem :: Minute -> Minute -> (Minute, Minute)
$cdivMod :: Minute -> Minute -> (Minute, Minute)
divMod :: Minute -> Minute -> (Minute, Minute)
$ctoInteger :: Minute -> Integer
toInteger :: Minute -> Integer
Integral,Typeable Minute
Typeable Minute =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Minute -> c Minute)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Minute)
-> (Minute -> Constr)
-> (Minute -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Minute))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Minute))
-> ((forall b. Data b => b -> b) -> Minute -> Minute)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Minute -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Minute -> r)
-> (forall u. (forall d. Data d => d -> u) -> Minute -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Minute -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Minute -> m Minute)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Minute -> m Minute)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Minute -> m Minute)
-> Data Minute
Minute -> Constr
Minute -> DataType
(forall b. Data b => b -> b) -> Minute -> Minute
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Minute -> u
forall u. (forall d. Data d => d -> u) -> Minute -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Minute -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Minute -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Minute -> m Minute
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Minute -> m Minute
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Minute
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Minute -> c Minute
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Minute)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Minute)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Minute -> c Minute
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Minute -> c Minute
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Minute
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Minute
$ctoConstr :: Minute -> Constr
toConstr :: Minute -> Constr
$cdataTypeOf :: Minute -> DataType
dataTypeOf :: Minute -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Minute)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Minute)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Minute)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Minute)
$cgmapT :: (forall b. Data b => b -> b) -> Minute -> Minute
gmapT :: (forall b. Data b => b -> b) -> Minute -> Minute
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Minute -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Minute -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Minute -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Minute -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Minute -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Minute -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Minute -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Minute -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Minute -> m Minute
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Minute -> m Minute
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Minute -> m Minute
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Minute -> m Minute
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Minute -> m Minute
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Minute -> m Minute
Data,Integer -> Minute
Minute -> Minute
Minute -> Minute -> Minute
(Minute -> Minute -> Minute)
-> (Minute -> Minute -> Minute)
-> (Minute -> Minute -> Minute)
-> (Minute -> Minute)
-> (Minute -> Minute)
-> (Minute -> Minute)
-> (Integer -> Minute)
-> Num Minute
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: Minute -> Minute -> Minute
+ :: Minute -> Minute -> Minute
$c- :: Minute -> Minute -> Minute
- :: Minute -> Minute -> Minute
$c* :: Minute -> Minute -> Minute
* :: Minute -> Minute -> Minute
$cnegate :: Minute -> Minute
negate :: Minute -> Minute
$cabs :: Minute -> Minute
abs :: Minute -> Minute
$csignum :: Minute -> Minute
signum :: Minute -> Minute
$cfromInteger :: Integer -> Minute
fromInteger :: Integer -> Minute
Num,Eq Minute
Eq Minute =>
(Minute -> Minute -> Ordering)
-> (Minute -> Minute -> Bool)
-> (Minute -> Minute -> Bool)
-> (Minute -> Minute -> Bool)
-> (Minute -> Minute -> Bool)
-> (Minute -> Minute -> Minute)
-> (Minute -> Minute -> Minute)
-> Ord Minute
Minute -> Minute -> Bool
Minute -> Minute -> Ordering
Minute -> Minute -> Minute
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Minute -> Minute -> Ordering
compare :: Minute -> Minute -> Ordering
$c< :: Minute -> Minute -> Bool
< :: Minute -> Minute -> Bool
$c<= :: Minute -> Minute -> Bool
<= :: Minute -> Minute -> Bool
$c> :: Minute -> Minute -> Bool
> :: Minute -> Minute -> Bool
$c>= :: Minute -> Minute -> Bool
>= :: Minute -> Minute -> Bool
$cmax :: Minute -> Minute -> Minute
max :: Minute -> Minute -> Minute
$cmin :: Minute -> Minute -> Minute
min :: Minute -> Minute -> Minute
Ord,Num Minute
Ord Minute
(Num Minute, Ord Minute) => (Minute -> Rational) -> Real Minute
Minute -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: Minute -> Rational
toRational :: Minute -> Rational
Real,Ord Minute
Ord Minute =>
((Minute, Minute) -> [Minute])
-> ((Minute, Minute) -> Minute -> Int)
-> ((Minute, Minute) -> Minute -> Int)
-> ((Minute, Minute) -> Minute -> Bool)
-> ((Minute, Minute) -> Int)
-> ((Minute, Minute) -> Int)
-> Ix Minute
(Minute, Minute) -> Int
(Minute, Minute) -> [Minute]
(Minute, Minute) -> Minute -> Bool
(Minute, Minute) -> Minute -> Int
forall a.
Ord a =>
((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
$crange :: (Minute, Minute) -> [Minute]
range :: (Minute, Minute) -> [Minute]
$cindex :: (Minute, Minute) -> Minute -> Int
index :: (Minute, Minute) -> Minute -> Int
$cunsafeIndex :: (Minute, Minute) -> Minute -> Int
unsafeIndex :: (Minute, Minute) -> Minute -> Int
$cinRange :: (Minute, Minute) -> Minute -> Bool
inRange :: (Minute, Minute) -> Minute -> Bool
$crangeSize :: (Minute, Minute) -> Int
rangeSize :: (Minute, Minute) -> Int
$cunsafeRangeSize :: (Minute, Minute) -> Int
unsafeRangeSize :: (Minute, Minute) -> Int
Ix,Typeable)

instance TimeUnit Minute where
  toMicroseconds :: Minute -> Integer
toMicroseconds (Minute Integer
x) = Integer
x Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
* (Second -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds (Second -> Integer) -> Second -> Integer
forall a b. (a -> b) -> a -> b
$ Integer -> Second
Second Integer
60)
  fromMicroseconds :: Integer -> Minute
fromMicroseconds Integer
x        = Integer -> Minute
Minute (Integer
x Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
`div` (Second -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds (Second -> Integer) -> Second -> Integer
forall a b. (a -> b) -> a -> b
$ Integer -> Second
Second Integer
60))
instance Show Minute where
  show :: Minute -> String
show (Minute Integer
x) = Integer -> String
forall a. Show a => a -> String
show Integer
x String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"m"
instance Read Minute where
  readsPrec :: Int -> ReadS Minute
readsPrec = (Integer -> Minute) -> String -> Int -> ReadS Minute
forall a.
(Integer -> a) -> String -> Int -> String -> [(a, String)]
readUnit Integer -> Minute
Minute String
"m"

--

newtype Hour        = Hour        Integer
 deriving (Int -> Hour
Hour -> Int
Hour -> [Hour]
Hour -> Hour
Hour -> Hour -> [Hour]
Hour -> Hour -> Hour -> [Hour]
(Hour -> Hour)
-> (Hour -> Hour)
-> (Int -> Hour)
-> (Hour -> Int)
-> (Hour -> [Hour])
-> (Hour -> Hour -> [Hour])
-> (Hour -> Hour -> [Hour])
-> (Hour -> Hour -> Hour -> [Hour])
-> Enum Hour
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: Hour -> Hour
succ :: Hour -> Hour
$cpred :: Hour -> Hour
pred :: Hour -> Hour
$ctoEnum :: Int -> Hour
toEnum :: Int -> Hour
$cfromEnum :: Hour -> Int
fromEnum :: Hour -> Int
$cenumFrom :: Hour -> [Hour]
enumFrom :: Hour -> [Hour]
$cenumFromThen :: Hour -> Hour -> [Hour]
enumFromThen :: Hour -> Hour -> [Hour]
$cenumFromTo :: Hour -> Hour -> [Hour]
enumFromTo :: Hour -> Hour -> [Hour]
$cenumFromThenTo :: Hour -> Hour -> Hour -> [Hour]
enumFromThenTo :: Hour -> Hour -> Hour -> [Hour]
Enum,Hour -> Hour -> Bool
(Hour -> Hour -> Bool) -> (Hour -> Hour -> Bool) -> Eq Hour
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Hour -> Hour -> Bool
== :: Hour -> Hour -> Bool
$c/= :: Hour -> Hour -> Bool
/= :: Hour -> Hour -> Bool
Eq,Enum Hour
Real Hour
(Real Hour, Enum Hour) =>
(Hour -> Hour -> Hour)
-> (Hour -> Hour -> Hour)
-> (Hour -> Hour -> Hour)
-> (Hour -> Hour -> Hour)
-> (Hour -> Hour -> (Hour, Hour))
-> (Hour -> Hour -> (Hour, Hour))
-> (Hour -> Integer)
-> Integral Hour
Hour -> Integer
Hour -> Hour -> (Hour, Hour)
Hour -> Hour -> Hour
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: Hour -> Hour -> Hour
quot :: Hour -> Hour -> Hour
$crem :: Hour -> Hour -> Hour
rem :: Hour -> Hour -> Hour
$cdiv :: Hour -> Hour -> Hour
div :: Hour -> Hour -> Hour
$cmod :: Hour -> Hour -> Hour
mod :: Hour -> Hour -> Hour
$cquotRem :: Hour -> Hour -> (Hour, Hour)
quotRem :: Hour -> Hour -> (Hour, Hour)
$cdivMod :: Hour -> Hour -> (Hour, Hour)
divMod :: Hour -> Hour -> (Hour, Hour)
$ctoInteger :: Hour -> Integer
toInteger :: Hour -> Integer
Integral,Typeable Hour
Typeable Hour =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Hour -> c Hour)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Hour)
-> (Hour -> Constr)
-> (Hour -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Hour))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Hour))
-> ((forall b. Data b => b -> b) -> Hour -> Hour)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Hour -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Hour -> r)
-> (forall u. (forall d. Data d => d -> u) -> Hour -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Hour -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Hour -> m Hour)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Hour -> m Hour)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Hour -> m Hour)
-> Data Hour
Hour -> Constr
Hour -> DataType
(forall b. Data b => b -> b) -> Hour -> Hour
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Hour -> u
forall u. (forall d. Data d => d -> u) -> Hour -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Hour -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Hour -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Hour -> m Hour
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Hour -> m Hour
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Hour
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Hour -> c Hour
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Hour)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Hour)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Hour -> c Hour
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Hour -> c Hour
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Hour
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Hour
$ctoConstr :: Hour -> Constr
toConstr :: Hour -> Constr
$cdataTypeOf :: Hour -> DataType
dataTypeOf :: Hour -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Hour)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Hour)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Hour)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Hour)
$cgmapT :: (forall b. Data b => b -> b) -> Hour -> Hour
gmapT :: (forall b. Data b => b -> b) -> Hour -> Hour
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Hour -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Hour -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Hour -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Hour -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Hour -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Hour -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Hour -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Hour -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Hour -> m Hour
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Hour -> m Hour
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Hour -> m Hour
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Hour -> m Hour
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Hour -> m Hour
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Hour -> m Hour
Data,Integer -> Hour
Hour -> Hour
Hour -> Hour -> Hour
(Hour -> Hour -> Hour)
-> (Hour -> Hour -> Hour)
-> (Hour -> Hour -> Hour)
-> (Hour -> Hour)
-> (Hour -> Hour)
-> (Hour -> Hour)
-> (Integer -> Hour)
-> Num Hour
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: Hour -> Hour -> Hour
+ :: Hour -> Hour -> Hour
$c- :: Hour -> Hour -> Hour
- :: Hour -> Hour -> Hour
$c* :: Hour -> Hour -> Hour
* :: Hour -> Hour -> Hour
$cnegate :: Hour -> Hour
negate :: Hour -> Hour
$cabs :: Hour -> Hour
abs :: Hour -> Hour
$csignum :: Hour -> Hour
signum :: Hour -> Hour
$cfromInteger :: Integer -> Hour
fromInteger :: Integer -> Hour
Num,Eq Hour
Eq Hour =>
(Hour -> Hour -> Ordering)
-> (Hour -> Hour -> Bool)
-> (Hour -> Hour -> Bool)
-> (Hour -> Hour -> Bool)
-> (Hour -> Hour -> Bool)
-> (Hour -> Hour -> Hour)
-> (Hour -> Hour -> Hour)
-> Ord Hour
Hour -> Hour -> Bool
Hour -> Hour -> Ordering
Hour -> Hour -> Hour
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Hour -> Hour -> Ordering
compare :: Hour -> Hour -> Ordering
$c< :: Hour -> Hour -> Bool
< :: Hour -> Hour -> Bool
$c<= :: Hour -> Hour -> Bool
<= :: Hour -> Hour -> Bool
$c> :: Hour -> Hour -> Bool
> :: Hour -> Hour -> Bool
$c>= :: Hour -> Hour -> Bool
>= :: Hour -> Hour -> Bool
$cmax :: Hour -> Hour -> Hour
max :: Hour -> Hour -> Hour
$cmin :: Hour -> Hour -> Hour
min :: Hour -> Hour -> Hour
Ord,Num Hour
Ord Hour
(Num Hour, Ord Hour) => (Hour -> Rational) -> Real Hour
Hour -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: Hour -> Rational
toRational :: Hour -> Rational
Real,Ord Hour
Ord Hour =>
((Hour, Hour) -> [Hour])
-> ((Hour, Hour) -> Hour -> Int)
-> ((Hour, Hour) -> Hour -> Int)
-> ((Hour, Hour) -> Hour -> Bool)
-> ((Hour, Hour) -> Int)
-> ((Hour, Hour) -> Int)
-> Ix Hour
(Hour, Hour) -> Int
(Hour, Hour) -> [Hour]
(Hour, Hour) -> Hour -> Bool
(Hour, Hour) -> Hour -> Int
forall a.
Ord a =>
((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
$crange :: (Hour, Hour) -> [Hour]
range :: (Hour, Hour) -> [Hour]
$cindex :: (Hour, Hour) -> Hour -> Int
index :: (Hour, Hour) -> Hour -> Int
$cunsafeIndex :: (Hour, Hour) -> Hour -> Int
unsafeIndex :: (Hour, Hour) -> Hour -> Int
$cinRange :: (Hour, Hour) -> Hour -> Bool
inRange :: (Hour, Hour) -> Hour -> Bool
$crangeSize :: (Hour, Hour) -> Int
rangeSize :: (Hour, Hour) -> Int
$cunsafeRangeSize :: (Hour, Hour) -> Int
unsafeRangeSize :: (Hour, Hour) -> Int
Ix,Typeable)

instance TimeUnit Hour where
  toMicroseconds :: Hour -> Integer
toMicroseconds (Hour Integer
x) = Integer
x Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
* (Minute -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds (Minute -> Integer) -> Minute -> Integer
forall a b. (a -> b) -> a -> b
$ Integer -> Minute
Minute Integer
60)
  fromMicroseconds :: Integer -> Hour
fromMicroseconds Integer
x      = Integer -> Hour
Hour (Integer
x Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
`div` (Minute -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds (Minute -> Integer) -> Minute -> Integer
forall a b. (a -> b) -> a -> b
$ Integer -> Minute
Minute Integer
60))
instance Show Hour where
  show :: Hour -> String
show (Hour Integer
x) = Integer -> String
forall a. Show a => a -> String
show Integer
x String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"h"
instance Read Hour where
  readsPrec :: Int -> ReadS Hour
readsPrec = (Integer -> Hour) -> String -> Int -> ReadS Hour
forall a.
(Integer -> a) -> String -> Int -> String -> [(a, String)]
readUnit Integer -> Hour
Hour String
"h"

--

newtype Day         = Day         Integer
 deriving (Int -> Day
Day -> Int
Day -> [Day]
Day -> Day
Day -> Day -> [Day]
Day -> Day -> Day -> [Day]
(Day -> Day)
-> (Day -> Day)
-> (Int -> Day)
-> (Day -> Int)
-> (Day -> [Day])
-> (Day -> Day -> [Day])
-> (Day -> Day -> [Day])
-> (Day -> Day -> Day -> [Day])
-> Enum Day
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: Day -> Day
succ :: Day -> Day
$cpred :: Day -> Day
pred :: Day -> Day
$ctoEnum :: Int -> Day
toEnum :: Int -> Day
$cfromEnum :: Day -> Int
fromEnum :: Day -> Int
$cenumFrom :: Day -> [Day]
enumFrom :: Day -> [Day]
$cenumFromThen :: Day -> Day -> [Day]
enumFromThen :: Day -> Day -> [Day]
$cenumFromTo :: Day -> Day -> [Day]
enumFromTo :: Day -> Day -> [Day]
$cenumFromThenTo :: Day -> Day -> Day -> [Day]
enumFromThenTo :: Day -> Day -> Day -> [Day]
Enum,Day -> Day -> Bool
(Day -> Day -> Bool) -> (Day -> Day -> Bool) -> Eq Day
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Day -> Day -> Bool
== :: Day -> Day -> Bool
$c/= :: Day -> Day -> Bool
/= :: Day -> Day -> Bool
Eq,Enum Day
Real Day
(Real Day, Enum Day) =>
(Day -> Day -> Day)
-> (Day -> Day -> Day)
-> (Day -> Day -> Day)
-> (Day -> Day -> Day)
-> (Day -> Day -> (Day, Day))
-> (Day -> Day -> (Day, Day))
-> (Day -> Integer)
-> Integral Day
Day -> Integer
Day -> Day -> (Day, Day)
Day -> Day -> Day
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: Day -> Day -> Day
quot :: Day -> Day -> Day
$crem :: Day -> Day -> Day
rem :: Day -> Day -> Day
$cdiv :: Day -> Day -> Day
div :: Day -> Day -> Day
$cmod :: Day -> Day -> Day
mod :: Day -> Day -> Day
$cquotRem :: Day -> Day -> (Day, Day)
quotRem :: Day -> Day -> (Day, Day)
$cdivMod :: Day -> Day -> (Day, Day)
divMod :: Day -> Day -> (Day, Day)
$ctoInteger :: Day -> Integer
toInteger :: Day -> Integer
Integral,Typeable Day
Typeable Day =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Day -> c Day)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Day)
-> (Day -> Constr)
-> (Day -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Day))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Day))
-> ((forall b. Data b => b -> b) -> Day -> Day)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r)
-> (forall u. (forall d. Data d => d -> u) -> Day -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Day -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Day -> m Day)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Day -> m Day)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Day -> m Day)
-> Data Day
Day -> Constr
Day -> DataType
(forall b. Data b => b -> b) -> Day -> Day
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Day -> u
forall u. (forall d. Data d => d -> u) -> Day -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Day -> m Day
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Day -> m Day
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Day
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Day -> c Day
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Day)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Day)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Day -> c Day
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Day -> c Day
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Day
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Day
$ctoConstr :: Day -> Constr
toConstr :: Day -> Constr
$cdataTypeOf :: Day -> DataType
dataTypeOf :: Day -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Day)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Day)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Day)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Day)
$cgmapT :: (forall b. Data b => b -> b) -> Day -> Day
gmapT :: (forall b. Data b => b -> b) -> Day -> Day
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Day -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Day -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Day -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Day -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Day -> m Day
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Day -> m Day
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Day -> m Day
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Day -> m Day
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Day -> m Day
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Day -> m Day
Data,Integer -> Day
Day -> Day
Day -> Day -> Day
(Day -> Day -> Day)
-> (Day -> Day -> Day)
-> (Day -> Day -> Day)
-> (Day -> Day)
-> (Day -> Day)
-> (Day -> Day)
-> (Integer -> Day)
-> Num Day
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: Day -> Day -> Day
+ :: Day -> Day -> Day
$c- :: Day -> Day -> Day
- :: Day -> Day -> Day
$c* :: Day -> Day -> Day
* :: Day -> Day -> Day
$cnegate :: Day -> Day
negate :: Day -> Day
$cabs :: Day -> Day
abs :: Day -> Day
$csignum :: Day -> Day
signum :: Day -> Day
$cfromInteger :: Integer -> Day
fromInteger :: Integer -> Day
Num,Eq Day
Eq Day =>
(Day -> Day -> Ordering)
-> (Day -> Day -> Bool)
-> (Day -> Day -> Bool)
-> (Day -> Day -> Bool)
-> (Day -> Day -> Bool)
-> (Day -> Day -> Day)
-> (Day -> Day -> Day)
-> Ord Day
Day -> Day -> Bool
Day -> Day -> Ordering
Day -> Day -> Day
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Day -> Day -> Ordering
compare :: Day -> Day -> Ordering
$c< :: Day -> Day -> Bool
< :: Day -> Day -> Bool
$c<= :: Day -> Day -> Bool
<= :: Day -> Day -> Bool
$c> :: Day -> Day -> Bool
> :: Day -> Day -> Bool
$c>= :: Day -> Day -> Bool
>= :: Day -> Day -> Bool
$cmax :: Day -> Day -> Day
max :: Day -> Day -> Day
$cmin :: Day -> Day -> Day
min :: Day -> Day -> Day
Ord,Num Day
Ord Day
(Num Day, Ord Day) => (Day -> Rational) -> Real Day
Day -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: Day -> Rational
toRational :: Day -> Rational
Real,Ord Day
Ord Day =>
((Day, Day) -> [Day])
-> ((Day, Day) -> Day -> Int)
-> ((Day, Day) -> Day -> Int)
-> ((Day, Day) -> Day -> Bool)
-> ((Day, Day) -> Int)
-> ((Day, Day) -> Int)
-> Ix Day
(Day, Day) -> Int
(Day, Day) -> [Day]
(Day, Day) -> Day -> Bool
(Day, Day) -> Day -> Int
forall a.
Ord a =>
((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
$crange :: (Day, Day) -> [Day]
range :: (Day, Day) -> [Day]
$cindex :: (Day, Day) -> Day -> Int
index :: (Day, Day) -> Day -> Int
$cunsafeIndex :: (Day, Day) -> Day -> Int
unsafeIndex :: (Day, Day) -> Day -> Int
$cinRange :: (Day, Day) -> Day -> Bool
inRange :: (Day, Day) -> Day -> Bool
$crangeSize :: (Day, Day) -> Int
rangeSize :: (Day, Day) -> Int
$cunsafeRangeSize :: (Day, Day) -> Int
unsafeRangeSize :: (Day, Day) -> Int
Ix,Typeable)

instance TimeUnit Day where
  toMicroseconds :: Day -> Integer
toMicroseconds (Day Integer
x) = Integer
x Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
* (Hour -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds (Hour -> Integer) -> Hour -> Integer
forall a b. (a -> b) -> a -> b
$ Integer -> Hour
Hour Integer
24)
  fromMicroseconds :: Integer -> Day
fromMicroseconds Integer
x     = Integer -> Day
Day (Integer
x Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
`div` (Hour -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds (Hour -> Integer) -> Hour -> Integer
forall a b. (a -> b) -> a -> b
$ Integer -> Hour
Hour Integer
24))
instance Show Day where
  show :: Day -> String
show (Day Integer
x) = Integer -> String
forall a. Show a => a -> String
show Integer
x String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"d"
instance Read Day where
  readsPrec :: Int -> ReadS Day
readsPrec = (Integer -> Day) -> String -> Int -> ReadS Day
forall a.
(Integer -> a) -> String -> Int -> String -> [(a, String)]
readUnit Integer -> Day
Day String
"d"

--

newtype Week        = Week        Integer
 deriving (Int -> Week
Week -> Int
Week -> [Week]
Week -> Week
Week -> Week -> [Week]
Week -> Week -> Week -> [Week]
(Week -> Week)
-> (Week -> Week)
-> (Int -> Week)
-> (Week -> Int)
-> (Week -> [Week])
-> (Week -> Week -> [Week])
-> (Week -> Week -> [Week])
-> (Week -> Week -> Week -> [Week])
-> Enum Week
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: Week -> Week
succ :: Week -> Week
$cpred :: Week -> Week
pred :: Week -> Week
$ctoEnum :: Int -> Week
toEnum :: Int -> Week
$cfromEnum :: Week -> Int
fromEnum :: Week -> Int
$cenumFrom :: Week -> [Week]
enumFrom :: Week -> [Week]
$cenumFromThen :: Week -> Week -> [Week]
enumFromThen :: Week -> Week -> [Week]
$cenumFromTo :: Week -> Week -> [Week]
enumFromTo :: Week -> Week -> [Week]
$cenumFromThenTo :: Week -> Week -> Week -> [Week]
enumFromThenTo :: Week -> Week -> Week -> [Week]
Enum,Week -> Week -> Bool
(Week -> Week -> Bool) -> (Week -> Week -> Bool) -> Eq Week
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Week -> Week -> Bool
== :: Week -> Week -> Bool
$c/= :: Week -> Week -> Bool
/= :: Week -> Week -> Bool
Eq,Enum Week
Real Week
(Real Week, Enum Week) =>
(Week -> Week -> Week)
-> (Week -> Week -> Week)
-> (Week -> Week -> Week)
-> (Week -> Week -> Week)
-> (Week -> Week -> (Week, Week))
-> (Week -> Week -> (Week, Week))
-> (Week -> Integer)
-> Integral Week
Week -> Integer
Week -> Week -> (Week, Week)
Week -> Week -> Week
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: Week -> Week -> Week
quot :: Week -> Week -> Week
$crem :: Week -> Week -> Week
rem :: Week -> Week -> Week
$cdiv :: Week -> Week -> Week
div :: Week -> Week -> Week
$cmod :: Week -> Week -> Week
mod :: Week -> Week -> Week
$cquotRem :: Week -> Week -> (Week, Week)
quotRem :: Week -> Week -> (Week, Week)
$cdivMod :: Week -> Week -> (Week, Week)
divMod :: Week -> Week -> (Week, Week)
$ctoInteger :: Week -> Integer
toInteger :: Week -> Integer
Integral,Typeable Week
Typeable Week =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Week -> c Week)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Week)
-> (Week -> Constr)
-> (Week -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Week))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Week))
-> ((forall b. Data b => b -> b) -> Week -> Week)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Week -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Week -> r)
-> (forall u. (forall d. Data d => d -> u) -> Week -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Week -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Week -> m Week)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Week -> m Week)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Week -> m Week)
-> Data Week
Week -> Constr
Week -> DataType
(forall b. Data b => b -> b) -> Week -> Week
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Week -> u
forall u. (forall d. Data d => d -> u) -> Week -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Week -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Week -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Week -> m Week
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Week -> m Week
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Week
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Week -> c Week
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Week)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Week)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Week -> c Week
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Week -> c Week
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Week
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Week
$ctoConstr :: Week -> Constr
toConstr :: Week -> Constr
$cdataTypeOf :: Week -> DataType
dataTypeOf :: Week -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Week)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Week)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Week)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Week)
$cgmapT :: (forall b. Data b => b -> b) -> Week -> Week
gmapT :: (forall b. Data b => b -> b) -> Week -> Week
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Week -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Week -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Week -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Week -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Week -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Week -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Week -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Week -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Week -> m Week
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Week -> m Week
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Week -> m Week
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Week -> m Week
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Week -> m Week
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Week -> m Week
Data,Integer -> Week
Week -> Week
Week -> Week -> Week
(Week -> Week -> Week)
-> (Week -> Week -> Week)
-> (Week -> Week -> Week)
-> (Week -> Week)
-> (Week -> Week)
-> (Week -> Week)
-> (Integer -> Week)
-> Num Week
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: Week -> Week -> Week
+ :: Week -> Week -> Week
$c- :: Week -> Week -> Week
- :: Week -> Week -> Week
$c* :: Week -> Week -> Week
* :: Week -> Week -> Week
$cnegate :: Week -> Week
negate :: Week -> Week
$cabs :: Week -> Week
abs :: Week -> Week
$csignum :: Week -> Week
signum :: Week -> Week
$cfromInteger :: Integer -> Week
fromInteger :: Integer -> Week
Num,Eq Week
Eq Week =>
(Week -> Week -> Ordering)
-> (Week -> Week -> Bool)
-> (Week -> Week -> Bool)
-> (Week -> Week -> Bool)
-> (Week -> Week -> Bool)
-> (Week -> Week -> Week)
-> (Week -> Week -> Week)
-> Ord Week
Week -> Week -> Bool
Week -> Week -> Ordering
Week -> Week -> Week
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Week -> Week -> Ordering
compare :: Week -> Week -> Ordering
$c< :: Week -> Week -> Bool
< :: Week -> Week -> Bool
$c<= :: Week -> Week -> Bool
<= :: Week -> Week -> Bool
$c> :: Week -> Week -> Bool
> :: Week -> Week -> Bool
$c>= :: Week -> Week -> Bool
>= :: Week -> Week -> Bool
$cmax :: Week -> Week -> Week
max :: Week -> Week -> Week
$cmin :: Week -> Week -> Week
min :: Week -> Week -> Week
Ord,Num Week
Ord Week
(Num Week, Ord Week) => (Week -> Rational) -> Real Week
Week -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: Week -> Rational
toRational :: Week -> Rational
Real,Ord Week
Ord Week =>
((Week, Week) -> [Week])
-> ((Week, Week) -> Week -> Int)
-> ((Week, Week) -> Week -> Int)
-> ((Week, Week) -> Week -> Bool)
-> ((Week, Week) -> Int)
-> ((Week, Week) -> Int)
-> Ix Week
(Week, Week) -> Int
(Week, Week) -> [Week]
(Week, Week) -> Week -> Bool
(Week, Week) -> Week -> Int
forall a.
Ord a =>
((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
$crange :: (Week, Week) -> [Week]
range :: (Week, Week) -> [Week]
$cindex :: (Week, Week) -> Week -> Int
index :: (Week, Week) -> Week -> Int
$cunsafeIndex :: (Week, Week) -> Week -> Int
unsafeIndex :: (Week, Week) -> Week -> Int
$cinRange :: (Week, Week) -> Week -> Bool
inRange :: (Week, Week) -> Week -> Bool
$crangeSize :: (Week, Week) -> Int
rangeSize :: (Week, Week) -> Int
$cunsafeRangeSize :: (Week, Week) -> Int
unsafeRangeSize :: (Week, Week) -> Int
Ix,Typeable)

instance TimeUnit Week where
  toMicroseconds :: Week -> Integer
toMicroseconds (Week Integer
x) = Integer
x Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
* (Day -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds (Day -> Integer) -> Day -> Integer
forall a b. (a -> b) -> a -> b
$ Integer -> Day
Day Integer
7)
  fromMicroseconds :: Integer -> Week
fromMicroseconds Integer
x      = Integer -> Week
Week (Integer
x Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
`div` (Day -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds (Day -> Integer) -> Day -> Integer
forall a b. (a -> b) -> a -> b
$ Integer -> Day
Day Integer
7))
instance Show Week where
  show :: Week -> String
show (Week Integer
x) = Integer -> String
forall a. Show a => a -> String
show Integer
x String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"w"
instance Read Week where
  readsPrec :: Int -> ReadS Week
readsPrec = (Integer -> Week) -> String -> Int -> ReadS Week
forall a.
(Integer -> a) -> String -> Int -> String -> [(a, String)]
readUnit Integer -> Week
Week String
"w"

--

newtype Fortnight   = Fortnight   Integer
 deriving (Int -> Fortnight
Fortnight -> Int
Fortnight -> [Fortnight]
Fortnight -> Fortnight
Fortnight -> Fortnight -> [Fortnight]
Fortnight -> Fortnight -> Fortnight -> [Fortnight]
(Fortnight -> Fortnight)
-> (Fortnight -> Fortnight)
-> (Int -> Fortnight)
-> (Fortnight -> Int)
-> (Fortnight -> [Fortnight])
-> (Fortnight -> Fortnight -> [Fortnight])
-> (Fortnight -> Fortnight -> [Fortnight])
-> (Fortnight -> Fortnight -> Fortnight -> [Fortnight])
-> Enum Fortnight
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: Fortnight -> Fortnight
succ :: Fortnight -> Fortnight
$cpred :: Fortnight -> Fortnight
pred :: Fortnight -> Fortnight
$ctoEnum :: Int -> Fortnight
toEnum :: Int -> Fortnight
$cfromEnum :: Fortnight -> Int
fromEnum :: Fortnight -> Int
$cenumFrom :: Fortnight -> [Fortnight]
enumFrom :: Fortnight -> [Fortnight]
$cenumFromThen :: Fortnight -> Fortnight -> [Fortnight]
enumFromThen :: Fortnight -> Fortnight -> [Fortnight]
$cenumFromTo :: Fortnight -> Fortnight -> [Fortnight]
enumFromTo :: Fortnight -> Fortnight -> [Fortnight]
$cenumFromThenTo :: Fortnight -> Fortnight -> Fortnight -> [Fortnight]
enumFromThenTo :: Fortnight -> Fortnight -> Fortnight -> [Fortnight]
Enum,Fortnight -> Fortnight -> Bool
(Fortnight -> Fortnight -> Bool)
-> (Fortnight -> Fortnight -> Bool) -> Eq Fortnight
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Fortnight -> Fortnight -> Bool
== :: Fortnight -> Fortnight -> Bool
$c/= :: Fortnight -> Fortnight -> Bool
/= :: Fortnight -> Fortnight -> Bool
Eq,Enum Fortnight
Real Fortnight
(Real Fortnight, Enum Fortnight) =>
(Fortnight -> Fortnight -> Fortnight)
-> (Fortnight -> Fortnight -> Fortnight)
-> (Fortnight -> Fortnight -> Fortnight)
-> (Fortnight -> Fortnight -> Fortnight)
-> (Fortnight -> Fortnight -> (Fortnight, Fortnight))
-> (Fortnight -> Fortnight -> (Fortnight, Fortnight))
-> (Fortnight -> Integer)
-> Integral Fortnight
Fortnight -> Integer
Fortnight -> Fortnight -> (Fortnight, Fortnight)
Fortnight -> Fortnight -> Fortnight
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: Fortnight -> Fortnight -> Fortnight
quot :: Fortnight -> Fortnight -> Fortnight
$crem :: Fortnight -> Fortnight -> Fortnight
rem :: Fortnight -> Fortnight -> Fortnight
$cdiv :: Fortnight -> Fortnight -> Fortnight
div :: Fortnight -> Fortnight -> Fortnight
$cmod :: Fortnight -> Fortnight -> Fortnight
mod :: Fortnight -> Fortnight -> Fortnight
$cquotRem :: Fortnight -> Fortnight -> (Fortnight, Fortnight)
quotRem :: Fortnight -> Fortnight -> (Fortnight, Fortnight)
$cdivMod :: Fortnight -> Fortnight -> (Fortnight, Fortnight)
divMod :: Fortnight -> Fortnight -> (Fortnight, Fortnight)
$ctoInteger :: Fortnight -> Integer
toInteger :: Fortnight -> Integer
Integral,Typeable Fortnight
Typeable Fortnight =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Fortnight -> c Fortnight)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Fortnight)
-> (Fortnight -> Constr)
-> (Fortnight -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Fortnight))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fortnight))
-> ((forall b. Data b => b -> b) -> Fortnight -> Fortnight)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Fortnight -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Fortnight -> r)
-> (forall u. (forall d. Data d => d -> u) -> Fortnight -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Fortnight -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Fortnight -> m Fortnight)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Fortnight -> m Fortnight)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Fortnight -> m Fortnight)
-> Data Fortnight
Fortnight -> Constr
Fortnight -> DataType
(forall b. Data b => b -> b) -> Fortnight -> Fortnight
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Fortnight -> u
forall u. (forall d. Data d => d -> u) -> Fortnight -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Fortnight -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Fortnight -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Fortnight -> m Fortnight
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Fortnight -> m Fortnight
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Fortnight
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Fortnight -> c Fortnight
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Fortnight)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fortnight)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Fortnight -> c Fortnight
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Fortnight -> c Fortnight
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Fortnight
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Fortnight
$ctoConstr :: Fortnight -> Constr
toConstr :: Fortnight -> Constr
$cdataTypeOf :: Fortnight -> DataType
dataTypeOf :: Fortnight -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Fortnight)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Fortnight)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fortnight)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fortnight)
$cgmapT :: (forall b. Data b => b -> b) -> Fortnight -> Fortnight
gmapT :: (forall b. Data b => b -> b) -> Fortnight -> Fortnight
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Fortnight -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Fortnight -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Fortnight -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Fortnight -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Fortnight -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Fortnight -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Fortnight -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Fortnight -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Fortnight -> m Fortnight
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Fortnight -> m Fortnight
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Fortnight -> m Fortnight
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Fortnight -> m Fortnight
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Fortnight -> m Fortnight
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Fortnight -> m Fortnight
Data,Integer -> Fortnight
Fortnight -> Fortnight
Fortnight -> Fortnight -> Fortnight
(Fortnight -> Fortnight -> Fortnight)
-> (Fortnight -> Fortnight -> Fortnight)
-> (Fortnight -> Fortnight -> Fortnight)
-> (Fortnight -> Fortnight)
-> (Fortnight -> Fortnight)
-> (Fortnight -> Fortnight)
-> (Integer -> Fortnight)
-> Num Fortnight
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: Fortnight -> Fortnight -> Fortnight
+ :: Fortnight -> Fortnight -> Fortnight
$c- :: Fortnight -> Fortnight -> Fortnight
- :: Fortnight -> Fortnight -> Fortnight
$c* :: Fortnight -> Fortnight -> Fortnight
* :: Fortnight -> Fortnight -> Fortnight
$cnegate :: Fortnight -> Fortnight
negate :: Fortnight -> Fortnight
$cabs :: Fortnight -> Fortnight
abs :: Fortnight -> Fortnight
$csignum :: Fortnight -> Fortnight
signum :: Fortnight -> Fortnight
$cfromInteger :: Integer -> Fortnight
fromInteger :: Integer -> Fortnight
Num,Eq Fortnight
Eq Fortnight =>
(Fortnight -> Fortnight -> Ordering)
-> (Fortnight -> Fortnight -> Bool)
-> (Fortnight -> Fortnight -> Bool)
-> (Fortnight -> Fortnight -> Bool)
-> (Fortnight -> Fortnight -> Bool)
-> (Fortnight -> Fortnight -> Fortnight)
-> (Fortnight -> Fortnight -> Fortnight)
-> Ord Fortnight
Fortnight -> Fortnight -> Bool
Fortnight -> Fortnight -> Ordering
Fortnight -> Fortnight -> Fortnight
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Fortnight -> Fortnight -> Ordering
compare :: Fortnight -> Fortnight -> Ordering
$c< :: Fortnight -> Fortnight -> Bool
< :: Fortnight -> Fortnight -> Bool
$c<= :: Fortnight -> Fortnight -> Bool
<= :: Fortnight -> Fortnight -> Bool
$c> :: Fortnight -> Fortnight -> Bool
> :: Fortnight -> Fortnight -> Bool
$c>= :: Fortnight -> Fortnight -> Bool
>= :: Fortnight -> Fortnight -> Bool
$cmax :: Fortnight -> Fortnight -> Fortnight
max :: Fortnight -> Fortnight -> Fortnight
$cmin :: Fortnight -> Fortnight -> Fortnight
min :: Fortnight -> Fortnight -> Fortnight
Ord,Num Fortnight
Ord Fortnight
(Num Fortnight, Ord Fortnight) =>
(Fortnight -> Rational) -> Real Fortnight
Fortnight -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: Fortnight -> Rational
toRational :: Fortnight -> Rational
Real,Ord Fortnight
Ord Fortnight =>
((Fortnight, Fortnight) -> [Fortnight])
-> ((Fortnight, Fortnight) -> Fortnight -> Int)
-> ((Fortnight, Fortnight) -> Fortnight -> Int)
-> ((Fortnight, Fortnight) -> Fortnight -> Bool)
-> ((Fortnight, Fortnight) -> Int)
-> ((Fortnight, Fortnight) -> Int)
-> Ix Fortnight
(Fortnight, Fortnight) -> Int
(Fortnight, Fortnight) -> [Fortnight]
(Fortnight, Fortnight) -> Fortnight -> Bool
(Fortnight, Fortnight) -> Fortnight -> Int
forall a.
Ord a =>
((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
$crange :: (Fortnight, Fortnight) -> [Fortnight]
range :: (Fortnight, Fortnight) -> [Fortnight]
$cindex :: (Fortnight, Fortnight) -> Fortnight -> Int
index :: (Fortnight, Fortnight) -> Fortnight -> Int
$cunsafeIndex :: (Fortnight, Fortnight) -> Fortnight -> Int
unsafeIndex :: (Fortnight, Fortnight) -> Fortnight -> Int
$cinRange :: (Fortnight, Fortnight) -> Fortnight -> Bool
inRange :: (Fortnight, Fortnight) -> Fortnight -> Bool
$crangeSize :: (Fortnight, Fortnight) -> Int
rangeSize :: (Fortnight, Fortnight) -> Int
$cunsafeRangeSize :: (Fortnight, Fortnight) -> Int
unsafeRangeSize :: (Fortnight, Fortnight) -> Int
Ix,Typeable)

instance TimeUnit Fortnight where
  toMicroseconds :: Fortnight -> Integer
toMicroseconds (Fortnight Integer
x) = Integer
x Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
* (Week -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds (Week -> Integer) -> Week -> Integer
forall a b. (a -> b) -> a -> b
$ Integer -> Week
Week Integer
2)
  fromMicroseconds :: Integer -> Fortnight
fromMicroseconds Integer
x           = Integer -> Fortnight
Fortnight (Integer
x Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
`div` (Week -> Integer
forall a. TimeUnit a => a -> Integer
toMicroseconds (Week -> Integer) -> Week -> Integer
forall a b. (a -> b) -> a -> b
$ Integer -> Week
Week Integer
2))
instance Show Fortnight where
  show :: Fortnight -> String
show (Fortnight Integer
x) = Integer -> String
forall a. Show a => a -> String
show Integer
x String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"fn"
instance Read Fortnight where
  readsPrec :: Int -> ReadS Fortnight
readsPrec = (Integer -> Fortnight) -> String -> Int -> ReadS Fortnight
forall a.
(Integer -> a) -> String -> Int -> String -> [(a, String)]
readUnit Integer -> Fortnight
Fortnight String
"fn"