lambda-cube-0.3.0: Some thoughts on Calculus of Constructions
Safe HaskellNone
LanguageHaskell2010

L3.Core.DeBruijn

Description

Type checking and type inference

Synopsis

Documentation

index :: (Eq a, Enum a, Show a) => Int -> Expr (Either Int a) -> Expr (Either Int a) Source #

Given an free index, convert an expression in Right names into Left indexes. This uses DeBruijn indicies.

index0 :: (Eq a, Enum a, Show a) => Expr a -> Expr (Either Int a) Source #

Provide an initial free index of 0 and index an expression. This converts any expression to its DeBruijn indexed form, leaving global names untouched.