Commit 8b1464f0 authored by Michael Hanus's avatar Michael Hanus
Browse files

deriving Read added to Time datatypes

parent 3a92b667
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
--- Library for handling date and time information. --- Library for handling date and time information.
--- ---
--- @author Michael Hanus --- @author Michael Hanus
--- @version April 2007 --- @version January 2018
--- @category general --- @category general
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
...@@ -17,14 +17,14 @@ module Time(ClockTime, ...@@ -17,14 +17,14 @@ module Time(ClockTime,
--- ClockTime represents a clock time in some internal representation. --- ClockTime represents a clock time in some internal representation.
data ClockTime = CTime Int data ClockTime = CTime Int
deriving (Eq, Ord, Show) deriving (Eq, Ord, Show, Read)
--- A calendar time is presented in the following form: --- A calendar time is presented in the following form:
--- (CalendarTime year month day hour minute second timezone) --- (CalendarTime year month day hour minute second timezone)
--- where timezone is an integer representing the timezone as a difference --- where timezone is an integer representing the timezone as a difference
--- to UTC time in seconds. --- to UTC time in seconds.
data CalendarTime = CalendarTime Int Int Int Int Int Int Int data CalendarTime = CalendarTime Int Int Int Int Int Int Int
deriving (Eq, Ord, Show) deriving (Eq, Ord, Show, Read)
--- The year of a calendar time. --- The year of a calendar time.
ctYear :: CalendarTime -> Int ctYear :: CalendarTime -> Int
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment