[wg-camlp4] Pending issues

Hongbo Zhang hongboz at seas.upenn.edu
Mon Feb 11 15:30:26 GMT 2013


If you clean up the ast, it could be great to make pattern and
expression symmetric for the intersection part.

For example, in Fan the intersection type is something like
--------------------------------------
  type ep =
     [= `Nil of loc
     | `Id  of (loc * ident) (* i *)
     | `App of (loc * ep * ep) (* e e *)
     | `Vrn of (loc * string)       (* `s *)
     | `Com of (loc * ep * ep)
     | `Sem of (loc * ep * ep) (* e; e *)
     | `Tup of (loc * ep)
     | `Record of (loc * rec_bind)
     | ant  | literal ]
     and rec_bind =
     [= `Nil of loc
     | `RecBind of (loc * ident * ep)
     | `Sem of (loc * rec_bind * rec_bind)
     | `Any of loc
     | ant];
--------------------------------------------------------
We benefit a lot from the subtyping  relation here (ep:>expr, ep :> patt)
On Mon, Feb 11, 2013 at 9:51 AM, Hongbo Zhang <hongboz at seas.upenn.edu> wrote:
>
>
>
> On Mon, Feb 11, 2013 at 9:45 AM, Alain Frisch <alain.frisch at lexifi.com> wrote:
>>
>>
>> 5. Fork Parsetree or clean it up?
>>
>> Hongbo has proposed that we introduce a different representation of the Parsetree on which -ppx rewriters would be applied.  Concretely, we could fork parsetree.mli into parsetree.mli/ast.mli, clean up parsetree (see below) and adapt parser.mly accordingly, and then implement a translation pass from Parsetree to Ast before running the type-checker on Ast.  The alternative is to clean up Parsetree directly and adapt the type-checker to these changes.  This avoids an extra intermediate language and the mapping, but this could add a little bit of extra complexity to the type-checker (and it might be more difficult to convince core developers).  What do people think?
>>
> Hi Alain, This is great , and you have more freedom to clean up the Ast, for example, remove the unnecessary prefix names without breaking other existing software.
>>
>> Alain
>> _______________________________________________
>> wg-camlp4 mailing list
>> wg-camlp4 at lists.ocaml.org
>> http://lists.ocaml.org/listinfo/wg-camlp4
>
>
>
>
> --
> -- Regards, Hongbo




--
-- Regards, Hongbo


More information about the wg-camlp4 mailing list