ghc-7.0.3: The GHC API

HsUtils

Synopsis

Documentation

mkHsApp :: LHsExpr name -> LHsExpr name -> LHsExpr nameSource

mkMatch :: [LPat id] -> LHsExpr id -> HsLocalBinds id -> LMatch idSource

mkHsLam :: [LPat id] -> LHsExpr id -> LHsExpr idSource

mkHsIf :: LHsExpr id -> LHsExpr id -> LHsExpr id -> HsExpr idSource

mkHsOpApp :: LHsExpr id -> id -> LHsExpr id -> HsExpr idSource

nlHsTyApp :: name -> [Type] -> LHsExpr nameSource

nlHsApps :: id -> [LHsExpr id] -> LHsExpr idSource

nlHsVarApps :: id -> [id] -> LHsExpr idSource

nlHsOpApp :: LHsExpr id -> id -> LHsExpr id -> LHsExpr idSource

nlHsIf :: LHsExpr id -> LHsExpr id -> LHsExpr id -> LHsExpr idSource

nlHsCase :: LHsExpr id -> [LMatch id] -> LHsExpr idSource

mkFunBind :: Located id -> [LMatch id] -> HsBind idSource

mkVarBind :: id -> LHsExpr id -> LHsBind idSource

mk_easy_FunBind :: SrcSpan -> id -> [LPat id] -> LHsExpr id -> LHsBind idSource

nlVarPat :: id -> LPat idSource

nlConVarPat :: id -> [id] -> LPat idSource

nlConPat :: id -> [LPat id] -> LPat idSource

nlInfixConPat :: id -> LPat id -> LPat id -> LPat idSource

nlTuplePat :: [LPat id] -> Boxity -> LPat idSource

mkHsAppTy :: LHsType name -> LHsType name -> LHsType nameSource

nlHsAppTy :: LHsType name -> LHsType name -> LHsType nameSource

nlHsTyVar :: name -> LHsType nameSource

nlHsFunTy :: LHsType name -> LHsType name -> LHsType nameSource

nlHsTyConApp :: name -> [LHsType name] -> LHsType nameSource

mkTransformStmt :: [LStmt idL] -> LHsExpr idR -> StmtLR idL idRSource

mkTransformByStmt :: [LStmt idL] -> LHsExpr idR -> LHsExpr idR -> StmtLR idL idRSource

mkExprStmt :: LHsExpr idR -> StmtLR idL idRSource

mkBindStmt :: LPat idL -> LHsExpr idR -> StmtLR idL idRSource

mkGroupUsingStmt :: [LStmt idL] -> LHsExpr idR -> StmtLR idL idRSource

mkGroupByStmt :: [LStmt idL] -> LHsExpr idR -> StmtLR idL idRSource

mkGroupByUsingStmt :: [LStmt idL] -> LHsExpr idR -> LHsExpr idR -> StmtLR idL idRSource

mkRecStmt :: [LStmtLR idL idR] -> StmtLR idL idRSource

collectLStmtsBinders :: [LStmtLR idL idR] -> [idL]Source

collectStmtsBinders :: [StmtLR idL idR] -> [idL]Source

collectStmtBinders :: StmtLR idL idR -> [idL]Source

hsTyClDeclBinders :: Eq name => Located (TyClDecl name) -> [Located name]Source

Returns all the binding names of the decl, along with their SrcLocs. 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 occurence. We use the equality to filter out duplicate field names