2011-11-23から1日間の記事一覧
main = do putStrLn $ f 0; putStrLn $ f '/'; f :: Show x => x -> String f x = show x これは問題なく動いて 0 '/' を出力する。だけど main = do putStrLn $ f 0; putStrLn $ f '/'; f :: Show x => x -> String f 0 = "zero" f x = show x はコンパイル…
main = do putStrLn $ f 0; putStrLn $ f '/'; f :: Show x => x -> String f x = show x これは問題なく動いて 0 '/' を出力する。だけど main = do putStrLn $ f 0; putStrLn $ f '/'; f :: Show x => x -> String f 0 = "zero" f x = show x はコンパイル…