Safe Haskell | None |
---|---|
Language | Haskell98 |
HsUtils
- mkHsPar :: LHsExpr id -> LHsExpr id
- mkHsApp :: LHsExpr name -> LHsExpr name -> LHsExpr name
- mkHsConApp :: DataCon -> [Type] -> [HsExpr Id] -> LHsExpr Id
- mkSimpleHsAlt :: LPat id -> Located (body id) -> LMatch id (Located (body id))
- mkSimpleMatch :: [LPat id] -> Located (body id) -> LMatch id (Located (body id))
- unguardedGRHSs :: Located (body id) -> GRHSs id (Located (body id))
- unguardedRHS :: Located (body id) -> [LGRHS id (Located (body id))]
- mkMatchGroup :: [LMatch id (Located (body id))] -> MatchGroup id (Located (body id))
- mkMatch :: [LPat id] -> LHsExpr id -> HsLocalBinds id -> LMatch id (LHsExpr id)
- mkHsLam :: [LPat id] -> LHsExpr id -> LHsExpr id
- mkHsIf :: LHsExpr id -> LHsExpr id -> LHsExpr id -> HsExpr id
- mkHsWrap :: HsWrapper -> HsExpr id -> HsExpr id
- mkLHsWrap :: HsWrapper -> LHsExpr id -> LHsExpr id
- mkHsWrapCo :: TcCoercion -> HsExpr id -> HsExpr id
- mkLHsWrapCo :: TcCoercion -> LHsExpr id -> LHsExpr id
- coToHsWrapper :: TcCoercion -> HsWrapper
- mkHsDictLet :: TcEvBinds -> LHsExpr Id -> LHsExpr Id
- mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr Id -> LHsExpr Id
- mkHsOpApp :: LHsExpr id -> id -> LHsExpr id -> HsExpr id
- mkHsDo :: HsStmtContext Name -> [ExprLStmt id] -> HsExpr id
- mkHsComp :: HsStmtContext Name -> [ExprLStmt id] -> LHsExpr id -> HsExpr id
- mkHsWrapPat :: HsWrapper -> Pat id -> Type -> Pat id
- mkHsWrapPatCo :: TcCoercion -> Pat id -> Type -> Pat id
- mkLHsPar :: LHsExpr name -> LHsExpr name
- mkHsCmdCast :: TcCoercion -> HsCmd id -> HsCmd id
- nlHsTyApp :: name -> [Type] -> LHsExpr name
- nlHsVar :: id -> LHsExpr id
- nlHsLit :: HsLit -> LHsExpr id
- nlHsApp :: LHsExpr id -> LHsExpr id -> LHsExpr id
- nlHsApps :: id -> [LHsExpr id] -> LHsExpr id
- nlHsIntLit :: Integer -> LHsExpr id
- nlHsVarApps :: id -> [id] -> LHsExpr id
- nlHsDo :: HsStmtContext Name -> [LStmt id (LHsExpr id)] -> LHsExpr id
- nlHsOpApp :: LHsExpr id -> id -> LHsExpr id -> LHsExpr id
- nlHsLam :: LMatch id (LHsExpr id) -> LHsExpr id
- nlHsPar :: LHsExpr id -> LHsExpr id
- nlHsIf :: LHsExpr id -> LHsExpr id -> LHsExpr id -> LHsExpr id
- nlHsCase :: LHsExpr id -> [LMatch id (LHsExpr id)] -> LHsExpr id
- nlList :: [LHsExpr id] -> LHsExpr id
- mkLHsTupleExpr :: [LHsExpr a] -> LHsExpr a
- mkLHsVarTuple :: [a] -> LHsExpr a
- missingTupArg :: HsTupArg a
- toHsType :: Type -> LHsType RdrName
- toHsKind :: Kind -> LHsKind RdrName
- mkFunBind :: Located RdrName -> [LMatch RdrName (LHsExpr RdrName)] -> HsBind RdrName
- mkVarBind :: id -> LHsExpr id -> LHsBind id
- mkHsVarBind :: SrcSpan -> RdrName -> LHsExpr RdrName -> (Origin, LHsBind RdrName)
- mk_easy_FunBind :: SrcSpan -> RdrName -> [LPat RdrName] -> LHsExpr RdrName -> (Origin, LHsBind RdrName)
- mkTopFunBind :: Located Name -> [LMatch Name (LHsExpr Name)] -> HsBind Name
- mkPatSynBind :: Located RdrName -> HsPatSynDetails (Located RdrName) -> LPat RdrName -> HsPatSynDir RdrName -> HsBind RdrName
- mkHsIntegral :: Integer -> PostTcType -> HsOverLit id
- mkHsFractional :: FractionalLit -> PostTcType -> HsOverLit id
- mkHsIsString :: FastString -> PostTcType -> HsOverLit id
- mkHsString :: String -> HsLit
- mkNPat :: HsOverLit id -> Maybe (SyntaxExpr id) -> Pat id
- mkNPlusKPat :: Located id -> HsOverLit id -> Pat id
- nlVarPat :: id -> LPat id
- nlLitPat :: HsLit -> LPat id
- nlConVarPat :: id -> [id] -> LPat id
- nlConPat :: id -> [LPat id] -> LPat id
- nlInfixConPat :: id -> LPat id -> LPat id -> LPat id
- nlNullaryConPat :: id -> LPat id
- nlWildConPat :: DataCon -> LPat RdrName
- nlWildPat :: LPat id
- nlTuplePat :: [LPat id] -> Boxity -> LPat id
- mkParPat :: LPat name -> LPat name
- mkHsAppTy :: LHsType name -> LHsType name -> LHsType name
- userHsTyVarBndrs :: SrcSpan -> [name] -> [Located (HsTyVarBndr name)]
- nlHsAppTy :: LHsType name -> LHsType name -> LHsType name
- nlHsTyVar :: name -> LHsType name
- nlHsFunTy :: LHsType name -> LHsType name -> LHsType name
- nlHsTyConApp :: name -> [LHsType name] -> LHsType name
- mkTransformStmt :: [ExprLStmt idL] -> LHsExpr idR -> StmtLR idL idR (LHsExpr idL)
- mkTransformByStmt :: [ExprLStmt idL] -> LHsExpr idR -> LHsExpr idR -> StmtLR idL idR (LHsExpr idL)
- mkBodyStmt :: Located (bodyR idR) -> StmtLR idL idR (Located (bodyR idR))
- mkBindStmt :: LPat idL -> Located (bodyR idR) -> StmtLR idL idR (Located (bodyR idR))
- mkLastStmt :: Located (bodyR idR) -> StmtLR idL idR (Located (bodyR idR))
- emptyTransStmt :: StmtLR idL idR (LHsExpr idR)
- mkGroupUsingStmt :: [ExprLStmt idL] -> LHsExpr idR -> StmtLR idL idR (LHsExpr idL)
- mkGroupByUsingStmt :: [ExprLStmt idL] -> LHsExpr idR -> LHsExpr idR -> StmtLR idL idR (LHsExpr idL)
- emptyRecStmt :: StmtLR idL idR bodyR
- mkRecStmt :: [LStmtLR idL idR bodyR] -> StmtLR idL idR bodyR
- mkHsSpliceTy :: LHsExpr RdrName -> HsType RdrName
- mkHsSpliceE :: LHsExpr RdrName -> HsExpr RdrName
- mkHsSpliceTE :: LHsExpr RdrName -> HsExpr RdrName
- mkHsSplice :: LHsExpr RdrName -> HsSplice RdrName
- mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsQuasiQuote RdrName
- unqualQuasiQuote :: RdrName
- noRebindableInfo :: Bool
- collectLocalBinders :: HsLocalBindsLR idL idR -> [idL]
- collectHsValBinders :: HsValBindsLR idL idR -> [idL]
- collectHsBindListBinders :: [LHsBindLR idL idR] -> [idL]
- collectHsBindsBinders :: LHsBindsLR idL idR -> [idL]
- collectHsBindBinders :: HsBindLR idL idR -> [idL]
- collectMethodBinders :: LHsBindsLR RdrName idR -> [Located RdrName]
- collectPatBinders :: LPat a -> [a]
- collectPatsBinders :: [LPat a] -> [a]
- collectLStmtsBinders :: [LStmtLR idL idR body] -> [idL]
- collectStmtsBinders :: [StmtLR idL idR body] -> [idL]
- collectLStmtBinders :: LStmtLR idL idR body -> [idL]
- collectStmtBinders :: StmtLR idL idR body -> [idL]
- hsLTyClDeclBinders :: Eq name => Located (TyClDecl name) -> [Located name]
- hsTyClDeclsBinders :: [TyClGroup Name] -> [Located (InstDecl Name)] -> [Name]
- hsForeignDeclsBinders :: [LForeignDecl Name] -> [Name]
- hsGroupBinders :: HsGroup Name -> [Name]
- hsDataFamInstBinders :: Eq name => DataFamInstDecl name -> [Located name]
- lStmtsImplicits :: [LStmtLR Name idR (Located (body idR))] -> NameSet
- hsValBindsImplicits :: HsValBindsLR Name idR -> NameSet
- lPatImplicits :: LPat Name -> NameSet
Documentation
unguardedGRHSs :: Located (body id) -> GRHSs id (Located (body id))Source
unguardedRHS :: Located (body id) -> [LGRHS id (Located (body id))]Source
mkMatchGroup :: [LMatch id (Located (body id))] -> MatchGroup id (Located (body id))Source
mkHsWrapCo :: TcCoercion -> HsExpr id -> HsExpr idSource
mkLHsWrapCo :: TcCoercion -> LHsExpr id -> LHsExpr idSource
mkHsWrapPatCo :: TcCoercion -> Pat id -> Type -> Pat idSource
mkHsCmdCast :: TcCoercion -> HsCmd id -> HsCmd idSource
nlHsIntLit :: Integer -> LHsExpr idSource
nlHsVarApps :: id -> [id] -> LHsExpr idSource
mkLHsTupleExpr :: [LHsExpr a] -> LHsExpr aSource
mkLHsVarTuple :: [a] -> LHsExpr aSource
mk_easy_FunBind :: SrcSpan -> RdrName -> [LPat RdrName] -> LHsExpr RdrName -> (Origin, LHsBind RdrName)Source
mkPatSynBind :: Located RdrName -> HsPatSynDetails (Located RdrName) -> LPat RdrName -> HsPatSynDir RdrName -> HsBind RdrNameSource
mkHsIntegral :: Integer -> PostTcType -> HsOverLit idSource
mkHsFractional :: FractionalLit -> PostTcType -> HsOverLit idSource
mkHsIsString :: FastString -> PostTcType -> HsOverLit idSource
mkHsString :: String -> HsLitSource
mkNPlusKPat :: Located id -> HsOverLit id -> Pat idSource
nlConVarPat :: id -> [id] -> LPat idSource
nlInfixConPat :: id -> LPat id -> LPat id -> LPat idSource
nlNullaryConPat :: id -> LPat idSource
nlWildConPat :: DataCon -> LPat RdrNameSource
nlTuplePat :: [LPat id] -> Boxity -> LPat idSource
userHsTyVarBndrs :: SrcSpan -> [name] -> [Located (HsTyVarBndr name)]Source
nlHsTyConApp :: name -> [LHsType name] -> LHsType nameSource
mkTransformByStmt :: [ExprLStmt idL] -> LHsExpr idR -> LHsExpr idR -> StmtLR idL idR (LHsExpr idL)Source
mkBodyStmt :: Located (bodyR idR) -> StmtLR idL idR (Located (bodyR idR))Source
mkLastStmt :: Located (bodyR idR) -> StmtLR idL idR (Located (bodyR idR))Source
emptyTransStmt :: StmtLR idL idR (LHsExpr idR)Source
mkGroupByUsingStmt :: [ExprLStmt idL] -> LHsExpr idR -> LHsExpr idR -> StmtLR idL idR (LHsExpr idL)Source
emptyRecStmt :: StmtLR idL idR bodyRSource
mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsQuasiQuote RdrNameSource
collectLocalBinders :: HsLocalBindsLR idL idR -> [idL]Source
collectHsValBinders :: HsValBindsLR idL idR -> [idL]Source
collectHsBindListBinders :: [LHsBindLR idL idR] -> [idL]Source
collectHsBindsBinders :: LHsBindsLR idL idR -> [idL]Source
collectHsBindBinders :: HsBindLR idL idR -> [idL]Source
collectMethodBinders :: LHsBindsLR RdrName idR -> [Located RdrName]Source
collectPatBinders :: LPat a -> [a]Source
collectPatsBinders :: [LPat a] -> [a]Source
collectLStmtsBinders :: [LStmtLR idL idR body] -> [idL]Source
collectStmtsBinders :: [StmtLR idL idR body] -> [idL]Source
collectLStmtBinders :: LStmtLR idL idR body -> [idL]Source
collectStmtBinders :: StmtLR idL idR body -> [idL]Source
hsLTyClDeclBinders :: Eq name => Located (TyClDecl name) -> [Located name]Source
Returns all the binding names of the decl. The first one is guaranteed to be the name of the decl. For record fields mentioned in multiple constructors, the SrcLoc will be from the first occurrence. We use the equality to filter out duplicate field names.
Each returned (Located name) is wrapped in a SrcSpan
of the whole
declaration, not just the name itself (which is how it appears in
the syntax tree). This SrcSpan (for the entire declaration) is used
as the SrcSpan for the Name that is finally produced, and hence for
error messages. (See Trac #8607.)
hsForeignDeclsBinders :: [LForeignDecl Name] -> [Name]Source
hsGroupBinders :: HsGroup Name -> [Name]Source
hsDataFamInstBinders :: Eq name => DataFamInstDecl name -> [Located name]Source
hsValBindsImplicits :: HsValBindsLR Name idR -> NameSetSource
lPatImplicits :: LPat Name -> NameSetSource