momo-0.1.0.0: Modular module system
Safe HaskellSafe-Inferred
LanguageGHC2021

Momo.Env

Documentation

type Env term = Table (Binding term) Source #

addSignature :: [Specification term] -> Env term -> Env term Source #

addValue :: Ident -> Val term -> Env term -> Env term Source #

findValue :: (CoreSyntax term, MonadThrow m) => Path -> Env term -> m (Val term) Source #

addType :: Ident -> TypeDecl term -> Env term -> Env term Source #

findType :: (CoreSyntax term, MonadThrow m) => Path -> Env term -> m (TypeDecl term) Source #

addModule :: Ident -> ModType term -> Env term -> Env term Source #

findModule :: (CoreSyntax term, MonadThrow m) => Path -> Env term -> m (ModType term) Source #

data Binding term Source #

Constructors

Value (Val term) 
Type (TypeDecl term) 
Module (ModType term) 

Instances

Instances details
ShowTerm term => Show (Binding term) Source # 
Instance details

Defined in Momo.Env

Methods

showsPrec :: Int -> Binding term -> ShowS #

show :: Binding term -> String #

showList :: [Binding term] -> ShowS #

EqTerm term => Eq (Binding term) Source # 
Instance details

Defined in Momo.Env

Methods

(==) :: Binding term -> Binding term -> Bool #

(/=) :: Binding term -> Binding term -> Bool #

OrdTerm term => Ord (Binding term) Source # 
Instance details

Defined in Momo.Env

Methods

compare :: Binding term -> Binding term -> Ordering #

(<) :: Binding term -> Binding term -> Bool #

(<=) :: Binding term -> Binding term -> Bool #

(>) :: Binding term -> Binding term -> Bool #

(>=) :: Binding term -> Binding term -> Bool #

max :: Binding term -> Binding term -> Binding term #

min :: Binding term -> Binding term -> Binding term #

addSpec :: Specification term -> Env term -> Env term Source #

find :: forall term m. (CoreSyntax term, MonadThrow m) => Path -> Env term -> m (Binding term) Source #