Category: functional-programming
Posts in this Category (2)
First-Class Modules and Modular Implicits in OCaml
Published on: September 25, 2017
I was pleasantly surprised to discover that OCaml has been supporting modules as first-class objects since v3.12 (2011). Intuition suggests that first-class modules should be expressive enough to simulate Haskell-style typeclasses in OCaml. Turns out this is the route taken by Leo White et al to introduce adhoc polymorphism via...ML Type Inference
Published on: July 25, 2015
One of the most useful features of ML-family languages (OCaml, Standard ML, F# etc) is the type inference. This post contains the notes I took when I was trying to understand the foundational principles of ML type inference. Damas-Milner Algorithm for Type Inference Let us take a look at the...