redefine 'equals' in terms of 'element'

It turns out 'equals' was already a primitive isomorphism, it was just
inversed. I kept equals, as I need it the inverse order more often.
switch from cabal-dev to cabal-sandbox
fix compilation errors

Wasn't this working before? I guess code does decay with time.