[Haskell-cafe] Strange kind error when using Lens.traverseOf

Henning Thielemann lemming at henning-thielemann.de
Tue Jul 23 20:08:53 UTC 2024


On Tue, 23 Jul 2024, Tom Ellis wrote:

> On Tue, Jul 23, 2024 at 04:51:34PM +0200, Henning Thielemann wrote:
>
>> I compiled with:
>> 
>> $ ghc-9.6.6 -package lens -c src/Ganeti/LensPlain.hs
>
> A major difference between 9.0 and 9.2 is that GHC2021 is enabled by
> default in 9.2.  GHC2021 enables PolyKinds, and presumably what used
> to be assumed to be * (Type) is now generalized to k2.
>
> The simplest solution is probably just to put
>
>    {-# LANGUAGE NoPolyKinds #-}
>
> at the top of LensPlain.hs.  The reason it works as part of a Cabal
> project is that Cabal does not turn on GHC2021 by default.

Perfect! That solves the problem and explains everything. I guess I could 
be surprised for some more weeks.


More information about the Haskell-Cafe mailing list