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

Description

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
                 /tmp/tg4t.hs:4:11
Compilation failed.

Change History (2)

comment:1 Changed 11 months ago by akio

Cc: akio added

comment:2 Changed 11 months ago by mpickering

Resolution: duplicate
Status: newclosed

This has been discussed a bit on #11228.

Note: See TracTickets for help on using tickets.