
#8581: Add support for explicitly-bidirectional pattern synonyms -------------------------------------+------------------------------------ Reporter: cactus | Owner: cactus Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: 5144 Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by Iceland_jack): This would be very nice to have, +1. The possibility of `_` being a shorthand for `undefined` is intriguing. It allows `_` to be a run-of-the-mill pattern exported by `Prelude` that may be redefined by users! The regular wildcard meaning where the expression is `undefined` could be defined as such with the proposed syntax: {{{ pattern _ <- a where _ = undefined failure :: a -> b failure _ = _ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8581#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler