{O7      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN 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 wxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij k!l!m!n!o!p!q!r!s!t!u!v!w!x!y!z!{!|!}!~!!!!!!!!""#$$$$$$$$$$%%%%%%%%%%%%%%%% % % % % %%%%%%%%%%%%%%%%%%% %!%"%#%$%%%&%'%(%)%*%+%,%-%.%/%0%1%2%3%4%5%6%7%8%9%:%;%<%=%>%?%@%A%B%C%D%E%F%G%H%I%J%K%L%M%N%O%P%Q%RSTUVWXYZ[\&]&^&_&`&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%{%|%}%~,,,,,,,,,,,,R- Safe-InferredC&Other constructors at the spec level. ?All material regions in a data type are captured in a closure. !Region is captured in a closure. 8Allocation into all material regions in some data type. Allocation into some region. 1Write to all material regions in some data type. Write of some region. -Read of all material regions in a data type. %Read the head region in a data type. Read of some region. A suspended computation. +Function with a latent effect and closure. Pure function. ,The unit data type constructor is baked in. Witness type constructors. >Non-interfering effects are disjoint. Used for rewrite rules. (Manifestness of some region (not lazy). -Laziness of the primary region in some type. Laziness of some region. Distinctness of some n regions -Mutability of material regions in some type. Mutability of some region. +Constancy of material regions in some type Constancy of some region. -Globalness of material regions in some type. Globalness of some region. Emptiness of some closure. Purity of some effect. Kind constructor. Kind of closures. Kind of effects. Kind of regions. !Kind of data values. "Kind of witnesses. #Function kind constructor. 6 This is only well formed when it is fully applied. $Sort constructor. %Sort of computation kinds. &Sort of witness kinds. '%Kind, type and witness constructors. FThese are grouped to make it easy to determine the universe that they  belong to. ()User defined and primitive constructors. )>(level 1) Builtin Spec constructors for types of other kinds. *@(level 1) Builtin Spec constructors for the types of witnesses. +%(level 2) Builtin Kind constructors. ,%(level 3) Builtin Sort constructors. -6Wraps a variable or constructor that can be added the 4 array. 0)Hash value used to insert types into the 4 array of a 2. 2&A least upper bound of several types. DWe keep type sums in this normalised format instead of joining them ) together with a binary operator (like (+)"). This makes sums easier to work N with, as a given sum type often only has a single physical representation. 4?Where we can see the outer constructor of a type, its argument ? is inserted into this array. This handles common cases like  Read, Write, Alloc effects. 5 A map for named type variables. 6$A map for anonymous type variables. 7Types that can')t be placed in the other fields go here. INVARIANT: this list doesn't contain more @s. 9&The kind of the elements in this sum. ?A value type, kind, or sort. IWe use the same data type to represent all three universes, as they have ! a similar algebraic structure. @Least upper bound. A Application. B Abstraction. C Constructor. D Variable. E1A bound occurrence of a variable, with its type. If variable hasn'/t been annotated with its real type then this  can be tBot (an empty sum). F2Named primitive that has its type attached to it. + The types of primitives must be closed. G2Named variable that should be in the environment. H8Nameless variable that should be on the deBruijn stack. I!A variable binder with its type. J#Named variable in the environment. K)Nameless variable on the deBruijn stack. L)A variable with no uses in the body doesn't need a name. MA variable binder. Q  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP #"! $&%',+*)(-/.01283994567:;<=>?DCBA@EHGFILKJMPON. Safe-Inferred  / Safe-InferredQ*Language feature supported by a fragment. RAllow unused named matches. S.Allow unused named data and witness bindings. TAllow name shadowing. UCAllow non-primitive functions to be instantiated at unboxed types.  Our existing backends can')t handle this, because boxed and unboxed + objects have different representations. V;Allow data and witness vars without binding occurrences if ; they are annotated directly with their types. This lets  us work with open terms. WDebruijn binders. A Most backends will want to use real names, instead of indexed  binders. XNested function bindings. = The output of the lambda-lifter should not contain these. Y3Function application where the thing being applied  is not a variable. ) Most backend languages (like LLVM) don't support this. ZPartially applied functions ['Partially applied primitive operators. \*Attach latent closures to function types. ])Attach latent effects to function types. ^ Track closure type information. _Track effect type information. QRSTUVWXYZ[\]^_QRSTUVWXYZ[\]^_Q_^]\[ZYXWVUTSR Safe-InferredQ  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPR?DCBA@=><;:28399456701-/.',+*)($&%#"!  MPONILKJEHGF Safe-Inferred`/Construct an empty type sum of the given kind. 6Construct an empty type sum of the given kind, but in 3 form.  This isn' t exported. a2Construct a type sum containing a single element. b/Check whether an element is a member of a sum. 3 Returns True when the first argument is $0 or !0. 7 Returns False when the first argument is another sum. ? May return False if the first argument is miskinded but still 4 alpha-equivalent to some component of the sum. c!Insert a new element into a sum. dDelete an element from a sum. eAdd two type sums. fUnion a list of 2 s together. g9Delete all members of the second sum from the first one. hTake the kind of a sum. i8Flatten out a sum, yielding a list of individual terms. jConvert a list of types to a 2 k Yield the 0 of a ', or  if there isn't one.  Yield the 0 of a  TyConBuiltin, or  if there isn't one. l,The range of hashes that can be produced by k. m Yield the ' corresponding to a 0, or  if there isn't one. ;If this type can be put in one of our arrays then split it # into the hash and the argument.  Inverse of . `abcdefghijklm`abcdefghijklm`aefcijhbdgklm`abcdefghijklm Safe-Inferred0n"Take the variable name of a bind. 0 If this is an anonymous binder then there won' t be a name. oTake the type of a bind. p+Replace the type of a bind with a new one. qTake the binder of a bind. r(Make a bind from a binder and its type. s-Make lists of binds that have the same type. t!Take the name of bound variable. - If this is a deBruijn index then there won' t be a name. u%Check whether a bound maches a bind.  G and J# match if they have the same name.  UIx 0 _ and BAnon _ always match.  Yields - for other combinations of bounds and binds. v3Check whether a named bound matches a named bind.  Yields 0 if they are not named or have different names. w Convert a I to a E, ready for substitution. Returns G for J, UIx 0 for K  and  for L, because there's nothing to substitute. x Convert some Is to Bounds yIf this E is a F then replace it's embedded type with a new & one, otherwise return it unharmed. zConstruct a deBruijn index. {Construct an empty type sum. |Construct a type application. }Construct a type application. ~+Construct a sequence of type applications. CFlatten a sequence ot type applications into the function part and  arguments, if any. HFlatten a sequence of type applications, returning the type constructor # and arguments, if there is one. HFlatten a sequence of type applications, returning the type constructor L and arguments, if there is one. Only accept primitive type constructors. HFlatten a sequence of type applications, returning the type constructor G and arguments, if there is one. Only accept data type constructors. /Take the prime region variable of a data type. O This corresponds to the region the outermost constructor is allocated into. >Build an anonymous type abstraction, with a single parameter. >Build an anonymous type abstraction, with a single parameter. 1 Starting the next index from the given value. >Build an anonymous type abstraction, with several parameters. 1 Starting the next index from the given value. >Build an anonymous type abstraction, with several parameters. 1 Starting the next index from the given value. 0Split nested foralls from the front of a type,  or  if there was no outer forall.  Erase all B quantifiers from a type. Construct a kind function. Construct some kind functions. Destruct a kind function 6Destruct a chain of kind functions into the arguments Like 9, but return argument and return kinds in the same list. ATake the result kind of a kind function, or return the same kind  unharmed if it's not a kind function.  Construct a pure function type. "Construct a value type function, ) with the provided effect and closure. 0Construct a pure and empty value type function. @Construct a pure and empty function from a list containing the % parameter and return type. Yields  if the list is empty. @Construct a pure and empty function from a list containing the % parameter and return type. Yields  if the list is empty. 7Yield the argument and result type of a function type. Works for both   and  . 7Yield the argument and result type of a function type. ODestruct the type of a function, returning just the argument and result types. Works for both   and  . !Destruct the type of a function, D returning the witness argument, value argument and result types. @ The function type must have the witness implications before  the value arguments, eg T1 => T2 -> T3 -> T4 -> T5. Works for both   and  . 5Destruct the type of a possibly polymorphic function ; returning all kinds of quantifiers, witness arguments, = and value arguments in the order they appear, along with  the type of the result. =Determine the arity of an expression by looking at its type. / Count all the function arrows, and foralls. &Construct a witness implication type. 4Build a nullary type constructor of the given kind. 6Build a type constructor application of one argumnet. Rnopqrstuvwxyz{|}~Onopqrstuvwxyz{|}~Onopqrstuvwxy{|}~zRnopqrstuvwxyz{|}~0 Safe-Inferred Data constructors. Name of the data constructor. Type of the data constructor.  The type must be closed. CAlgebraic constructors can be deconstructed with case-expressions, * and must have a data type declaration. Non-algebraic types like  can't be inspected with  case-expressions. Data constructor names. -Data constructor name defined by the client. &The unit data constructor is builtin. #Take the name of data constructor. 0Take the type annotation of a data constructor. The unit data constructor. $Make an algebraic data constructor. *Make a non-algebraic (solid) constructor. : These are used for location values in the interpreter, 9 and for floating point literals in the main compiler.   1 Safe-InferredPattern matching. 1Match a data constructor and bind its arguments. %The default pattern always succeeds. 2 Safe-Inferred Built-in witness constructors. CThese are used to convert a runtime capability into a witness that ' the corresponding property is true. BConvert a capability guaranteeing the constancy of a region, into 7 a witness that allocation into that region is pure. : This lets us increase the sharing of constant objects,  because we can'1t tell constant objects of the same value apart. alloc :: [r : %]. Const r => Pure (Alloc r)BConvert a capability guaranteeing the constancy of a region, into 3 a witness that a read from that region is pure. A This lets us suspend applications that read constant objects,  because it doesn'#t matter if the read is delayed, we' ll always  get the same result. read :: [r : %]. Const r => Pure (Read r)AConvert a capability guaranteeing that a region is in the global C heap, into a witness that a closure using this region is empty. A This lets us rely on the garbage collector to reclaim objects B in the region. It is needed when we suspend the evaluation of @ expressions that have a region in their closure, because the @ type of the returned thunk may not reveal that it references  objects in that region. use :: [r : %]. Global r => Empty (Use r)$(axiom) The empty closure is empty. empty :: Empty $0!(axiom) The pure effect is pure. pure :: Pure !0Witness constructors. 1Witness constructors defined in the environment. @ In the interpreter we use this to hold runtime capabilities. % The attached type must be closed. .Witness constructors baked into the language.   Safe-Inferred Type casts. Run a computation, / releasing its effects into the environment. Suspend a computation, 4 capturing its effects in the S computation type. 5Forget about the closure (sharing) of an expression. -Purify the effect (action) of an expression. %Weaken the closure of an expression. > The closures of these expressions are added to the closure  of the body. $Weaken the effect of an expression. + The given effect is added to the effect  of the body. :When a witness exists in the program it guarantees that a , certain property of the program is true. 3Type can appear as the argument of an application. Joining of witnesses. Witness application. Witness constructor. Witness variable. Case alternatives. Possibly recursive bindings. )Holds a region handle during evaluation. Bind a local region variable, $ and witnesses to its properties. *Recursive binding of lambda abstractions. "Non-recursive expression binding. *Well-typed expressions have types of kind Data. 6Witness can appear as the argument of an application. 3Type can appear as the argument of an application.  Type cast. Case branching. Possibly recursive bindings.  Application. )Value and Witness abstraction (level-0). Type abstraction (level-1). Data constructor or literal. )Value variable or primitive operation.  Annotation. &  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP5   Safe-InferredMake some nested type lambdas. +Make some nested value or witness lambdas. 4Split type lambdas from the front of an expression,  or  if there aren't any. GSplit nested value or witness lambdas from the front of an expression,  or  if there aren't any. &Make some nested lambda abstractions, 4 using a flag to indicate whether the lambda is a . level-1 (True), or level-0 (False) binder. 7Split nested lambdas from the front of an expression, D with a flag indicating whether the lambda was a level-1 (True),  or level-0 (False) binder. &Build sequence of value applications. AFlatten an application into the function part and its arguments. Returns # if there is no outer application. AFlatten an application into the function part and its arguments.  This is like 7 above, except we know there is at least one argument. FFlatten an application into the function parts and arguments, if any. 5Flatten an application of a primop into the variable  and its arguments. Returns  if the expression isn't a primop application. BFlatten an application of a data constructor into the constructor  and its arguments. Returns  if the expression isn't a constructor application. -Wrap some let-bindings around an expression. <Split let-bindings from the front of an expression, if any. Take the binds of a . 9The level-1 and level-0 binders are returned separately. Like + but only take the spec (level-1) binders. Like 8 but only take the value and witness (level-0) binders. >Take the constructor name of an alternative, if there is one.  Take the binds of a .   Construct a witness application  -Construct a sequence of witness applications  Take the witness from an  argument, if any.  FFlatten an application into the function parts and arguments, if any. AFlatten an application of a witness into the witness constructor  name and its arguments. EReturns nothing if there is no witness constructor in head position. Take the type from an  argument, if any.  Construct a value of unit type.      nnopqrstuvwxyz{|}~                Safe-Inferred:When a witness exists in the program it guarantees that a , certain property of the program is true. 3Type can appear as the argument of an application. Joining of witnesses. Witness application. Witness constructor. Witness variable.  Type casts. Run a computation, / releasing its effects into the environment. Suspend a computation, 4 capturing its effects in the S computation type. 5Forget about the closure (sharing) of an expression. -Purify the effect (action) of an expression. %Weaken the closure of an expression. > The closures of these expressions are added to the closure  of the body. $Weaken the effect of an expression. + The given effect is added to the effect  of the body. Case alternatives.  Possibly recursive bindings. !)Holds a region handle during evaluation. "Bind a local region variable, $ and witnesses to its properties. #*Recursive binding of lambda abstractions. $"Non-recursive expression binding. %*Well-typed expressions have types of kind Data. &6Witness can appear as the argument of an application. '3Type can appear as the argument of an application. ( Type cast. )Case branching. *Possibly recursive bindings. + Application. ,)Value and Witness abstraction (level-0). -Type abstraction (level-1). .Data constructor or literal. /)Value variable or primitive operation. $ !"#$%&'()*+,-./  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP !"#$%&'()*+,-./3%/.-,+*)('& $#"!  $#"!% /.-,+*)('&3 Safe-Inferred  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP !"#$%&'()*+,-./ Safe-Inferred02Take the outermost annotation from an expression,  or Nothing if this is an ' or & without an annotation. 1Make some nested type lambdas. 2+Make some nested value or witness lambdas. 34Split type lambdas from the front of an expression,  or  if there aren't any. 4GSplit nested value or witness lambdas from the front of an expression,  or  if there aren't any. 5&Make some nested lambda abstractions, 4 using a flag to indicate whether the lambda is a . level-1 (True), or level-0 (False) binder. 67Split nested lambdas from the front of an expression, D with a flag indicating whether the lambda was a level-1 (True),  or level-0 (False) binder. 7&Build sequence of value applications. 8 Build sequence of applications.  Similar to 7) but also takes list of annotations for  the + constructors. 9AFlatten an application into the function part and its arguments. Returns # if there is no outer application. :AFlatten an application into the function part and its arguments.  This is like 97 above, except we know there is at least one argument. ;FFlatten an application into the function parts and arguments, if any. <#Destruct sequence of applications.  Similar to ;' but also keeps annotations for later. =5Flatten an application of a primop into the variable  and its arguments. Returns  if the expression isn't a primop application. >BFlatten an application of a data constructor into the constructor  and its arguments. Returns  if the expression isn't a constructor application. ?-Wrap some let-bindings around an expression. @JWrap some let-bindings around an expression, with individual annotations. A<Split let-bindings from the front of an expression, if any. BTake the binds of a  . 9The level-1 and level-0 binders are returned separately. CLike B+ but only take the spec (level-1) binders. DLike B8 but only take the value and witness (level-0) binders. E>Take the constructor name of an alternative, if there is one. FTake the binds of a . G Construct a witness application H-Construct a sequence of witness applications ITake the witness from an & argument, if any. JFFlatten an application into the function parts and arguments, if any. KAFlatten an application of a witness into the witness constructor  name and its arguments. EReturns nothing if there is no witness constructor in head position. LTake the type from an ' argument, if any. M Construct a value of unit type. 0123456789:;<=>?@ABCDEFGHIJKLMrnopqrstuvwxyz{|}~0123456789:;<=>?@ABCDEFGHIJKLM#0125346789:;<>=?@ABCDFEGHIJKLM0123456789:;<=>?@ABCDEFGHIJKLM4 Safe-Inferredrnopqrstuvwxyz{|}~0123456789:;<=>?@ABCDEFGHIJKLM  Safe-InferredO8Apply a function to all bound variables in the program. 5 The function is passed the current binding depth.  This is used to defined both Q and S. P=Lift debruijn indices less than or equal to the given depth. Q Wrapper for P that starts at depth 0. R>Lower debruijn indices less than or equal to the given depth. S Wrapper for R that starts at depth 0. NO$Function to apply to the bound occ. + It is passed the current binding depth. Current binding depth. 'Lift expression indices in this thing. PNumber of levels to lift. Current binding depth. 'Lift expression indices in this thing. QRNumber of levels to lower. Current binding depth. (Lower expression indices in this thing. SNumber of levels to lift. Current binding depth.  Lift exp indices in this thing. *Lifted, and how much to increase depth by NOPQRSQPSRNO NOPQRS  Safe-InferredT Convert the Simple version of the AST to the Annot version, 2 using a the provided default annotation value. TUTUTUTU  Safe-InferredV Convert the Annot version of the AST to the Simple version, F using the provided function to decide when to keep the annotation. VWVWVWVW  Safe-InferredY8Apply a function to all bound variables in the program. 5 The function is passed the current binding depth.  This is used to defined both [ and ]. Z=Lift debruijn indices less than or equal to the given depth. [ Wrapper for  liftAtDepthX that starts at depth 0. \>Lower debruijn indices less than or equal to the given depth. ] Wrapper for  lowerAtDepthX that starts at depth 0. XY$Function to apply to the bound occ. + It is passed the current binding depth. Current binding depth. 'Lift expression indices in this thing. ZNumber of levels to lift. Current binding depth. 'Lift expression indices in this thing. [\Number of levels to lower. Current binding depth. (Lower expression indices in this thing. ]XYZ[\][Z]\XY XYZ[\]5 Safe-InferredNumber of levels to lift. Current binding depth.  Lift exp indices in this thing. *Lifted, and how much to increase depth by XYZ[[ZXY  Safe-Inferred^"Stack of anonymous binders that we''ve entered under during substitution. `:Holds anonymous binders that were already in the program, H as well as named binders that are being rewritten to anonymous ones. D In the resulting expression all these binders will be anonymous. aKHolds all binders, independent of whether they are being rewritten or not. b Number of K in `. c Number of J in `. dSubstitution state. K Keeps track of the binders in the environment that have been rewrittten 7 to avoid variable capture or spec binder shadowing. fBound variable that we're substituting for. gWe'6ve decended past a binder that shadows the one that we're  substituting for. We')re no longer substituting, but still may * need to anonymise variables in types. 3 This can only happen for level-0 named binders. h:Level-1 names that need to be rewritten to avoid capture. i:Level-0 names that need to be rewritten to avoid capture. j#Rewriting stack for level-1 names. k#Rewriting stack for level-0 names. mDRewrite names in some thing to anonymous form if they conflict with  any names in the d. state. We use this to avoid variable capture  during substitution. n(Push several binds onto the bind stack, : anonymyzing them if need be to avoid variable capture. o Push a bind onto a bind stack, 8 anonymizing it if need be to avoid variable capture. p Compare a E against the one we're substituting for. q,Push a level-1 binder on the rewrite stack. r0Push some level-1 binders on the rewrite stack. s,Push a level-0 binder on the rewrite stack. t0Push some level-0 binders on the rewrite stack. u0Rewrite the use of a level-1 binder if need be. v0Rewrite the use of a level-0 binder if need be. ^_`abcdefghijklmno!Names that need to be rewritten. Current bind stack. Bind to push. (New stack and possibly anonymised bind. p(Current Bind stack during substitution. Bound we're substituting for. Bound we're looking at now. qrstuv^_`abcdefghijklmnopqrstuvlmdefghijk^_`abconpqrstuv^_`abcdefghijklmnopqrstuv6 Safe-Inferred^_`abcdefghijklmnopqrstuvlmdefghijk^_`abconpqrstuv Safe-Inferredw%Type synonym to improve readability. x%Type synonym to improve readability. y%Type synonym to improve readability. zA type environment. |Types of named binders. }%Types of anonymous deBruijn binders. ~The length of the above stack. $Types of baked in, primitive names. An empty environment. *Extend an environment with a new binding. D Replaces bindings with the same name already in the environment. 3Extend an environment with a list of new bindings. D Replaces bindings with the same name already in the environment. ;Set the function that knows the types of primitive things. .Check if the type of a name is defined by the . Convert a list of Is to an environment. 2Convert a map of names to types to a environment. Combine two environments. ; If both environments have a binding with the same name, < then the one in the second environment takes preference. =Check whether a bound variable is present in an environment. ACheck whether a binder is already present in the an environment. Q This can only return True for named binders, not anonymous or primitive ones. -Lookup a bound variable from an environment. )Lookup a bound name from an environment. -Yield the total depth of the deBruijn stack. PLift all free deBruijn indices in the environment by the given number of steps. GWrap locally bound (non primitive) variables defined in an environment ! around a type as new foralls. wxyz{|}~wxyz{|}~z{|}~yxwwxyz{|}~ Safe-Inferred What level this binder is at. $Describes how a variable was bound. CA description of the binding structure of some type or expression. Use of a constructor. Use of a variable.  An abstract binding expression. 6Collect the free Spec variables in a thing (level-1). -Collect all the bound variables in a thing, 0 independent of whether they are free or not. 1Collect all the spec and exp binders in a thing. /Check if a boundlevel is expression or witness Get the  corresponding to a . Helper for constructing the  for a type binder.  Safe-InferredA fully qualified name, 0 including the name of the module it is from. A hierarchical module name.  Map of module names to modules. 7A module can be mutually recursive with other modules. Name of this module. Kinds of exported types. Types of exported values. Kinds of imported types, 4 along with the name of the module they are from. Types of imported values, 4 along with the name of the module they are from. .The module body consists of some let-bindings % wrapping a unit data constructor. We'%re only interested in the bindings, + with the unit being just a place-holder. Check if this is the Main module. 0Get the top-level kind environment of a module,  from its imported types. 0Get the top-level type environment of a module,  from its imported values. IAdd the kind environment exported by all these modules to the given one. IAdd the type environment exported by all these modules to the given one. &Check whether this is the name of the "Main" module. 7 Safe-InferredBCollect the free Data and Witness variables in a thing (level-0). Helper for constructing the & for an expression or witness binder.  Safe-Inferred>Apply the given function to every annotation in a core thing.  Safe-InferredRewrite G bounds to F bounds and attach their types. J Primitives have their types attached because they are so common in the / language, their types are closed, and we don't want to keep having to & look them up from the environment.  Safe-InferredDSpread type annotations from binders and the environment into bound . occurrences of variables and constructors.  Also convert Es to F# form if the environment says that  they are primitive.   Safe-InferredCheck whether a type is a D #Test if some type is an empty TSum Check whether a type is a D, C or is Bottom. %Check if some kind is the data kind. 'Check if some kind is the region kind. 'Check if some kind is the effect kind. (Check if some kind is the closure kind. (Check if some kind is the witness kind. 3Check whether this type is that of algebraic data. =It needs to have an explicit data constructor out the front, E and not a type variable. The constructor must not be the function 0 constructor, and must return a value of kind . ,Check whether type is a witness constructor $Check whether this is the type of a Const witness. $Check whether this is the type of a Mutable witness. $Check whether this is the type of a Distinct witness. -Check whether this is an atomic read effect. .Check whether this is an atomic write effect. .Check whether this is an atomic alloc effect. 5Check whether an effect is some sort of read effect.  Matches Read HeadRead and DeepRead. ;Check whether an effect is some sort of allocation effect.  Matches Alloc and  DeepAlloc ;Check whether an effect is some sort of allocation effect.  Matches Alloc and  DeepAlloc  Safe-Inferred +Check whether an expression is a variable. .Check whether an expression is a constructor. !Check whether an expression is a / or an ., ! or some type or witness atom. Check whether a witness is a  or . =Check whether an expression is a spec abstraction (level-1). ICheck whether an expression is a value or witness abstraction (level-0). FCheck whether an expression is a spec, value, or witness abstraction. "Check whether an expression is an +. "Check whether an expression is an ' "Check whether an expression is an & "Check whether an alternative is a . "  8None2Pretty print a binder, adding spaces after names. ! The RAnon and None binders don't need spaces, as they're single symbols. -Print a group of binders with the same type. Y      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a 9NonebPretty print a binder, ) showing its type annotation only if it's not bottom. c-Print a group of binders with the same type. dWrap a U% in parens if the predicate is true. becfghdijklmnopqrsY      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abecfghdijklmnopqrs:None)Language fragment compliance violations. Found a naked witness that isn't used as a function argument. Found a naked type that isn't used as a function argument. %Found a bound variable with no uses,  but the profile doesn't permit this. DFound a variable binder that shadows another one at a higher scope,  but the profile doesn't permit this. Found an unbound variable. 'Found an undefined primitive operator. 'Found an unsupported language feature. ttNone"A token with a user-defined name. HAtomic tokens are keywords, punctuation and baked-in constructor names.  They don'9t contain user-defined names or primops specific to the  language fragment. 15Meta tokens contain out-of-band information that is % eliminated before parsing proper. 2This is injected by  applyOffside when it finds an explit close = brace in a position where it would close a synthetic one. 3This is injected by dropCommentBlock when it finds " an unterminated block comment. 8-Tokens accepted by the core language parser. 99A named token that is specific to the language fragment  (maybe it'%s a primop), or a user defined name. :6Atomic tokens are keywords, punctuation and baked-in  constructor names. ;?Meta tokens contain out-of-band information that is eliminated  before parsing proper. <Some junk symbol that isn't part of the language. uThe family of a token. 8 This is used to help generate parser error messages,  so we can say ''the constructor Cons''  and ''the keyword case'' etc. v4Describe a token family, for parser error messages. ='Apply a function to all the names in a 8. >,Describe a token for parser error messages. ?.Describe a TokMeta, for lexer error messages. @ Describe a , for parser error messages. A Describe a , for parser error messages. w'Apply a function to all the names in a . ^      !"#$%&'()*+,-./0123456789:;<uxyz{|v=>?@}AwU      !"#$%&'()*+,-./0123456789:;<=>?@AU8<;:9=>1765432?0/.-,+*)('&%$#"!      @A ?0/.-,+*)('&%$#"!      17654328<;:9u|{zyxv=>?@}AwNoneB'Textual keywords in the core language. CRead a named sort constructor. DRead a named kind constructor. E'Read a named witness type constructor. F:Read a builtin type constructor with a non-symbolic name.  ie not '->'. GRead a witness constructor. HString is a variable name I$Charater can start a variable name. J*Character can be part of a variable body. K%Read a named, user defined variable. LString is a constructor name. M(Character can start a constructor name. N,Charater can be part of a constructor body. ORead a named, user defined . P!String is the name of a literal. QCharacter can start a literal. R)Character can be part of a literal body. BCDE~FGHIJKLMNOPQRBCDEFGHIJKLMNOPQRBCDEFGHIJKLMNOPQRBCDE~FGHIJKLMNOPQR;None LHolds a real token or start symbol which is used to apply the offside rule. Signal that we'$re starting a block in this column. -Apply the offside rule to this token stream. A It should have been processed with addStarts first to add the  LexemeStartLine/LexemeStartLine tokens. 0Add block and line start tokens to this stream. 9 This is lifted straight from the Haskell98 report. 1Drop newline tokens at the front fo this stream. 1Drop newline tokens at the front fo this stream. ;Check if a token is one that starts a block of statements. )Test whether this wrapper token matches. )Test whether this wrapper token matches. DWhen generating new source tokens, take the position from the first " non-newline token in this list This is injected by  when it finds an explit close = brace in a position where it would close a synthetic one. <None9Drop all the comments and newline tokens in this stream. )Drop block comments form a token stream. $Drop newline tokens from this list. ,Position of outer-most block comment start. NoneS)Lex a module and apply the offside rule. AAutomatically drop comments from the token stream along the way. TLex a string into tokens. AAutomatically drop comments from the token stream along the way. S)Path to source file, for error messages. Starting line number.  String containing program text. T)Path to source file, for error messages. Starting line number.  String containing program text. h      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTSTST=NoneU"A parser of core language tokens. 4Parse a module name. 0Parse a qualified variable or constructor name. V&Parse a constructor or variable name. Parse a builtin named  Parse a builtin named  WParse a constructor name. Parse a constructor name. XParse a literal 'Parse a literal, with source position. YParse a variable. (Parse a variable, with source position. ZParse a deBruijn index .Parse a deBruijn index, with source position. [Parse an atomic token. 5Parse an atomic token, yielding its source position. \-Parse an atomic token and return some value. <Parse an atomic token and return source position and value. UVWXYZ[\UVWXYZ[\UVWXYZ[\> Safe-InferredTake the kind of a ', if there is one. ]2Take the superkind of an atomic kind constructor. Yields ' for the kind function (~>) as it doesn't have a sort  without being fully applied. ^-Take the kind of a witness type constructor. _1Take the kind of a computation type constructor. ]^_]^_]^_ Safe-Inferred`/Trim compound closures into their components.  This is like  crushEffect', but for closures instead of effects. For example, trimming ,DeepUse (Int r2 -(Read r1 | Use r1)> Int r2) yields  just Use r1.  Only r1H might contain an actual store object that is reachable from a function  closure with such a type. AThis function assumes the closure is well-kinded, and may return  if  this is not the case. &Trim a closure down to a closure sum.  May return  if the closure is mis-kinded. CTrim the argument of a DeepUsed constructor down to a closure sum. ! The argument is of data kind. ?Make the appropriate Use term for a type of the given kind, or  if  there isn'1t one. Also recursively trim types of data kind. ```` Safe-Inferreda*Crush compound effects and closure terms. M We check for a crushable term before calling crushT because that function + will recursively crush the components. ) As equivT is already recursive, we don'#t want a doubly-recursive function E that tries to re-crush the same non-crushable type over and over. b3Crush compound effect terms into their components.  This is like `& but for effects instead of closures. For example, crushing DeepRead (List r1 (Int r2)) yields (Read r1 + Read r2). 6If this type has first order kind then wrap with the  appropriate read effect. 6If this type has first order kind then wrap with the  appropriate read effect. 6If this type has first order kind then wrap with the  appropriate read effect. 6If this type has first order kind then wrap with the  appropriate read effect. abababab Safe-Inferredd#Substitute a type into some thing. O In the target, if we find a named binder that would capture a free variable M in the type to substitute, then we rewrite that binder to anonymous form,  avoiding the capture. e Substitute a ? for the E corresponding to some I in a thing. f Wrapper for e to substitute multiple things. g Substitute a ? for E in some thing. cdBound variable that we're subsituting into. Type to substitute. 3Names of free varaibles in the type to substitute.  Bind stack. efg^_`abcnopcdefgefgcd^_`abconpcdefgNoneh%Instantiate a type with an argument. ? The type to be instantiated must have an outer forall, else . i+Instantiate a type with several arguments. I The type to be instantiated must have at least as many outer foralls $ as provided type arguments, else . hType to instantiate. Argument type. iType to instantiate. Argument types. hihihi  Safe-Inferredj8Lookup the type of a bound thing from the binder stack. 4 The binder stack contains the binders of all the Bs we've  entered under so far. jjjj! Safe-Inferredk*Describes a data constructor, used in the y table. mName of data constructor. n4Tag of constructor (order in data type declaration) oField types of constructor. p$Name of result type of constructor. q/Describes a data type constructor, used in the y table. sName of data type constructor. t)Kinds of type parameters to constructor. u.Names of data constructors of this data type,  or ) if it has infinitely many constructors. vFThe mode of a data type records how many data constructors there are.  This can be set to Large/ for large primitive types like Int and Float.  In this case we don'(t ever expect them all to be enumerated  as case alternatives. y"A table of data type definitions, H unpacked into type and data constructors so we can find them easily. }&The definition of a single data type. Name of the data type. Kinds of type parameters. 7Constructors of the data type, or Nothing if there are  too many to list (like with ). )An empty table of data type definitions. 2Insert a data type definition into some DataDefs. Build a y table from a list of } >Yield the list of data constructor names for some data type,  or 5 for large types with too many constructors to list. klmnopqrstuvwxyz{|}~klmnopqrstuvwxyz{|}~}~yz{|vxwqrstuklmnop klmnopqrstuvxwyz{|}~? Safe-Inferred .A flattened set of features, for easy lookup. :The fragment profile describes the language features and 2 primitive operators available in the language. The name of this profile. Permitted language features. "Primitive data type declarations. Supers of primitive kinds. Kinds of primitive types. Types of primitive operators. )Check whether a type is an unboxed type. / Some fragments limit how these can be used. <A language profile with no features or primitive operators. -This provides a simple first-order language. ,An emtpy feature set, with all flags set to . Set a language Flag in the . @None Compliance checking monad. ?Class of things we can check language fragment compliance for. FCheck whether a core thing complies with a language fragment profile. Like & but with some starting environments. 3Check for compliance violations at a binding site. 3Check for compliance violations at a binding site. . The binders must all be at the same level. +Check the function part of an application. @The top level context, used at the top-level scope of a module. Record that we'%ve entered into an abstraction body. ERecord that the expression is being directly applied to an argument. )Reset the argument counter of a context. Throw an error in the monad. $Take the result from a check monad. &Fragment profile giving the supported . language features and primitive operators. Starting Kind environment. Starting Type environment. &Fragment profile giving the supported . language features and primitive operators. The thing to check. &Fragment profile giving the supported . language features and primitive operators. Starting kind environment. Starting type environment. The thing to check. The current language profile. The current environment The binder at this site. Names used under the binder. Names used above the binder. None=Carries all the information we need to work on a particular + fragment of the Disciple Core language. $Language profile for this fragment. =File extension to use when dumping modules in this fragment.  Read a name. Lex module source into tokens, 4 given the source name and starting line number. #Lex expression source into tokens, 3 given the source name and starting line number. 7Perform language fragment specific checks on a module. <Perform language fragment specific checks on an expression. >QRSTUVWXYZ[\]^_>Q_^]\[ZYXWVUTSRANone1Configuration and information from the context. ' Used for context sensitive parsing. )Slurp an initital Context from a Profile BNone Parse a type. Parse a binder. Parse a quantified type. Parse a function type. Parse a type application. 5Parse a variable, constructor or parenthesised type. "Parse a builtin sort constructor. "Parse a builtin kind constructor. "Parse a builtin type constructor. *Parse a builtin witness type constructor. 'Parse a user defined type constructor. Z[\ CNoneParse a witness expression. Parse a witness join. Parse a witness application. Parse a witness argument. 8Parse a variable, constructor or parenthesised witness. 8Parse a variable, constructor or parenthesised witness, # also returning source position. DNone'Specification of a function parameter. C We can determine the contribution to the type of the function, 5 as well as its expression based on the parameter. JBuild the expression of a function from specifications of its parameters, $ and the expression for the body. DBuild the type of a function from specifications of its parameters,  and the type of the body. !Parse a parameter specification. BIND1 BIND2 .. BINDN : TYPE  or (BIND : TYPE) * or (BIND : TYPE) { EFFECT | CLOSURE } Spec of parameters. Body of function. Expression of whole function. Spec of parameters. Type of body. Type of whole function. ENone"Parse a core language expression. ;Parse a variable, constructor or parenthesised expression. ;Parse a variable, constructor or parenthesised expression, # also returning source position. A binding for let expression. 2Letrec bindings must have a full type signature, F or use function syntax with a return type so that we can make one. Parse a single statement. Parse some statements. )Make an expression from some statements. FNoneParse a core module. Parse a type signature. 2Parse the type signature of an imported variable. 2Parse the type signature of an imported variable. NoneUVWXYZ[\UWXZYV[\GNone +Static configuration for the type checker.  These fields don'%t change as we decend into the tree. EThe starting configuration should be converted from the profile that 4 defines the language fragment you are checking.  See DDC.Core.Fragment and use  below. Data type definitions.  Super kinds of primitive kinds. Kinds of primitive types. Types of primitive operators. Track effect type information.  Track closure type information. -Attach effect information to function types. .Attach closure information to function types. ;Convert a langage profile to a type checker configuration.   H Safe-Inferred <Things that can go wrong when checking the kind of at type. KA witness implication where the premise or conclusion has an invalid kind. <A forall where the body does not have data or witness kind. 6A type sum that does not have effect or closure kind. 6A type sum where the components have differing kinds. DA type application where the thing being applied is not a function. =A type application where the parameter and argument kinds don' t match. .Found an unapplied kind function constructor.  Found a naked sort constructor. PThe kind annotation on the variables does not match the one in the environment. An undefined type constructor. An undefined type variable.  %INoneNoneThe type checker monad. GCheck a type in the given environment, returning an error or its kind. FCheck a type in an empty environment, returning an error or its kind. "Check a type, returning its kind. 0]^_6]^_" Safe-InferredCheck equivalence of types. HChecks equivalence up to alpha-renaming, as well as crushing of effects  and trimming of closures.  Return  if we find any free variables. F We assume the types are well-kinded, so that the type annotations on M bound variables match the binders. If this is not the case then you get  an indeterminate result. Like . but take the initial stacks of type binders. >If we have a UName and UPrim with the same name then these won't match I even though they pretty print the same. This will only happen due to H a compiler bugs, but is very confusing when it does, so we check for  this case explicitly. -Unpack single element sums into plain types. # Safe-Inferred2Check whether the first type subsumes the second. >Both arguments are converted to sums, and we check that every G element of the second sum is equivalent to an element in the first. BThis only works for well formed types of effect and closure kind.  Other types will yield . $None )Universes of the Disciple Core language. ((level 0). The universe of data values. B These are physical data objects that take up space at runtime.  This is like the Set* universe in constructive logic, but the 2 expressions may diverge or cause side effects. &(level 0). The universe of witnesses. B The existence of a witness in the program guarantees that some E property about how it operates at runtime. For example, a witness F of constancy of some region guarantees objects in that region will $ not be updated. This is like the Prop universe in constructive  logic. +(level 1). The universe of specifications. ; Specifications classify both witnesses and data values.  In the vanilla Haskell world "specifications" are known as  "types"6, but here we use the former term because we overload  the word "type"& to refer to kinds and sorts as well. "(level 2). The universe of kinds. " Kinds classify specifications. "(level 3). The universe of sorts.  Sorts classify kinds. HGiven the type of the type of the type of some thing (up three levels), 0 yield the universe of the original thing, or  it was badly formed. :Given the type of the type of some thing (up two levels), 0 yield the universe of the original thing, or  if it was badly formed. -Given the type of some thing (up one level), 0 yield the universe of the original thing, or  if it was badly formed. !Yield the universe of some type. / universeOfType (tBot kEffect) = UniverseSpec / universeOfType kRegion = UniverseKind    JNone2BAll the things that can go wrong when type checking an expression  or witness. Found a naked & that wasn'"t the argument of an application. Found a naked ' that wasn'"t the argument of an application. (A run cast applied to a non-suspension. BA weakeff-cast where the type provided does not have effect kind. EA case-expression where the result types of the alternatives are not  identical. DA case-expression where the annotation on a pattern variable binder 5 does not match the field type of the constructor. AA case-expression where the type of the scrutinee does not match  the type of the pattern. DA case-expression where the pattern types could not be instantiated - with the arguments of the scrutinee type. BA case-expression where one of the patterns has too many binders.  1A case-expression with overlapping alternatives.  ,A case-expression where the alternatives don't cover all the F possible constructors, and the type has too many data constructors  to list.  ,A case-expression where the alternatives don't cover all the  possible data constructors. (A case-expression with no alternatives. =A case-expression where the scrutinee type is not in our set  of data type declarations. =A case-expression where the scrutinee type is not algebraic. FA witness provided for a forget cast that does not witness emptiness. CA witness provided for a purify cast that does not witness purity. An invalid witness join. ;Tried to perform a witness application with a non-witness. =A witness application where the argument type does not match  the parameter type. DA letregion-expression where some of the the bound region variables % are free in the type of the body. DA withregion-expression where the handle does not have region kind. AA letregion-expression where the witness binding references some > free region variable that is not the one being introduced.  ?A letregion-expression where a bound witnesses was not for the ) the region variable being introduced. #CA letregion-expression that tried to create conflicting witnesses. &?A letregion-expression that tried to create a witness with an  invalid type. 'DA letregion-expression where some of the the bound region variables % are free in the type of the body. (DA letregion-expression that tried to shadow some pre-existing named  region variables. )DA letregion-expression where the some of the bound variables do not  have region kind. ,:A recursive let-expression that has more than one binding  with the same name. -AA recursive let-expression where the right of the binding is not  a lambda abstraction. /9A let-expression where the body does not have data kind. 0IA let-expression where the right of the binding does not have data kind. 1GA let-expression where the type of the binder does not match the right  of the binding. 27An abstraction where the body does not have data kind. 3>A value function where the parameter does not have data kind. 5:An abstraction where the body has a visible closure that 6 is not supported by the current language fragment. 7>An abstraction where the body has a visible side effect that 6 is not supported by the current language fragment. 9@A type abstraction that tries to shadow a type variable that is  already in the environment. ;1Tried to apply something that is not a function. =;A function application where the parameter and argument don' t match. @A data constructor that wasn'"t in the set of data definitions. AFA bound occurrence of a variable whose type annotation does not match 4 the corresponding annotation in the environment. DAn undefined type variable. GFound a malformed expression,  and we don'"t have a more specific diagnosis. H>Type signature of exported binding does not match the type at  the definition site. KExported value is undefined. MFound a malformed type,  and we don'"t have a more specific diagnosis. P)Found a kind error when checking a type. Y      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQY      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQPMKHGDA@=;9753210/-,)('&#    QNOLLIJNEFEBCNN>?N<?N:NF8NF6NO4N:O4N:ON:4NO4N.N:N*+N*N*ON:N$%N!"N"NE4NEO>?<?NONONNNNNNN  NNNBNN84NONNKNoneY      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQLNone GA closure-term tagged with the bound variable that the term is due to. Term due to a region handle. $Term due to a free region variable. #Term due to a free value variable. NConvert a tagged clousure to a regular closure by dropping the tag variables. FConvert a set of tagged closures to a regular closure by dropping the  tag variables. .Yield the tagged closure of a value variable. -Yield the tagged closure of a type argument,  or  for out-of-scope type vars. "Convert the closure provided as a weakclo to tagged form.  Only terms of form `Use r` can be converted. +Mask a closure term from a tagged closure. This is used for the forget cast. ACut the terms due to the outermost binder from a tagged closure. Like ' but cut terms due to several binders. ACut the terms due to the outermost binder from a tagged closure.  M Safe-InferredBCollect the free type variables and constructors used in a thing. N Safe-InferredV*Type constructors used in the expression. WDType constructors used in the argument of a value-type application. X&Free spec variables in an expression. YDType constructors used in the argument of a value-type application. Z)Free witness variables in an expression.  (from the Witness universe) ['Free value variables in an expression.  (from the Data universe) RSTUVWXYZ[  RSTUVWXYZ[ RSTUVWXYZ[   Safe-InferredRSTUVWXYZ[TUVWXYZ[RS& Safe-Inferred^ Substitute a ? for the E corresponding to some I in a thing. _ Wrapper for e to substitute multiple types. ` Substitute a ? for a E in some thing. \]^_`   \]^_`\]^_` \]^_`   ' Safe-Inferredc Wrapper for b. that determines the set of free names in the B type being substituted, and starts with an empty binder stack. d Wrapper for b to substitute multiple things. /Rewrite or substitute into a witness variable. abcdabcdabcdabcd( Safe-Inferredg Wrapper for substituteWithX. that determines the set of free names in the H expression being substituted, and starts with an empty binder stack. h Wrapper for  substituteX% to substitute multiple expressions. i>Substitute the argument of an application into an expression. $ Perform type substitution for an ' $ and witness substitution for an & j Wrapper for j# to substitute multiple arguments. 3Rewrite or substitute into an expression variable. efghijefghijefghij efghij) Safe-Inferredk)Trim the expressions of a weaken closure (XCast CastWeakenClosure) ! into only the free variables.  For example,  trimClosures [build (k z. something k), else]  = [build, something, else]   lTrim an expression if it is a weakclo cast. ANon-recursive version. If you want to recursively trim closures,  use  transformUpX' (const trimX). DCollect all the free variables, but return them all as expressions:  eg    freeExp  (let i = 5 [R0#] () in  updateInt [:R0 R1:]  w i ...)  will return something like  [ XType (TCon R0#)  , XVar updateInt  , XType (TCon R0#)  , XType (TCon R1#)  , XWitness w ]   klkllkkl*NonemJThe type checker for witnesses adds this annotation to every node in the, 5 giving the type of each component of the witness. mnopmnopmnopmnop+NoneqAThe type checker adds this annotation to every node in the AST, ( giving its type, effect and closure. w Promote an m to an q& by filling in the effect and closure  portions with bottoms. qrstuvwqrstuvwqrstuvwqrstuvwONone Type checker monad.  Used to manage type errors. xCheck a witness. If it'Cs good, you get a new version with types attached to all the bound : variables, as well as the type of the overall witness. If it'+s bad, you get a description of the error. IThe returned expression has types attached to all variable occurrences,  so you can call y on any open subterm. AThe kinds and types of primitives are added to the environments  automatically, you don''t need to supply these as part of the  starting environments. yLike x%, but check in an empty environment. JAs this function is not given an environment, the types of free variables 7 must be attached directly to the bound occurrences. # This attachment is performed by x above. !Like x but using the   monad to manage errors. z(Take the type of a witness constructor. "0Take the type of a builtin witness constructor. #(Check a type in the exp checking monad.  xStatic configuration. Starting Kind Environment. Strating Type Environment. Witness to check. y!Data type definitions. Kind environment. Type environment. Witness to check. z"# xy!z"# xy!z"#PNone$Check a data constructor. F The data constructor must be in the set of data type declarations. $(The full expression for error messages. Data constructor to check. $$QNone {Type check an expression. If it'Cs good, you get a new version with types attached to all the bound 9 variables, as well its the type, effect and closure. If it'+s bad, you get a description of the error. IThe returned expression has types attached to all variable occurrences,  so you can call | on any open subterm. AThe kinds and types of primitives are added to the environments  automatically, you don''t need to supply these as part of the  starting environments. |Like {3, but only return the value type of an expression. %Like { but using the   monad to handle errors. &Like {) but we allow naked types and witnesses. ':Helper function for building the return value of checkExpM' G It builts the AnTEC annotation and attaches it to the new AST node, J as well as returning the current effect and closure in the appropriate  form as part of the tuple. (Check some let bindings. )=Take elements of a list that have more than once occurrence. *Check a case alternative. +AMerge a type annotation on a pattern field with a type we get by ' instantiating the constructor type. ,FCheck the set of witness bindings bound in a letregion for conflicts. -CCheck the type annotation of a let bound variable against the type * inferred for the right of the binding. A If the annotation is Bot then we just replace the annotation, > otherwise it must match that for the right of the binding. {Static configuration. Starting Kind environment. Starting Type environment. Expression to check. |Static configuration. Starting Kind environment Starting Type environment. Expression to check. %Static config. Kind environment. Type environment. Expression to check. .&Static config. Kind environment. Type environment. Expression to check. '(*Enclosing expression, for error messages. Static config. Kind environment. Type environment. )*+Whole case expression, for error messages. Data type definitions. Kind environment. Type environment. Type of discriminant. *Args to type constructor of discriminant. Alternative to check. +,/)Region variables bound in the letregion. (Other witness bindings in the same set. The witness binding to check. -qrstuv {|% {|%.&'()*+,/-RNone}Type check a module. If it'Cs good, you get a new version with types attached to all the bound  variables If it'+s bad, you get a description of the error. 0Like } but using the   monad to handle errors. 1FCheck that the exported signatures match the types of their bindings. 2KIf some bind is exported, then check that it matches the exported version. 3BCheck that a top-level binding is actually defined by the module. 4(Check a type in the exp checking monad. }Static configuration. Module to check. 0Static configuration. Starting kind environment. Starting type environment. Module to check. 1Kinds of exported types. Types of exported values. "Environment of top-level bindings  defined by the module 2Kinds of exported types. Types of exported values. 3Types defined by the module. Name of an exported binding. 4}0}01234%Nonep      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQqrstuvxyz{|}}{|xyzqrstuvPMKHGDA@=;9753210/-,)('&#    QNOLLIJNEFEBCNN>?N<?N:NF8NF6NO4N:O4N:ON:4NO4N.N:N*+N*N*ON:N$%N!"N"NE4NEO>?<?NONONNNNNNN  NNNBNN84NONN,None~4Things that can go wrong when loading a core thing. 0Parse and type check a core module from a file. 2Parse and type check a core module from a string. $Parse and type check a core module. Parse and check an expression 8 returning it along with its spec, effect and closure Parse and check a type, % returning it along with its kind. Parse and check a witness, % returning it along with its type. ~Language fragment profile. !Function to lex the source file. File containing source code. Language fragment profile. !Function to lex the source file. (Path to source file for error messages. Program text. Language fragment profile. (Path to source file for error messages. Source tokens. Language fragment profile. "Other modules currently in scope. , We add their exports to the environment. (Path to source file for error messages. Source tokens. Language fragment profile. (Path to source file for error messages. Source tokens. Language fragment profile. (Path to source file for error messages. Source tokens. 5qrstuv~qrstuv~~56-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-{-|-}-~-------------------------------------///////////////     0000000000000111222 2!2"2#2$2%2&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a./0123'()*+,-56789:;<=>?@ABCDEFbHIJKLMNcOPQdRSTeUVWXYZ[\]^_`a f g h i j k l m n o p q r s t u v v w x y z { { | } ~              7::::::::      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd=e=f=g=h=i=j=k=l>m>n>opqrstuvwxy z!{!{!|!}!~!!!!!!!!!!!!!!!!!!!!!!???????????????????????????@@@AAAAAAABBBBCCCEEEFGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH""#$$$$$$$$$$JJJJJJJJJJJJJJ J J J J JJJJJJJJJJJJJJJJJJJ J!J"J#J$J%J&J'J(J)J*J+J,J-JJ.J/J0J1J2J3J4J5JJ6J7J8J9J:J;JJ<J=J>JJJJ?JJJJ@JAJBJCJDJEJFJGJJHJIJJNKNLNMNMNNNONPNQNRNS&T&U&V&W&X'Y'Z'['\(](^(_(`(a(b)c)d*e*e*f*g+h+h+f+i+j+g+kOlOmOnQoQpRq,,r,s,t,u,v,w,x,y,z,{,|.}.~..........00122                      555555   677777778888888888888      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKIJLIJMIJNIJOIJPIJQIJRIJSIJTIJUIJV9W99X9Y9Z9[9\9]9^9_9`9a9b9c9d9e9f9g:hijklmnopqr;s;t;u;v;w;x;y;z;{;|;};;~;;;;;<<<w<z==========>?@@@@@@@@@@@@@@@@@@@@BBBBBBBBCCCDDDDDDDEEEEEEEEEEEEEEEEFFFIh""$KhLLLLLLLLLLLLLLLLLMMMNNNNNNNN&&&&&&'''''(((())**+ + OO O OP QQQQQQQQQQQRRRRR,hddc-core-0.3.2.1 DDC.Type.ExpDDC.Core.Fragment DDC.Type.SumDDC.Type.CompoundsDDC.Core.Exp.SimpleDDC.Core.Compounds.SimpleDDC.Core.Exp.AnnotDDC.Core.Compounds.AnnotDDC.Core.Transform.LiftXDDC.Core.Transform.AnnotateDDC.Core.Transform.DeannotateDDC.Type.Transform.LiftTDDC.Type.Transform.Rename DDC.Type.EnvDDC.Type.CollectDDC.Core.ModuleDDC.Core.CollectDDC.Core.Transform.ReannotateDDC.Type.Transform.SpreadTDDC.Core.Transform.SpreadXDDC.Type.PredicatesDDC.Core.PredicatesDDC.Core.Lexer.TokensDDC.Core.Lexer.NamesDDC.Core.LexerDDC.Core.ParserDDC.Type.CheckDDC.Type.Transform.TrimDDC.Type.Transform.CrushDDC.Type.Transform.SubstituteTDDC.Type.Transform.Instantiate DDC.Type.BindDDC.Type.DataDefDDC.Type.EquivDDC.Type.SubsumesDDC.Type.UniverseDDC.Core.CheckDDC.Core.Transform.SubstituteTXDDC.Core.Transform.SubstituteWXDDC.Core.Transform.SubstituteXXDDC.Core.Transform.TrimDDC.Core.Annot.AnTDDC.Core.Annot.AnTEC DDC.Core.LoadDDC.Type.Exp.BaseDDC.Type.Exp.NFDataDDC.Core.Fragment.FeatureDDC.Core.Exp.DaConDDC.Core.Exp.PatDDC.Core.Exp.WiCon DDC.Core.ExpDDC.Core.CompoundsDDC.Core.Transform.LiftTDDC.Core.Transform.RenameDDC.Core.Collect.FreeDDC.Type.PrettyDDC.Core.PrettyDDC.Core.Fragment.ErrorDDC.Core.Lexer.OffsideDDC.Core.Lexer.CommentsDDC.Core.Parser.BaseDDC.Type.Check.CheckConDDC.Core.Fragment.ProfileDDC.Core.Fragment.ComplianceDDC.Core.Parser.ContextDDC.Core.Parser.TypeDDC.Core.Parser.WitnessDDC.Core.Parser.ParamDDC.Core.Parser.ExpDDC.Core.Parser.ModuleDDC.Type.Check.ConfigDDC.Type.Check.ErrorDDC.Type.Check.ErrorMessageDDC.Core.Check.ErrorDDC.Core.Check.ErrorMessageDDC.Core.Check.TaggedClosureDDC.Type.Collect.FreeTDDC.Core.Collect.SupportDDC.Core.Check.CheckWitnessDDC.Core.Check.CheckDaConDDC.Core.Check.CheckExpDDC.Core.Check.CheckModuleTcCon TcConDeepUseTcConUseTcConDeepAlloc TcConAllocTcConDeepWrite TcConWrite TcConDeepRead TcConHeadRead TcConRead TcConSusp TcConFunECTcConFun TcConUnitTwCon TwConDisjoint TwConManifest TwConHeadLazy TwConLazy TwConDistinctTwConDeepMutable TwConMutableTwConDeepConst TwConConstTwConDeepGlobal TwConGlobal TwConEmpty TwConPure TwConImplKiCon KiConClosure KiConEffect KiConRegion KiConData KiConWitnessKiConFunSoCon SoConComp SoConPropTyCon TyConBound TyConSpec TyConWitness TyConKind TyConSort TypeSumVarCon TypeSumCon TypeSumVar TyConHashTypeSum TypeSumSet typeSumElemstypeSumBoundNamedtypeSumBoundAnon typeSumSpill TypeSumBot typeSumKindClosureEffectRegionKindSortTypeTSumTAppTForallTConTVarBoundUPrimUNameUIxBindBNameBAnonBNoneBinderRNameRAnonRNoneFeature UnusedMatchesUnusedBindings NameShadowingUnboxedInstantiationUnboundLevel0VarsDebruijnBindersNestedFunctionsGeneralApplicationPartialApplication PartialPrimsFunctionalClosuresFunctionalEffectsTrackedClosuresTrackedEffectsempty singletoneleminsertdeleteunionunions difference kindOfSumtoListfromList hashTyConhashTyConRange unhashTyContakeNameOfBind typeOfBindreplaceTypeOfBind binderOfBindmakeBindFromBinderpartitionBindsByTypetakeNameOfBoundboundMatchesBindnamedBoundMatchesBindtakeSubstBoundOfBindtakeSubstBoundsOfBindsreplaceTypeOfBoundtIxtBottApp$:tApps takeTApps takeTyConAppstakePrimTyConAppstakeDataTyConAppstakePrimeRegiontForalltForall'tForalls tForalls' takeTForalls eraseTForallstSumtUnitkFunkFunstakeKFun takeKFuns takeKFuns'takeResultKindtFuntFunECtFunPE tFunOfList tFunOfListPEtakeTFun takeTFunECtakeTFunArgResulttakeTFunWitArgResulttakeTFunAllArgResult arityOfTypetImpltSuspsCompsPropkDatakRegionkEffectkClosurekWitnesstRead tHeadRead tDeepReadtWrite tDeepWritetAlloc tDeepAlloctUsetDeepUsetPuretEmptytGlobal tDeepGlobaltConst tDeepConsttMutable tDeepMutable tDistincttLazy tHeadLazy tManifest tConData0 tConData1DaCon daConName daConTypedaConIsAlgebraic DaConName DaConNamed DaConUnittakeNameOfDaCon typeOfDaCondcUnit mkDaConAlg mkDaConSolidPatPDataPDefaultWbCon WbConAlloc WbConReadWbConUse WbConEmpty WbConPureWiCon WiConBound WiConBuiltinCastCastRun CastSuspend CastForget CastPurifyCastWeakenClosureCastWeakenEffectWitnessWTypeWJoinWAppWConWVarWAnnotAltAAltLets LWithRegion LLetRegionsLRecLLetExpXWitnessXTypeXCastXCaseXLetXAppXLamXLAMXConXVarXAnnotxLAMsxLams takeXLAMs takeXLams makeXLamFlags takeXLamFlagsxApps takeXApps takeXApps1takeXAppsAsList takeXPrimApps takeXConAppsxLets splitXLets bindsOfLetsspecBindsOfLetsvalwitBindsOfLetstakeCtorNameOfAlt bindsOfPatwAppwApps takeXWitnesstakeWAppsAsListtakePrimWiConApps takeXTypexUnittakeAnnotOfExpmakeXAppsWithAnnotstakeXAppsWithAnnots xLetsAnnot MapBoundXmapBoundAtDepthX liftAtDepthXliftX lowerAtDepthXlowerXAnnotateannotate Deannotate deannotate MapBoundTmapBoundAtDepthT liftAtDepthTliftT lowerAtDepthTlowerT BindStack stackBindsstackAll stackAnons stackNamedSubsubBound subShadow0 subConflict1 subConflict0 subStack1 subStack0Rename renameWith pushBindspushBind substBoundbind1bind1sbind0bind0suse1use0TypeEnvKindEnvSuperEnvEnvenvMapenvStackenvStackLength envPrimFunextendextends setPrimFunisPrim fromTypeMapmember memberBindlookup lookupNamedepthlift wrapTForalls BindStruct slurpBindTree BoundLevelBoundWitBoundExp BoundSpecBindWay BindCasePatBindLetRegionWithBindLetRegions BindLetRecBindLetBindLamBindLAM BindForallBindTreeBindConBindUseBindDeffreeT collectBound collectBinds isBoundExpWitboundLevelOfBindWaybindDefTQualName ModuleName ModuleMapModule ModuleCore moduleNamemoduleExportKindsmoduleExportTypesmoduleImportKindsmoduleImportTypes moduleBody isMainModule moduleKindEnv moduleTypeEnvmodulesGetBindsmodulesExportKindsmodulesExportTypesisMainModuleNamefreeX Reannotate reannotateSpreadTspreadTSpreadXspreadXisBNoneisBAnonisBNameisTVarisBotisAtomT isDataKind isRegionKind isEffectKind isClosureKind isWitnessKind isAlgDataType isWitnessTypeisConstWitTypeisMutableWitTypeisDistinctWitType isReadEffect isWriteEffect isAllocEffectisSomeReadEffectisSomeWriteEffectisSomeAllocEffectisXVarisXConisAtomXisAtomWisXLAMisXLam isLambdaXisXAppisXLetisXType isXWitness isPDefaultErrorErrorNakedWitnessErrorNakedTypeErrorUnusedBindErrorShadowedBindErrorUndefinedVarErrorUndefinedPrimErrorUnsupportedTokNamedKLitKVarKConTokAtom KDaConUnit KTcConBuiltin KWbConBuiltin KTwConBuiltin KKiConBuiltin KSoConBuiltinKIndexKElseKMatchKDoKRunKSuspendKForgetKPurifyKWeakCloKWeakEffKTypeKOfKCase KWithRegion KLetRegion KLetRegionsKLetRecKLazyKLetKInKWhereKWithKExportsKImportsKModule KBotClosure KBotEffect KArrowEqualsKArrowDashLeft KArrowDash KArrowTilde KBigLambda KColonColonKDash KAmpersandKEquals KUnderscore KSemiColon KBackSlashKCommaKColonKPlusKHatKBarKDotKAngleColonKetKAngleColonBraKSquareColonKetKSquareColonBra KAngleKet KAngleBra KBraceKet KBraceBra KSquareKet KSquareBra KRoundKet KRoundBraTokMetaKOffsideClosingBraceKCommentUnterminatedKCommentBlockEndKCommentBlockStartKCommentLineStartKNewLineTokKNKAKMKJunk renameTok describeTokdescribeTokMetadescribeTokAtomdescribeTokNamedkeywordsreadSoConBuiltinreadKiConBuiltinreadTwConBuiltinreadTcConBuiltinreadWbConBuiltin isVarName isVarStart isVarBodyreadVar isConName isConStart isConBodyreadCon isLitName isLitStart isLitBodylexModuleWithOffsidelexExpParserpNamepConpLitpVarpIndexpTokpTokAstakeSortOfKiCon kindOfTwCon kindOfTcCon trimClosure crushSomeT crushEffect SubstituteTsubstituteWithT substituteT substituteTssubstituteBoundT instantiateT instantiateTs getBindTypeDataCtor dataCtorName dataCtorTagdataCtorFieldTypesdataCtorTypeNameDataType dataTypeNamedataTypeParamKinds dataTypeModeDataMode DataModeLarge DataModeSmallDataDefs dataDefsTypes dataDefsCtorsDataDefdataDefTypeNamedataDefParamKinds dataDefCtors emptyDataDefs insertDataDeffromListDataDefslookupModeOfDataTypeFeaturesfeaturesTrackedEffectsfeaturesTrackedClosuresfeaturesFunctionalEffectsfeaturesFunctionalClosuresfeaturesPartialPrimsfeaturesPartialApplicationfeaturesGeneralApplicationfeaturesNestedFunctionsfeaturesDebruijnBindersfeaturesUnboundLevel0VarsfeaturesUnboxedInstantiationfeaturesNameShadowingfeaturesUnusedBindingsfeaturesUnusedMatchesProfile profileNameprofileFeaturesprofilePrimDataDefsprofilePrimSupersprofilePrimKindsprofilePrimTypesprofileTypeIsUnboxed zeroProfile zeroFeaturesCompliescompliescompliesWithEnvsFragmentfragmentProfilefragmentExtensionfragmentReadNamefragmentLexModulefragmentLexExpfragmentCheckModulefragmentCheckExpContextcontextTrackedEffectscontextTrackedClosurescontextFunctionalEffectscontextFunctionalClosurescontextOfProfilepTypepBinderpTypeApp pTypeAtompWitness pWitnessApp pWitnessAtompExppExpApppExpAtompModuleConfigconfigPrimDataDefsconfigPrimSupersconfigPrimKindsconfigPrimTypesconfigTrackedEffectsconfigTrackedClosuresconfigFunctionalEffectsconfigFunctionalClosuresconfigOfProfileErrorWitnessImplInvalid errorLeftType errorLeftKinderrorRightTypeerrorRightKindErrorForallKindInvalid errorBodyErrorSumKindInvaliderrorCheckingSum errorKindErrorSumKindMismatcherrorKindExpected errorTypeSum errorKindsErrorAppNotFun errorFunTypeerrorFunTypeKind errorArgTypeerrorArgTypeKindErrorAppArgMismatch errorCheckingerrorParamKind errorArgKindErrorUnappliedKindFunErrorNakedSort errorSortErrorVarAnnotMismatch errorTypeEnvErrorUndefinedCtorErrorUndefined errorBound checkType kindOfTypeequivTequivWithBindsT subsumesTUniverse UniverseDataUniverseWitness UniverseSpec UniverseKind UniverseSortuniverseFromType3universeFromType2universeFromType1universeOfTypeErrorRunNotSuspensionErrorWeakEffNotEffErrorCaseAltResultMismatch errorAltType1 errorAltType2ErrorCaseFieldTypeMismatcherrorTypeFieldErrorCaseScrutineeTypeMismatcherrorTypePatternErrorCaseCannotInstantiate errorTypeCtorErrorCaseTooManyBinderserrorCtorDaConerrorCtorFieldserrorPatternFieldsErrorCaseOverlappingErrorCaseNonExhaustiveLargeErrorCaseNonExhaustiveerrorCtorNamesMissingErrorCaseNoAlternatives ErrorCaseScrutineeTypeUndeclaredErrorCaseScrutineeNotAlgebraicerrorTypeScrutineeErrorWitnessNotEmptyErrorWitnessNotPurityErrorCannotJoinerrorWitnessLeft errorTypeLefterrorWitnessRighterrorTypeRightErrorWAppNotCtorErrorWAppMismatch errorWitnessErrorWithRegionFreeErrorWithRegionNotRegionErrorLetRegionWitnessFreeErrorLetRegionsWitnessOthererrorBoundRegionserrorBindWitnessErrorLetRegionWitnessConflicterrorBindWitness1errorBindWitness2ErrorLetRegionWitnessInvalidErrorLetRegionFreeErrorLetRegionsReboundErrorLetRegionsNotRegion errorBindsErrorLetrecReboundErrorLetrecBindingNotLambdaerrorExpErrorLetBodyNotDataErrorLetBindingNotDataErrorLetMismatchErrorLamBodyNotDataErrorLamBindNotDataErrorLamNotEmpty errorClosureErrorLamNotPure errorEffectErrorLamShadow errorBinderrorNotFunTypeErrorAppMismatcherrorParamTypeerrorTypeAnnot errorUniverseErrorMalformedExpErrorExportMismatcherrorExportType errorDefTypeErrorExportUndefined errorNameErrorMalformedType errorType ErrorTypeerrorTypeErrorSupportXsupportSupport supportTyConsupportTyConXArg supportSpVarsupportSpVarXArg supportWiVar supportDaVar SubstituteTXsubstituteWithTX substituteTX substituteTXssubstituteBoundTX SubstituteWXsubstituteWithWX substituteWX substituteWXs SubstituteXXsubstituteWithXX substituteXX substituteXXssubstituteXArgsubstituteXArgs trimClosurestrimXAnT annotType annotTailAnTEC annotEffect annotClosurefromAnT checkWitness typeOfWitness typeOfWiConcheckExp typeOfExp checkModuleErrorCompliance ErrorCheckExpErrorCheckType ErrorParser ErrorReadloadModuleFromFileloadModuleFromStringloadModuleFromTokensloadExploadType loadWitness $fNFDataTcCon $fNFDataTwCon $fNFDataKiCon $fNFDataSoCon $fNFDataTyCon$fNFDataTypeSumVarCon$fNFDataTyConHash$fNFDataTypeSum $fNFDataType $fNFDataBound $fNFDataBind$fNFDataBinderemptySetbase Data.MaybeNothing hashTcConGHC.ErrerrortakeSumArrayElemmakeSumArrayElem$fOrdTypeSumVarCon$fEqTypeSumVarCon $fOrdBound $fEqTypeSum$fEqTypeghc-prim GHC.TypesFalsetcCon1twCon1twCon2Float $fNFDataDaCon$fNFDataDaConName $fNFDataPat $fNFDataWbCon $fNFDataWiCon$fNFDataWitness $fNFDataAlt $fNFDataLets $fNFDataCast $fNFDataExpmapBoundAtDepthXLets countBAnons$fMapBoundXAltn$fMapBoundXCastn$fMapBoundXWitnessn$fMapBoundXExpn$fMapBoundXBoundn$fAnnotateWitnessWitness$fAnnotateAltAlt$fAnnotateLetsLets$fAnnotateCastCast$fAnnotateExpExp$fDeannotateCastCast$fDeannotateWitnessWitness$fDeannotateAltAlt$fDeannotateLetsLets$fDeannotateExpExp$fMapBoundTTypeSumn$fMapBoundTTypen$fMapBoundTBoundn$fMapBoundTBindnmapBoundAtDepthTLets$fMapBoundTAltn$fMapBoundTCastn$fMapBoundTWitnessn$fMapBoundTExpn $fRenameBind$fRenameTypeSum $fRenameType$fRenameWitness freeOfTreeTcollectBoundOfTreecollectSpecBindsOfTreecollectExpBindsOfTree$fBindStructTyCon$fBindStructType$fNFDataQualName$fNFDataModuleName$fNFDataModulebindDefX freeOfTreeX$fBindStructWitness$fBindStructAlt$fBindStructCast$fBindStructExp$fBindStructModule$fReannotateWitness$fReannotateCast$fReannotateAlt$fReannotateLets$fReannotateExp$fReannotateModule$fSpreadTTyCon$fSpreadTBound $fSpreadTBind$fSpreadTTypeSum $fSpreadTType$fSpreadXBound $fSpreadXBind$fSpreadXWiCon$fSpreadXWitness $fSpreadXLets $fSpreadXAlt $fSpreadXPat $fSpreadXCast$fSpreadXDaCon $fSpreadXExp$fSpreadXModuleGHC.Num* pprBinderSeppprBinderGroupstage $fPrettyTcCon $fPrettyTwCon $fPrettyKiCon $fPrettySoCon $fPrettyTyCon$fPrettyTypeSum $fPrettyType $fPrettyBound$fPrettyBinder $fPrettyBind wl-pprint-1.1Text.PrettyPrint.Leijen SimpleDocSLineSTextSCharSEmptylisttupled semiBraces encloseSep punctuatesepfillSephsepvsepcatfillCathcatvcat<><+><$><$$>softline softbreaksquotesdquotesbracesparensanglesbracketsencloselparenrparenlangleranglelbracerbracelbracketrbracketsquotedquotesemicoloncommaspacedot backslashequalsstringboolintintegerfloatdoublerational fillBreakfillwidthindenthangalignchartextline linebreaknestcolumnnestinggroup renderCompactdisplayS displayIOhPutDocDocddc-base-0.3.2.1DDC.Base.PrettyputDocLnputDoc renderIndent renderPlainrenderpprParenpprPrecpprPretty RenderPlain RenderIndent RenderMode pprPatBind pprParen' pprBinder breakWhen isSimpleXparens' $fPrettyWbCon $fPrettyWiCon$fPrettyWitness $fPrettyLets $fPrettyCast $fPrettyDaCon $fPrettyAlt $fPrettyPat $fPrettyExp$fPrettyModule$fPrettyModuleName $fPrettyError TokenFamilydescribeTokenFamilyrenameTokNamedVariableIndex ConstructorKeywordSymboldescribeTokAtom'readTwConWithArityLexemeLexemeStartBlock applyOffside addStarts dropNewLinesdropNewLinesLexeme isBlockStartisToken isKNTokennewCBranewOffsideClosingBraceLexemeStartLine LexemeToken addStarts'newCKet newSemiColontakeTok dropCommentsdropCommentBlock lexString pModuleName pQualNamepWbConpWbConSPpConSPpLitSPpVarSPpIndexSPpTokSPpTokAsSPtakeKindOfTyCon trimToSumC trimDeepUsedDmakeUsed makeDeepRead makeDeepWrite makeDeepAllocmakeDeepGlobal$fSubstituteTTypeSum$fSubstituteTType$fSubstituteTBindInt setFeatureCheckM checkBind checkBinds checkFunction contextTopsetBodyaddArgresetthrowresultcontextAbsBodycontextFunArgs compliesX $fMonadCheckM $fCompliesAlt $fCompliesExp$fCompliesModule$fShowFragment pTypeForallpTypeFunpSoConpKiConpTcConpTwCon pTyConNamedpTypeSum pWitnessJoin pWitnessArgSPpWitnessAtomSP ParamSpec expOfParamsfunTypeOfParamspBindParamSpec ParamValue ParamWitness ParamType pExpAtomSP pLetBindingpLetRecBindingpStmtpStmts makeStmtsStmtStmtNone StmtMatchStmtBindpArgSPspAltpPatpBindPatpLetsSPpLetWitspTypeSigpImportKindSpecpImportTypeSpec checkTypeM checkTypeM' checkBounds unpackSumT$fPrettyUniverse TaggedClosure GBoundRgnCon GBoundRgnVar GBoundValclosureOfTaggedclosureOfTaggedSettaggedClosureOfValBoundtaggedClosureOfTyArgtaggedClosureOfWeakClomaskFromTaggedSetcutTaggedClosureTcutTaggedClosureXscutTaggedClosureX$fMapBoundTTaggedClosuren$fPrettyTaggedClosure$fOrdTaggedClosure$fEqTaggedClosure freeVarConT FreeVarConT$fFreeVarConTType$fSupportXLets$fSupportXCast$fSupportXWitness $fSupportXAlt $fSupportXExp$fSupportXBind$fSupportXType$fMonoidSupport$fSubstituteTXType$fSubstituteTXBind$fSubstituteTXWitness$fSubstituteTXCast$fSubstituteTXAlt$fSubstituteTXExpsubstW$fSubstituteWXWitness$fSubstituteWXCast$fSubstituteWXAlt$fSubstituteWXExpsubstX$fSubstituteXXCast$fSubstituteXXAlt$fSubstituteXXExpfreeExp freeOfTreeExp $fPrettyAnT $fNFDataAnT $fPrettyAnTEC $fNFDataAnTEC checkWitnessM typeOfWbCon checkDaConM checkExpM checkArgMreturnX checkLetsM duplicates checkAltM mergeAnnotcheckWitnessBindsMcheckLetBindOfTypeM checkExpM'checkWitnessBindM checkModuleMcheckModuleBindscheckModuleBindcheckBindDefined