shithub: MicroHs

ref: 94db41b3b458bebdf4de50de98f0563a3a9e5d29
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]