ddc-source-tetra-0.4.3.1: Disciplined Disciple Compiler source language.

Safe HaskellNone
LanguageHaskell98

DDC.Source.Tetra.Module

Contents

Description

Definition of Source Tetra modules.

Synopsis

Modules

data Module l Source #

Constructors

Module 

Fields

Instances

isMainModule :: Module l -> Bool Source #

Check if this is the Main module.

data ExportSource n t :: * -> * -> * #

Define thing exported from a module.

Constructors

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.

Instances

(Show n, Show t) => Show (ExportSource n t) 
(NFData n, NFData t) => NFData (ExportSource n t) 

Methods

rnf :: ExportSource n t -> () #

data ImportType n t :: * -> * -> * #

Define a type being imported into a module.

Constructors

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.

Fields

Instances

Show t => Show (ImportType n t) 

Methods

showsPrec :: Int -> ImportType n t -> ShowS #

show :: ImportType n t -> String #

showList :: [ImportType n t] -> ShowS #

(NFData n, NFData t) => NFData (ImportType n t) 

Methods

rnf :: ImportType n t -> () #

data ImportCap n t :: * -> * -> * #

Define a foreign capability being imported into a module.

Constructors

ImportCapAbstract

Capability imported abstractly. For capabilities like (Read r) for some top-level region r we can just say that we have the capability.

Fields

Instances

Show t => Show (ImportCap n t) 

Methods

showsPrec :: Int -> ImportCap n t -> ShowS #

show :: ImportCap n t -> String #

showList :: [ImportCap n t] -> ShowS #

(NFData n, NFData t) => NFData (ImportCap n t) 

Methods

rnf :: ImportCap n t -> () #

data ImportValue n t :: * -> * -> * #

Define a foreign value being imported into a module.

Constructors

ImportValueModule

Value imported from a module that we compiled ourselves.

Fields

ImportValueSea

Value imported via the C calling convention.

Fields

Instances

(Show n, Show t) => Show (ImportValue n t) 

Methods

showsPrec :: Int -> ImportValue n t -> ShowS #

show :: ImportValue n t -> String #

showList :: [ImportValue n t] -> ShowS #

(NFData n, NFData t) => NFData (ImportValue n t) 

Methods

rnf :: ImportValue n t -> () #

Module Names

data QualName n :: * -> * #

A fully qualified name, including the name of the module it is from.

Constructors

QualName ModuleName n 

Instances

Show n => Show (QualName n) 

Methods

showsPrec :: Int -> QualName n -> ShowS #

show :: QualName n -> String #

showList :: [QualName n] -> ShowS #

NFData n => NFData (QualName n) 

Methods

rnf :: QualName n -> () #

isMainModuleName :: ModuleName -> Bool #

Check whether this is the name of the "Main" module.

Top-level things

data Top l Source #

Constructors

TopClause

Some top-level, possibly recursive clauses.

Fields

TopData

Data type definition.

Fields

TopType

Type binding.

Instances

Defix Top l Source # 

Methods

defix :: FixTable l -> Top l -> Either (Error l) (Top l) Source #

ShowLanguage l => Show (Top l) Source # 

Methods

showsPrec :: Int -> Top l -> ShowS #

show :: Top l -> String #

showList :: [Top l] -> ShowS #

NFDataLanguage l => NFData (Top l) Source # 

Methods

rnf :: Top l -> () #

Expand (Top Source) Source # 

Data type definitions

data DataDef l Source #

Data type definitions.

Constructors

DataDef 

Fields

Instances

(ShowLanguage l, Show (DataCtor l)) => Show (DataDef l) Source # 

Methods

showsPrec :: Int -> DataDef l -> ShowS #

show :: DataDef l -> String #

showList :: [DataDef l] -> ShowS #

NFData (DataDef n) Source # 

Methods

rnf :: DataDef n -> () #