see. 型システムを学ぼう!
Scala by Example 第16章、および、Typing Haskell in Haskell を参考に Hindley/Milner の型推論を Haskell で