Skip to content
Snippets Groups Projects
  1. Jan 10, 2024
  2. Nov 19, 2023
  3. 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
  4. Jun 29, 2023
  5. Jan 19, 2023
  6. Jan 16, 2023
  7. Dec 04, 2022
  8. Nov 30, 2022
  9. Nov 29, 2022
  10. 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
  11. May 12, 2022
  12. May 07, 2022
  13. Mar 18, 2022
  14. Dec 12, 2021
  15. 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
  16. Jul 27, 2021
  17. Apr 02, 2021
  18. Mar 18, 2021
  19. Feb 16, 2021
  20. Dec 31, 2020
  21. Jun 30, 2020
  22. May 05, 2020
  23. Apr 15, 2020
  24. Mar 28, 2020
  25. Mar 13, 2020
  26. Jan 16, 2020
  27. Dec 27, 2019
  28. Nov 17, 2019
  29. Nov 12, 2019
  30. Oct 01, 2019
  31. Aug 27, 2019
Loading