Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Collecting fixity declarations (and polarity pragmas) for concrete declarations.
Synopsis
- type Fixities = Map Name Fixity'
- type Polarities = Map Name [Occurrence]
- class Monad m => MonadFixityError m where
- throwMultipleFixityDecls :: [(Name, [Fixity'])] -> m a
- throwMultiplePolarityPragmas :: [Name] -> m a
- warnUnknownNamesInFixityDecl :: HasCallStack => [Name] -> m ()
- warnUnknownNamesInPolarityPragmas :: HasCallStack => [Name] -> m ()
- warnUnknownFixityInMixfixDecl :: HasCallStack => [Name] -> m ()
- warnPolarityPragmasButNotPostulates :: HasCallStack => [Name] -> m ()
- data DoWarn
- fixitiesAndPolarities :: MonadFixityError m => DoWarn -> [Declaration] -> m (Fixities, Polarities)
Documentation
type Polarities = Map Name [Occurrence] Source #
class Monad m => MonadFixityError m where Source #
throwMultipleFixityDecls :: [(Name, [Fixity'])] -> m a Source #
throwMultiplePolarityPragmas :: [Name] -> m a Source #
warnUnknownNamesInFixityDecl :: HasCallStack => [Name] -> m () Source #
warnUnknownNamesInPolarityPragmas :: HasCallStack => [Name] -> m () Source #
warnUnknownFixityInMixfixDecl :: HasCallStack => [Name] -> m () Source #
warnPolarityPragmasButNotPostulates :: HasCallStack => [Name] -> m () Source #
Instances
MonadFixityError ScopeM Source # | |
Defined in Agda.Syntax.Scope.Monad throwMultipleFixityDecls :: [(Name, [Fixity'])] -> ScopeM a Source # throwMultiplePolarityPragmas :: [Name] -> ScopeM a Source # warnUnknownNamesInFixityDecl :: [Name] -> ScopeM () Source # warnUnknownNamesInPolarityPragmas :: [Name] -> ScopeM () Source # warnUnknownFixityInMixfixDecl :: [Name] -> ScopeM () Source # warnPolarityPragmasButNotPostulates :: [Name] -> ScopeM () Source # |
fixitiesAndPolarities :: MonadFixityError m => DoWarn -> [Declaration] -> m (Fixities, Polarities) Source #
Get the fixities and polarity pragmas from the current block. Doesn't go inside modules and where blocks. The reason for this is that these declarations have to appear at the same level (or possibly outside an abstract or mutual block) as their target declaration.