Probably either one of A
, B
, C
, D
(or all of them) are already bound to some value when the case
clause pattern matches, which is not the same as it should be in order to match.
For this to match the following conditions must be met, at the point where the pattern match happens:
A
must be unbound, otherwise it must contain the valueatom1
B
must be unbound, otherwise it must contain the same value thatA1
doesC
must be unbound, otherwise it must contain the valueatom2
D
must be unbound, otherwise it must contain the same value thatA2
does