Skip to content
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

Does not compile on GHC 9.2.2 (pre-release): Module ‘Data.Semigroup’ does not export ‘getOption’ #1000

Closed
maerten opened this issue Mar 3, 2022 · 2 comments

Comments

@maerten
Copy link

maerten commented Mar 3, 2022

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
Copy link
Collaborator

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
Copy link
Author

maerten commented Mar 4, 2022

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 👍

@maerten maerten closed this as completed Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants