Module "Distribution.curry"

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:

curryCompiler  :: String  deterministic 
          The name of the Curry compiler (e.g., "pakcs" or "kics").
curryCompilerMajorVersion  :: Int  deterministic 
          The major version number of the Curry compiler.
curryCompilerMinorVersion  :: Int  deterministic 
          The minor version number of the Curry compiler.
curryRuntime  :: String  deterministic 
          The name of the run-time environment (e.g., "sicstus", "swi", or "ghc")
curryRuntimeMajorVersion  :: Int  deterministic 
          The major version number of the Curry run-time environment.
curryRuntimeMinorVersion  :: Int  deterministic 
          The minor version number of the Curry run-time environment.
rcFileName  :: IO String  deterministic 
          The name of the file specifying configuration parameters of the current distribution.
rcFileContents  :: IO [(String,String)]  deterministic 
          Returns the current configuration parameters of the distribution.
getRcVar  :: String -> IO (Maybe String)  deterministic 
          Look up a specific configuration variable as specified by user in his rc file.
getRcVars  :: [String] -> IO [Maybe String]  deterministic 
          Look up configuration variables as specified by user in his rc file.
installDir  :: String  deterministic 
          finding files in correspondence to compiler load path Name of the main installation directory of the Curry compiler.
lookupFileInLoadPath  :: String -> IO (Maybe String)  deterministic 
          Adds a directory name to a file by looking up the current load path.
findFileInLoadPath  :: String -> IO String  deterministic 
          Adds a directory name to a file by looking up the current load path.
readFirstFileInLoadPath  :: String -> IO String  deterministic 
          Returns the contents of the file found first in the current load path.
getLoadPath  :: IO [String]  deterministic 
          Returns the current path (list of directory names) that is used for loading modules.
getLoadPathForFile  :: String -> IO [String]  deterministic 
          Returns the current path (list of directory names) that is used for loading modules w.r.t.
defaultParams  :: FrontendParams  deterministic 
          The default parameters of the front end.
setQuiet  :: Bool -> FrontendParams -> FrontendParams  deterministic flexible
          Set quiet mode of the front end.
setFullPath  :: [String] -> FrontendParams -> FrontendParams  deterministic flexible
          Set the full path of the front end.
setOutfile  :: String -> FrontendParams -> FrontendParams  deterministic flexible
          Set the outfile parameter of the front end.
setLogfile  :: String -> FrontendParams -> FrontendParams  deterministic flexible
          Set the logfile parameter of the front end.
quiet  :: FrontendParams -> Bool  deterministic flexible
          Returns the value of the "quiet" parameter.
fullPath  :: FrontendParams -> Maybe [String]  deterministic flexible
          Returns the full path parameter of the front end.
outfile  :: FrontendParams -> Maybe String  deterministic flexible
          Returns the outfile parameter of the front end.
logfile  :: FrontendParams -> Maybe String  deterministic flexible
          Returns the logfile parameter of the front end.
callFrontend  :: FrontendTarget -> String -> IO ()  deterministic 
          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.
callFrontendWithParams  :: FrontendTarget -> FrontendParams -> String -> IO ()  deterministic 
          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.

 Imported modules:

Char
FileGoodies
IO
List
Prelude
PropertyFile
System
Directory

 Exported datatypes:

FrontendTarget

Data type for representing the different target files that can be produced by the front end of the Curry compiler.

Constructors:

FCY :: FrontendTarget

FCY - FlatCurry file ending with .fcy

FINT :: FrontendTarget

FINT - FlatCurry interface file ending with .fint

ACY :: FrontendTarget

ACY - AbstractCurry file ending with .acy

UACY :: FrontendTarget

UACY - Untyped (without type checking) AbstractCurry file ending with .uacy

HTML :: FrontendTarget

HTML - colored HTML representation of source program

CY :: FrontendTarget

CY - source representation employed by the frontend


FrontendParams

Abstract data type for representing parameters supported by the front end of the Curry compiler.

Constructors:



 Exported functions:

