ghc-9.10.1: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Rename.Fixity

Synopsis

Documentation

data MiniFixityEnv Source #

Mini fixity env for the names we're about to bind, in a single binding group

It is keyed by the *FastString*, not the *OccName*, because the single fixity decl infix 3 T affects both the data constructor T and the type constructor T

We keep the location so that if we find a duplicate, we can report it sensibly

Fixity declarations may influence names in a single namespace by using a type or data specifier, e.g. in:

 data a :*: b = a :*: b
 infix 3 type :*:

To handle that correctly, MiniFixityEnv contains separate fields for type-level and data-level names. If no namespace specifier is provided, the declaration will populate both the type-level and data-level fields.

lookupFixityRn_help :: Name -> RnM (Bool, Fixity) Source #

lookupFixityRn_help returns (True, fixity) if it finds a Fixity in a local environment or from an interface file. Otherwise, it returns (False, fixity) (e.g., for unbound Names or Names without user-supplied fixity declarations).