Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/ekmett/exceptions. Pull mirroring updated .
  1. Feb 11, 2018
  2. Jan 28, 2018
    • Michael Snoyman's avatar
      Fix general bracket for ExceptT/ErrorT (#60) · 7ec3240e
      Michael Snoyman authored and Ryan Scott's avatar Ryan Scott committed
      * Demonstrate broken ExceptT instance for MonadMask
      
      * Simplify generalBracket so it works for ExceptT
      
      The previous type signature was in fact invalid, as it did not allow for
      a valid instance for ExceptT (et al). In particular, in the case of a
      non-exceptional Left result, neither the release nor cleanup functions
      could be used, since:
      
      * No result value was available for release
      * No SomeException value was available for cleanup
      
      It appears that this less pleasing version of generalBracket is the only
      one that works for all the types we care about.
      
      Furthermore: once we accept this, we are now forced to perform some
      discarding of updated state and Monoid written values in the StateT,
      WriterT, and RWST instances. This seems inherent to making things
      compatible with ExceptT.
      
      An alternative to this is to simply remove the ExceptT and ErrorT
      instances, but that's contrary to what many users want it seems.
      
      * Doc cleanups @RyanGIScott's review
      7ec3240e
  3. Jan 16, 2018
  4. Jan 12, 2018
  5. Jan 11, 2018
  6. Nov 22, 2017
  7. Jun 29, 2017
  8. Jun 16, 2017
    • Michael Snoyman's avatar
      Further generalization of generalBracket · af59d648
      Michael Snoyman authored
      I just realized that the function could be more general, and thereby
      more explicit in its intent, but allowing the non-exceptional release
      function to return a different type than the inner function.
      af59d648
  9. Jun 15, 2017
  10. Jun 13, 2017
  11. Jun 12, 2017
  12. Jun 06, 2017
  13. Apr 11, 2017
  14. Dec 12, 2016
  15. Nov 30, 2016
  16. Jul 20, 2016
    • Ryan Scott's avatar
    • Michael Snoyman's avatar
      Add instances for MonadCatch and MonadMask for Either (#56) · d63e1de4
      Michael Snoyman authored and Ryan Scott's avatar Ryan Scott committed
      Came up in a discussion with @bitonic. There's no downside I can see to
      the MonadCatch instance. However, the MonadMask instance is a little bit
      more controversial, in that it's not actually doing any masking.
      However, it's impossible to know that it's not masking the async
      exceptions since there are no side-effects from the Either monad.
      
      Of course, by using unsafePerformIO, we could observe the difference,
      but I think that's a valid trade-off.
      
      One final argument against MonadMask for Either: it's probably not
      terribly useful.
      d63e1de4
  17. Jul 17, 2016
  18. Jan 16, 2016
  19. Jan 15, 2016
  20. Jan 13, 2016
  21. Nov 23, 2015
  22. Nov 22, 2015
  23. Sep 23, 2015
  24. Aug 09, 2015
Loading