3 ms·
Exhaustive pattern matching and tagged unions (sum types) are both great. Haskell's had them since its inception.
by Jeff_Brown 3y ago
Exhaustive pattern matching and tagged unions (sum types) are both great. Haskell's had them since its inception.
- JoelMcCracken 3y agowell, sadly, you have to turn on an option to get exhaustivity checking. Which annoys me, because sometimes I forget to turn it on for a small project/script. I need to come up with a haskell "new project" template thing
- carterschonwald 3y agoWall!it’s great.
- Jeff_Brown 3y ago[A clarification to the less familiar: --Wall is a compiler option that stands for "all warnings".]
- carterschonwald 3y agoAnd in ghc is enables coverage checking for pattern matching. The most amazing compiler feature in most compilers Thx for expositing my remark :)