noprompt / meander

Tools for transparent data transformation
MIT License
928 stars 55 forks source link

m/not fails to compile under 626 #198

Closed markaddleman closed 3 years ago

markaddleman commented 3 years ago

  (:require [meander.epsilon :as m]))

(comment
  ; compiles
  (m/rewrites {}
    {:group-by       (m/scan {(m/some :alias) ?a :as ?group-by})
     :group-defaults (m/scan {:attribute {:alias (m/not ?a)}})}
    {:group-by [?group-by]}))

(comment
  ; does not compile
  (m/rewrites {}
    {:group-defaults (m/scan {:attribute       {:alias (m/some ?alias)}
                              :from-expression (m/some ?expression)})
     :group-by       (m/scan {:alias ?alias :as ?group-by})}
    {:group-by [{:default {:from-expression ?expression} & ?group-by}]}

    {:group-by       (m/scan {(m/some :alias) ?a :as ?group-by})
     :group-defaults (m/scan {:attribute {:alias (m/not ?a)}})}
    {:group-by [?group-by]}))```
noprompt commented 3 years ago

@markaddleman This appears to be compiling and passing a test created for it.