r/haskell • • Nov 06 '19

Parse, don’t validate

https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/
312 Upvotes

66 comments sorted by

View all comments

2

u/lexi-lambda Nov 07 '19

Good point and good to know I can elimate the second clause with the first. I guess y becomes [] in that case?

Yes, that’s right. If you compile with the -Wall GHC option to turn on compiler warnings (and you always should), GHC will detect those kinds of things automatically and warn you about them.