This library defines I/O actions to read and write type-annotated FlatCurry programs.
typeAnnotatedFlatCurryFileName
:: String -> String
Transforms a name of a Curry program (with or without suffix ".curry" or ".lcurry") into the name of the file containing the corresponding type-annotated FlatCurry program.
typeAnnotatedFlatCurryFilePath
:: String -> IO String
Gets the standard type-annotated FlatCurry file location for a given Curry module name. The Curry source program must exist in the Curry load path, otherwise an error is raised.
readTypeAnnotatedFlatCurry
:: String -> IO (AProg TypeExpr)
I/O action which parses a Curry program and returns the corresponding type-annotated FlatCurry program. The argument is the module path (without suffix ".curry" or ".lcurry") and the result is a type-annotated FlatCurry term representing this program.
readTypeAnnotatedFlatCurryWithParseOptions
:: String -> FrontendParams -> IO (AProg TypeExpr)
I/O action which parses a Curry program
with respect to some parser options and returns the
corresponding FlatCurry program.
This I/O action is used by readTypeAnnotatedFlatCurry.
:: String
|
the program file name (without suffix ".curry") |
-> FrontendParams
|
parameters passed to the front end |
-> IO (AProg TypeExpr)
|
readTypeAnnotatedFlatCurryFile
:: String -> IO (AProg TypeExpr)
Reads a type-annotated FlatCurry program from a file in .afcy
format
where the file name is provided as the argument.
writeTypeAnnotatedFlatCurry
:: AProg TypeExpr -> IO ()
Writes a type-annotated FlatCurry program into a file in .afcy
format.
The file is written in the standard location for intermediate files,
i.e., in the typeAnnotatedFlatCurryFileName
relative to the directory
of the Curry source program (which must exist!).
writeTypeAnnotatedFlatCurryFile
:: String -> AProg TypeExpr -> IO ()
Writes a type-annotated FlatCurry program into a file in ".afcy" format.
The first argument must be the name of the target file
(with suffix .afcy).