biscuit icon indicating copy to clipboard operation
biscuit copied to clipboard

Allow heterogeneous sets

Open divarvel opened this issue 2 years ago • 0 comments

The spec mentions in a single place that sets should only contain elements of the same type, but nothing else in the spec mentions it or even relies on this property.

as for implementations:

  • biscuit-rust prevents it in the parser and the protobuf deserialization layer, but still allows through parameter substitution or manual AST building.
  • biscuit-haskell does not prevent it

in any case, evaluation is defined for heterogeneous sets (set operations care about equality of elements, which is defined on heterogeneous values if we consider datalog terms as unityped).

I think the homogeneous set restriction is arbitrary and could be lifted. If we want to keep this restriction, we should make sure heterogeneous sets can't be created at all.

One current limitation in biscuit-rust is that it prevents using parameter interpolation within a set: ["a", {b}] will fail to parse.

divarvel avatar Jun 12 '23 07:06 divarvel