[project @ 1999-11-12 14:12:38 by simonpj]
[ghc-hetmet.git] / ghc / tests / deSugar / should_run / dsrun003.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", lastName = "Smith"}))
13