cgrep
cgrep copied to clipboard
cgrep 8.0.0/8.1.0 doesn't build
[19 of 29] Compiling CGrep.Output ( src/CGrep/Output.hs, dist/build/cgrep/cgrep-tmp/CGrep/Output.dyn_o )
src/CGrep/Output.hs:173:12: error:
• Illegal equational constraint GHC.Exts.Item a ~ B.Builder
(Use GADTs or TypeFamilies to permit this)
• When checking the inferred type
mkMatch :: forall {a}.
(GHC.Exts.Item a ~ B.Builder, Semigroup a, GHC.Exts.IsList a) =>
a -> Output -> a
In an equation for ‘jsonOutput’:
jsonOutput outs
= pure
$ mconcat . intersperse (B.char8 '\n')
$ [B.byteString "{ \"file\":\""
<> B.byteString fname <> B.byteString "\", \"matches\":["]
<>
[mconcat $ intersperse (B.char8 ',') (foldl mkMatch ... outs)]
<> [B.byteString "]}"]
where
fname | (Output f _ _ _) <- head outs = f
mkJToken chunk
= B.byteString "{ \"col\":"
<>
B.int64Dec (cOffset chunk)
<>
B.byteString ", \"token\":\""
<> B.byteString (cToken chunk) <> B.byteString "\" }"
mkMatch xs (Output _ n _ ts) = xs <> [...]
|
173 | mkMatch xs (Output _ n _ ts) =
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
I'm building with GHC 9.2.8 on Arch Linux x86_64.