Closed maksbotan closed 4 years ago
See the test failure.
It also needs to parse newline delineated lists and mixed newline comma lists. Cabal will except:
packages:
./
ghcide
Yeah, I'm already on it.
While reading Cabal sources I missed that it first parses fields into a tree and then parses its parts, that's why parseOptCommaList
does not have to deal with indices.
This commit should work. I've also added a testcase.
Thanks, I'll publish new version in the next few days
Thanks! The tool is very useful, by the way :)
Current parser for lists, like
packages:
incabal.project.local
, fails to process some input, for example:packages: foo/foo.cabal , bar/bar.cabal , baz/baz.cabal
This commit simplifies the parser by using
sepBy
directly and by handling indented fields more uniformly.