
#11987: Allow record wildcards with pattern synonyms which are defined in GHCi -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: mpickering Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.1 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): Phab:D2544 Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): The patch fixes comment:4 but doesn't fix the case where a user defines a record pattern synonym in the GHCi prompt. To be specific, here is the exact example which still fails. {{{ *Test Prelude> pattern P{x} = Just x *Test Prelude> let x=5 in P{..} <interactive>:8:12: error: Illegal `..' notation for constructor āPā The constructor has no labelled fields }}} It seems that `tcg_field_env` is not updated properly somewhere with the record pattern synonym selectors. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11987#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler