Î\      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[ *Utilities used by the Sequent Core librarymaurerl@cs.uoregon.edu experimental Safe-Inferred\]\]\]\] None^_`abcdefghijklmno p^_`adefgh^_`abcdefghijklmnoSequent Core syntaxmaurerl@cs.uoregon.edu experimentalNoneI^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.Usual instance of  , with q s for bindersUsual instance of  , with q s for bindersUsual instance of  , with q s for bindersUsual instance of  , with q s for binders Usual instance of , with q 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, representing a strict context of a Haskell expression. Computation in the sequent calculus is expressed as the interaction of a value with a continuation.|An expression producing a value. These include literals, lambdas, and variables, as well as types and coercions (see GHC's   w for the reasoning). They also include computed values, which bind the current continuation in the body of a command.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 r module for operations.%The identifier contained by the type a.$Usual binders for Sequent Core terms'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.WThe identifier for a covariable, which is like a variable but it binds a continuation.Top-level continuation. "Reference to a bound continuation.!2Annotate the enclosed frame. Used by the profiler."(Cast the value using the given coercion.##Perform case analysis on the value.$Apply the value to an argument.%A continuation. Allowed only! as the body of a non-recursive let.&+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.(CA value produced by a computation. Binds the current continuation.)7A value formed by a saturated constructor application.*NA function. Binds both an argument and a continuation. The body is a command.+A term variable. Must not be a nullary constructor; use ) for this.,A primitive literal value.-sConstructs a command that simply returns a value. If the value is a computation, returns that computation instead..4Constructs a command that simply returns a variable./!Wraps a command in a value using (*. If the command is a value command (see B), unwraps it instead.0;Constructs a number of lambdas surrounding a function body.1;Adds the given bindings outside those in the given command.29Divide a value into a sequence of lambdas and a body. If c is not a lambda, then (collectLambdas v == ([], valueCommand v).3RDivide a continuation into a sequence of arguments and an outer continuation. If k+ is not an application continuation, then collectArgs k == ([], k).4WDivide a continuation into a sequence of type arguments and an outer continuation. If kN is not an application continuation or only applies non-type arguments, then collectTypeArgs k == ([], k).5Divide a continuation into a sequence of type arguments, then a sequence of non-type arguments, then an outer continuation. If k+ is not an application continuation, then (collectTypeAndOtherArgs k == ([], [], k).6SDivide a list of values into an initial sublist of types and the remaining values.7XTrue if the given command is a simple lambda, with no let bindings and no continuation.8'True if the given value is a type. See s.9+True if the given value is a coercion. See t.:.True if the given value is a type or coercion.;STrue if the given value appears at runtime, i.e. is neither a type nor a coercion.<vTrue 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.=True 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.>True 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.?;True if the given continuation is the return continuation, .@If a command represents a saturated call to some function, splits it into the function, the arguments, and the remaining continuation after the arguments.AIf 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.BBIf a command does nothing but provide a value, returns that value.CCompute the type of a value.DCompute the outer type of a continuation, that is, the type of the value it eventually yields to the environment. Requires the inner type as an argument.E<Compute the type that a command yields to its outer context.FrCompute (a conservative estimate of) the arity of a value. If the value is a variable, this may be a lower bound.G0Find whether an expression is definitely bottom.H6Find whether a command definitely evaluates to bottom.IINTERNAL USE ONLY.J(Find whether an id is a continuation id.KTag an id as a continuation id. This changes the unique of the id, so the returned id is always distinct from the argument in comparisons.u3An empty context for alpha-equivalence comparisons.LMTrue if the two given terms are the same, up to renaming of bound variables.vIf the given lists of bindings are alpha-equivalent, returns an augmented environment tracking the correspondences between the bound variables.wIf the given bindings are alpha-equivalent, returns an augmented environment tracking the correspondences between the bound variables.T  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKuLvwxyz{|}~L  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLL,+*)('&% $#"!     -./0123456789:;<=>?@ABFCDEGHIJKL<    $#"! ,+*)('&%-./0123456789:;<=>?@ABCDEFGHIJKuLvwxyz{|}~L%Pretty printing of Sequent Core termsmaurerl@cs.uoregon.edu experimentalNone=Print the given bindings as a sequence of top-level bindings.Core <-> Sequent Coremaurerl@cs.uoregon.edu experimentalNone M/Translates a Core expression into Sequent Core.N5Translates a Core case alternative into Sequent Core.O,Translates a Core binding into Sequent Core.P5Translates a list of Core bindings into Sequent Core.QTranslates a command into Core.RTranslates a value into Core.STranslates a continuation 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.).TTranslates a binding into Core.U(Translates a list of bindings into Core.V(Translates a case alternative into Core.MNOPQRSTUV MNOPQRSTUV MOPNQRSTUVMNOPQRSTUVGHC plugin librarymaurerl@cs.uoregon.edu experimentalNoneWGiven 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.W~A processing function. May assume that there are no shadowed identifiers in the given binders (this is ensured by a call to ).WWWExample pluginmaurerl@cs.uoregon.edu experimentalNoneXAThe plugin. A GHC plugin is a module that exports a value called plugin with the type .XXXXNone%Sequent Core information dumpermaurerl@cs.uoregon.edu experimentalNoneYAThe plugin. A GHC plugin is a module that exports a value called plugin with the type . YYYYNoneP      !"A#  <      !".Simplifier reimplementation using Sequent Coremaurerl@cs.uoregon.edu experimentalNone?ZaPlugin data. The initializer replaces all instances of the original simplifier with the new one.$Z%&'()*+,-./0123456789:ZZ$Z%&'()*+,-./0123456789:SpecConstr reimplementationmaurerl@cs.uoregon.edu experimentalNone;A generated specialization---the call pattern that gave rise to it, the identifier of the specialized function, and the function's definition.[iPlugin 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.);=>?@ABCDEFGHIJKLMNO[PQRSTUVWXYZ[<\]^_`ab[[;=>?@ABCDFEGHIJKLMNO[PQRSTUVWXYZ[<\]^_`ab\.External interface to the Sequent Core librarymaurerl@cs.uoregon.edu experimentalNoneX  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWc !"#$%&'()*+, -./0123456!789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghiiii j k l l m n n o p q r s t u v w x y z {|}<<~~877       !"#$%&'~()*+,-./0123456789:;<=>?@A@BCDEFGHIJKLMMNOPQRSTUVWXYZ[\]^_`abcdefsequent-core-0.4Language.SequentCore.SyntaxLanguage.SequentCore.PrettyLanguage.SequentCore.TranslateLanguage.SequentCore.PluginLanguage.SequentCore.DumpLanguage.SequentCore.InspectLanguage.SequentCore.SimplLanguage.SequentCore.SpecConstrLanguage.SequentCore.Util Language.SequentCore.Simpl.MonadGHCExpr CoreUtils exprIsTrivial#Language.SequentCore.Simpl.ExprSizeLanguage.SequentCore.Simpl.EnvLanguage.SequentCore ghc-7.8.3CoreSynDataAltLitAltDEFAULTAltConHasId SeqCoreAlt SeqCoreBindSeqCoreCommand SeqCoreCont SeqCoreValueAltBindCommandContValue mkCommandpprTopLevelBindsAlphaEqaeqaeqInAlphaEnv identifier SeqCoreBndrRecNonReccmdLetcmdValuecmdContContIdReturnJumpTickCastCaseAppCoercionTypeComputeConsLamVarLit valueCommand varCommand mkComputelambdasaddLetscollectLambdas collectArgscollectTypeArgscollectTypeAndOtherArgspartitionTypesisLambda isTypeValue isCoValue isErasedValueisRuntimeValue isTrivialisTrivialValue isTrivialCont isReturnContcommandAsSaturatedCallasSaturatedCallasValueCommand valueType contOuterType commandType valueArity valueIsBottomcommandIsBottom contIdTagisContIdasContId=~= fromCoreExpr fromCoreAlt fromCoreBind fromCoreBindscommandToCoreExprvalueToCoreExprcontToCoreExpr bindToCore bindsToCore altToCore sequentPasspluginorElse consMaybeSimplGlobalEnvsg_modeSimplMunSimplM runSimplM liftCoreMgetModetickfreeTick withZeroCount$fMonadUniqueSimplM$fMonadIOSimplM$fHasDynFlagsSimplM$fApplicativeSimplM$fFunctorSimplM $fMonadSimplMDynFlags getDynFlagsVarEnvTypeRep emptyAlphaEnv aeqBindsIn aeqBindIn $fAlphaEqBind $fAlphaEq[]$fAlphaEqCoercion $fAlphaEqType $fAlphaEqAlt$fAlphaEqCommand $fAlphaEqCont$fAlphaEqValue $fHasIdVarppr_bind ppr_binds_top ppr_block ppr_bindsppr_binds_with ppr_bindingppr_comm ppr_valueppr_cont_framesppr_cont pprCoreAlt ppr_case_pat pprCoreComm pprCoreValuenoParens$fOutputableAlt$fOutputableCont$fOutputableCommand$fOutputableValue$fOutputableBindToCoreMfromCoreExprAsValuefromCoreLamAsCont uniqSupply runToCoreMfreshVarcomm2Cval2Ccont2Cbind2Cbinds2Calt2C CoreSubst deShadowBinds CoreMonadPlugininstallshowSequentCoreKCVBodySizebsBase bsArgDiscs bsResultDiscTooBigExprSizeesBase esArgDiscs esResultDisc body2ExprSizesizeZerosizeNmaxSize mkBodySize valueSize commandSizecontSizebodySizelitSize classOpSizefunSize primOpSize buildSize augmentSizeconSizelamScrutDiscount isRealWorldIdisRealWorldValue$fOutputableExpr$fOutputableExprSize$fOutputableBodySizeOptions optShowSizesoptUnrecognizeddefaults parseOptioninspectSequentCoreshowBindOutCoVarOutTyVarOutVarOutIdOutBindOutAltOutContOutValue OutCommandInCoVarInTyVarInVarInIdInBindInAltInContInValue InCommandGuidance SometimesguSizeguArgDiscountsguResultDiscountNever DefinitionNotAmongBoundToIdDefEnvSuspContSubstAnsSuspValDoneIdDoneVal SimplIdSubst StaticEnvSimplEnv se_idSubst se_tvSubst se_cvSubstse_cont se_inScopese_defs se_dflags mkBoundTo mkGuidance initialEnv mkSuspension enterScope enterScopessubstIdrefine getTvSubstsubstTy substTyStatic substIdType getCvSubstsubstCo substCoStatic cvSubstPairsmkCvSubstFromSubstEnv extendIdSubst zapSubstEnvs setSubstEnvssuspendAndZapEnvsuspendAndSetEnvbindContpushContzapCont staticPart setStaticPart restoreEnv$fOutputableGuidance$fOutputableDefinition$fOutputableSuspCont$fOutputableSubstAns$fOutputableStaticEnv$fOutputableSimplEnvuniqAwaytracing runSimplifier simplModule simplCommand simplValue simplBinds simplBind simplNonRec completeBindsimplRecsimplCut matchCase simplCont simplContWithpreInlineUnconditionallypostInlineUnconditionallycallSiteInline shouldInline someBenefit whnfOrBot inlineMultinoSizeIncrease smallEnoughSpec specializespec_patspec_id spec_defnCallPat:->ArgUsageHowBoundSpecArgSpecFunCallCallsScUsageScEnvSCEsc_size sc_how_bound sc_dflags specModule initScEnv emptyScUsage specInValue specInCont specInAlt specInBind specInCommand specInCut usageFromCutspecBind specToBindingsamePat$fOutputableSpec$fOutputableCallPat$fMonoidScUsage$fOutputableHowBound$fOutputableScUsage$fOutputableScEnv