Data Declarations
Sum-types
data Suit = Hearts
| Diamonds
| Spades
| Clubsdata Bool = True | Falsedata ConfigError =
ConfigErrorFileNotFound FilePath
| ConfigErrorNoEKG
deriving ShowsuitStr :: Suit -> String
suitStr Hearts = "... of hearts."
suitStr Diamonds = "... of diamonds."
suitStr Spades = "... of spades."
suitStr Clubs = "... of clubs."
ghci> suitStr Hearts
"... of hearts."Product-types
Field labels (records)
Last updated