Extension to OCaml for deriving functions from type declarations
