[m-dev.] proposal: require_switch_arms_{det,semi,...}

Zoltan Somogyi zoltan.somogyi at runbox.com
Thu Nov 13 18:23:31 AEDT 2014



On Thu, 13 Nov 2014 14:02:28 +1100, Paul Bone <paul at bone.id.au> wrote:
> I think this makes sense and your example makes it even clearer that this
> feature is desirable.
> 
> I also can't think of any reason why I wouldn't want this.

Ok. We already have, on the one hand,

  require_det Goal
  require_semidet Goal

and so on for the other determinisms, and on the other hand,

  require_complete_switch [Var] Goal

so the obvious syntax for the proposed construct is

  require_switch_arms_det [Var] Goal
  require_switch_arms_det [Var] Goal

and so on. I think we can argue about the keyword,
but I don't think we can use a different overall naming scheme
unless we want to massively confuse developers.

Any objections if I add this to the compiler in this form?

Zoltan.







More information about the developers mailing list