Does not compile on GHC 9.2.2 (pre-release): Module ‘Data.Semigroup’ does not export ‘getOption’
maerten opened this issue · 2 comments
maerten commented
lens > [40 of 86] Compiling Control.Lens.Wrapped
lens >
lens > /private/var/folders/0c/zmpjp7l568xcvnt49pkkn5p00000gn/T/stack-a625ece36a2e1acb/lens-5.0.1/src/Control/Lens/Wrapped.hs:756:15: error:
lens > Not in scope: type constructor or class ‘S.Option’
lens > Module ‘Data.Semigroup’ does not export ‘Option’.
lens > |
lens > 756 | instance (t ~ S.Option b) => Rewrapped (S.Option a) t
lens > | ^^^^^^^^
lens >
lens > /private/var/folders/0c/zmpjp7l568xcvnt49pkkn5p00000gn/T/stack-a625ece36a2e1acb/lens-5.0.1/src/Control/Lens/Wrapped.hs:756:41: error:
lens > Not in scope: type constructor or class ‘S.Option’
lens > Module ‘Data.Semigroup’ does not export ‘Option’.
lens > |
lens > 756 | instance (t ~ S.Option b) => Rewrapped (S.Option a) t
lens > | ^^^^^^^^
lens >
lens > /private/var/folders/0c/zmpjp7l568xcvnt49pkkn5p00000gn/T/stack-a625ece36a2e1acb/lens-5.0.1/src/Control/Lens/Wrapped.hs:757:19: error:
lens > Not in scope: type constructor or class ‘S.Option’
lens > Module ‘Data.Semigroup’ does not export ‘Option’.
lens > |
lens > 757 | instance Wrapped (S.Option a) where
lens > | ^^^^^^^^
lens >
lens > /private/var/folders/0c/zmpjp7l568xcvnt49pkkn5p00000gn/T/stack-a625ece36a2e1acb/lens-5.0.1/src/Control/Lens/Wrapped.hs:758:19: error:
lens > Not in scope: type constructor or class ‘S.Option’
lens > Module ‘Data.Semigroup’ does not export ‘Option’.
lens > |
lens > 758 | type Unwrapped (S.Option a) = Maybe a
lens > | ^^^^^^^^
lens >
lens > /private/var/folders/0c/zmpjp7l568xcvnt49pkkn5p00000gn/T/stack-a625ece36a2e1acb/lens-5.0.1/src/Control/Lens/Wrapped.hs:759:19: error:
lens > Not in scope: ‘S.getOption’
lens > Module ‘Data.Semigroup’ does not export ‘getOption’.
lens > |
lens > 759 | _Wrapped' = iso S.getOption S.Option
lens > | ^^^^^^^^^^^
lens >
lens > /private/var/folders/0c/zmpjp7l568xcvnt49pkkn5p00000gn/T/stack-a625ece36a2e1acb/lens-5.0.1/src/Control/Lens/Wrapped.hs:759:31: error:
lens > Not in scope: data constructor ‘S.Option’
lens > Module ‘Data.Semigroup’ does not export ‘Option’.
lens > |
lens > 759 | _Wrapped' = iso S.getOption S.Option
lens > | ^^^^^^^^
RyanGlScott commented
I wouldn't expect lens-5.0.1
to compile with GHC 9.2. GHC 9.2 uses template-haskell-2.18
, and lens-5.0.1
has an upper bound of <2.18
on its template-haskell
dependency.
Does building lens-5.1
(the most recently released version, which supports GHC 9.2.1) work?
maerten commented
Thanks for pointing out I was using an older version! I added the latest github commit to stack.yaml
and now it builds just fine 👍