|
RE: Some random newbie questions: msg#00080lang.haskell.cafe
| * As far as I can determine, there is no way to check pattern matches for | exhaustiveness. Coming from OCaml, this feels like losing a significant | safety net! How do people program so as not to be getting dynamic match | failures all the time? GHC has -fwarn-incomplete-patterns and -fwarn-overlapped-patterns. But the code implementing these checks is old and crufty, and the warnings are sometimes a bit wrong -- at least when guards and numeric literals are involved. I think they are accurate when you are just using "ordinary" pattern matching. Cleaning up this bit of GHC is a long-standing to-do item, if anyone feels motivated to undertake it. It's a well-defined task, with plenty of well-written papers explaining how to do it -- but it's tricker than it seems at first! Simon |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: The implementation of Functional: 00080, Simon Peyton-Jones |
|---|---|
| Next by Date: | Guards (Was: Some random newbie questions): 00080, Henning Thielemann |
| Previous by Thread: | Some random newbie questionsi: 00080, Derek Elkins |
| Next by Thread: | Guards (Was: Some random newbie questions): 00080, Henning Thielemann |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |