1. 12 Nov, 2019 2 commits
  2. 01 Oct, 2019 1 commit
  3. 27 Aug, 2019 3 commits
  4. 27 Jun, 2019 2 commits
  5. 05 Jun, 2019 1 commit
    • Ryan Scott's avatar
      Make the test suite depend on the library (#71) · 9cf80838
      Ryan Scott authored
      Before, the test suite would rebuild the entirety of the library's
      source code separately from the library component, which feels
      wasteful. Since none of the test suite's dependencies depend on
      `exceptions`, there shouldn't be any reason why we have to do this.
  6. 02 May, 2019 3 commits
  7. 01 May, 2019 1 commit
  8. 30 Apr, 2019 1 commit
  9. 26 Mar, 2019 2 commits
  10. 15 Mar, 2019 2 commits
  11. 12 Mar, 2019 2 commits
  12. 10 Dec, 2018 1 commit
  13. 06 Nov, 2018 1 commit
  14. 17 Oct, 2018 1 commit
  15. 22 Sep, 2018 1 commit
  16. 03 Sep, 2018 1 commit
  17. 02 Jul, 2018 2 commits
  18. 04 Jun, 2018 1 commit
  19. 20 Apr, 2018 1 commit
  20. 11 Mar, 2018 1 commit
  21. 09 Mar, 2018 1 commit
    • gelisam's avatar
      change the type of generalBracket, fixes #63 (#64) · 9fe0a666
      gelisam authored and Ryan Scott's avatar Ryan Scott committed
      * SomeMSpec
      'MSpec' was an existential in 'm', but I want to construct another
      type which has both an 'MSpec' and some other 'm'-related fields. So I
      am exposing the 'm' in 'MSpec' and creating another existential which
      abstracts over it.
      * name the MSpecs
      I want to reuse them
      * a series of tests about detectable effects
      To make sure that the all the effects performed while releasing a
      resource are preserved, not just the IO effects.
      I'm writing the tests first, so the tests currently fail.
      * test that the release error wins
      It is easy to accidentally implement the 'ExceptT' instance in a way
      which causes the error message thrown during 'use' to get propagated
      instead of the one thrown by 'release'. When both 'use' and 'release'
      throw an IO exception, the one thrown by 'release' wins, so I think we
      should follow suit.
      * move the CatchT warning to the instance documentation
      Now that we have documentation for individual instances, there is no
      need to repeat this seldom-used information here.
      * explain the difference with lifted-base
      The exceptions package used to have an undocumented advantage over
      lifted-base, namely that the non-IO effects are not discarded, but
      then exceptions-0.9.0 made a breaking change which lost this
      advantage. In this PR, I am restoring this advantage, and I am
      documenting it, both to help users decide which package to pick, and
      so we don't foolishly repeat that mistake.
      * change the type of generalBracket, fixes #63
      This is the PR's main change. I make the type of 'generalBracket' even
      more general, which allows me to fix the implementations of 'StateT'
      and 'WriterT' so they don't discard their state changes.
      * MonadMask instance for MaybeT
      if ExceptT has one, MaybeT should have one too
      * onException vs onError
      Update the documentation to reflect the difference between an
      exception and an error, calling out the cases in which the user might
      expect to catch all errors but will only catch all exceptions.
      In particular, 'onException' will only run the handler when an
      exception is thrown but not when any other kind of error is thrown;
      this is not particularly useful, but we can't do better without
      changing its type signature. A new function 'onError' is introduced
      which does not have this flaw.
      * use return instead of pure
      to match the style of the existing codebase
      * add the changes to the changelog
      * add onError to the changelog
      * add Show instance for ExitCase
      * Explicitly state which constructors of ExitCase correspond to throwE and throwM.
      * typos
      * next version is 0.10.0
      * onError @since 0.10.0
      * spell out the difference between onError and onException
      * swap the arguments of generalBracket to match bracket
      * explain why users probably don't want to call generalBracket directly
      * reminder to keep the doc in sync with the implementation
      * @since annotations for MaybeT and ExceptT
      the Either instance has one, so MaybeT and ExceptT should have one as well
      * adjust phrasing
      * rename the type variables in bracket*
      to match the order in which the actions will be executed, like in
      * import Control.Applicative when required
      * use liftM instead of fmap, for older GHCs
      * also import Control.Applicative for GHC-7.4
  22. 08 Mar, 2018 1 commit
  23. 25 Feb, 2018 1 commit
  24. 24 Feb, 2018 1 commit
  25. 11 Feb, 2018 1 commit
    • Michael Snoyman's avatar
      More general bracket docs (#62) · 0657cd13
      Michael Snoyman authored and Ryan Scott's avatar Ryan Scott committed
      * More consistent generalBracket implementations
      The behavior is identical to before, but since I'm about to use these
      instances in the docs, I wanted to raise less confusing questions to
      readers about implementation.
      * Docs explaining generalBracket implementation
  26. 28 Jan, 2018 1 commit
    • 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
  27. 16 Jan, 2018 1 commit
  28. 12 Jan, 2018 1 commit
  29. 11 Jan, 2018 2 commits