GHC.Hs.Binds

ghc-9.2.0.20210422: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Hs.Binds

Contents

- Orphan instances

Synopsis

- module Language.Haskell.Syntax.Binds
- emptyLHsBinds :: LHsBindsLR (GhcPass idL) idR
- emptyLocalBinds :: HsLocalBindsLR (GhcPass a) (GhcPass b)
- emptyValBindsIn :: HsValBindsLR (GhcPass a) (GhcPass b)
- emptyValBindsOut :: HsValBindsLR (GhcPass a) (GhcPass b)
- eqEmptyLocalBinds :: HsLocalBindsLR a b -> Bool
- isEmptyIPBindsPR :: HsIPBinds (GhcPass p) -> Bool
- isEmptyIPBindsTc :: HsIPBinds GhcTc -> Bool
- isEmptyLHsBinds :: LHsBindsLR (GhcPass idL) idR -> Bool
- isEmptyValBinds :: HsValBindsLR (GhcPass a) (GhcPass b) -> Bool
- plusHsValBinds :: HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a)
- pprDeclList :: [SDoc] -> SDoc
- pprLHsBinds :: (OutputableBndrId idL, OutputableBndrId idR) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
- pprLHsBindsForUser :: (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId id2) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc]
- pprMinimalSig :: OutputableBndr name => LBooleanFormula (GenLocated l name) -> SDoc
- pprSpec :: OutputableBndr id => id -> SDoc -> InlinePragma -> SDoc
- pprTcSpecPrags :: TcSpecPrags -> SDoc
- pprTicks :: SDoc -> SDoc -> SDoc
- pprVarSig :: OutputableBndr id => [id] -> SDoc -> SDoc
- ppr_monobind :: forall idL idR. (OutputableBndrId idL, OutputableBndrId idR) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc
- ppr_sig :: forall p. OutputableBndrId p => Sig (GhcPass p) -> SDoc
- pragBrackets :: SDoc -> SDoc
- pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc
- data AnnSig = AnnSig {
  - asDcolon :: AddEpAnn
  - asRest :: [AddEpAnn]
  }
- data NHsValBindsLR idL = NValBinds [(RecFlag, LHsBinds idL)] [LSig GhcRn]

# Documentation

module Language.Haskell.Syntax.Binds

emptyLHsBinds :: LHsBindsLR (GhcPass idL) idR Source #

emptyLocalBinds :: HsLocalBindsLR (GhcPass a) (GhcPass b) Source #

emptyValBindsIn :: HsValBindsLR (GhcPass a) (GhcPass b) Source #

emptyValBindsOut :: HsValBindsLR (GhcPass a) (GhcPass b) Source #

eqEmptyLocalBinds :: HsLocalBindsLR a b -> Bool Source #

isEmptyIPBindsPR :: HsIPBinds (GhcPass p) -> Bool Source #

isEmptyIPBindsTc :: HsIPBinds GhcTc -> Bool Source #

isEmptyLHsBinds :: LHsBindsLR (GhcPass idL) idR -> Bool Source #

isEmptyValBinds :: HsValBindsLR (GhcPass a) (GhcPass b) -> Bool Source #

plusHsValBinds :: HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) Source #

pprDeclList :: [SDoc] -> SDoc Source #

pprLHsBinds :: (OutputableBndrId idL, OutputableBndrId idR) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc Source #

pprLHsBindsForUser :: (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId id2) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc] Source #

pprMinimalSig :: OutputableBndr name => LBooleanFormula (GenLocated l name) -> SDoc Source #

pprSpec :: OutputableBndr id => id -> SDoc -> InlinePragma -> SDoc Source #

pprTcSpecPrags :: TcSpecPrags -> SDoc Source #

pprTicks :: SDoc -> SDoc -> SDoc Source #

pprVarSig :: OutputableBndr id => [id] -> SDoc -> SDoc Source #

ppr_monobind :: forall idL idR. (OutputableBndrId idL, OutputableBndrId idR) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc Source #

ppr_sig :: forall p. OutputableBndrId p => Sig (GhcPass p) -> SDoc Source #

pragBrackets :: SDoc -> SDoc Source #

pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc Source #

Using SourceText in case the pragma was spelled differently or used mixed case

data AnnSig Source #

Constructors

AnnSig |
Fields asDcolon :: AddEpAnn asRest :: [AddEpAnn]

#### Instances

Instances details

Data AnnSig # |
Instance details Defined in GHC.Hs.Binds Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnSig -> c AnnSig Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnSig Source # toConstr :: AnnSig -> Constr Source # dataTypeOf :: AnnSig -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnSig) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnSig) Source # gmapT :: (forall b. Data b => b -> b) -> AnnSig -> AnnSig Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnSig -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnSig -> r Source # gmapQ :: (forall d. Data d => d -> u) -> AnnSig -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnSig -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnSig -> m AnnSig Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnSig -> m AnnSig Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnSig -> m AnnSig Source #

data NHsValBindsLR idL Source #

Constructors

NValBinds [(RecFlag, LHsBinds idL)] [LSig GhcRn] |

#### Instances

Instances details

Data (NHsValBindsLR GhcPs) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NHsValBindsLR GhcPs -> c (NHsValBindsLR GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NHsValBindsLR GhcPs) Source # toConstr :: NHsValBindsLR GhcPs -> Constr Source # dataTypeOf :: NHsValBindsLR GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (NHsValBindsLR GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (NHsValBindsLR GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> NHsValBindsLR GhcPs -> NHsValBindsLR GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NHsValBindsLR GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NHsValBindsLR GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> NHsValBindsLR GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> NHsValBindsLR GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcPs -> m (NHsValBindsLR GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcPs -> m (NHsValBindsLR GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcPs -> m (NHsValBindsLR GhcPs) Source #
Data (NHsValBindsLR GhcRn) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NHsValBindsLR GhcRn -> c (NHsValBindsLR GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NHsValBindsLR GhcRn) Source # toConstr :: NHsValBindsLR GhcRn -> Constr Source # dataTypeOf :: NHsValBindsLR GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (NHsValBindsLR GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (NHsValBindsLR GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> NHsValBindsLR GhcRn -> NHsValBindsLR GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NHsValBindsLR GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NHsValBindsLR GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> NHsValBindsLR GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> NHsValBindsLR GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcRn -> m (NHsValBindsLR GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcRn -> m (NHsValBindsLR GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcRn -> m (NHsValBindsLR GhcRn) Source #
Data (NHsValBindsLR GhcTc) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NHsValBindsLR GhcTc -> c (NHsValBindsLR GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NHsValBindsLR GhcTc) Source # toConstr :: NHsValBindsLR GhcTc -> Constr Source # dataTypeOf :: NHsValBindsLR GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (NHsValBindsLR GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (NHsValBindsLR GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> NHsValBindsLR GhcTc -> NHsValBindsLR GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NHsValBindsLR GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NHsValBindsLR GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> NHsValBindsLR GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> NHsValBindsLR GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcTc -> m (NHsValBindsLR GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcTc -> m (NHsValBindsLR GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcTc -> m (NHsValBindsLR GhcTc) Source #

# Orphan instances

Outputable TcSpecPrag # |
Instance details Methods ppr :: TcSpecPrag -> SDoc Source #
OutputableBndrId p => Outputable (ABExport (GhcPass p)) # |
Instance details Methods ppr :: ABExport (GhcPass p) -> SDoc Source #
OutputableBndrId p => Outputable (FixitySig (GhcPass p)) # |
Instance details Methods ppr :: FixitySig (GhcPass p) -> SDoc Source #
OutputableBndrId p => Outputable (HsIPBinds (GhcPass p)) # |
Instance details Methods ppr :: HsIPBinds (GhcPass p) -> SDoc Source #
OutputableBndrId p => Outputable (IPBind (GhcPass p)) # |
Instance details Methods ppr :: IPBind (GhcPass p) -> SDoc Source #
OutputableBndrId p => Outputable (Sig (GhcPass p)) # |
Instance details Methods ppr :: Sig (GhcPass p) -> SDoc Source #
(OutputableBndrId pl, OutputableBndrId pr) => Outputable (HsBindLR (GhcPass pl) (GhcPass pr)) # |
Instance details Methods ppr :: HsBindLR (GhcPass pl) (GhcPass pr) -> SDoc Source #
(OutputableBndrId pl, OutputableBndrId pr) => Outputable (HsLocalBindsLR (GhcPass pl) (GhcPass pr)) # |
Instance details Methods ppr :: HsLocalBindsLR (GhcPass pl) (GhcPass pr) -> SDoc Source #
(OutputableBndrId pl, OutputableBndrId pr) => Outputable (HsValBindsLR (GhcPass pl) (GhcPass pr)) # |
Instance details Methods ppr :: HsValBindsLR (GhcPass pl) (GhcPass pr) -> SDoc Source #
(OutputableBndrId l, OutputableBndrId r) => Outputable (PatSynBind (GhcPass l) (GhcPass r)) # |
Instance details Methods ppr :: PatSynBind (GhcPass l) (GhcPass r) -> SDoc Source #