Open pbrisbin opened 2 years ago
Oh, yeah, thats Simplified Subsumption, here to ruin your expectations for how eta reduction "just works" in Haskell.
Probably going to drop the SqlReadT
type in persistent
upstream because of it.
Im trying to better understand the options available here after running into a similar issue after upgraded to 9.2 and using 3.5.6.1 of esqueleto.
It seems like the GHC issue and @pbrisbin were able to work around this with ImpredicativeTypes
but I've got examples in our codebase where that doesnt work when defining a type alias that uses SqlReadT
/ SqlWriteT
. Is there a way to get things working without fully replacing these type aliases?
Maybe just get to 9.2.4 and re-enable DeepSubsumption
?
Yeah, if you jump directly to 9.2.4 and enable DeepSubsumption
then you'll be fine
This is not a bug, as far as I can tell. But I wanted to make you aware:
On GHC-9.0 (the current LTS), this fails with a very confusing error:
(The
SqlPersistT
vsSqlReadT
is a red-herring, them0
is the problem.)On GHC-9.2, you can enable
ImpredicativeTypes
to fix it. But on GHC 9.0, you have to do this:I'm also discussing this phenomena in a GHC Issue.
So, yeah...