Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Definition of Source Tetra modules.
- data Module l = Module {
- moduleName :: !ModuleName
- moduleExportTypes :: [GName l]
- moduleExportValues :: [GName l]
- moduleImportModules :: [ModuleName]
- moduleImportTypes :: [(GName l, ImportType (GName l))]
- moduleImportCaps :: [(GName l, ImportCap (GName l))]
- moduleImportValues :: [(GName l, ImportValue (GName l))]
- moduleTops :: [Top l]
- isMainModule :: Module l -> Bool
- data ExportSource n :: * -> *
- = ExportSourceLocal { }
- | ExportSourceLocalNoType { }
- data ImportType n :: * -> *
- = ImportTypeAbstract {
- importTypeAbstractType :: !(Kind n)
- | ImportTypeBoxed {
- importTypeBoxed :: !(Kind n)
- = ImportTypeAbstract {
- data ImportCap n :: * -> * = ImportCapAbstract {
- importCapAbstractType :: !(Type n)
- data ImportValue n :: * -> *
- = ImportValueModule {
- importValueModuleName :: !ModuleName
- importValueModuleVar :: !n
- importValueModuleType :: !(Type n)
- importValueModuleArity :: !(Maybe (Int, Int, Int))
- | ImportValueSea {
- importValueSeaVar :: !String
- importValueSeaType :: !(Type n)
- = ImportValueModule {
- data QualName n :: * -> * = QualName ModuleName n
- data ModuleName :: * = ModuleName [String]
- isMainModuleName :: ModuleName -> Bool
- data Top l
- data DataDef n = DataDef {
- dataDefTypeName :: !n
- dataDefParams :: [Bind n]
- dataDefCtors :: [DataCtor n]
Modules
Module | |
|
isMainModule :: Module l -> Bool Source
Check if this is the Main
module.
data ExportSource n :: * -> *
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 (ExportSource n) | |
NFData n => NFData (ExportSource n) |
data ImportType n :: * -> *
Define a foreign 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 n => Show (ImportType n) | |
NFData n => NFData (ImportType n) |
data ImportCap n :: * -> *
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 :: * -> *
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 (ImportValue n) | |
NFData n => NFData (ImportValue n) |
Module Names
data QualName n :: * -> *
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
Data type definitions
Data type definitions.
DataDef | |
|