Safe Haskell | None |
---|---|
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 :: Type -> Type) where
- throwMultipleFixityDecls :: [(Name, [Fixity'])] -> m a
- throwMultiplePolarityPragmas :: [Name] -> m a
- warnUnknownNamesInFixityDecl :: [Name] -> m ()
- warnUnknownNamesInPolarityPragmas :: [Name] -> m ()
- warnUnknownFixityInMixfixDecl :: [Name] -> m ()
- warnPolarityPragmasButNotPostulates :: [Name] -> m ()
- data DoWarn
- fixitiesAndPolarities :: MonadFixityError m => DoWarn -> [Declaration] -> m (Fixities, Polarities)
Documentation
type Polarities = Map Name [Occurrence] Source #
class Monad m => MonadFixityError (m :: Type -> Type) where Source #
throwMultipleFixityDecls :: [(Name, [Fixity'])] -> m a Source #
throwMultiplePolarityPragmas :: [Name] -> m a Source #
warnUnknownNamesInFixityDecl :: [Name] -> m () Source #
warnUnknownNamesInPolarityPragmas :: [Name] -> m () Source #
warnUnknownFixityInMixfixDecl :: [Name] -> m () Source #
warnPolarityPragmasButNotPostulates :: [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.