flip package:ghc

flip f takes its (first) two arguments in the reverse order of f.
>>> flip (++) "hello" "world"
"worldhello"
maybeFlipCond c returns Just c' if it is possible to flip the arguments to the conditional c, and the new condition should be c'.