Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mjambon's full-sized avatar

Martin Jambon mjambon

View GitHub Profile
module Abstract_value :
sig
type t
val create : unit -> t
end =
struct
type t = unit -> unit
let create () =
@NicolasT
NicolasT / generics.ml
Created April 11, 2013 01:04
A stab at generics in OCaml
(* Generics for OCaml
*
* This is a huge hack. It doesn't work with higher-kinded types. It, well,
* hardly works for anything but the provided samples :-P
*)
(* Standard Generic representation types *)
(* Unit *)
type u = U
(* Sum types ('Plus') *)