Is there no standard (Either a) monad instance?

前端 未结 4 1939
一整个雨季
一整个雨季 2021-01-01 18:14

I was under the impression that there was an instance for Either a somewhere, but I can\'t seem to find it. I have tried importing Control.Monad, Control.Monad.Instances and

4条回答
  •  遥遥无期
    2021-01-01 18:43

    There is not an instance for Either a, but there is for Either String in Control.Monad.Error. (Actually, it's for Error e => Either e, IIRC).

提交回复
热议问题