| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Proto3.Suite.DotProto.Generate.Syntax
Description
Utilities to manipulate Haskell AST
Synopsis
- type HsAlt = LMatch GhcPs HsExp
- type HsBangType = LBangType GhcPs
- type HsBind = LHsBind GhcPs
- type HsConDecl = LConDecl GhcPs
- type HsDecl = LHsDecl GhcPs
- type HsDerivStrategy = LDerivStrategy GhcPs
- type HsDerivingClause = LHsDerivingClause GhcPs
- type HsExp = LHsExpr GhcPs
- type HsExportSpec = LIE GhcPs
- type HsGrhs = LGRHS GhcPs HsExp
- type HsGuardedAlts = GRHSs GhcPs HsExp
- type HsImportDecl = LImportDecl GhcPs
- type HsImportSpec = LIE GhcPs
- type HsMatch = LMatch GhcPs HsExp
- type HsName = LIdP GhcPs
- type HsOuterFamEqnTyVarBndrs = HsOuterFamEqnTyVarBndrs GhcPs
- type HsOuterSigTyVarBndrs = HsOuterSigTyVarBndrs GhcPs
- type HsPat = LPat GhcPs
- type HsQName = LIdP GhcPs
- type HsQOp = LHsExpr GhcPs
- type HsSig = LSig GhcPs
- type HsTyVarBndrU = LHsTyVarBndr () GhcPs
- type HsTyVarBndrV = LHsTyVarBndr (HsBndrVis GhcPs) GhcPs
- type HsType = LHsType GhcPs
- type Module = ModuleName
- pattern VirtualBraces :: Int -> EpLayout
- class SyntaxDefault a where
- synDef :: a
- pattern PfxCon :: [arg] -> HsConDetails Void arg r
- haskellName :: NameSpace -> String -> HsQName
- jsonpbName :: NameSpace -> String -> HsQName
- grpcName :: NameSpace -> String -> HsQName
- lrName :: NameSpace -> String -> HsQName
- protobufName :: NameSpace -> String -> HsQName
- protobufASTName :: NameSpace -> String -> HsQName
- protobufFormName :: NameSpace -> String -> HsQName
- proxyName :: NameSpace -> String -> HsQName
- haskellNS :: ModuleName
- protobufFormNS :: ModuleName
- protobufFormType :: NameSpace -> String -> HsType
- formProtoTypeT :: HsType
- formNamesOf :: HsQName
- formNumberOf :: HsQName
- formOneOfOf :: HsQName
- formCardinalityOf :: HsQName
- formProtoTypeOf :: HsQName
- formFieldNotFound :: HsType
- formFieldOrOneOfNotFound :: HsType
- formUnpackedT :: HsType
- formPackedT :: HsType
- formCardinalityT :: HsType
- formImplicitT :: HsType
- formOptionalT :: HsType
- formRepeatedT :: HsType
- formInt32T :: HsType
- formInt64T :: HsType
- formSInt32T :: HsType
- formSInt64T :: HsType
- formUInt32T :: HsType
- formUInt64T :: HsType
- formFixed32T :: HsType
- formFixed64T :: HsType
- formSFixed32T :: HsType
- formSFixed64T :: HsType
- formStringT :: HsType
- formBytesT :: HsType
- formBoolT :: HsType
- formFloatT :: HsType
- formDoubleT :: HsType
- formEnumerationT :: HsType
- formMessageT :: HsType
- formMapT :: HsType
- formWrapperT :: HsType
- app :: HsExp -> HsExp -> HsExp
- apply :: HsExp -> [HsExp] -> HsExp
- appAt :: HsExp -> HsType -> HsExp
- applyAt :: HsExp -> [HsType] -> HsExp
- opApp :: HsExp -> HsQOp -> HsExp -> HsExp
- maybeModify :: HsExp -> Maybe HsExp -> HsExp
- paren :: HsExp -> HsExp
- parenPat :: HsPat -> HsPat
- parenTy :: HsType -> HsType
- applicativeApply :: HsExp -> [HsExp] -> HsExp
- tyApp :: HsType -> HsType -> HsType
- tyApply :: HsType -> [HsType] -> HsType
- splitTyApp :: HsType -> (HsType, [HsType])
- tyConApp :: HsName -> HsType -> HsType
- tyConApply :: HsName -> [HsType] -> HsType
- splitTyConApp :: HsType -> Maybe (HsName, [HsType])
- funTy :: HsType -> HsType -> HsType
- unrestrictedArrow_ :: HsArrow GhcPs
- unbangedTy_ :: HsType -> HsBangType
- module_ :: ModuleName -> Maybe [HsExportSpec] -> [HsImportDecl] -> [HsDecl] -> HsModule GhcPs
- importDecl_ :: ModuleName -> Bool -> Maybe ModuleName -> Maybe (Bool, [HsImportSpec]) -> HsImportDecl
- ieName_ :: HsName -> HsImportSpec
- ieNameAll_ :: HsName -> HsImportSpec
- dataDecl_ :: String -> [HsTyVarBndrV] -> [HsConDecl] -> [HsQName] -> HsDecl
- recDecl_ :: HsName -> [([HsName], HsBangType)] -> HsConDecl
- conDecl_ :: HsName -> [HsBangType] -> HsConDecl
- derivingClause_ :: Maybe HsDerivStrategy -> [(HsOuterSigTyVarBndrs, HsType)] -> Maybe HsDerivingClause
- splitDerivingClause :: HsDerivingClause -> (Maybe HsDerivStrategy, [(HsOuterSigTyVarBndrs, HsType)])
- instDecl_ :: HsQName -> [HsType] -> [HsBind] -> HsDecl
- typeOfInstDecl :: HsDecl -> Maybe (HsOuterSigTyVarBndrs, HsType)
- closedTyFamDecl_ :: HsQName -> [HsTyVarBndrV] -> HsType -> [(Maybe [HsTyVarBndrU], [HsType], HsType)] -> HsDecl
- tyFamInstDecl_ :: HsQName -> Maybe [HsTyVarBndrU] -> [HsType] -> HsType -> HsDecl
- valDecl_ :: HsBind -> HsDecl
- patBind_ :: HsPat -> HsExp -> HsBind
- functionS_ :: String -> [([HsPat], HsExp)] -> HsBind
- function_ :: HsName -> [([HsPat], HsExp)] -> HsBind
- functionLike_ :: SrcStrictness -> HsName -> [([HsPat], HsExp)] -> HsBind
- typeSig_ :: [HsName] -> HsOuterSigTyVarBndrs -> HsType -> HsDecl
- implicitOuterFamEqnTyVarBinders_ :: HsOuterFamEqnTyVarBndrs
- implicitOuterSigTyVarBinders_ :: HsOuterSigTyVarBndrs
- userTyVar_ :: flag -> HsName -> LHsTyVarBndr flag GhcPs
- kindedTyVar_ :: flag -> HsName -> HsType -> LHsTyVarBndr flag GhcPs
- wild_ :: HsPat
- qual_ :: ModuleName -> NameSpace -> String -> HsQName
- unqual_ :: NameSpace -> String -> HsName
- uvar_ :: String -> HsExp
- var_ :: HsQName -> HsExp
- fieldBind_ :: HsName -> HsExp -> LHsRecField GhcPs HsExp
- recordCtor_ :: HsName -> [LHsRecField GhcPs HsExp] -> HsExp
- fieldUpd_ :: HsName -> HsExp -> LHsRecUpdField GhcPs GhcPs
- recordUpd_ :: HsExp -> [LHsRecUpdField GhcPs GhcPs] -> HsExp
- protobufType_ :: String -> HsType
- primType_ :: String -> HsType
- protobufStringType_ :: String -> HsType
- protobufBytesType_ :: String -> HsType
- protobufFixedType_ :: HsType -> HsType
- protobufSignedType_ :: HsType -> HsType
- protobufWrappedType_ :: HsType -> HsType
- typeNamed_ :: HsName -> HsType
- type_ :: String -> HsType
- tvarn_ :: String -> HsName
- tvar_ :: String -> HsType
- kindSig_ :: HsType -> HsType -> HsType
- tupleType_ :: [HsType] -> HsType
- patVar :: String -> HsPat
- conPat :: HsQName -> [HsPat] -> HsPat
- recPat :: HsQName -> [LHsRecField GhcPs HsPat] -> HsPat
- fieldPunPat :: HsName -> LHsRecField GhcPs HsPat
- alt_ :: HsPat -> HsExp -> HsAlt
- case_ :: HsExp -> [HsAlt] -> HsExp
- let_ :: [HsBind] -> HsExp -> HsExp
- lambda_ :: [HsPat] -> HsExp -> HsExp
- if_ :: HsExp -> HsExp -> HsExp -> HsExp
- tuple_ :: [HsExp] -> HsExp
- tupleT_ :: [HsType] -> HsType
- list_ :: [HsExp] -> HsExp
- listT_ :: [HsType] -> HsType
- str_ :: String -> HsExp
- strPat :: String -> HsPat
- symT :: String -> HsType
- dotProtoFieldC :: HsExp
- primC :: HsExp
- optionalC :: HsExp
- repeatedC :: HsExp
- nestedRepeatedC :: HsExp
- namedC :: HsExp
- mapC :: HsExp
- fieldNumberC :: HsExp
- singleC :: HsExp
- pathC :: HsExp
- dotsC :: HsExp
- qualifiedC :: HsExp
- anonymousC :: HsExp
- dotProtoOptionC :: HsExp
- identifierC :: HsExp
- stringLitC :: HsExp
- intLitC :: HsExp
- floatLitC :: HsExp
- boolLitC :: HsExp
- forceEmitC :: HsExp
- forceEmitT :: HsType
- encodeMessageFieldE :: HsExp
- decodeMessageFieldE :: HsExp
- atE :: HsExp
- oneofE :: HsExp
- trueC :: HsExp
- falseC :: HsExp
- nothingC :: HsExp
- nothingN :: HsQName
- nothingT :: HsType
- justC :: HsExp
- justN :: HsQName
- justT :: HsType
- maybeT :: HsType
- fromStringE :: HsExp
- pureE :: HsExp
- returnE :: HsExp
- mappendE :: HsExp
- memptyE :: HsExp
- msumE :: HsExp
- fmapE :: HsExp
- natT :: HsType
- symbolT :: HsType
- typeErrorT :: HsType
- apOp :: HsQOp
- fmapOp :: HsQOp
- composeOp :: HsQOp
- fractionOp :: HsQOp
- bindOp :: HsQOp
- altOp :: HsQOp
- toJSONPBOp :: HsQOp
- parseJSONPBOp :: HsQOp
- neConsOp :: HsQOp
- intE :: Integral a => a -> HsExp
- intP :: Integral a => a -> HsPat
- natTLit :: Integral a => a -> HsType
- floatE :: RealFloat f => f -> HsExp
- do_ :: [ExprLStmt GhcPs] -> HsExp
- letStmt_ :: [HsBind] -> ExprLStmt GhcPs
- bindStmt_ :: HsPat -> HsExp -> ExprLStmt GhcPs
- lastStmt_ :: HsExp -> ExprLStmt GhcPs
- bodyStmt_ :: HsExp -> ExprLStmt GhcPs
Documentation
type HsBangType = LBangType GhcPs Source #
type HsDerivStrategy = LDerivStrategy GhcPs Source #
type HsExportSpec = LIE GhcPs Source #
type HsImportDecl = LImportDecl GhcPs Source #
type HsImportSpec = LIE GhcPs Source #
type HsTyVarBndrU = LHsTyVarBndr () GhcPs Source #
type HsTyVarBndrV = LHsTyVarBndr (HsBndrVis GhcPs) GhcPs Source #
type Module = ModuleName Source #
pattern VirtualBraces :: Int -> EpLayout Source #
class SyntaxDefault a where Source #
Instances
pattern PfxCon :: [arg] -> HsConDetails Void arg r Source #
formPackedT :: HsType Source #
formInt32T :: HsType Source #
formInt64T :: HsType Source #
formSInt32T :: HsType Source #
formSInt64T :: HsType Source #
formUInt32T :: HsType Source #
formUInt64T :: HsType Source #
formStringT :: HsType Source #
formBytesT :: HsType Source #
formFloatT :: HsType Source #
formDoubleT :: HsType Source #
Wrappers around ghc constructors
splitTyApp :: HsType -> (HsType, [HsType]) Source #
Whenever f is not itself a type application,
.splitTyApp (tyApply f as) = (f, as)
splitTyConApp :: HsType -> Maybe (HsName, [HsType]) Source #
.splitTyConApp (tyApply (L _ (GHC.HsTyVar _ NotPromoted tc)) as) = Just (tc, as)
unbangedTy_ :: HsType -> HsBangType Source #
module_ :: ModuleName -> Maybe [HsExportSpec] -> [HsImportDecl] -> [HsDecl] -> HsModule GhcPs Source #
importDecl_ :: ModuleName -> Bool -> Maybe ModuleName -> Maybe (Bool, [HsImportSpec]) -> HsImportDecl Source #
ieName_ :: HsName -> HsImportSpec Source #
ieNameAll_ :: HsName -> HsImportSpec Source #
derivingClause_ :: Maybe HsDerivStrategy -> [(HsOuterSigTyVarBndrs, HsType)] -> Maybe HsDerivingClause Source #
splitDerivingClause :: HsDerivingClause -> (Maybe HsDerivStrategy, [(HsOuterSigTyVarBndrs, HsType)]) Source #
typeOfInstDecl :: HsDecl -> Maybe (HsOuterSigTyVarBndrs, HsType) Source #
closedTyFamDecl_ :: HsQName -> [HsTyVarBndrV] -> HsType -> [(Maybe [HsTyVarBndrU], [HsType], HsType)] -> HsDecl Source #
tyFamInstDecl_ :: HsQName -> Maybe [HsTyVarBndrU] -> [HsType] -> HsType -> HsDecl Source #
valDecl_ :: HsBind -> HsDecl Source #
HsBind includes a location, and this is one of the few places
where we do not need a location. Rather than distinguishing in
the type between bindings that have a location and those that
do not, we simply ignore any binding location given here.
function_ :: HsName -> [([HsPat], HsExp)] -> HsBind Source #
A function with prefix syntax (as opposed to infix).
functionLike_ :: SrcStrictness -> HsName -> [([HsPat], HsExp)] -> HsBind Source #
userTyVar_ :: flag -> HsName -> LHsTyVarBndr flag GhcPs Source #
kindedTyVar_ :: flag -> HsName -> HsType -> LHsTyVarBndr flag GhcPs Source #
fieldBind_ :: HsName -> HsExp -> LHsRecField GhcPs HsExp Source #
recordCtor_ :: HsName -> [LHsRecField GhcPs HsExp] -> HsExp Source #
recordUpd_ :: HsExp -> [LHsRecUpdField GhcPs GhcPs] -> HsExp Source #
protobufType_ :: String -> HsType Source #
protobufStringType_ :: String -> HsType Source #
protobufBytesType_ :: String -> HsType Source #
protobufFixedType_ :: HsType -> HsType Source #
protobufSignedType_ :: HsType -> HsType Source #
protobufWrappedType_ :: HsType -> HsType Source #
typeNamed_ :: HsName -> HsType Source #
tupleType_ :: [HsType] -> HsType Source #
fieldPunPat :: HsName -> LHsRecField GhcPs HsPat Source #
Common Haskell expressions, constructors, and operators
fieldNumberC :: HsExp Source #
qualifiedC :: HsExp Source #
anonymousC :: HsExp Source #
identifierC :: HsExp Source #
stringLitC :: HsExp Source #
forceEmitC :: HsExp Source #
forceEmitT :: HsType Source #
fromStringE :: HsExp Source #
typeErrorT :: HsType Source #
fractionOp :: HsQOp Source #
toJSONPBOp :: HsQOp Source #