Safe Haskell | None |
---|---|
Language | Haskell98 |
Definition of Source Tetra modules.
- data Module l = Module {
- moduleName :: !ModuleName
- moduleExportTypes :: [GTBoundCon l]
- moduleExportValues :: [GXBoundVar l]
- moduleImportModules :: [ModuleName]
- moduleImportTypes :: [(GTBindCon l, ImportType (GTBindCon l) (GType l))]
- moduleImportCaps :: [(GXBindVar l, ImportCap (GXBindVar l) (GType l))]
- moduleImportValues :: [(GXBindVar l, ImportValue (GXBindVar l) (GType l))]
- moduleTops :: [Top l]
- isMainModule :: Module l -> Bool
- data ExportSource n t :: * -> * -> *
- = ExportSourceLocal { }
- | ExportSourceLocalNoType { }
- data ImportType n t :: * -> * -> *
- = ImportTypeAbstract {
- importTypeAbstractType :: ~t
- | ImportTypeBoxed {
- importTypeBoxed :: ~t
- = ImportTypeAbstract {
- data ImportCap n t :: * -> * -> * = ImportCapAbstract {
- importCapAbstractType :: ~t
- data ImportValue n t :: * -> * -> *
- = ImportValueModule {
- importValueModuleName :: ~ModuleName
- importValueModuleVar :: ~n
- importValueModuleType :: ~t
- importValueModuleArity :: ~(Maybe (Int, Int, Int))
- | ImportValueSea {
- importValueSeaVar :: ~String
- importValueSeaType :: ~t
- = ImportValueModule {
- data QualName n :: * -> * = QualName ModuleName n
- data ModuleName :: * = ModuleName [String]
- isMainModuleName :: ModuleName -> Bool
- data Top l
- data DataDef l = DataDef {
- dataDefTypeName :: !(GTBindCon l)
- dataDefParams :: [(GTBindVar l, GType l)]
- dataDefCtors :: [DataCtor l]
Modules
Module | |
|
isMainModule :: Module l -> Bool Source #
Check if this is the Main
module.
data ExportSource n t :: * -> * -> * #
Define thing exported from a module.
ExportSourceLocal | A name defined in this module, with an explicit type. |
| |
ExportSourceLocalNoType | A named defined in this module, without a type attached. We use this version for source language where we infer the type of the exported thing. |
(Show n, Show t) => Show (ExportSource n t) | |
(NFData n, NFData t) => NFData (ExportSource n t) | |
data ImportType n t :: * -> * -> * #
Define a type being imported into a module.
ImportTypeAbstract | Type imported abstractly. Used for phantom types of kind Data, as well as regions, effects, and any other type that does not have kind Data. When a type is imported abstractly it has no associated values, so we can just say that we have the type without worrying about how to represent its associated values. |
| |
ImportTypeBoxed | Type of some boxed data. The objects follow the standard heap object layout, but the code that constructs and destructs them may have been written in a different language. This is used when importing data types defined in Salt modules. |
|
Show t => Show (ImportType n t) | |
(NFData n, NFData t) => NFData (ImportType n t) | |
data ImportCap n t :: * -> * -> * #
Define a foreign capability being imported into a module.
ImportCapAbstract | Capability imported abstractly. For capabilities like (Read r) for some top-level region r we can just say that we have the capability. |
|
data ImportValue n t :: * -> * -> * #
Define a foreign value being imported into a module.
ImportValueModule | Value imported from a module that we compiled ourselves. |
| |
ImportValueSea | Value imported via the C calling convention. |
|
(Show n, Show t) => Show (ImportValue n t) | |
(NFData n, NFData t) => NFData (ImportValue n t) | |
Module Names
A fully qualified name, including the name of the module it is from.
data ModuleName :: * #
A hierarchical module name.
isMainModuleName :: ModuleName -> Bool #
Check whether this is the name of the "Main" module.
Top-level things
TopClause | Some top-level, possibly recursive clauses. |
TopData | Data type definition. |
| |
TopType | Type binding. |
|
Data type definitions
Data type definitions.
DataDef | |
|