Saturday, February 24, 2018

Detecting use-cases for GADTs in OCaml



Before we dive into the GADT implementation lets do a quick review of how to define GADTs in OCaml. Remember that we previously defined the value type like this To define a GADT we need to use a slightly different syntax. The following syntax definition is taken from the OCaml Users Guide.

No comments:

Finite-State Machines, Part 1: Modeling with Haskell Data Types

Stateful programs often become complex beasts as they grow. Program state incohesively spread across a bunch of variables, spuriously guar...