Skip to content

Commit

Permalink
Merge pull request #9 from bellroy/remove-overlapping-instance
Browse files Browse the repository at this point in the history
Remove `instance PluckError e (Except e) m`
  • Loading branch information
endgame authored May 6, 2024
2 parents a18cf8d + 0d09d4c commit e2dae7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* Replaced the `HoistError` typeclass, which is about monads, with a
simpler `PluckError` typeclass that is about extracting errors from
values.
* Removed the instance for `Except e`, as it triggers overlapping
instance errors when attempting to hoist `ExceptT e m` for unknown
monads `m`.
* Introduced a parallel `Control.Monad.Fail.Hoist` module, for
hoisting error messages into `MonadFail`.

Expand Down
4 changes: 0 additions & 4 deletions src/Control/Monad/Error/Hoist.hs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,3 @@ instance Applicative m => PluckError e (Either e) m where
instance Monad m => PluckError e (ExceptT e m) m where
pluckError = runExceptT
foldError f g = either f g <=< runExceptT

instance Applicative m => PluckError e (Except e) m where
pluckError = pure . runExcept
foldError f g = either f g . runExcept

0 comments on commit e2dae7f

Please sign in to comment.