#11986 closed bug (duplicate)

Record fields not defined with pattern synonym in ghci

Reported by: Iceland_jack Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.1
Keywords: PatternSynonyms Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #11985 Differential Rev(s):
Wiki Page:

Description

Another thing discovered while in the air: When you define pattern synonyms with record syntax, the fields aren't defined in GHCI:

$ ghci -ignore-dot-ghci -XPatternSynonyms
GHCi, version 8.1.20160419: http://www.haskell.org/ghc/  :? for help
Prelude> pattern Point {x, y} = (x, y)
Prelude> :t x

<interactive>:1:1: error: Variable not in scope: x
Prelude> 

Works fine when imported from a file.

Change History (1)

comment:1 Changed 20 months ago by mpickering

Resolution: duplicate
Status: newclosed

The same as #11985.

Note: See TracTickets for help on using tickets.