|
|
|
|
| Synopsis |
|
|
|
| Documentation |
|
| type CoreVarName = String |
|
| type CoreFuncName = String |
|
| type CoreDataName = String |
|
| type CoreCtorName = String |
|
| type CoreFieldName = String |
|
| data Core |
| Constructors | | Core | | | coreName :: String | | | coreImports :: [String] | | | coreDatas :: [CoreData] | | | coreFuncs :: [CoreFunc] | |
|
| Instances | |
|
|
| data CoreData |
| Constructors | | Instances | |
|
|
| data CoreCtor |
| Constructors | | Instances | |
|
|
| data CoreFunc |
| Constructors | | CoreFunc | | | | CorePrim | | | coreFuncName :: CoreFuncName | | | corePrimArity :: Int | | | corePrimExternal :: String | | | corePrimConv :: String | | | corePrimImport :: Bool | | | corePrimTypes :: [String] | |
|
| Instances | |
|
|
| isCoreFunc :: CoreFunc -> Bool |
|
| isCorePrim :: CoreFunc -> Bool |
|
| coreFuncArity :: CoreFunc -> Int |
|
| coreFuncArgList :: CoreFunc -> [CoreVarName] |
|
| type CoreFuncMap = Map CoreFuncName CoreFunc |
|
| data CoreExpr |
| Constructors | | Instances | |
|
|
| data CoreLit |
| Constructors | | CoreInt Int | | | CoreInteger Integer | | | CoreChr Char | | | CoreStr String | | | CoreFloat Float | | | CoreDouble Double | |
| Instances | |
|
|
| data CorePat |
| Constructors | | Instances | |
|
|
| coreApp :: CoreExpr -> [CoreExpr] -> CoreExpr |
|
| coreLet :: [(CoreVarName, CoreExpr)] -> CoreExpr -> CoreExpr |
|
| coreLam :: [CoreVarName] -> CoreExpr -> CoreExpr |
|
| fromCoreLit :: CoreExpr -> CoreLit |
|
| fromCoreCon :: CoreExpr -> String |
|
| fromCoreVar :: CoreExpr -> String |
|
| fromCoreFun :: CoreExpr -> String |
|
| fromCoreApp :: CoreExpr -> (CoreExpr, [CoreExpr]) |
|
| fromCoreLet :: CoreExpr -> ([(CoreVarName, CoreExpr)], CoreExpr) |
|
| fromCoreLam :: CoreExpr -> ([CoreVarName], CoreExpr) |
|
| isCoreCon :: CoreExpr -> Bool |
|
| isCoreVar :: CoreExpr -> Bool |
|
| isCoreFun :: CoreExpr -> Bool |
|
| isCoreLam :: CoreExpr -> Bool |
|
| isCorePos :: CoreExpr -> Bool |
|
| isCoreLet :: CoreExpr -> Bool |
|
| isCoreCase :: CoreExpr -> Bool |
|
| isCoreLit :: CoreExpr -> Bool |
|
| isCoreStr :: CoreLit -> Bool |
|
| isCoreChr :: CoreLit -> Bool |
|
| isCoreInt :: CoreLit -> Bool |
|
| isPatDefault :: CorePat -> Bool |
|
| isPatLit :: CorePat -> Bool |
|
| isPatCon :: CorePat -> Bool |
|
| patToExpr :: CorePat -> CoreExpr |
|
| exprToPat :: CoreExpr -> CorePat |
|
| isCoreLitSmall :: CoreLit -> Bool |
| Returns true for constants that take a small, bounded
amount of space
|
|
| remCorePos :: CoreExpr -> CoreExpr |
|
| dropModule :: String -> String |
| drop a module from a Core declaration
|
|
| coreFunc :: Core -> CoreFuncName -> CoreFunc |
| Get a function from a Core type
crashes if the function does not exist
|
|
| coreFuncMaybe :: Core -> CoreFuncName -> Maybe CoreFunc |
| A non-crashing version of coreFunc
returns Nothing if the function does not exist.
If multiple functions with the same name exist, this crashes.
|
|
| coreFieldDataMaybe :: Core -> CoreFieldName -> Maybe CoreData |
| Get a CoreData from a field (the snd element of coreCtorFields)
|
|
| coreCtorDataMaybe :: Core -> CoreCtorName -> Maybe CoreData |
| Get a CoreData from a ctor name
|
|
| coreFieldCtorMaybe :: Core -> CoreFieldName -> Maybe CoreCtor |
| Get a CoreCtor from a field name
|
|
| coreFieldData :: Core -> CoreFieldName -> CoreData |
|
| coreCtorData :: Core -> CoreCtorName -> CoreData |
|
| coreFieldCtor :: Core -> CoreFieldName -> CoreCtor |
|
| coreCtor :: Core -> CoreCtorName -> CoreCtor |
|
| coreData :: Core -> CoreDataName -> CoreData |
|
| applyBodyCore :: (CoreExpr -> CoreExpr) -> Core -> Core |
| Take a function that operates on bodies, and apply it to a program
|
|
| applyBodyFunc :: (CoreExpr -> CoreExpr) -> CoreFunc -> CoreFunc |
| Take a function that operates on bodies, and apply it to a function
|
|
| applyFuncCore :: (CoreFunc -> CoreFunc) -> Core -> Core |
| Take a function that operates on functions, and apply it to a program
|
|
| applyCtorCore :: (CoreCtor -> CoreCtor) -> Core -> Core |
|
| applyDataCore :: (CoreData -> CoreData) -> Core -> Core |
|
| applyCtorData :: (CoreCtor -> CoreCtor) -> CoreData -> CoreData |
|
| applyBodyCoreM :: Monad m => (CoreExpr -> m CoreExpr) -> Core -> m Core |
|
| applyFuncCoreM :: Monad m => (CoreFunc -> m CoreFunc) -> Core -> m Core |
|
| coreDataTypeSplit :: String -> [String] |
| Split up a coreDataType into lexical elements
None of the result elements will be space, or blank
Some may be (, ) or !
|
|
| coreDataTypeJoin :: [String] -> String |
| can pretty print much nicer, just something that works for now
|
|
| fromCoreFuncMap :: Core -> CoreFuncMap -> Core |
|
| toCoreFuncMap :: Core -> CoreFuncMap |
|
| coreFuncMap :: CoreFuncMap -> CoreFuncName -> CoreFunc |
|
| coreFuncMapMaybe :: CoreFuncMap -> CoreFuncName -> Maybe CoreFunc |
|
| Produced by Haddock version 0.8 |