
#9671: Allow expressions in patterns -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: Resolution: | Keywords: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by ekmett): {{{Lookup $"Alice" =}}} is syntactically ambiguous in the context where you are doing a destructuring assignment. It could be defining `$` or providing the marker. This seems to indicate that the marker should be a divider or indicator of purpose that is already reserved syntax and isn't a valid operator. `->` is taken by view patterns, but you could use (with varying degrees of absurdity) already reserved operators like `<-`, `\`, `;`, `..`, `=>` as either a separator between parameters and fields or as an indicator in a manner that would simply be filling a hole in the grammar, if you really want a visual indicator of which arguments to the pattern are inputs if we really do want a visual marker here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9671#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler