ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Types.Fixity

Description

Fixity

Synopsis

- data Fixity = Fixity Int FixityDirection
- data FixityDirection
  - = InfixL
  - | InfixR
  - | InfixN
- data LexicalFixity
  - = Prefix
  - | Infix
- maxPrecedence :: Int
- minPrecedence :: Int
- defaultFixity :: Fixity
- negateFixity :: Fixity
- funTyFixity :: Fixity
- compareFixity :: Fixity -> Fixity -> (Bool, Bool)

# Documentation

data Fixity #

Constructors

Fixity Int FixityDirection |

#### Instances

Instances details

NFData Fixity # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods rnf :: Fixity -> () #
Data Fixity # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixity -> c Fixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Fixity # toConstr :: Fixity -> Constr # dataTypeOf :: Fixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Fixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fixity) # gmapT :: (forall b. Data b => b -> b) -> Fixity -> Fixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQ :: (forall d. Data d => d -> u) -> Fixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity #
Binary Fixity # |
Instance details Defined in GHC.Hs.Basic Methods put_ :: WriteBinHandle -> Fixity -> IO () # put :: WriteBinHandle -> Fixity -> IO (Bin Fixity) # get :: ReadBinHandle -> IO Fixity #
Outputable Fixity # |
Instance details Defined in GHC.Hs.Basic Methods ppr :: Fixity -> SDoc #
Eq Fixity # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods (==) :: Fixity -> Fixity -> Bool # (/=) :: Fixity -> Fixity -> Bool #

data FixityDirection #

Constructors

InfixL |
InfixR |
InfixN |

#### Instances

Instances details

NFData FixityDirection # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods rnf :: FixityDirection -> () #
Data FixityDirection # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FixityDirection -> c FixityDirection # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FixityDirection # toConstr :: FixityDirection -> Constr # dataTypeOf :: FixityDirection -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FixityDirection) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FixityDirection) # gmapT :: (forall b. Data b => b -> b) -> FixityDirection -> FixityDirection # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FixityDirection -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FixityDirection -> r # gmapQ :: (forall d. Data d => d -> u) -> FixityDirection -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FixityDirection -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FixityDirection -> m FixityDirection # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FixityDirection -> m FixityDirection # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FixityDirection -> m FixityDirection #
Binary FixityDirection # |
Instance details Defined in GHC.Hs.Basic Methods put_ :: WriteBinHandle -> FixityDirection -> IO () # put :: WriteBinHandle -> FixityDirection -> IO (Bin FixityDirection) # get :: ReadBinHandle -> IO FixityDirection #
Outputable FixityDirection # |
Instance details Defined in GHC.Hs.Basic Methods ppr :: FixityDirection -> SDoc #
Eq FixityDirection # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods (==) :: FixityDirection -> FixityDirection -> Bool # (/=) :: FixityDirection -> FixityDirection -> Bool #

data LexicalFixity #

Captures the fixity of declarations as they are parsed. This is not necessarily the same as the fixity declaration, as the normal fixity may be overridden using parens or backticks.

Constructors

Prefix |
Infix |

#### Instances

Instances details

Data LexicalFixity # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LexicalFixity -> c LexicalFixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LexicalFixity # toConstr :: LexicalFixity -> Constr # dataTypeOf :: LexicalFixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LexicalFixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LexicalFixity) # gmapT :: (forall b. Data b => b -> b) -> LexicalFixity -> LexicalFixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFixity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFixity -> r # gmapQ :: (forall d. Data d => d -> u) -> LexicalFixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LexicalFixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity #
Outputable LexicalFixity # |
Instance details Defined in GHC.Hs.Basic Methods ppr :: LexicalFixity -> SDoc #
Eq LexicalFixity # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods (==) :: LexicalFixity -> LexicalFixity -> Bool # (/=) :: LexicalFixity -> LexicalFixity -> Bool #

maxPrecedence :: Int #

minPrecedence :: Int #

defaultFixity :: Fixity #

negateFixity :: Fixity #

funTyFixity :: Fixity #

compareFixity :: Fixity -> Fixity -> (Bool, Bool) #