Reputation: 697
Record definition:
type t = {name: string}
Variant definition :
type thing = Thing1 | Thing2;
Can anyone example what the following snippet defines?
type ('a, 'b) t =
Blah : ((('a, 'b) Tea_result.t -> unit) -> unit) -> ('a, 'b) t
More Generally, this structure:
type t = Blah : xxx
Any insight would be appreciated.
Upvotes: 1
Views: 82
Reputation: 4441
This is Generalized Algebraic Data Type - have a look at https://caml.inria.fr/pub/docs/manual-ocaml-400/manual021.html#toc85
Upvotes: 2