Fix tuple patterns
https://github.com/MarcWeber/hasktags/pull/99 attempted to fix multiline tuple patterns, but in the process broke some test. In fact, it turns out tuple patterns were underexercised in tests, so we were lucky to catch this (it also broke the handling of prefix operator definitions). Moreover, the logic in that PR was hard to understand in places.
This PR fixes this by replacing the tuple-splitting logic by a simple unfold splitting on delimiters.
Also, to silence GHC warnings, it introduces two prisms _TokenName and _NewLine to use instead of eg map (\(NewLine x ...) -> x) . filter isNewLine.
Closes: #101 Fixes: #99
CI fails for 8.0 and 8.2 because of the Semigroup incompatibility.
I think these versions should simply be dropped from CI, rather than fixing the imports in the code.
To drop, remove them from tested-with in the .cabal file, and then run haskell-ci regenerate or just delete them from .github/workflows/haskell-ci.yml.
In cleaning up my outstanding bugs list, I noticed I hadn't addressed this. Apologies. Unfortunately, enough time has elapsed that the CI logs have been wiped, so I can't assess how hard it'd be to bridge the Semigroup/Monoid change. Moreover, haskell-ci doesn't like some of the GHC versions configured (9.6.7, 9.8.4, 9.10.2, 9.12.2) so I couldn't do this automatically. Hopefully my manual patch is OK.
Moreover,
haskell-cidoesn't like some of the GHC versions configured (9.6.7, 9.8.4, 9.10.2, 9.12.2)
You need to install haskell-ci from its github repo, the released version on hackage is always way behind.