
#5144: Pattern synonyms -------------------------------------+------------------------------------ Reporter: simonpj | 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: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by simonmar): We need to think about the import/export situation. One of the goals of pattern synonyms is to abstract constructors, so that a library can change a data type representation while allowing clients to continue to use pattern matching. Clearly we can't use the `T(P1,P2,..)` syntax for exporting patterns (what is `T`?), but perhaps we can use the `pattern` syntax for exporting constructors. I haven't thought about this very hard. When a pattern is imported, can it be used in an expression? Does the client know whether it can be used in an expression or not? What do the Haddock docs for pattern synonyms look like? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/5144#comment:21 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler