This library defines various I/O actions to read Curry programs and transform them into the AbstractCurry representation and to write AbstractCurry files.
Assumption: an abstract Curry program is stored in file with
extension .acy
in the subdirectory .curry
Author: Michael Hanus, Bjoern Peemoeller, Jan Tikovsky, Finn Teegen
Version: August 2024
readCurry
:: String -> IO CurryProg
I/O action which parses a Curry program and returns the corresponding typed Abstract Curry program. |
readCurryWithImports
:: String -> IO [CurryProg]
Read an AbstractCurry file with all its imports. |
tryReadCurryWithImports
:: String -> IO (Either [String] [CurryProg])
|
tryReadCurryFile
:: String -> IO (Either String CurryProg)
|
tryParse
:: String -> IO (Either String CurryProg)
Try to parse an AbstractCurry file. |
readUntypedCurry
:: String -> IO CurryProg
I/O action which parses a Curry program and returns the corresponding untyped AbstractCurry program. |
readCurryWithParseOptions
:: String -> FrontendParams -> IO CurryProg
I/O action which reads a typed Curry program from a file (with extension ".acy") with respect to some parser options. |
readUntypedCurryWithParseOptions
:: String -> FrontendParams -> IO CurryProg
I/O action which reads an untyped Curry program from a file (with extension ".uacy") with respect to some parser options. |
abstractCurryFileName
:: 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 AbstractCurry program. |
untypedAbstractCurryFileName
:: 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 untyped AbstractCurry program. |
readAbstractCurryFile
:: String -> IO CurryProg
I/O action which reads an AbstractCurry program from a file in ".acy" format. |
tryReadACYFile
:: String -> IO (Maybe CurryProg)
Tries to read an AbstractCurry file and returns
|
writeAbstractCurryFile
:: String -> CurryProg -> IO ()
Writes an AbstractCurry program into a file in ".acy" format. |
I/O action which parses a Curry program and returns the corresponding typed Abstract Curry program. Thus, the argument is the file name without suffix ".curry" or ".lcurry") and the result is a Curry term representing this program. |
Read an AbstractCurry file with all its imports.
|
|
|
Try to parse an AbstractCurry file.
|
I/O action which parses a Curry program and returns the corresponding
untyped AbstractCurry program.
The argument is the file name without suffix ".curry"
or ".lcurry") and the result is a Curry term representing this
program.
In an untyped AbstractCurry program, the type signatures
of operations are the type signatures provided by the programmer
(and not the type signatures inferred by the front end).
If the programmer has not provided an explicit type signature,
the function declaration contains the type |
I/O action which reads a typed Curry program from a file (with extension ".acy") with respect to some parser options. This I/O action is used by the standard action readCurry. It is currently predefined only in Curry2Prolog.
|
I/O action which reads an untyped Curry program from a file (with extension
".uacy") with respect to some parser options. For more details
see function readCurryWithParseOptions
In an untyped AbstractCurry program, the type signatures
of operations are the type signatures provided by the programmer
(and not the type signatures inferred by the front end).
If the programmer has not provided an explicit type signature,
the function declaration contains the type |
Transforms a name of a Curry program (with or without suffix ".curry" or ".lcurry") into the name of the file containing the corresponding AbstractCurry program. |
Transforms a name of a Curry program (with or without suffix ".curry" or ".lcurry") into the name of the file containing the corresponding untyped AbstractCurry program. |
I/O action which reads an AbstractCurry program from a file in ".acy"
format. In contrast to |
Tries to read an AbstractCurry file and returns
|
Writes an AbstractCurry program into a file in ".acy" format. The first argument must be the name of the target file (with suffix ".acy"). |