hsdata Either a b = Left a | Right b
hsinstance Monad (Either e) where return x = Right x Right m >>= k = k m Left e >>= _ = Left e