This module contains operations to load and store analysis information persistently in files.
getAnalysisBaseFile
:: String -> String -> IO String
Get the file name in which analysis results are stored (without suffix ".pub" or ".priv")
getAnalysisPublicFile
:: String -> String -> IO String
Get the file name in which public analysis results are stored.
getAnalysisPrivateFile
:: String -> String -> IO String
Get the file name in which public analysis results are stored.
getAnalysisDirectory
:: IO String
getInterfaceInfos
:: (Read a, ReadWrite a) => DLevel -> String -> [String] -> IO (ProgInfo a)
loadDefaultAnalysisValues
:: Read a => DLevel -> String -> String -> IO [((String, String), a)]
Reads the file name in which default analysis values different from
standard start values are stored. Typically, such a file contains
specific analysis information for external operations.
The file must contain a term of the type [(String,a)]
where
the first component of each pair is the name of the operation
(it is assumed that this denotes an operation of the current module)
and the second component is an analysis value.
loadCompleteAnalysis
:: (Read a, ReadWrite a) => DLevel -> String -> String -> IO (ProgInfo a)
Loads the currently stored analysis information for a module.
loadPublicAnalysis
:: (Read a, ReadWrite a) => DLevel -> String -> String -> IO (ProgInfo a)
Reads analysis result from file for the public entities of a given module.
storeImportModuleList
:: DLevel -> String -> [String] -> IO ()
Store current import dependencies.
getImportModuleListFile
:: String -> IO (Maybe String)
Gets the file containing import dependencies for a main module (if it exists).
storeAnalysisResult
:: (Show a, ReadWrite a) => DLevel -> String -> String -> ProgInfo a -> IO ()
Store an analysis results in a file and create directories if neccesssary. The arguments are the analysis name, the module name and the analysis results for this module.
createDirectoryR
:: DLevel -> String -> IO ()
deleteAllAnalysisFiles
:: String -> IO ()
Deletes all analysis files for a given analysis name.
findModuleSourceInLoadPath
:: String -> IO (String, String)
Returns a directory name and the actual source file name for a module by looking up the module source in the current load path. If the module is hierarchical, the directory is the top directory of the hierarchy. An error is raised if there is no corresponding source file.
getImports
:: DLevel -> String -> IO [String]
Get the imports of a module.
getSourceFileTime
:: String -> IO (String, ClockTime)
getFlatCurryFileTime
:: String -> IO (String, Maybe ClockTime)
flatCurryFileNewer
:: String -> IO (Maybe String)
Returns name of the FlatCurry file of a module if this file exists and is newer than the source file.
readNewestFlatCurry
:: String -> IO Prog
Returns the newest FlatCurry program for a module. The source program is parsed if the interface older than the source, otherwise the FlatCurry program is read without parsing (note that this returns only the correct version if the imported modules are already parsed or are not relevant here).
readNewestFlatCurryInt
:: String -> IO Prog
Returns the newest FlatCurry interface for a module. The source program is parsed if the interface older than the source, otherwise the FlatCurry interface file is read without parsing (note that this returns only the correct version if the imported modules are already parsed or are not relevant here).
flat2intName
:: String -> String
Translates FlatCurry file name to corresponding FlatCurry interface file name.