SpoofaxLang does not support higher order argument strategies. The Spoofax Stratego editor also does not support them if I recall correctly, but in SpoofaxLang you can not even compile code that uses such strategies, whereas in the Spoofax Stratego editor you can just ignore the warning/error: the compiler does support higher order strategies as strategy arguments.

Examples:


abox2text’(|width) =
rules( GppIndent := 0 )
; let local-abox2text(|pos) =
abox2text’(local-abox2text | pos, width)

   in local-abox2text(|0)
  end
; Fst


In abox2text'(local-abox2text | pos, width), local-abox2text is undefined according to SpoofaxLang.


abox2text-I(rec : t * t -> t | xpos, width) =
?I(sopt, bs)

; {|GppIndent:
      <add> (xpos, <gpp-is-length> sopt) => left-xpos
    ; rules( GppIndent := left-xpos )
    ; <fetch-elem(?SOpt(IS(), <id>)) <+ !"0"> sopt => value
    ; <rec(|xpos)> H([SOpt(HS(), value)], [S(""), bs])
  |}


Here, in rec(|xpos), rec is undefined, even though it is an argument of abox2text-I.

Maybe relevant: https://yellowgrass.org/issue/Spoofax/117

Submitted by Tobi Vollebregt on 7 March 2012 at 15:50

On 7 March 2012 at 15:50 Tobi Vollebregt tagged spoofaxlang

On 7 March 2012 at 18:26 Adil Akhter tagged @adil

On 8 January 2013 at 14:40 Eelco Visser tagged wontfix

Log in to post comments