data Dec
= ...
| InfixD Fixity NamespaceSpecifier Name
-- ^ @{ infix 3 data foo }@
-- | A way to specify a namespace to look in when GHC needs to find
-- a name's source
data NamespaceSpecifier
= NoNamespaceSpecifier -- ^ Name may be everything; If there are two
-- names in different namespaces, then consider both
| TypeNamespaceSpecifier -- ^ Name should be a type-level entity, such as a
-- data type, type alias, type family, type class,
-- or type variable
| DataNamespaceSpecifier -- ^ Name should be a term-level entity, such as a
-- function, data constructor, or pattern synonym
(Note that InfixD already existed before, but the NamespaceSpecifier field is new.)
template-haskell-2.22.0.0
(shipped with GHC 9.10.1) includes support for namespaces in fixity declarations:(Note that
InfixD
already existed before, but theNamespaceSpecifier
field is new.)We should update
DInfix
accordingly.