|
categories: |
Metaprogramming |
|
dependencies: |
[Dependency "base" [[VGte "3.0.0",VLt "4.0.0"]],Dependency "flatcurry" [[VGte "5.0.0",VLt "6.0.0"]],Dependency "containers" [[VGte "3.0.0",VLt "4.0.0"]],Dependency "transformers" [[VGte "3.0.0",VLt "4.0.0"]]] |
|
documentation: |
flatcurry-addtypes
==================
This packages defines operations to add type information to the body
of each function defined in a FlatCurry program.
The type information (see type `FlatCurry.AddTypes.TypeInfo`)
consists of a list of all typed variables visible
in an expression and the result type of the expression.
The main operation `addTypesInProgWithImports` defined in `FlatCurry.AddTypes`
takes the FlatCurry interfaces (or programs) of imported modules
and the program to be transformed and returns the type-annotated program
(the data types to represent type-annotated programs are also defined
in `FlatCurry.AddTypes`):
addTypesInProgWithImports :: [Prog] -> Prog -> AProg TypeInfo
The imports are necessary to get the types of all constructors
and functions accessed in the program. There is also the operation
addTypesInProg :: Prog -> IO (AProg TypeInfo)
which reads the interfaces of the imports before annotating the program.
|
|
exportedmodules: |
FlatCurry.AddTypes |
|
modules: |
FlatCurry.AddTypes |
|
version: |
1.0.0 |