This module contains functions to obtain information concerning the current
distribution of the Curry implementation.
Most of the information is based on the external constants
curryCompiler....
Author: Bernd Brassel, Michael Hanus
Version: March 2007
| Exported names: |
Datatypes:
FrontendParams
| FrontendTarget
Constructors:
ACY
| CY
| FCY
| FINT
| HTML
| UACY
Functions:
callFrontend
| callFrontendWithParams
| curryCompiler
| curryCompilerMajorVersion
| curryCompilerMinorVersion
| curryRuntime
| curryRuntimeMajorVersion
| curryRuntimeMinorVersion
| defaultParams
| findFileInLoadPath
| fullPath
| getLoadPath
| getLoadPathForFile
| getRcVar
| getRcVars
| installDir
| logfile
| lookupFileInLoadPath
| outfile
| quiet
| rcFileContents
| rcFileName
| readFirstFileInLoadPath
| setFullPath
| setLogfile
| setOutfile
| setQuiet
| Summary of exported functions: |
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
| Imported modules: |
| Exported datatypes: |
Data type for representing the different target files that can be produced by the front end of the Curry compiler.
Constructors:
:: FrontendTarget
FCY - FlatCurry file ending with .fcy
:: FrontendTarget
FINT - FlatCurry interface file ending with .fint
:: FrontendTarget
ACY - AbstractCurry file ending with .acy
:: FrontendTarget
UACY - Untyped (without type checking) AbstractCurry file ending with .uacy
:: FrontendTarget
HTML - colored HTML representation of source program
:: FrontendTarget
CY - source representation employed by the frontend
Abstract data type for representing parameters supported by the front end of the Curry compiler.
Constructors:
| Exported functions: |
:: String
The name of the Curry compiler (e.g., "pakcs" or "kics").
:: Int
The major version number of the Curry compiler.
:: Int
The minor version number of the Curry compiler.
:: String
The name of the run-time environment (e.g., "sicstus", "swi", or "ghc")
:: Int
The major version number of the Curry run-time environment.
:: Int
The minor version number of the Curry run-time environment.
:: IO String
The name of the file specifying configuration parameters of the current distribution. This file must have the usual format of property files (see description in module PropertyFile).
:: IO [(String,String)]
Returns the current configuration parameters of the distribution. This action yields the list of pairs (var,val).
:: String -> IO (Maybe String)
Look up a specific configuration variable as specified by user in his rc file. Uppercase/lowercase is ignored for the variable names.
:: [String] -> IO [Maybe String]
Look up configuration variables as specified by user in his rc file. Uppercase/lowercase is ignored for the variable names.
:: String
finding files in correspondence to compiler load path Name of the main installation directory of the Curry compiler.
:: String -> IO (Maybe String)
Adds a directory name to a file by looking up the current load path. An error message is delivered if there is no such file.
:: String -> IO String
Adds a directory name to a file by looking up the current load path. An error message is delivered if there is no such file.
:: String -> IO String
Returns the contents of the file found first in the current load path. An error message is delivered if there is no such file.
:: IO [String]
Returns the current path (list of directory names) that is used for loading modules.
:: String -> IO [String]
Returns the current path (list of directory names) that is used for loading modules w.r.t. a given main module file. The directory prefix of the module file (or "." if there is no such prefix) is the first element of the load path and the remaining elements are determined by the environment variables CURRYRPATH and PAKCSLIBPATH when using pakcs and the entry of kicsrc when using kics, respectively.
:: FrontendParams
The default parameters of the front end.
:: Bool -> FrontendParams -> FrontendParams
Set quiet mode of the front end.
:: [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).
:: String -> FrontendParams -> FrontendParams
Set the outfile parameter of the front end. Relevant for HTML generation.
:: 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.
:: FrontendParams -> Bool
Returns the value of the "quiet" parameter.
:: FrontendParams -> Maybe [String]
Returns the full path parameter of the front end.
:: FrontendParams -> Maybe String
Returns the outfile parameter of the front end.
:: FrontendParams -> Maybe String
Returns the logfile parameter of the front end.
:: 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.
Example call: (callFrontend target progname)
target
- the kind of target file to be generated
progname
- the name of the main module of the application to be compiled
:: 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.
Example call: (callFrontendWithParams target params progname)
target
- the kind of target file to be generated
params
- parameters for the front end
progname
- the name of the main module of the application to be compiled