idris-1.3.4: Functional Programming Language with Dependent Types

License | BSD3
Maintainer | The Idris Community.
Safe Haskell | None
Language | Haskell2010

IRTS.CodegenCommon

Description

Synopsis

- data DbgLevel
  - = NONE
  - | DEBUG
  - | TRACE
- data OutputType
  - = Raw
  - | Object
  - | Executable
- data CodegenInfo = CodegenInfo {
  - outputFile :: String
  - outputType :: OutputType
  - targetTriple :: String
  - targetCPU :: String
  - includes :: [FilePath]
  - importDirs :: [FilePath]
  - compileObjs :: [String]
  - compileLibs :: [String]
  - compilerFlags :: [String]
  - debugLevel :: DbgLevel
  - simpleDecls :: [(Name, SDecl)]
  - defunDecls :: [(Name, DDecl)]
  - liftDecls :: [(Name, LDecl)]
  - interfaces :: Bool
  - exportDecls :: [ExportIFace]
  - ttDecls :: [(Name, TTDecl)]
  }
- type CodeGenerator = CodegenInfo -> IO ()

# Documentation

data DbgLevel #

Constructors

NONE |
DEBUG |
TRACE |

#### Instances

Instances details

Eq DbgLevel # |
Instance details Defined in IRTS.CodegenCommon Methods (==) :: DbgLevel -> DbgLevel -> Bool # (/=) :: DbgLevel -> DbgLevel -> Bool #

data OutputType #

Constructors

Raw |
Object |
Executable |

#### Instances

Instances details

NFData OutputType # |
Instance details Defined in Idris.DeepSeq Methods rnf :: OutputType -> () #
Generic OutputType # |

Instance details

Defined in IRTS.CodegenCommon

Associated Types

type Rep OutputType |
Instance details Defined in IRTS.CodegenCommon type Rep OutputType = D1 ('MetaData "OutputType" "IRTS.CodegenCommon" "idris-1.3.4-CzetPXHz9szL2e7hoCyB4A" 'False) (C1 ('MetaCons "Raw" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Object" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Executable" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: OutputType -> Rep OutputType x #

to :: Rep OutputType x -> OutputType #

Show OutputType # |
Instance details Defined in IRTS.CodegenCommon Methods showsPrec :: Int -> OutputType -> ShowS # show :: OutputType -> String # showList :: [OutputType] -> ShowS #
Eq OutputType # |
Instance details Defined in IRTS.CodegenCommon Methods (==) :: OutputType -> OutputType -> Bool # (/=) :: OutputType -> OutputType -> Bool #
type Rep OutputType # |
Instance details Defined in IRTS.CodegenCommon type Rep OutputType = D1 ('MetaData "OutputType" "IRTS.CodegenCommon" "idris-1.3.4-CzetPXHz9szL2e7hoCyB4A" 'False) (C1 ('MetaCons "Raw" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Object" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Executable" 'PrefixI 'False) (U1 :: Type -> Type)))

data CodegenInfo #

Everything which might be needed in a code generator.

A CG can choose which level of Decls to generate code from (simplified, defunctionalised or merely lambda lifted) and has access to the list of object files, libraries, etc.

Constructors

CodegenInfo |

Fields

- outputFile :: String
- outputType :: OutputType
- targetTriple :: String
- targetCPU :: String
- includes :: [FilePath]
- importDirs :: [FilePath]
- compileObjs :: [String]
- compileLibs :: [String]
- compilerFlags :: [String]
- debugLevel :: DbgLevel
- simpleDecls :: [(Name, SDecl)]
- defunDecls :: [(Name, DDecl)]
- liftDecls :: [(Name, LDecl)]
- interfaces :: Bool
- exportDecls :: [ExportIFace]
- ttDecls :: [(Name, TTDecl)]

#### Instances

Instances details

ToJSON CodegenInfo # |
Instance details Defined in IRTS.Portable Methods toJSON :: CodegenInfo -> Value # toEncoding :: CodegenInfo -> Encoding # toJSONList :: [CodegenInfo] -> Value # toEncodingList :: [CodegenInfo] -> Encoding # omitField :: CodegenInfo -> Bool #

type CodeGenerator = CodegenInfo -> IO () #