-- | Custom type for dates, in this case Month.
-- This should, in time, be switched out in favour of a proper package
-- designed to handle all the complexities of dates.
module Language.Drasil.Data.Date
  ( -- * Type
    Month(..)
  ) where

-- | Custom type for months (abbreviated).
data Month = Jan
           | Feb
           | Mar
           | Apr
           | May
           | Jun
           | Jul
           | Aug
           | Sep
           | Oct
           | Nov
           | Dec deriving (Month -> Month -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Month -> Month -> Bool
$c/= :: Month -> Month -> Bool
== :: Month -> Month -> Bool
$c== :: Month -> Month -> Bool
Eq, Eq Month
Month -> Month -> Bool
Month -> Month -> Ordering
Month -> Month -> Month
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
min :: Month -> Month -> Month
$cmin :: Month -> Month -> Month
max :: Month -> Month -> Month
$cmax :: Month -> Month -> Month
>= :: Month -> Month -> Bool
$c>= :: Month -> Month -> Bool
> :: Month -> Month -> Bool
$c> :: Month -> Month -> Bool
<= :: Month -> Month -> Bool
$c<= :: Month -> Month -> Bool
< :: Month -> Month -> Bool
$c< :: Month -> Month -> Bool
compare :: Month -> Month -> Ordering
$ccompare :: Month -> Month -> Ordering
Ord)

instance Show Month where
  show :: Month -> String
show Month
Jan = String
"January"
  show Month
Feb = String
"February"
  show Month
Mar = String
"March"
  show Month
Apr = String
"April"
  show Month
May = String
"May"
  show Month
Jun = String
"June"
  show Month
Jul = String
"July"
  show Month
Aug = String
"August"
  show Month
Sep = String
"September"
  show Month
Oct = String
"October"
  show Month
Nov = String
"November"
  show Month
Dec = String
"December"