fmthoma / vgrep

A pager for grep
BSD 3-Clause "New" or "Revised" License
104 stars 8 forks source link

Build failure with vty-5.34 #59

Open sjakobi opened 2 years ago

sjakobi commented 2 years ago
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/