L3.Core.DeBruijn
Description
Type checking and type inference
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.
free
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.