data Fruit = Apple | Orange deriving Show whichFruit f = case f of "apple" -> Just Apple "orange" -> Just Orange _ -> Nothing