Pixel Pedals of Tomakomai

北海道苫小牧市出身の初老の日常

2017-01-26から1日間の記事一覧

AllowAmbiguousTypes拡張と型適用

このように f を定義して実行したい。 f :: String -> String f = show . read main :: IO () main = putStrLn $ f "True" エラーが出る。 Prelude> :l test.hs [1 of 1] Compiling Main ( test.hs, interpreted ) test.hs:5:5: error: • Ambiguous type var…