liboleg-2010.1.10.0: An evolving collection of Oleg Kiselyov's Haskell modules
Language.TEval.TEvalNR
Description
Simply-typed Church-style (nominal) lambda-calculus with integers and zero-comparison Type reconstruction, for all subterms
http://okmij.org/ftp/Computation/Computation.html#teval
Synopsis
data Typ Source
Constructors
Instances
data Term Source
type VarName = StringSource
type TEnv = [(VarName, Typ)]Source
Type Environment: associating types with free variables
free
env0 :: TEnvSource
lkup :: TEnv -> VarName -> TypSource
ext :: TEnv -> (VarName, Typ) -> TEnvSource
type TermIndex = [Int]Source
A virtual typed AST: associating a type to each subterm
type Typs = Map TermIndex TypSource
topterm :: Typ -> TypsSource
toptyp :: Typs -> TypSource
shift :: Int -> Typs -> TypsSource
teval :: TEnv -> Term -> TypsSource
Type reconstruction: abstract evaluation