Safe Haskell | Ignore |
---|---|
Language | GHC2021 |
Synopsis
- data MiniFixityEnv = MFE {}
- addLocalFixities :: MiniFixityEnv -> [Name] -> RnM a -> RnM a
- lookupMiniFixityEnv :: MiniFixityEnv -> Name -> Maybe (Located Fixity)
- emptyMiniFixityEnv :: MiniFixityEnv
- lookupFixityRn :: Name -> RnM Fixity
- lookupFixityRn_help :: Name -> RnM (Bool, Fixity)
- lookupFieldFixityRn :: FieldOcc GhcRn -> RnM Fixity
- lookupTyFixityRn :: LocatedN Name -> RnM Fixity
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.
addLocalFixities :: MiniFixityEnv -> [Name] -> RnM a -> RnM a Source #
lookupMiniFixityEnv :: MiniFixityEnv -> Name -> Maybe (Located Fixity) Source #