elm-lang / elm-package

Command line tool to share Elm libraries
BSD 3-Clause "New" or "Revised" License
214 stars 66 forks source link

Use ExceptT instead of (deprecated) ErrorT #99

Closed nathan closed 9 years ago

nathan commented 9 years ago

This probably won't compile in GHC 7.10 without https://github.com/elm-lang/elm-package/pull/98.

See https://github.com/elm-lang/elm-repl/pull/56.

evancz commented 9 years ago

So Control.Monad.Error is deprecated, but MonadError still exists and it is in a module called Control.Monad.Error.Class? That seems really weird to me.

evancz commented 9 years ago

Is there a MonadExcept? Is it recommended that people start to move away from MonadError?

nathan commented 9 years ago

The difference between ErrorT and ExceptT is that ErrorT constrains the type of the error data with the Error class (e.g., compare their MonadError instances). MonadError doesn't use Error, so it isn't deprecated and probably won't ever be.

evancz commented 9 years ago

Okay, looks good to me, thank you!