Opened 4 years ago

Closed 4 years ago

#12061 closed feature request (duplicate)

Allow duplicate record fields in pattern synonyms

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


DuplicateRecordFields seems to not work for pattern synonyms

{-# Language PatternSynonyms, DuplicateRecordFields, NamedFieldPuns #-}

pattern A{x} = Just x
pattern B{x} = Just x
tg4t.hs:4:11: error: …
    Multiple declarations of ‘x’
    Declared at: /tmp/tg4t.hs:3:11
Compilation failed.

Change History (2)

comment:1 Changed 4 years ago by akio

Cc: akio added

comment:2 Changed 4 years ago by mpickering

Resolution: duplicate
Status: newclosed

This has been discussed a bit on #11228.

Note: See TracTickets for help on using tickets.