unison
unison copied to clipboard
Implement "give back as needed" version of `Pattern.many`
Right now in join [many anyChar, literal "hi", many anyChar] the first many anyChar consumes the whole text, leaving an eof for the literal "hi", which fails.
The version that "gives back as needed" might be either a separate builtin, since it's less efficient:
Pattern.star : Pattern a -> Pattern a
Or we could just change the behavior of many.
A "reluctant" modifier would be good too, but is probably a separate issue.