shithub: MicroHs

ref: 63b1cd19101d0f5f566abdd67f305cc4e198e370
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]