symantic-6.3.0.20170807: Library for Typed Tagless-Final Higher-Order Composable DSL

Safe HaskellNone
LanguageHaskell2010

Language.Symantic.Compiling.Module

Contents

Synopsis

Class ModuleFor

class ModuleFor src ss s where Source #

Methods

moduleFor :: (PathMod, Module src ss) Source #

Type Modules

newtype Modules src ss Source #

Constructors

Modules 

Fields

Instances

Source src => Eq (Modules src ss) Source # 

Methods

(==) :: Modules src ss -> Modules src ss -> Bool #

(/=) :: Modules src ss -> Modules src ss -> Bool #

Source src => Show (Modules src ss) Source # 

Methods

showsPrec :: Int -> Modules src ss -> ShowS #

show :: Modules src ss -> String #

showList :: [Modules src ss] -> ShowS #

unionModules :: Modules src ss -> Modules src ss -> Either Error_Module (Modules src ss) Source #

unionModulesUnchecked :: Modules src ss -> Modules src ss -> Modules src ss Source #

Type Error_Module

Type Module

type Module src ss = ByFixity (ModuleFixy src ss Unifix) (ModuleFixy src ss Infix) (ModuleFixy src ss Unifix) Source #

moduleWhere :: forall src ss. Source src => PathMod -> [DefTerm src ss] -> (PathMod, Module src ss) Source #

Type ModuleFixy

type ModuleFixy src ss fixy = Map NameTe (Tokenizer src ss fixy) Source #

Type Tokenizer

data Tokenizer src ss fixy Source #

Constructors

Tokenizer 

Fields

Instances

(Source src, Eq fixy) => Eq (Tokenizer src ss fixy) Source # 

Methods

(==) :: Tokenizer src ss fixy -> Tokenizer src ss fixy -> Bool #

(/=) :: Tokenizer src ss fixy -> Tokenizer src ss fixy -> Bool #

Source src => Show (Tokenizer src ss fixy) Source # 

Methods

showsPrec :: Int -> Tokenizer src ss fixy -> ShowS #

show :: Tokenizer src ss fixy -> String #

showList :: [Tokenizer src ss fixy] -> ShowS #

Type AST_Term

type AST_Term src ss = BinTree (Token_Term src ss) Source #

Abstract Syntax Tree of Token_Term.

Type Token_Term

data Token_Term src ss Source #

Constructors

Token_Term (TermAVT src ss) 
Token_TermVT (TermVT src ss '[]) 
Token_Term_Abst src NameTe (AST_Type src) (AST_Term src ss) 
Token_Term_Var src NameTe 
Token_Term_Let src NameTe (AST_Term src ss) (AST_Term src ss) 
Token_Term_App src 

Instances

Source src => Eq (Token_Term src ss) Source # 

Methods

(==) :: Token_Term src ss -> Token_Term src ss -> Bool #

(/=) :: Token_Term src ss -> Token_Term src ss -> Bool #

Source src => Show (Token_Term src ss) Source # 

Methods

showsPrec :: Int -> Token_Term src ss -> ShowS #

show :: Token_Term src ss -> String #

showList :: [Token_Term src ss] -> ShowS #

SourceInj (AST_Term (SrcTe inp ss) ss) (SrcTe inp ss) # 

Methods

sourceInj :: AST_Term (SrcTe inp ss) ss -> SrcTe inp ss #

Type NameTe

Class ModulesInj

type ModulesInj src ss = ModulesInjR src ss ss Source #

modulesInj :: forall src ss. ModulesInj src ss => Either Error_Module (Modules src ss) Source #

Class ModulesInjR

class ModulesInjR src ss rs where Source #

Minimal complete definition

modulesInjR

Instances

ModulesInjR src ss ([] *) Source # 
(ModuleFor k src ss s, ModulesInjR src ss rs) => ModulesInjR src ss ((:) * (Proxy k s) rs) Source # 

Type DefTerm

data DefTerm src ss Source #

Constructors

(:=) (WithFixity NameTe) (forall ts. Term src ss ts vs t) 

lookupDefTerm :: forall src ss fixy. Fixy (ModuleFixy src ss Unifix) (ModuleFixy src ss Infix) (ModuleFixy src ss Unifix) (ModuleFixy src ss fixy) -> Imports NameTe -> Mod NameTe -> Modules src ss -> Either Error_Module (Tokenizer src ss fixy) Source #

Lookup given Mod NameTe into the Infix TermDef of given Modules.

NOTE: Token_Term_App is returned for the space NameTe.

deleteDefTerm :: Mod NameTe -> Modules src ss -> Modules src ss Source #

Delete given Mod NameTe into given Modules.

deleteDefTermInfix :: Mod NameTe -> Modules src ss -> Modules src ss Source #

Delete given Mod NameTe into byInfixs of given Modules.

deleteDefTermPrefix :: Mod NameTe -> Modules src ss -> Modules src ss Source #

Delete given Mod NameTe into byPrefixs of given Modules.

deleteDefTermPostix :: Mod NameTe -> Modules src ss -> Modules src ss Source #

Delete given Mod NameTe into byPostfixs of given Modules.

insertDefTerm :: forall src ss. Source src => Mod (DefTerm src ss) -> Modules src ss -> Modules src ss Source #

insertTermVT :: forall src ss. Source src => Mod (TermVT src ss '[]) -> NameTe -> Fixity -> Modules src ss -> Modules src ss Source #

insertFixity :: (forall fx. fx -> ModuleFixy src ss fx -> ModuleFixy src ss fx) -> Fixity -> Module src ss -> Module src ss Source #