streamly icon indicating copy to clipboard operation
streamly copied to clipboard

Warn if a non-terminating Fold/Parser is used in applicative/alternative

Open harendra-kumar opened this issue 5 years ago • 0 comments

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.

harendra-kumar avatar Aug 21 '20 15:08 harendra-kumar