Re: combining signatures
Matthew Fluet <[email protected]> Mon, 6 Jun 2011 09:24:28 -0400
| Newsgroups | gmane.comp.lang.ml.mlton.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Jun 5, 2011 at 8:28 PM, Michael Norrish <[email protected]> wrote: > is it possible to create a signature that merges One and Two without retyping all of the bindings? Unfortunately, not in Standard ML without changing the signatures One and Two. As Vesa mentioned (in the thread to which he pointed), the "Expressive Language of Signatures" of Ramsey, Fisher, and Govereau (http://mlton.org/References#RamseyFisherGovereau05) does provide ways of slicing and dicing signatures to make such combinations easy. OCaml recently (ver 3.12) added a "destructive" substitution constraint for signatures to alleviate exactly this case (http://caml.inria.fr/pub/distrib/ocaml-3.12/ocaml-3.12-refman.html#htoc111).