packages feed

MicroHs-0.17.4.0 / tests / Newtype.hs

module Newtype(main) wherenewtype N = N Intnewtype M a = M af :: N -> Intf (N x) = xg :: M (Int, Int) -> M Intg (M (x, y)) = M xshowM :: forall a . (a -> String) -> M a -> StringshowM sh (M x) = "(M " ++ sh x ++ ")"main :: IO ()main = do  print [f (N 1), f (N 2)]  putStrLn $ showM show (g (M (3,4)))