# Haskell Pattern Matching ## Metadata **Status**:: #x **Zettel**:: #zettel/fleeting **Created**:: [[2026-01-26]] **Parent**:: [[Haskell]] ## Synopsis Haskell allows nonexclusive pattern matching and will raise error at runtime on missing branches. Use `-W` to turn on the warning, which is not included in `-Wall`. The option `-Werror` can raise error on warnings. - `-W`: Provides the standard warnings plus `-fwarn-incomplete-patterns`, `-fwarn-dodgy-exports`, `-fwarn-dodgy-imports`, `-fwarn-unused-matches`, `-fwarn-unused-imports`, and `-fwarn-unused-binds`. - `-Wall`: Turns on all warning options that indicate potentially suspicious code. The warnings that are _not_ enabled by `-Wall` are `-fwarn-tabs`, `-fwarn-incomplete-uni-patterns`, `-fwarn-incomplete-record-updates`, `-fwarn-monomorphism-restriction`, `-fwarn-auto-orphans`, `-fwarn-implicit-prelude`, `-fwarn-missing-local-sigs`, `-fwarn-missing-import-lists`. - `-Werror`: Makes any warning into a fatal error. Useful so that you don't miss warnings when doing batch compilation.