module Main where
foo :: Int -> Int -> String
foo x y =
case (x, y) of
(1, 1) -> "all ones"
(2, 3) -> "two and three"
(11, 12) -> "umm... large numbers"
otherwise -> "XXX no shadowing error here " ++ show otherwise
main = putStrLn $ foo 7 8
module Main where
foo :: Int -> Int -> String
foo x y =
case (x, y) of
(1, 1) -> "all ones"
(2, 3) -> "two and three"
(11, 12) -> "umm... large numbers"
_ -> "XXX no shadowing error here " ++ show (x, y)
main = putStrLn $ foo 7 8
module Main where
foo :: Int -> Int -> String
foo x y =
case (x, y) of
(1, 1) -> "all ones"
(2, 3) -> "two and three"
(11, 12) -> "umm... large numbers"
other -> "XXX no shadowing error here " ++ show other
main = putStrLn $ foo 7 8
module Main where
foo :: Int -> Int -> String
foo x y =
case (x, y) of
(1, 1) -> "all ones"
(2, 3) -> "two and three"
(11, 12) -> "umm... large numbers"
_ -> "OK"
main :: IO ()
main = putStrLn $ foo 7 8