This module contains a simple compiler from FlatCurry to ICurry programs.
To do in future work:
Author: Michael Hanus
Version: May 2020
test
:: String -> IO ()
|
icCompile
:: ICOptions -> String -> IO IProg
Generates an ICurry program by reading a FlatCurry program and compiling it to ICurry. |
defaultICOptions
:: ICOptions
|
arityPosOfCons
:: ICOptions -> (String,String) -> (Int,Int)
|
posOfCons
:: ICOptions -> (String,String) -> Int
|
posOfFun
:: ICOptions -> (String,String) -> Int
|
printStatus
:: ICOptions -> String -> IO ()
|
printIntermediate
:: ICOptions -> String -> IO ()
|
printDetails
:: ICOptions -> String -> IO ()
|
funError
:: ICOptions -> String -> a
|
flat2icurry
:: ICOptions -> Prog -> IProg
Translation from FlatCurry to ICurry according to the transformation specified in the paper. |
trVis
:: Visibility -> IVisibility
|
trFunc
:: ICOptions -> FuncDecl -> IFunction
|
demandOf
:: Rule -> [Int]
|
trRule
:: ICOptions -> Rule -> IFuncBody
|
toIBlock
:: ICOptions -> [Int] -> Expr -> Int -> IBlock
|
toIExpr
:: ICOptions -> Expr -> IExpr
|
trLit
:: Literal -> ILiteral
|
varPos
:: [Int] -> IExpr -> [(Int,[Int])]
|
showIProg
:: IProg -> String
Simple show for ICurry programs. |
pre
:: String -> (String,String)
|
Options for the ICurry compiler. Contains mappings from constructor and functions names into locally unique integers and other stuff.
Constructors:
ICOptions
:: Int -> Bool -> Bool -> String -> Bool -> String -> Bool -> Bool -> [(QName,(IArity,Int))] -> [(QName,Int)] -> QName -> ICOptions
Fields:
|
Generates an ICurry program by reading a FlatCurry program and compiling it to ICurry. |
|
|
|
|
|
Translation from FlatCurry to ICurry according to the transformation specified in the paper. |
|
|