[m-dev.] proposed syntax for typed insts

Peter Wang novalazy at gmail.com
Tue Sep 8 12:26:15 AEST 2015


On Mon, 07 Sep 2015 18:51:50 +1000 (AEST), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> I am proposing a syntax for typed insts, which we have
> long agreed are a good idea.
> 
> Currently, inst declarations look like either this:
> 
> :- inst Instname(InstArgs) == ...
> 
> or like this:
> 
> :- inst InstName(InstArgs) ---> ...
> 
> I propose that "for TypeName/TypeArity" be added
> between the InstName(InstArgs) and the "==" or "---->",
> so that they look like this:
> 
> :- inst InstName(InstArgs) for TypeName/TypeArity == ...

It looks okay to me.

Previously I had imagined the same syntax but with ":" instead of "for".
Too bad ":" would bind tighter than the "/" in TypeName/TypeArity.

Peter



More information about the developers mailing list