fmthoma / fmthoma/vgrep

Build failure with vty-5.34

Open
#59 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
109
Forks
8
PR merge metrics
No merged PRs in 30d

Description

```
src/Vgrep/Ansi/Parser.hs:71:37: error:
• No instance for (Semigroup Attr) arising from a use of ‘<>’
• In the first argument of ‘pure’, namely
‘(format attr' (bare t) <> rest)’
In a stmt of a 'do' block: pure (format attr' (bare t) <> rest)
In the expression:
do acs <- many attrChange
let attr' = foldr ($) attr (reverse acs)
t <- rawText
rest <- go attr'
....
|
71 | pure (format attr' (bare t) <> rest)
| ^^

src/Vgrep/Ansi/Parser.hs:105:17: error:
• No instance for (Monoid Attr) arising from a use of ‘mempty’
• In the first argument of ‘const’, namely ‘mempty’
In the expression: const mempty
In a case alternative: 0 -> const mempty
|
105 | 0 -> const mempty
| ^^^^^^
cabal: Failed to build vgrep-0.2.3.0
```

This seems to be due to the removal of `Attr`'s `Semigroup` and `Monoid` instances in `vty-5.34`: https://hackage.haskell.org/package/vty-5.34/changelog.

As a Hackage trustee I have revised `vgrep-0.2.3.0` to add a bound `vty < 5.34`: https://hackage.haskell.org/package/vgrep-0.2.3.0/revisions/

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with src/Vgrep/Ansi/Parser.hs at lines 71 and 105, then inspect the vty-5.34 changelog for the removed Attr instances. Reproduce the vgrep-0.2.3.0 build failure with vty-5.34 and determine the intended replacement for these uses. Done means the package builds successfully with vty-5.34 without relying on the temporary vty < 5.34 bound.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.