
#8582: Record syntax for pattern synonyms -------------------------------------+------------------------------------- Reporter: cactus | Owner: mpickering Type: feature request | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: Resolution: | Keywords: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: 5144 | Blocking: Related Tickets: | Differential Revisions: Phab:D1152 -------------------------------------+------------------------------------- Comment (by mpickering): The first example is a bit tricky although I don't think the results are unexpected. If instead you write {{{ data D = MkD { foo :: Int } pattern Pat = MkD { foo = 6 } baz = (Pat) { foo = 5 } }}} then everything works as expected. Otherwise there is a type error as `Pat` does not have a field `foo`. This is similar to one of the examples I posted on the original discussion thread. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8582#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler