úÎA< S      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR  Safe-Inferred(*+None!"'9=JKUniform variant of S, for indexed types. This is different from   ä in that it is properly kind polymorphic and crucially heterogeneous, and it places no constraint on the index. Because it is heterogeneous, it is useful to project equality in the base space from equality in the total space.dWhen both sides are equal, give in addition a proof that their indices are equal; otherwise return T.A boolean version of , which must agree with it.(Essentially, Martin-Löf's identity type."Type constructors are extensional.   None !"(*+9=HMT First order term views. v is the type of variables; o5 is the type of operators parameterized by arities; n< is the "higher type"/valence of the term (i.e. a term has n=0, a single binding has n=1 , etc.); ÆB is the functor which interprets the inner structure of the view.Views are a (higher) functor.6A prism to extract arguments from a proposed operator.  "7  o !Ò o ns !’ Prism' (  v o Æ) (U Æ ns)  a natural transformation Æ !’ È a view at Æ       None   Safe-Inferred'9=Uniform variant of V, for indexed types. This is different from   ) in that it is properly kind polymorphic. Safe-Inferred689Generates a fresh variable-Generates a fresh variable tagged with a nameNone!"(689= The t signature represents mediation between an arbitrary (possibly nameless) term representaion, and a simple one (the  (). Based on the (effectful) ismorphism  /  between representations, many operations can be defined generically for arbitrary operator sets, including substitution and aggregation of free variables. Convert a   into a term.Convert a term into a simple  .&The injection from variables to terms.Construct an abstraction.Construct an operator term.!Substitute a term for a variable.1Instantiate the bound variable of an abstraction.%Compute the free variables of a term. +Render a term into a human-readable string.      None !"(*+2469=T!:First order terms (i.e. terms not headed by abstractions).")Locally nameless terms with operators in o at order n.'JA variable is a De Bruijn index, optionally decorated with a display name.+ A lens for ). + "7 Lens' ' (W X) , A lens for *. , "7 Lens' ' Y -6A prism to extract arguments from a proposed operator. - "7  o !Ò o ns !’ Prism' (! o) (U (! o) ns) !"#$%&'()*+,Z[-\]^_` !"#$%&'()*+,- "&%$#!-'()*+, !"&%$#'()*+,Z[-\]^_` None None !"(23469BMT 29A monad transformer for small step operational semantics.5^Next, we'll define the operators for a tiny lambda calculus as a datatype indexed by arities.;oWe'll start off with a monad in which to manipulate ABTs; we'll need some state for fresh variable generation.>AWe'll run an ABT computation by starting the variable counter at 0.D*To indicate that a term is in normal form.EA single evaluation step.FGThe reflexive-transitive closure of a small-step operational semantics.GEvaluate a term to normal formK »x.xL  (»x.x)(»x.x)M<A demonstration of evaluating (and pretty-printing). Output: )ap[lam[@2.@2];lam[@3.@3]] ~>* lam[@4.@4] R6Check out the source to see fresh variable generation.%./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR ./0123456789:;<=>?@ABCDEFGHIJKLM%;<=>R5:9876QP?@ABC234DOEFG/01N.HIJKLM./012345:9876;<=>?@ABCDEFGHIJKLMNOPQRa  !"#$%&'()*+,-./01234456789:;;<==>?@ABCDEEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd_ef_`g_hi\jklmnopqrs abt-0.1.1.0 Abt.Types.NatAbt.Class.HEq1Abt.Types.ViewAbt.Class.Show1Abt.Class.Monad Abt.Class.AbtAbt.Concrete.LocallyNameless Abt.Tutorial Data.FunctorEq1 Abt.TypesShow1 Abt.ClassNatSZHEq1heq1===:=:Reflcong $fHEq1[]RecView0View:$:\VmapView_ViewOp showsPrec1show1MonadVarfreshnamedAbtintooutvar\\$$subst//freeVarstoStringTm0TmAppAbsBoundFreeVar_varName _varIndexvarNamevarIndex_TmOpCtxJudgeT runJudgeTStepTrunStepTLangAXUNITPIAPPLAMM_MrunMlamappaxunitpistepsExhaustedstepstarevalraisecheckTyinferTy identityTmappTmmain$fMonadVarVarJudgeT$fMonadVarVarStepT $fHEq1[]Lang $fShow1[]Lang$fMonadVarVarMghc-prim GHC.ClassesEqbase Data.MaybeNothing vinyl-0.5Data.Vinyl.CoreRecGHC.ShowShowMaybeGHC.BaseString GHC.TypesIntshiftVaraddVar $fAbtVaroTm $fHEq1NatTm$fOrdVar$fEqVar $fShowVar