/**
 * Note: these strategies are not used in the main implode-asfix, but
 * only in a specific implosion option.
 */
module stratego/asfix/implode/sort
rules

  ApplToSort :
    appl(prod(as, sort(""), _), [t]) -> t

  ApplToSort :
    appl(prod(as, cf(sort(x)), _), ts) -> c#(ts)
    where
      <pp-sdf-symbol> sort(x); concat-strings => c

  ApplToSort :
    appl(prod(as, cf(a), _), ts) -> c#(ts)
    where
      <not(?sort(_))> a
      ; <pp-sdf-symbol> a
      ; <concat> [["\""], <id>, ["\""]]
      ; concat-strings => c