yhccore-0.9.1: Yhc's Internal Core language.

Yhc.Core.Type

Synopsis

Documentation

isCoreLitSmall :: CoreLit -> BoolSource

Returns true for constants that take a small, bounded amount of space

dropModule :: String -> StringSource

drop a module from a Core declaration

coreFunc :: Core -> CoreFuncName -> CoreFuncSource

Get a function from a Core type crashes if the function does not exist

coreFuncMaybe :: Core -> CoreFuncName -> Maybe CoreFuncSource

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 CoreDataSource

Get a CoreData from a field (the snd element of coreCtorFields)

applyBodyCore :: (CoreExpr -> CoreExpr) -> Core -> CoreSource

Take a function that operates on bodies, and apply it to a program

applyBodyFunc :: (CoreExpr -> CoreExpr) -> CoreFunc -> CoreFuncSource

Take a function that operates on bodies, and apply it to a function

applyFuncCore :: (CoreFunc -> CoreFunc) -> Core -> CoreSource

Take a function that operates on functions, and apply it to a program

coreDataTypeSplit :: String -> [String]Source

Split up a coreDataType into lexical elements None of the result elements will be space, or blank Some may be (, ) or !

coreDataTypeJoin :: [String] -> StringSource

can pretty print much nicer, just something that works for now