This module contains operations to execute the front end of the Curry system.
data FrontendTarget
Data type for representing the different target files that can be produced by the front end of the Curry compiler.
Constructors:
FCY
:: FrontendTarget
TFCY
:: FrontendTarget
.tfcy
FINT
:: FrontendTarget
.fint
ACY
:: FrontendTarget
.acy
UACY
:: FrontendTarget
.uacy
HTML
:: FrontendTarget
M_curry.html
for source module M.curry
)
CY
:: FrontendTarget
.cy
TOKS
:: FrontendTarget
.tokens
TAFCY
:: FrontendTarget
.tafcy
AST
:: FrontendTarget
.ast
SAST
:: FrontendTarget
.sast
COMMS
:: FrontendTarget
.cycom
Known instances:
data FrontendParams
Abstract data type for representing parameters supported by the front end
of the Curry compiler.
The parameters are of the form
FrontendParams Quiet Extended Cpp NoOverlapWarn FullPath HtmlDir LogFile Specials FrontendPath
Constructors:
FrontendParams
:: Bool -> Bool -> Bool -> [(String, Int)] -> Bool -> (Maybe [String]) -> (Maybe String) -> String -> (Maybe String) -> [FrontendTarget] -> String -> String -> FrontendParams
Fields:
quiet
:: Bool
:
work silently
extended
:: Bool
:
support extended Curry syntax
cpp
:: Bool
:
enable conditional compiling
definitions
:: [(String, Int)]
:
definitions for conditional compiling
overlapWarn
:: Bool
:
warn for overlapping rules
fullPath
:: (Maybe [String])
:
the complete list of directory names
for loading modules
htmldir
:: (Maybe String)
:
output directory for HTML target
outdir
:: String
:
output directory for Curry artifacts
logfile
:: (Maybe String)
:
store all output (including errors)
of the front end in file
targets
:: [FrontendTarget]
:
additional targets for the front end
specials
:: String
:
additional special parameters
(use with care!)
frontendPath
:: String
:
the path to the frontend executable
defaultParams
:: FrontendParams
The default parameters of the front end.
The default parameters of the front end as configured by the compiler specific resource configuration file.
setQuiet
:: Bool -> FrontendParams -> FrontendParams
Set quiet mode of the front end.
setExtended
:: Bool -> FrontendParams -> FrontendParams
Set extended mode of the front end.
setCpp
:: Bool -> FrontendParams -> FrontendParams
Set cpp mode of the front end.
addDefinition
:: (String, Int) -> FrontendParams -> FrontendParams
Add cpp definition of the front end.
setDefinitions
:: [(String, Int)] -> FrontendParams -> FrontendParams
Set cpp definitions of the front end.
setOverlapWarn
:: Bool -> FrontendParams -> FrontendParams
Set overlap warn mode of the front end.
setFullPath
:: [String] -> FrontendParams -> FrontendParams
Set the full path of the front end. If this parameter is set, the front end searches all modules in this path (instead of using the default path).
setHtmlDir
:: String -> FrontendParams -> FrontendParams
Set the htmldir parameter of the front end. Relevant for HTML generation.
setOutDir
:: String -> FrontendParams -> FrontendParams
Sets the output directory of frontend artifacts (currySubdir by default)
setLogfile
:: String -> FrontendParams -> FrontendParams
Set the logfile parameter of the front end. If this parameter is set, all messages produced by the front end are stored in this file.
addTarget
:: FrontendTarget -> FrontendParams -> FrontendParams
Add an additional front end target.
setSpecials
:: String -> FrontendParams -> FrontendParams
Set additional specials parameters of the front end. These parameters are specific for the current front end and should be used with care, since their form might change in the future.
setFrontendPath
:: String -> FrontendParams -> FrontendParams
Sets the path to the frontend executable.
callFrontend
:: FrontendTarget -> String -> IO ()
In order to make sure that compiler generated files (like .fcy, .fint, .acy) are up to date, one can call the front end of the Curry compiler with this action. If the front end returns with an error, an exception is raised.
:: FrontendTarget
|
the kind of target file to be generated |
-> String
|
the name of the main module to be compiled |
-> IO ()
|
callFrontendWithParams
:: FrontendTarget -> FrontendParams -> String -> IO ()
In order to make sure that compiler generated files (like .fcy, .fint, .acy) are up to date, one can call the front end of the Curry compiler with this action where various parameters can be set. If the front end returns with an error, an exception is raised.
:: FrontendTarget
|
the kind of target file to be generated |
-> FrontendParams
|
parameters for the front end |
-> String
|
the name of the main module to be compiled (possibly prefixed with a directory where this module resides) |
-> IO ()
|
getFrontendCall
:: FrontendTarget -> FrontendParams -> String -> IO String
Returns the system command invoked to call the front end of the Curry compiler where various parameters can be set.
:: FrontendTarget
|
the kind of target file to be generated |
-> FrontendParams
|
parameters for the front end |
-> String
|
the name of the main module possibly prefixed with a directory where the module resides |
-> IO String
|
system command to invoke the front end |
.fcy