-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Lens-based interface to Data.Time data structures
--   
--   Lens-based interface to Data.Time data structures
@package time-lens
@version 0.4.0.2

module Data.Time.Lens
class HasTime a
time :: HasTime a => Lens a TimeOfDay
hours :: HasTime a => Lens a Int
minutes :: HasTime a => Lens a Int
seconds :: HasTime a => Lens a Pico
class HasDate a
date :: HasDate a => Lens a Day

-- | <tt><a>modL</a> <a>year</a> (+n)</tt> adds <tt>n</tt> years, matching
--   month and day, with Feb 29th rolled over to Mar 1st if necessary (like
--   <a>addGregorianYearsRollOver</a>)
year :: HasDate a => Lens a Integer

-- | <tt><a>modL</a> <a>month</a> (+n)</tt> adds <tt>n</tt> months, with
--   days past the last day of the month rolling over to the next month
--   (like <a>addGregorianMonthsRollOver</a>)
month :: HasDate a => Lens a Int

-- | <tt><a>modL</a> <a>day</a> (+n)</tt> computes the date <tt>n</tt> days
--   after the original date (like <a>addDays</a>)
day :: HasDate a => Lens a Int

-- | The semantics of <a>gregorian</a> corresponds to that of
--   <a>toGregorian</a> and <a>fromGregorian</a>
gregorian :: HasDate a => Lens a (Integer, Int, Int)
class HasTime a => HasTimeZone a
timeZone :: HasTimeZone a => Lens a TimeZone

-- | The Modified Julian Day is a standard count of days, with zero being
--   the day 1858-11-17.
data Day :: *

-- | Time of day as represented in hour, minute and second (with
--   picoseconds), typically used to express local time of day.
data TimeOfDay :: *

-- | A simple day and time aggregate, where the day is of the specified
--   parameter, and the time is a TimeOfDay. Conversion of this (as local
--   civil time) to UTC depends on the time zone. Conversion of this (as
--   local mean time) to UT1 depends on the longitude.
data LocalTime :: *

-- | A local time together with a time zone.
data ZonedTime :: *
getZonedTime :: IO ZonedTime

-- | Simple lens data type
data Lens a b :: * -> * -> *

-- | Get the getter function from a lens
getL :: () => Lens a b -> a -> b

-- | Get the modifier function from a lens
modL :: () => Lens a b -> (b -> b) -> a -> a

-- | Get the setter function from a lens
setL :: () => Lens a b -> b -> a -> a
instance Data.Time.Lens.HasTimeZone Data.Time.LocalTime.Internal.ZonedTime.ZonedTime
instance Data.Time.Lens.HasDate Data.Time.Calendar.Days.Day
instance Data.Time.Lens.HasDate Data.Time.LocalTime.Internal.LocalTime.LocalTime
instance Data.Time.Lens.HasDate Data.Time.LocalTime.Internal.ZonedTime.ZonedTime
instance Data.Time.Lens.HasDate Data.Time.Clock.Internal.UTCTime.UTCTime
instance Data.Time.Lens.HasTime Data.Time.LocalTime.Internal.TimeOfDay.TimeOfDay
instance Data.Time.Lens.HasTime Data.Time.LocalTime.Internal.LocalTime.LocalTime
instance Data.Time.Lens.HasTime Data.Time.LocalTime.Internal.ZonedTime.ZonedTime
instance Data.Time.Lens.HasTime Data.Time.Clock.Internal.UTCTime.UTCTime
