Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ormolu.Fixity.Internal
Synopsis
- data OpName
- pattern OpName :: Text -> OpName
- unOpName :: OpName -> Text
- occOpName :: OccName -> OpName
- data FixityDirection
- data FixityInfo = FixityInfo {
- fiDirection :: Maybe FixityDirection
- fiMinPrecedence :: Int
- fiMaxPrecedence :: Int
- defaultFixityInfo :: FixityInfo
- colonFixityInfo :: FixityInfo
- data HackageInfo = HackageInfo (Map PackageName FixityMap) (Map PackageName Int)
- type FixityMap = Map OpName FixityInfo
- newtype LazyFixityMap = LazyFixityMap [FixityMap]
- lookupFixity :: OpName -> LazyFixityMap -> Maybe FixityInfo
Documentation
An operator name.
data FixityDirection Source #
Fixity direction.
Instances
data FixityInfo Source #
Fixity information about an infix operator that takes the uncertainty that can arise from conflicting definitions into account.
Constructors
FixityInfo | |
Fields
|
Instances
Semigroup FixityInfo Source # | Gives the ability to merge two (maybe conflicting) definitions for an operator, keeping the higher level of compatible information from both. |
Defined in Ormolu.Fixity.Internal Methods (<>) :: FixityInfo -> FixityInfo -> FixityInfo sconcat :: NonEmpty FixityInfo -> FixityInfo stimes :: Integral b => b -> FixityInfo -> FixityInfo | |
Generic FixityInfo Source # | |
Defined in Ormolu.Fixity.Internal Associated Types type Rep FixityInfo :: Type -> Type | |
Show FixityInfo Source # | |
Defined in Ormolu.Fixity.Internal Methods showsPrec :: Int -> FixityInfo -> ShowS show :: FixityInfo -> String showList :: [FixityInfo] -> ShowS | |
Binary FixityInfo Source # | |
Defined in Ormolu.Fixity.Internal | |
Eq FixityInfo Source # | |
Defined in Ormolu.Fixity.Internal | |
Ord FixityInfo Source # | |
Defined in Ormolu.Fixity.Internal Methods compare :: FixityInfo -> FixityInfo -> Ordering (<) :: FixityInfo -> FixityInfo -> Bool (<=) :: FixityInfo -> FixityInfo -> Bool (>) :: FixityInfo -> FixityInfo -> Bool (>=) :: FixityInfo -> FixityInfo -> Bool max :: FixityInfo -> FixityInfo -> FixityInfo min :: FixityInfo -> FixityInfo -> FixityInfo | |
type Rep FixityInfo Source # | |
Defined in Ormolu.Fixity.Internal type Rep FixityInfo = D1 ('MetaData "FixityInfo" "Ormolu.Fixity.Internal" "ormolu-0.5.3.0-LSqmAwaUDYM2znHf8JMYPC" 'False) (C1 ('MetaCons "FixityInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "fiDirection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FixityDirection)) :*: (S1 ('MetaSel ('Just "fiMinPrecedence") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "fiMaxPrecedence") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))) |
defaultFixityInfo :: FixityInfo Source #
The lowest level of information we can have about an operator.
colonFixityInfo :: FixityInfo Source #
Fixity info of the built-in colon data constructor.
data HackageInfo Source #
The map of operators declared by each package and the popularity of each package, if available.
Constructors
HackageInfo | |
Fields
|
Instances
Generic HackageInfo Source # | |
Defined in Ormolu.Fixity.Internal Associated Types type Rep HackageInfo :: Type -> Type | |
Binary HackageInfo Source # | |
Defined in Ormolu.Fixity.Internal | |
type Rep HackageInfo Source # | |
Defined in Ormolu.Fixity.Internal type Rep HackageInfo = D1 ('MetaData "HackageInfo" "Ormolu.Fixity.Internal" "ormolu-0.5.3.0-LSqmAwaUDYM2znHf8JMYPC" 'False) (C1 ('MetaCons "HackageInfo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map PackageName FixityMap)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map PackageName Int)))) |
type FixityMap = Map OpName FixityInfo Source #
Map from the operator name to its FixityInfo
.
newtype LazyFixityMap Source #
Constructors
LazyFixityMap [FixityMap] |
Instances
Show LazyFixityMap Source # | |
Defined in Ormolu.Fixity.Internal Methods showsPrec :: Int -> LazyFixityMap -> ShowS show :: LazyFixityMap -> String showList :: [LazyFixityMap] -> ShowS |
lookupFixity :: OpName -> LazyFixityMap -> Maybe FixityInfo Source #
Lookup a FixityInfo
of an operator. This might have drastically
different performance depending on whether this is an "unusual" operator.