#26, GHC 6.8 compatibility, define isLeft/isRight locally, avoiding the Data.Either imports