Opened 3 years ago

Closed 3 years ago

#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:


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:  :? for help
Prelude> pattern Point {x, y} = (x, y)
Prelude> :t x

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

Works fine when imported from a file.

Change History (1)

comment:1 Changed 3 years ago by mpickering

Resolution: duplicate
Status: newclosed

The same as #11985.

Note: See TracTickets for help on using tickets.