1{-# LANGUAGE DeriveGeneric #-}
3Module : IRTS.CodegenCommon
4Description : Common data structures required for all code generators.
7Maintainer : The Idris Community.
9module IRTS.CodegenCommon where
11import GHC.Generics (Generic)
15import IRTS.Defunctionalise
17data DbgLevel = NONE | DEBUG | TRACE deriving Eq
18data OutputType = Raw | Object | Executable deriving (Eq, Show, Generic)
20-- | Everything which might be needed in a code generator.
22-- A CG can choose which level of Decls to generate code from
23-- (simplified, defunctionalised or merely lambda lifted) and has
24-- access to the list of object files, libraries, etc.
26data CodegenInfo = CodegenInfo {
28 , outputType :: OutputType
29 , targetTriple :: String
31 , includes :: [FilePath]
32 , importDirs :: [FilePath]
33 , compileObjs :: [String]
34 , compileLibs :: [String]
35 , compilerFlags :: [String]
36 , debugLevel :: DbgLevel
37 , simpleDecls :: [(Name, SDecl)]
38 , defunDecls :: [(Name, DDecl)]
39 , liftDecls :: [(Name, LDecl)]
41 , exportDecls :: [ExportIFace]
44type CodeGenerator = CodegenInfo -> IO ()
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list