Skip to content

Instantly share code, notes, and snippets.

@kawakami-o3
Created June 16, 2016 04:53
Show Gist options
  • Save kawakami-o3/77327f06a99a8c6ee61ccc64a04046a3 to your computer and use it in GitHub Desktop.
Save kawakami-o3/77327f06a99a8c6ee61ccc64a04046a3 to your computer and use it in GitHub Desktop.
ghc -fwarn-incomplete-patterns -fwarn-incomplete-uni-patterns incomplete_pattern.hs
data Hoge = Foo | Bar
-- to_s :: Hoge -> String
to_s Foo = "foo"
main = do
putStrLn $ to_s Foo
putStrLn $ to_s Bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment