ddc-core-llvm-0.4.2.2: Disciplined Disciple Compiler LLVM code generator.

Safe HaskellNone
LanguageHaskell98

DDC.Core.Llvm.Convert

Synopsis

Documentation

convertModule :: Platform -> Module () Name -> Either Error Module Source

Convert a Salt module to LLVM.

If anything goes wrong in the convertion then this function will just call error.

convertType :: Platform -> KindEnv Name -> Type Name -> ConvertM Type Source

Convert a Salt type to an LlvmType.

convertSuperType :: Platform -> KindEnv Name -> Type Name -> ConvertM ([Type], Type) Source

Split the parameter and result types from a supercombinator type and and convert them to LLVM form.

We can't split the type first and just call convertType above as we need to decend into any quantifiers that wrap the body type.