shithub: MicroHs

ref: bdd38072a2fa4108fff41da806309074e79ce6de
dir: /tests/OrPat.hs/

View raw version
module OrPat where

data Sweet = Cupcake | Liquorice | Cookie | Raisins

taste :: Sweet -> Bool
tasty (Cupcake; Cookie) = True
tasty (Liquorice; Raisins) = False

main :: IO ()
main = print $ map tasty [Cupcake, Liquorice, Cupcake, Raisins]