Arantium Maestum

プログラミング、囲碁、読書の話題

2021-03-18から1日間の記事一覧

let rec内での多相とlocally abstract typeとpolymorphic type constraints

こういう記事を最近読んだ: tatta.hatenadiary.org (書かれたのは10年以上前だが) こういうコードは型チェック通らないよ、という話: let rec f x = x and g () = f 1 and h () = f true;; Line 3, characters 13-17: Error: This expression has type b…