mrkkrp / mrkkrp/parser-combinators
many and some for permutation parsers
Open
Nobody has claimed this yet.
feature-request
- Dominant language
- Haskell
- Stars
- 55
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
Would be nice to have something like this. @recursion-ninja do you think this makes sense?
manyPerm :: Functor m => m a -> Permutation m [a]
manyPerm parser = go []
where
go acc = P (Just (reverse acc)) (go . (: acc) <$> parser)
somePerm :: Functor m => m a -> Permutation m [a]
somePerm parser = P Nothing (go . pure <$> parser)
where
go acc = P (Just (reverse acc)) (go . (: acc) <$> parser)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the proposed manyPerm and somePerm definitions in issue #39, then inspect the existing Permutation API and parser-combinator tests. Determine the intended behavior for zero and one parses, and consider whether focused tests can establish the expected semantics before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100