packages feed

MicroHs-0.10.7.0: tests/PatSyn.hs

module PatSyn where

pattern Sing :: a -> [a]
pattern Sing a = [a]

f :: [Int] -> Int
f (Sing x) = x
f _ = 0


main :: IO ()
main = do
  print (Sing True)
  print (f [])
  print (f [1])
  print (f [2,3])