streamly
streamly copied to clipboard
Warn if a non-terminating Fold/Parser is used in applicative/alternative
It does not make sense to use a non-terminating fold/parser in an applicative/alternative/monad composition. It would be nice if we can identify this and produce a warning. Theoretically, we can identify if the Done/Error constructor is present in the fold/parser. This can perhaps be done by something like the fusion plugin/linter?
It may be possible to do this using types but that might make the life of users more difficult for little gain.