You're quite right. The vertical bar is used in /defining/
(1) a /typeclass/ that has functional dependencies
(2) a /function/ using pattern guards
(3) a /datatype/ that is a sum of two or more datatypes.
These are all different, as you've guessed. The reason the syntax conflation works is that all these constructs are different.
The canonical intro to fundeps is the container/element example. See Section 3 on collection types in