7b92ed24858f33e73b0021b2a8a0b2b8fe904b3a
[ghc-hetmet.git] / ghc / tests / deSugar / should_run / ds003.hs
1 -- Tests match on empty field lists 
2
3 module Main where
4
5 data Person     =  Female {firstName, lastName :: String}
6                 |  Male   {firstName, lastName :: String}
7                 deriving (Show)
8
9 isFemale (Female{})   =  True
10 isFemale (Male{})     =  False
11
12 main = print (isFemale (Female {firstName = "Jane"}))
13