Skip to content

Conversation

larskuhtz
Copy link

@larskuhtz larskuhtz commented Oct 23, 2021

tested with

cabal build all --allow-newer=base,template-haskell,ghc-prim,ghc-bignum
cabal test all --allow-newer=base,template-haskell,ghc-prim,ghc-bignum

This currently still requires the following source dependencies when building with ghc-9.2

-- in the main branch
source-repository-package
  type: git
  location: https://github.com/nfrisby/invariant-functors
  tag: ac836de79c0ed23a407890c68a4db9552c01f9f4

-- in the main branch
source-repository-package
  type: git
  location: https://github.com/ekmett/lens
  tag: f76e2716be525657a408a6f43eaee26ace2e5b77

-- PR submitted
source-repository-package
  type: git
  location: https://github.com/hackage-package-forks/qc-instances
  tag: 066630fec39dda09ea600a61c763d2840dde7568

#endif

{-
deriving instance SemialignWithIndex () Option

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to move the #endif to below this block comment, so that if it's ever uncommented it will do the right thing?

(_, True) -> Done
#if !MIN_VERSION_base(4,16,0)
_ -> Skip (sa, sb, Nothing, False)
#endif

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you need to do this? It compiles fine for me without making this change.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this I get a warning from GHC about a redundant pattern match. Newer versions of GHC are smarter in recognizing those than previous versions.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather match above with av@(Just x)

It wasn't obvious to me why the branch is redundant.

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

Successfully merging this pull request may close these issues.

3 participants