blob: d100bff71879c07acb53de53273257762aa2a4b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-- Tests match on empty field lists
module Main where
data Person = Female {firstName, lastName :: String}
| Male {firstName, lastName :: String}
deriving (Show)
isFemale (Female{}) = True
isFemale (Male{}) = False
main = print (isFemale (Female {firstName = "Jane", lastName = "Smith"}))
|