curryCompiler :: String  deterministic 

The name of the Curry compiler (e.g., "pakcs" or "kics").

Further infos:
  • externally defined

curryCompilerMajorVersion :: Int  deterministic 

The major version number of the Curry compiler.

Further infos:
  • externally defined

curryCompilerMinorVersion :: Int  deterministic 

The minor version number of the Curry compiler.

Further infos:
  • externally defined

curryRuntime :: String  deterministic 

The name of the run-time environment (e.g., "sicstus", "swi", or "ghc")

Further infos:
  • externally defined

curryRuntimeMajorVersion :: Int  deterministic 

The major version number of the Curry run-time environment.

Further infos:
  • externally defined

curryRuntimeMinorVersion :: Int  deterministic 

The minor version number of the Curry run-time environment.

Further infos:
  • externally defined

rcFileName :: IO String  deterministic 

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).


rcFileContents :: IO [(String,String)]  deterministic 

Returns the current configuration parameters of the distribution. This action yields the list of pairs (var,val).


getRcVar :: String -> IO (Maybe String)  deterministic 

Look up a specific configuration variable as specified by user in his rc file. Uppercase/lowercase is ignored for the variable names.


getRcVars :: [String] -> IO [Maybe String]  deterministic 

Look up configuration variables as specified by user in his rc file. Uppercase/lowercase is ignored for the variable names.


installDir :: String  deterministic 

finding files in correspondence to compiler load path Name of the main installation directory of the Curry compiler.

Further infos:
  • externally defined

lookupFileInLoadPath :: String -> IO (Maybe String)  deterministic 

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.


findFileInLoadPath :: String -> IO String  deterministic 

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.


readFirstFileInLoadPath :: String -> IO String  deterministic 

Returns the contents of the file found first in the current load path. An error message is delivered if there is no such file.


getLoadPath :: IO [String]  deterministic 

Returns the current path (list of directory names) that is used for loading modules.


getLoadPathForFile :: String -> IO [String]  deterministic 

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.


defaultParams :: FrontendParams  deterministic 

The default parameters of the front end.

Further infos:
  • solution complete, i.e., able to compute all solutions

setQuiet :: Bool -> FrontendParams -> FrontendParams  deterministic flexible

Set quiet mode of the front end.

Further infos:
  • solution complete, i.e., able to compute all solutions

setFullPath :: [String] -> FrontendParams -> FrontendParams  deterministic flexible

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).

Further infos:
  • solution complete, i.e., able to compute all solutions

setOutfile :: String -> FrontendParams -> FrontendParams  deterministic flexible

Set the outfile parameter of the front end. Relevant for HTML generation.

Further infos:
  • solution complete, i.e., able to compute all solutions

setLogfile :: String -> FrontendParams -> FrontendParams  deterministic flexible

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.

Further infos:
  • solution complete, i.e., able to compute all solutions

quiet :: FrontendParams -> Bool  deterministic flexible

Returns the value of the "quiet" parameter.

Further infos:
  • solution complete, i.e., able to compute all solutions

fullPath :: FrontendParams -> Maybe [String]  deterministic flexible

Returns the full path parameter of the front end.

Further infos:
  • solution complete, i.e., able to compute all solutions

outfile :: FrontendParams -> Maybe String  deterministic flexible

Returns the outfile parameter of the front end.

Further infos:
  • solution complete, i.e., able to compute all solutions

logfile :: FrontendParams -> Maybe String  deterministic flexible

Returns the logfile parameter of the front end.

Further infos:
  • solution complete, i.e., able to compute all solutions

callFrontend :: FrontendTarget -> String -> IO ()  deterministic 

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)

Parameters:
target - the kind of target file to be generated
progname - the name of the main module of the application to be compiled

callFrontendWithParams :: FrontendTarget -> FrontendParams -> String -> IO ()  deterministic 

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)

Parameters:
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


Generated by CurryDoc (Version 0.4.1 of June 7, 2007) at Aug 28 15:25:42 2008