fugue / fregot

Fugue Rego Toolkit
Apache License 2.0
234 stars 11 forks source link

Support using data imports as variables #239

Closed jaspervdj-luminal closed 4 years ago

jaspervdj-luminal commented 4 years ago

If there's a data import, e.g.

import data.foo

fregot only supported using foo as if it were a package (e.g. foo.bar), not as a rule directly (i.e. foo).

There's really not much of a distinction between the two from a "data tree" perspective, but it's helpful to keep the distinction anyway because it improves error messages. This patch adds support for the latter.

Fixes #238