The identity element of package dependencies.
Cabal package dependencies form a commutative monoid with an absorbing element. They satisfy the following axioms:
- Associativity
For all dependencies a, b and c,
(a , b) , c = a , (b , c)
In fact, the Cabal syntax does not even allow you to use the parentheses for this reason.
- Commutativity
For all dependencies a and b,
a , b = b , a
- Identity element
For all dependencies a,
acme-one , a = a
a , acme-one = a
Depending on acme-one has no additional effect.
- Absorbing element
For all dependencies a,
acme-zero , a = acme-zero
a , acme-zero = acme-zero
Depending on acme-zero in addition has the same effect as only depending on acme-zero.
acme-zero and acme-one
Cabal package dependencies form a commutative monoid with an absorbing element. They satisfy the following axioms:
Associativity
For all dependencies
a,bandc,(a , b) , c = a , (b , c)In fact, the Cabal syntax does not even allow you to use the parentheses for this reason.
Commutativity
For all dependencies
aandb,a , b = b , aIdentity element
For all dependencies
a,acme-one , a = a a , acme-one = aDepending on
acme-onehas no additional effect.Absorbing element
For all dependencies
a,acme-zero , a = acme-zero a , acme-zero = acme-zeroDepending on
acme-zeroin addition has the same effect as only depending onacme-zero.