Skip to main content

Module normalize

Module normalize 

Source
Expand description

Normalisation to an antichain.

A grant set is normal when no atom in it is permitted by another. Without that, {fs:read:/src/**, fs:read:/src/lib/**} and {fs:read:/src/**} are different values with identical meaning, and every downstream comparison has to re-derive that fact.

Normalising once makes equality structural: two sets that permit the same things become the same value, and therefore share a digest.

Functionsยง

is_normal
Whether the set is already an antichain.
normalize
Remove every atom that another atom in the set already permits.