|      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJ K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { GHC experimental emw4@rice.edu Safe-Infered Safe-Infered|||GHC experimental emw4@rice.edu Safe-InferedGHC experimental emw4@rice.edu Safe-InferedAn Append ctx1 ctx2 ctx is a "proof" that  ctx = ctx1  ctx2.  Appends two  proofs. ,Returns a proof that ctx :=: ctx1 :++: ctx2 Returns the length of an  proof.     GHC experimental emw4@rice.edu Safe-Infered A  Member ctx a is a "proof" that the type a is in the type  list ctx, meaning that ctx equals  % t0 ':>' a ':>' t1 ':>' ... ':>' tn for some types  t0,t1,...,tn. }    }GHC experimental emw4@rice.edu Safe-Infered A MapC f c. is a vector with exactly one element of type f a for  each type a in the type list c. Create an empty  vector. Create a singleton  vector. Look up an element of a  vector using a   proof. $Map a function to all elements of a  vector. 6Map a binary function to all pairs of elements of two  vectors.  Append two  vectors. Make an  proof from any  vector for the second  argument of the append.  A version of  that takes in a ~ argument. Split a  vector into two pieces.  Create a ~ object for the type list of a  vector. ,Create a vector of proofs that each type in c is a   of c. !Replace a single element of a  vector.  ! ! !  !GHC experimental emw4@rice.edu Safe-Infered~ GHC experimental emw4@rice.edu Safe-Infered& The type Cl a" represents a closed term of type a,  i.e., an expression of type a# with no free (Haskell) variables. D Since this cannot be checked directly in the Haskell type system,  the Cl3 data type is hidden, and the user can only create 3 closed terms using Template Haskell, through the mkClosed  operator. )An Mb ctx b9 is a multi-binding that binds exactly one name for each  type in ctx, where ctx has the form   t1  ...  tn. +A Name a. is a bound name that is associated with type a. "#$%&'()*+,-./0123"#$%&'()*+,-./0123+,)*&'($%-."#/0123 "#$%&'()*+,-./0123GHC experimental emw4@rice.eduNone4 The class  Liftable2 f( gives a lifting function for each type f a b  when a and b are Liftable. 6 The class  Liftable1 f( gives a lifting function for each type f a  when a itself is Liftable. 8 The class  Liftable a gives a "lifting function" for a, which can  take any data of type a out of a multi-binding of type ) ctx a. :A Binding/ is simply a multi-binding that binds one name ;nu f, creates a binding which binds a fresh name n and whose  body is the result of f n. <ACombines a binding inside another binding into a single binding. =ESeparates a binding into two nested bindings. The first argument, of  type  c1 c2 c, is a "phantom" argument to indicate how  the context c should be split. >=Returns a proxy object that enumerates all the types in ctx. ?-Creates an empty binding that binds 0 names. @The expression  nuMulti p f) creates a multi-binding of zero or more , names, one for each element of the vector p. The bound names are  passed the names to f , which returns the body of the  multi-binding. The argument p , of type ) f ctx , acts as a  "phantom"+ argument, used to reify the list of types ctx at the < term level; thus it is unimportant what the type function f is. A;Eliminates an empty binding, returning its body. Note that   elimEmptyMb is the inverse of emptyMb. B cmpName n m compares names n and m of types Name a and Name b, % respectively. When they are equal, Some e is returned for e a proof  of type a :=: b( that their types are equal. Otherwise, None is returned.  For example: J nu $ \n -> nu $ \m -> cmpName n n == nu $ \n -> nu $ \m -> Some Refl E nu $ \n -> nu $ \m -> cmpName n m == nu $ \n -> nu $ \m -> None C8Checks if a name is bound in a multi-binding, returning Left mem  when the name is bound, where mem! is a proof that the type of the @ name is in the type list for the multi-binding, and returning  Right n# when the name is not bound, where n is the name.  For example: I nu $ \n -> mbNameBoundP (nu $ \m -> m) == nu $ \n -> Left Member_Base @ nu $ \n -> mbNameBoundP (nu $ \m -> n) == nu $ \n -> Right n DBCompares two names inside bindings, taking alpha-equivalence into ! account; i.e., if both are the i#th name, or both are the same name E not bound in their respective multi-bindings, then they compare as / equal. The return values are the same as for B , so that   Some Refl* is returned when the names are equal and Nothing is  returned when they are not. E:Lift a list (but not its elements) out of a multi-binding F  nus = nuMulti456789:;<=>?@ABCDEF)+456789:;<=>?@ABCDEF+:);?@A<=>BDC896745EF456789:;<=>?@ABCDEFGHC experimental emw4@rice.eduNoneGHIGHIGHIGHI NoneNInstances of the NuElim a class allow the type a to be used with  nuWithElimMulti and W!. The structure of this class is # mostly hidden from the user; see X to see how to create  instances of the NuElim class. Q:Applies a function in a multi-binding to an argument in a ? multi-binding that binds the same number and types of names. S?Take a multi-binding inside another multi-binding and move the & outer binding inside the inner one. TThe expression nuWithElimMulti args f takes a sequence args of , zero or more multi-bindings, each of type  Mb ctx ai for the same  type context ctx of bound names, and a function f and does the  following: * Creates a multi-binding that binds names  n1,...,nn, one name for  each type in ctx;  Substitutes the names  n1,...,nn for the names bound by each  argument in the args& sequence, yielding the bodies of the args  (using the new name n ); and then  Passes the sequence  n1,...,nn along with the result of  substituting into args to the function f, which then returns - the value for the newly created binding. Note that the types in args must each have a NuElim instance;  this is represented with the  NuElimList type class. Here are some examples: O commuteFun :: (NuElim a, NuElim b) => Mb ctx (a -> b) -> Mb ctx a -> Mb ctx b  commuteFun f a = 7 nuWithElimMulti ('mbToProxy' f) ('Nil' :> f :> a) M (\_ ('Nil' :> 'Identity' f' :> 'Identity' a') -> f' a') U Similar to T but binds only one name. V Similar to T but takes only one argument W Similar to T( but takes only one argument that binds  a single name. XETemplate Haskell function for creating NuElim instances for (G)ADTs. H Typical usage is to include the following line in the source file for  (G)ADT T, (here assumed to have two type arguments):  + $(mkNuElimData [t| forall a b . T a b |]) The X3 call here will create an instance declaration for  N (T a b)2. It is also possible to include a context in the - forall type; for example, if we define the ID data type as follows:   data ID a = ID a then we can create a N instance for it like this:  * $( mkNuElimData [t| NuElim a => ID a |]) CNote that, when a context is included, the Haskell parser will add  the forall a for you. JKLMNOPQRSTUVWXJKLMNOPQRSTUVWXQRSTUVWNOXLMJKPJKLMNOPQRSTUVWX GHC experimental emw4@rice.eduNoneY  Closed = ClZclD is used with Template Haskell quotations to create closed terms of  type &C. A quoted expression is closed if all of the names occuring in it  are 1) bound globally or $ 2) bound within the quotation or  3) also of type &. [3Closed terms are closed (sorry) under application. \ mbLiftClosed! is safe because closed terms don't contain names. ] noClosedNames; encodes the hobbits guarantee that no name can escape its  multi-binding. ^ mbApplyCl f b applies a closed function f to the body of  multi-binding b. For example: 3 mbApplyCl $(cl [| f |]) (nu $ \n -> n) = nu f _  mkClosed = cl` unClosed = unClYZ[\]^_` &(YZ[\]^_` &(Z[(^\]_Y`YZ[\]^_`GHC experimental emw4@rice.edu Safe-InferedB~ &()+456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` GHC experimental emw4@rice.edu Safe-Inferedabcdefghijklmnopqabcdefghijklmnopqpoknmlqgjihdfeacb acbdfegjihknmlopq GHC experimental emw4@rice.edu Safe-Inferedrstuvwxyrstuvwxyrstuvwxyrstuvwxy GHC experimental emw4@rice.eduNonez{abcdefghijklmnopqz{z{z{ !"#$%&'()*+,#-./0011223456789:;<=>?@ABCDEFGHIJKLMNOPQRST U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~   hobbits-1.1"Data.Binding.Hobbits.PatternParserData.Type.List.ListData.Type.List.Proof.AppendData.Type.List.Proof.MemberData.Type.List.MapData.Binding.Hobbits.InternalData.Binding.Hobbits.MbData.Binding.Hobbits.QQData.Binding.Hobbits.NuElimData.Binding.Hobbits.Closed1Data.Binding.Hobbits.Examples.LambdaLifting.Terms4Data.Binding.Hobbits.Examples.LambdaLifting.Examples+Data.Binding.Hobbits.Examples.LambdaLifting&Data.Binding.Hobbits.InternalUtilitiesData.Type.ListData.Binding.Hobbits parsePattern:++::>Nil proxyConsAppend Append_Step Append_BasetransappendPflengthMember Member_Step Member_BasetoEqweakenLsameweakenRsplitMapCempty singletonlookupmapCmapC2appendmkAppend mkMonoAppendproxymembersreplaceExProxyExMemberClunClMbMkMbNameMkName memberFromLen unsafeLookupC proxyFromLenunsafeProxyFromLenunsafeNamesFromIntscounter fresh_name Liftable2mbLift2 Liftable1mbLift1LiftablembLiftBindingnu mbCombine mbSeparate mbToProxyemptyMbnuMulti elimEmptyMbcmpName mbNameBoundP mbCmpNamembListnusnuPclPclNuPNuElim1 nuElimProof1 NuElimListnuElimListProofNuElim nuElimProof NuElimProofmbApply mbMapAndSwap mbRearrangenuMultiWithElim nuWithElimnuMultiWithElim1 nuWithElim1 mkNuElimDataClosedclclApply mbLiftClosed noClosedNames mbApplyClmkClosedunClosedDecls Decls_Cons Decls_BaseDecl Decl_ConsDecl_OneDTermTAppTDVarTVarTermAppLamVarDLlamex1ex2ex3ex4ex5ex6ex7exP lambdaLift mbLambdaLifteverywhereButM $fShowMember tagged-0.4.2 Data.ProxyProxytype-equality-0.1.0.2Data.Type.EqualityRefl:=: $fLiftable1f $fLiftable1[] $fLiftablef$fLiftableMember$fLiftableChar $fLiftableInt$fShowMb $fShowMapC $fShowName $fNuElimMapC$fNuElimList:>$fNuElimListNil $fNuElim[]$fNuElimEither $fNuElim(,,,) $fNuElim(,,) $fNuElim(,) $fNuElimChar $fNuElimInt $fNuElimMb $fNuElim(->) $fNuElimName $fShowDecls $fShowDTerm $fShowTerm