Examples-0.1.0: Haskell code examples
Copyright© Frank Jung 2023
LicenseGPL-3.0-only
Safe HaskellSafe-Inferred
LanguageHaskell2010

Months

Description

Synopsis

Types

data Month Source #

Months of the year.

Instances

Instances details
CyclicEnum Month Source # 
Instance details

Defined in Months

Arbitrary Month Source #

Arbitrary instance for Month.

Instance details

Defined in Months

Bounded Month Source # 
Instance details

Defined in Months

Enum Month Source # 
Instance details

Defined in Months

Read Month Source # 
Instance details

Defined in Months

Show Month Source # 
Instance details

Defined in Months

Methods

showsPrec :: Int -> Month -> ShowS #

show :: Month -> String #

showList :: [Month] -> ShowS #

Eq Month Source # 
Instance details

Defined in Months

Methods

(==) :: Month -> Month -> Bool #

(/=) :: Month -> Month -> Bool #

Ord Month Source # 
Instance details

Defined in Months

Methods

compare :: Month -> Month -> Ordering #

(<) :: Month -> Month -> Bool #

(<=) :: Month -> Month -> Bool #

(>) :: Month -> Month -> Bool #

(>=) :: Month -> Month -> Bool #

max :: Month -> Month -> Month #

min :: Month -> Month -> Month #

Type classes

class (Eq a, Enum a, Bounded a) => CyclicEnum a where Source #

Cyclic bounded enumeration of compass directions.

Minimal complete definition

Nothing

Methods

cpred :: a -> a Source #

Predecessor of a Cyclic enumeration.

csucc :: a -> a Source #

Successor of a Cyclic enumeration.

Instances

Instances details
CyclicEnum Month Source # 
Instance details

Defined in Months

Functions

makeMonth :: String -> Maybe Month Source #

Make a Month from a string.