kQ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP *Utilities used by the Sequent Core librarymaurerl@cs.uoregon.edu experimental Safe-InferredQRQRQRQR NoneSTUVWXYZ[\]^_`abc dSTUVYZ[\] STUVWXYZ[\]^_`abcSequent Core syntaxmaurerl@cs.uoregon.edu experimentalNone?Usual instance of  , with e s for bindersUsual instance of  , with e s for bindersUsual instance of  , with e s for bindersUsual instance of  , with e s for bindersUsual instance of , with e s for binders Usual instance of , with e s for binders A case alternative. Given by the head constructor (or literal), a list of bound variables (empty for a literal), and the body as a  . A binding. Similar to the Bind` datatype from GHC. Can be either a single non-recursive binding or a mutually recursive block. XA general computation. A command brings together a list of bindings, some value, and a  continuationK saying what to do with that value. The value and continuation comprise a cut in the sequent calculus. Invariant: If &1 is a variable representing a constructor, then ' must not begin with as many + frames as the constructor's arity. In other words, the command must not represent a saturated application of a constructor. Such an application should be represented by a .$ value instead. When in doubt, use  to enforce this invariant. 'A continuation, expressed as a list of +s. In terms of the sequent calculus, here nils stands for a free covariable; since Haskell does not allow for control effects, we only allow for one covariable.A stack frame. A continuation is simply a list of these. Each represents the outer part of a Haskell expression, with a "hole" where a value can be placed. Computation in the sequent calculus is expressed as the interaction of a value with a continuation.lAn atomic value. These include literals, lambdas, and variables, as well as types and coercions (see GHC's    for the reasoning).Constructs a command, given let' bindings, a value, and a continuation.kThis smart constructor enforces the invariant that a saturated constructor invocation is represented as a . value rather than using + frames.@The class of types that can be compared up to alpha-equivalence.MTrue if the two given terms are the same, up to renaming of bound variables.True if the two given terms are the same, up to renaming of bound variables and the specified equivalences between free variables.The type of the environment of an alpha-equivalence comparison. Only needed by user code if two terms need to be compared under some assumed correspondences between free variables. See GHC's f module for operations.^A class of types that contain an identifier. Useful so that we can compare, say, elements of  Command b for any b7 that wraps an identifier with additional information. %The identifier contained by the type a."'A block of mutually recursive bindings.#A single non-recursive binding.%%Bindings surrounding the computation.&'The value provided to the continuation.'What to do with the value.(3Annotate the enclosed frame. Used by the profiler.)&Cast the value using the given proof.*$Perform case analysis on the value.+=Apply the value to an argument, which may be a computation.,+A coercion. Used to pass evidence for the cast operation to a lambda.-CA type. Used to pass a type as an argument to a type-level lambda..7A value formed by a saturated constructor application./3A function. The body is a computation, that is, a  .0A term variable. Must not be a nullary constructor; use . for this.1A primitive literal value.21Constructs a command that simply returns a value.34Constructs a command that simply returns a variable.4;Constructs a number of lambdas surrounding a function body.5;Adds the given bindings outside those in the given command.6MAdds the given continuation frames to the end of those in the given command.7;Divide a command into a sequence of lambdas and a body. If c is not a lambda, then collectLambdas c == ([], c).8RDivide a continuation into a sequence of arguments and an outer continuation. If k+ is not an application continuation, then collectArgs k == ([], k).9XTrue if the given command is a simple lambda, with no let bindings and no continuation.:True if the given command simply returns a type as a value. This may only be true of a command appearing as an argument (that is, inside an + frame) or as the body of a let.;True if the given command simply returns a coercion as a value. This may only be true of a command appearing as an argument (that is, inside an + frame) or as the body of a let.<True if the given command simply returns a value that is either a type or a coercion. This may only be true of a command appearing as an argument (that is, inside an + frame) or as the body of a let.=NTrue if the given command appears at runtime. Types and coercions are erased.>'True if the given value is a type. See g.?+True if the given value is a coercion. See h.@.True if the given value is a type or coercion.A+True if the given value appears at runtime.BvTrue if the given command represents no actual run-time computation or allocation. For this to hold, it must have no letT bindings, and its value and its continuation must both be trivial. Equivalent to   in GHC.CTrue if the given value represents no actual run-time computation. Some literals are not trivial, and a lambda whose argument is not erased or whose body is non-trivial is also non-trivial.DTrue if the given continuation represents no actual run-time computation. This holds if all of its frames are trivial (perhaps because it is the empty continuation).ETrue if the given continuation represents no actual run-time computation. This is true of casts and of applications of erased arguments (types and coercions). Ticks are not considered trivial, since this would cause them to be inlined.FIf a command represents a saturated call to some function, splits it into the function, the arguments, and the remaining continuation after the arguments.GIf the given value is a function, and the given continuation would provide enough arguments to saturate it, returns the arguments and the remainder of the continuation.HBIf a command does nothing but provide a value, returns that value.ICompute the type of a command.JrCompute (a conservative estimate of) the arity of a value. If the value is a variable, this may be a lower bound.i3An empty context for alpha-equivalence comparisons.KMTrue if the two given terms are the same, up to renaming of bound variables.jIf the given lists of bindings are alpha-equivalent, returns an augmented environment tracking the correspondences between the bound variables.kIf the given bindings are alpha-equivalent, returns an augmented environment tracking the correspondences between the bound variables.J  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJiKjklmnopqrstB  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKB10/.-,+*)( $%&' #" ! 23456789:;<=>?@ABCDEFGHJIK 6 ! #" $%&' +*)(10/.-, 23456789:;<=>?@ABCDEFGHIJiKjklmnopqrstK%Pretty printing of Sequent Core termsmaurerl@cs.uoregon.edu experimentalNoneL=Print the given bindings as a sequence of top-level bindings.uLvwxyz{|}~LLuLvwxyz{|}~Core <-> Sequent Coremaurerl@cs.uoregon.edu experimentalNone (Translates a case alternative into Core.(Translates a list of bindings into Core.Translates a binding into Core.Translates a frame into a function that will wrap a Core expression with a fragment of context (an argument to apply to, a case expression to run, etc.).Translates a value into Core.Translates a command into Core.5Translates a list of Core bindings into Sequent Core.,Translates a Core binding into Sequent Core.5Translates a Core case alternative into Sequent Core./Translates a Core expression into Sequent Core.    GHC plugin librarymaurerl@cs.uoregon.edu experimentalNoneMGiven a function that processes a module's bindings as Sequent Core terms, perform the same processing as a Core-to-Core pass usable from a GHC plugin. Intended to be passed to the CoreDoPluginPass' constructor as part of your plugin's installCoreToDos function. See Language.SequentCore.Dump5 for an example and the GHC manual for more details.M~A processing function. May assume that there are no shadowed identifiers in the given binders (this is ensured by a call to ).MMMExample pluginmaurerl@cs.uoregon.edu experimentalNoneNAThe plugin. A GHC plugin is a module that exports a value called plugin with the type .NNNNNoneG:9.Simplifier reimplementation using Sequent Coremaurerl@cs.uoregon.edu experimentalNone?OaPlugin data. The initializer replaces all instances of the original simplifier with the new one.OOOOSpecConstr reimplementationmaurerl@cs.uoregon.edu experimentalNoneA generated specialization---the call pattern that gave rise to it, the identifier of the specialized function, and the function's definition.PiPlugin data. The initialization code replaces the built-in SpecConstr pass in the Core-to-Core pipeline. The kernel of the SpecConstr pass. Takes the environment, data about how variables are used, and a let binding (part of a recursive block), and returns a new list of bindings---the original one (with specialization rules added) and also all specialized versions.)P PPP .External interface to the Sequent Core librarymaurerl@cs.uoregon.edu experimentalNoneN  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^^^_` a a b c c d e f g h i j k l m n opq@@rrs=<<tuvwxyz{|}~r     sequent-core-0.2.0.1Language.SequentCore.SyntaxLanguage.SequentCore.TranslateLanguage.SequentCore.PrettyLanguage.SequentCore.PluginLanguage.SequentCore.DumpLanguage.SequentCore.SimplLanguage.SequentCore.SpecConstrLanguage.SequentCore.Util Language.SequentCore.Simpl.MonadGHCExpr CoreUtils exprIsTrivialLanguage.SequentCore.Simpl.EnvLanguage.SequentCore ghc-7.8.3CoreSynDataAltLitAltDEFAULTAltCon SeqCoreAlt SeqCoreBindSeqCoreCommand SeqCoreCont SeqCoreFrame SeqCoreValueAltBindCommandContFrameValue mkCommand altToCore bindsToCore bindToCoreframeToCoreExprvalueToCoreExprcommandToCoreExpr fromCoreBinds fromCoreBind fromCoreAlt fromCoreExprAlphaEqaeqaeqInAlphaEnvHasId identifierRecNonReccmdLetcmdValuecmdContTickCastCaseAppCoercionTypeConsLamVarLit valueCommand varCommandlambdasaddLets extendContcollectLambdas collectArgsisLambda isTypeArgisCoArg isErasedArg isRuntimeArg isTypeValue isCoValue isErasedValueisRuntimeValue isTrivialisTrivialValue isTrivialContisTrivialFramecommandAsSaturatedCallasSaturatedCallasValueCommand commandType valueArity=~= ppr_binds_top sequentPasspluginorElse consMaybeSimplGlobalEnvsg_modeSimplMunSimplM runSimplM liftCoreMgetModetickfreeTick withZeroCount$fMonadIOSimplM$fHasDynFlagsSimplM$fApplicativeSimplM$fFunctorSimplM $fMonadSimplMDynFlags getDynFlagsVarEnvTypeRep emptyAlphaEnv aeqBindsIn aeqBindIn $fAlphaEqBind $fAlphaEq[]$fAlphaEqCoercion $fAlphaEqType $fAlphaEqAlt$fAlphaEqCommand$fAlphaEqFrame$fAlphaEqValue $fHasIdVarppr_bind ppr_block ppr_bindsppr_binds_with ppr_bindingppr_comm ppr_valuecollectBinders ppr_frame pprCoreAlt ppr_case_pat pprCoreComm pprCoreValuenoParens$fOutputableAlt$fOutputableFrame$fOutputableCommand$fOutputableValue$fOutputableBind CoreSubst deShadowBinds CoreMonadPlugininstallshowSequentCoreOutCoVarOutTyVarOutVarOutIdOutBindOutAltOutContOutFrameOutValue OutCommandInCoVarInTyVarInVarInIdInBindInAltInContInFrameInValue InCommand DefinitionNotAmongBoundToIdDefEnvSuspContSubstAnsSuspCommDoneIdDoneComm SimplIdSubst StaticEnvSimplEnv se_idSubst se_tvSubst se_cvSubstse_cont se_inScopese_defs initialEnv mkSuspension enterScope enterScopessubstIdrefine getTvSubstsubstTy substTyStatic substIdType getCvSubstsubstCo substCoStatic cvSubstPairsmkCvSubstFromSubstEnv extendIdSubst zapSubstEnvs setSubstEnvssuspendAndZapEnvsuspendAndSetEnvbindContzapCont staticPart setStaticPart restoreEnv$fOutputableDefinition$fOutputableSuspCont$fOutputableSubstAns$fOutputableStaticEnv$fOutputableSimplEnvuniqAway runSimplifier simplModule simplCommandsimplStandaloneCommand simplBinds simplBind simplNonRec completeBindsimplRecsimplCut matchCase simplContpreInlineUnconditionallypostInlineUnconditionallySpec specializespec_patspec_id spec_defnCallPat:->ArgUsageHowBoundSpecArgSpecFunCallCallsScUsageScEnvSCEsc_size sc_how_bound sc_dflags specModule initScEnv emptyScUsage specInValue specInFrame specInAlt specInBind specInCommand specInCut usageFromCutspecBind specToBindingsamePat$fOutputableSpec$fOutputableCallPat$fMonoidScUsage$fOutputableHowBound$fOutputableScUsage$fOutputableScEnv