-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow building with template-haskell-2.21.*
(GHC 9.8)
#1046
Conversation
This is made quite simple by using the `TyVarBndrVis`/`bndrVis` compatibility shims from `th-abstraction-0.6.*`. When that version of `th-abstraction` is not available, I provide these definitions using CPP. Fixes #1043.
I'll have to think about the best way to adapt these examples. |
I took a look at the Lines 181 to 182 in 7267819
It turns out that there is some grimy code here that catches all exceptions thrown (in pure code!) when invoking We could certainly define our own custom versions of For now, I'm inclined to just disable |
This avoids a `-Wx-partial` warning with GHC 9.8.
Some doctests in `Data.Data.Lens` use the partial `head` and `tail` functions, which now produce `-Wx-partial` warnings (implied by `-Wall`) as of GHC 9.8. Moreover, some of these doctests _rely_ on `head`/`tail` being partial, so it's not entirely straightforward to change them. To accommodate this, we redefine the `head`/`tail` functions (see the new `Control.Lens.Internal.Doctest` module) so that they can be used in the doctests without triggering any warnings. The end result should be indistinguishable to readers of the Haddocks.
As noted in 850b587#commitcomment-125292040, it's not entirely straightforward to disable a warning only in the doctests, nor is it even guaranteed to work reliably. As such, I've pushed an alternative approach that instead redefines |
This is made quite simple by using the
TyVarBndrVis
/bndrVis
compatibility shims fromth-abstraction-0.6.*
. When that version ofth-abstraction
is not available, I provide these definitions using CPP.Fixes #1043.
While I was in town, I also made sure that the
Prism
s thatLanguage.Haskell.TH.Lens
offers are up to date with recent versions of thetemplate-haskell
library.