Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/ekmett/exceptions. Pull mirroring updated .
  1. Mar 04, 2025
  2. Dec 03, 2024
  3. Oct 31, 2024
  4. Oct 27, 2024
  5. Jun 02, 2024
  6. Apr 23, 2024
  7. Apr 20, 2024
  8. Jan 10, 2024
  9. Nov 19, 2023
  10. Aug 11, 2023
    • ncaq's avatar
      test: `cabal test -w ghc-9.4 --constraint="mtl == 2.3.1"` · 94d5979b
      ncaq authored and Ryan Scott's avatar Ryan Scott committed
      The test with the following command did not pass because the decision to import the mtl module was made by referring to the transformers version.
      
      ~~~console
      cabal test -w ghc-9.4 --constraint="mtl == 2.3.1"
      ~~~
      
      There were two avenues to resolve this.
      One is by making it refer to the mtl version,
      The other is to change the transformers module to import.
      
      It seems more natural to reference the mtl version, but since `mtl-2.3.1` still supports `transformers-0.5.6.2` which still provides `ErrorT` and so on, we can use `cabal test -w ghc-9.6 --constraint=" transformers=0.5.6.2" --constraint="mtl==2.3.1"`, the API will change when assuming `mtl-2.3.1`.
      Therefore, we decided to change to import the transformers module.
      94d5979b
  11. Jun 29, 2023
  12. Jan 19, 2023
  13. Jan 16, 2023
  14. Dec 04, 2022
  15. Nov 30, 2022
  16. Nov 29, 2022
  17. Nov 27, 2022
    • parsonsmatt's avatar
      Add `HasCallStack` to classes and functions (#90) · 88814cf9
      parsonsmatt authored
      * Add `HasCallStack` to classes and functions
      
      This PR adds `HasCallStack` constraints to the class methods on this library. This allows for callsites to be populated with interesting information. 
      
      The primary use case I can imagine here is supporting [`annotated-exception`](https://hackage.haskell.org/package/annotated-exception-0.2.0.4/docs/Control-Exception-Annotated.html), and allowing you to define an instance of `MonadThrow` that always annotates with callstack:
      
      ```haskell
      instance MonadThrow AppM where
          throwM = throwWithCallStack
      ```
      
      With this, anything that uses `throwM` at the `AppM` type gets a call stack on the attached exception.
      
      While this only benefits users of `annotated-exception` currently, when the GHC proposal to [decorate all exceptions with backtrace information](https://github.com/ghc-proposals/ghc-proposals/pull/330
      
      ) is implemented, then everyone benefits from this.
      
      Without this constraint, the `CallStack` used by the above instance points to the instance definition site - not terribly useful.
      
      * Use call-stack for backwards compatibility
      
      * Only depend on call-stack if using an old GHC version
      
      `exceptions` is a GHC boot package, so we want to make sure that it does not
      incur any external depedencies when using a recent GHC version.
      
      * Enable FlexibleContexts for the benefit of older GHCs
      
      Older versions of GHC require `FlexibleContexts` to use `call-stack`'s
      `type HasCallStack = (?callStack :: CallStack)` compatibility shim.
      
      * Drop support for GHC 7.0 and 7.2
      
      `call-stack`'s `HasCallStack` compatibility shim only supports back to GHC 7.4.
      As a result, we can't reasonably support GHC 7.0 and 7.2 in `exceptions`
      without a fair bit of grimy CPP. That being said, GHC 7.0 and 7.2 are quite
      ancient by this point, so I'm comfortable with simply dropping support for
      them. This patch makes the necessary `.cabal` and CI changes to accomplish that.
      
      * Enable ConstraintKinds for the benefit of older GHCs
      
      Older versions of GHC require `ConstraintKinds` to use `call-stack`'s
      `type HasCallStack = (?callStack :: CallStack)` compatibility shim.
      
      * Add withFrozenCallStack where possible
      
      * withFrozenCallStack fix for old GHC
      
      * freeze masks
      
      Co-authored-by: default avatarRyan Scott <ryan.gl.scott@gmail.com>
      88814cf9
  18. May 12, 2022
  19. May 07, 2022
  20. Mar 18, 2022
  21. Dec 12, 2021
  22. Nov 17, 2021
    • Vladislav Zavialov's avatar
      Enable TypeOperators to use (~) (#83) · c142d1ac
      Vladislav Zavialov authored
      GHC Proposal #371 requires TypeOperators to use type equality a~b.
      The following lines are affected:
      
      	src/Control/Monad/Catch.hs
      	354:instance e ~ SomeException => MonadThrow (Either e) where
      	357:instance e ~ SomeException => MonadCatch (Either e) where
      	364:instance e ~ SomeException => MonadMask (Either e) where
      
      The fix is to simply enable the extension.
      c142d1ac
  23. Jul 27, 2021
  24. Apr 02, 2021
  25. Mar 18, 2021
  26. Feb 16, 2021
  27. Dec 31, 2020
  28. Jun 30, 2020
  29. May 05, 2020
  30. Apr 15, 2020
  31. Mar 28, 2020
Loading