h&d      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl m n o p q r s t u v w x y z { | } ~                                                                                                                 !!!!!!!!!!!!!! ! " " " " " " " " " " " " " # # $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ % % & & & & & & & & & & & & & & & & & & & ' ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + + + + + + + + , , , , , , , , - - - . . . . . . . . . . . . . / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 9 9 9 9 9 9 : : : : : : : : : : : : : : : : : : : ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; < < < < < < < < < < < < < < < < < < < < < < < <<<====================================>>>>>>>>>>>>>>>>>>>>>>>>>>>>???@@@@@@@@@@@@@@@@@@@AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPQQQQQQRRRRSTTTTTTTTTTTTTTTUUUUUUUUUUUUUVVVVVVVVVVVVVWWWWWWWWWWWWWWWWWWWXXXXXXXXXXXXXXXYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZZZ[[[[[[[[[[[[[[[\\\\\\\\\\\]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]^^______________________________________```````````````````aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccdddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffggggggggggghhhhhiiiiiiiijjjjjjjjjjjkllllllllllllllllmmmmmmmmmmmmmmmmnnnnnoooppppppqqqqqqqqqqqqqqrrrrrsssssssttttttttttttttttttttuuuuuuuuuuuuuuvvvvvvvvvvvvwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxxxxxxxxxxxxxxxxyyyyy Safe-Inferred)*5689:;=HswarmswarmRun an  effect with a  w, ())  w0 ( w >> ) =  (w0 <> w, w0 <> w) swarmRun a  effect (typically with a al log), producing the final log and discarding the result value.  w =   .  w swarmRun a  effect (typically with a al log), producing the result value and discarding the final log.  w =   .  w  BSD-3-Clause Safe-Inferred*5689:;=JswarmUsed only by "hasContradiction". Note that the Booleans returned in this tuple are not actually used as conditions, and therefore their semantic convention (e.g. associating True = Positive and False = Negative) is irrelevant. Rather, they are collected into sets to determine whether both True and False exist for a key.z Safe-Inferred*5689:;=J BSD-3-Clause Safe-Inferred"*5689:;=Kk ! ! BSD-3-Clause Safe-Inferred*5689:;=La"swarmIn contrast with the BoolExpr type, And and Or can have  one or more children instead of  exactly two."$&%#'()'"$&%#() BSD-3-Clause Safe-Inferred*5689:;=L154362789?>=<;:A@B9?>=<;:A@B78154362 BSD-3-Clause Safe-Inferred*5689:;=P Sswarm5A context is a mapping from variable names to things.VswarmWe use  values to represent variables.WswarmThe empty context.XswarmA singleton context.Yswarm Look up a variable in a context.Zswarm!Delete a variable from a context.[swarm6Get the list of key-value associations from a context.\swarmAdd a key-value binding to a context (overwriting the old one if the key is already present).]swarmRight-biased union of contexts.^swarm6Locally extend the context with an additional binding._swarmLocally extend the context with an additional context of bindings.bswarm(The semigroup operation for contexts is right-biased union. SUTVWXYZ[\]^_ VSUTWXYZ[\]^_  BSD-3-Clause Safe-Inferred*5689:;=c$lswarmIn several cases we have two versions of something: a "normal" version, and a U. version with unification variables in it (e.g. w vs v, q vs p, u vs t). This class abstracts over the process of converting back and forth between them.In particular, l t# represents the fact that the type t also has a U counterpart, with a way to convert back and forth. Note, however, that converting back may be "unsafe" in the sense that it requires an extra burden of proof to guarantee that it is used only on inputs that are safe.mswarmThe associated "U-version" of the type t.nswarm Convert from t to its associated "U-version". This direction is always safe (we simply have no unification variables even though the type allows it).oswarmConvert from the associated "U-version" back to t. Generally, this direction requires somehow knowing that there are no longer any unification variables in the value being converted.pswarm&A polytype with unification variables.qswarm)A polytype without unification variables.rswarmA Poly t is a universally quantified t5. The variables in the list are bound inside the t. For example, the type forall a. a -> a would be represented as Forall ["a"] (TyFun "a" "a").tswarmA UCtx is a mapping from variables to polytypes with unification variables. We generally have one of these while we are in the midst of the type inference process.uswarmA TCtx is a mapping from variables to polytypes. We generally get one of these at the end of the type inference process.vswarmv s are like w/s, but also contain unification variables. v is defined via 3, which is also a kind of fixed point (in fact, v is the  free monad over x). Just as with w=, we provide a bunch of pattern synonyms for working with v as if it were defined directly.wswarmType& is now defined as the fixed point of x?. It would be annoying to manually apply and match against  constructors everywhere, so we provide pattern synonyms that allow us to work with w3 as if it were defined in a directly recursive way.xswarmA "structure functor" encoding the shape of type expressions. Actual types are then represented by taking a fixed point of this functor. We represent types in this way, via a "two-level type", so that we can work with the unification-fd package (see  https://byorgey.wordpress.com/2021/09/08/implementing-hindley-milner-with-the-unification-fd-library/).yswarm A base type.zswarmA type variable.{swarmCommands, with return type. Note that commands form a monad.|swarmType of delayed computations.}swarm Sum type.~swarm Product type.swarmFunction type.swarm Record type.swarm Base types.swarm#The void type, with no inhabitants.swarm(The unit type, with a single inhabitant.swarm Signed, arbitrary-size integers.swarmUnicode strings.swarm Directions.swarm Booleans.swarmActors, i.e. anything that can do stuff. Internally, these are all just "robots", but we give them a more generic in-game name because they could represent other things like aliens, animals, seeds, ...swarm5Keys, i.e. things that can be pressed on the keyboardswarm*Get all the type variables contained in a w.swarm A generic fold for things defined via  (including, in particular, v$). This probably belongs in the unification-fd package, but since it doesn't provide one, we define it here.swarm(A quick-and-dirty method for turning an  (used internally as a unification variable) into a unique variable name, by appending a number to the given name.swarmUnify two Maps by insisting they must have exactly the same keys, and if so, simply matching up corresponding values to be recursively unified. There could be other reasonable implementations, but in our case we will use this for unifying record types, and we do not have any subtyping, so record types will only unify if they have exactly the same keys.swarm!For convenience, so we can write e.g. "a" instead of  TyVar "a".swarmA l instance can be lifted through any functor (including, in particular, S and r).swarmw is an instance of l, with associated type v.Vlmnopqrstuvwxyz{|}~Vxyz{|}~wvrsqputlmno165  BSD-3-Clause Safe-Inferred*5689:;=iEswarm5The result of doing a unification check on two types.swarmThe two types are definitely not equal; they will never unify no matter how any unification variables get filled in. For example, (int * u0) and (u1 -> u2) are apart: the first is a product type and the second is a function type.swarmThe two types might unify, depending on how unification variables get filled in, but we're not sure. For example, (int * u0) and (u1 * bool).swarmThe two types are most definitely equal, and we don't need to bother generating a constraint to make them so. For example, (int * text) and (int * text).swarm?Given two types, try hard to prove either that (1) they are <, i.e. cannot possibly unify, or (2) they are definitely . In case (1), we can generate a much better error message at the instant the two types come together than we could if we threw a constraint into the unifier. In case (2), we don't have to bother with generating a trivial constraint. If we don't know for sure whether they will unify, return .swarmThe  Semigroup instance for  UnifyStatus2 is used to combine results for compound types.  BSD-3-Clause Safe-Inferred*5689:;=i  BSD-3-Clause Safe-Inferred*5689:;=mswarmLabels for a rectangular border, with optional left, middle, and right labels on the top and bottom.swarmLabels for a horizontal border, with optional left, middle, and right labels.swarm)A plain horizontal border with no labels.swarm*A plain rectangular border with no labels.swarmDraw a horizontal border with three optional labels. The left label (if present) will be placed two units away from the left end of the border, and the right label will be placed two units away from the right end. The center label, if present, will always be centered in the border overall, regardless of the width of the left and right labels. This ensures that when the labels change width, they do not cause the other labels to wiggle.swarmPut a rectangular border around the specified widget with the specified label widgets placed around the border.    BSD-3-Clause Safe-Inferred*5689:;=oswarmHandle a list event, taking an extra predicate to identify which list elements are separators; separators will be skipped if possible.swarmIs this element a separator? BSD-3-Clause Safe-Inferred*5689:;=uswarm represents names to uniquely identify various components of the UI, such as forms, panels, caches, extents, lists, and buttons.swarm4An individual control within the world editor panel.swarmThe REPL input form.swarm$The render cache for the world view.swarm%The cached extent for the world view.swarmThe cursor/viewCenter display in the bottom left of the World viewswarm2The list of possible entities to paint a map with.swarm6The entity paint item position in the EntityPaintList.swarm'The list of possible terrain materials.swarm-The terrain item position in the TerrainList.swarm?The list of inventory items for the currently focused robot.swarm1The inventory item position in the InventoryList.swarmThe list of main menu choices.swarmThe list of achievements.swarm=An individual control within the scenario launch config panelswarmThe list of goals/objectives.swarmThe list of scenario choices.swarm+The scrollable viewport for the info panel.swarm-The scrollable viewport for any modal dialog.swarm%A clickable button in a modal dialog.swarm#Clickable buttons in modal dialogs.swarm8The file selector for launching a scenario with a scriptswarmThe panel containing the REPL.swarm$The panel containing the world view.swarm/The panel containing the world editor controls.swarm;The panel showing robot info and inventory on the top left.swarm"The info panel on the bottom left.22 BSD-3-Clause Safe-Inferred*5689:;=wswarmCreate a panel.swarm2Border attribute to use when the panel is focused.swarm'Focus ring the panel should be part of.swarm&The name of the panel. Must be unique.swarm$The labels to use around the border.swarmThe content of the panel. BSD-3-Clause Safe-Inferred"*5689:;=%swarm&A convenient infix flipped version of : Just a ? b = a, and Nothing ? b = b . It can also be chained, as in x ? y ? z ? def), which takes the value inside the first Just, defaulting to def as a last resort.swarm8Ensure the smaller value in a pair is the first element.swarmFind the maximum of two values, comparing them according to a custom projection function.swarmFind the maximum of a list of numbers, defaulting to 0 if the list is empty.swarmTake the successor of an 2 type, wrapping around when it reaches the end.swarm*Guaranteed to yield an element of the listswarm7Drop repeated elements that are adjacent to each other.uniq [][] uniq [1..5] [1,2,3,4,5]uniq (replicate 10 'a')"a"uniq "abbbccd""abcd"swarmPlace the second element of the tuples into bins by the value of the first element.swarmCount occurrences of a valueswarm8Find a duplicate element within the list, if any exists.swarmSafely attempt to read a file.swarm,Safely attempt to (efficiently) read a file.swarmRecursively acquire all files in the given directory with the given extension, and their contents.swarm Turns any IO error into Nothing.swarmPredicate to test for characters which can be part of a valid identifier: alphanumeric, underscore, or single quote.5isIdentChar 'A' && isIdentChar 'b' && isIdentChar '9'True#isIdentChar '_' && isIdentChar '\''True5isIdentChar '$' || isIdentChar '.' || isIdentChar ' 'FalseswarmreplaceLast r t replaces the last word of t with r.:set -XOverloadedStrings replaceLast "foo" "bar baz quux" "bar baz foo"replaceLast "move" "(make""(move"swarmFail with a Text-based message, made out of phrases to be joined by spaces.swarmShow a value, but as Text.swarm+Show a value in all lowercase, but as Text.swarm;Reflow text by removing newlines and condensing whitespace.swarmPrepend a noun with the proper indefinite article ("a" or "an").swarmPrepend a noun with the proper indefinite article, and surround the noun in single quotes.swarmCombine the subject word with the simple present tense of the verb.Only some irregular verbs are handled, but it should be enough to scrap some error message boilerplate and have fun!:set -XOverloadedStringssingularSubjectVerb "I" "be""I am"singularSubjectVerb "he" "can""he can"+singularSubjectVerb "The target robot" "do""The target robot does"swarmPluralize a noun.swarmEither pluralize a noun or not, depending on the value of the number.swarm$Surround some text in single quotes.swarm$Surround some text in double quotes.swarm Surround some text in backticks.swarm"Surround some text in parentheses.swarm&Surround some text in square brackets.swarm5Make a list of things with commas and the word "and".swarm Require that a Boolean value is True, or throw an exception.swarmRequire that a  value is , or throw an exception.swarmRequire that an  value is 5, or throw an exception based on the value in the .swarmRequire that a  value is 5, or throw an exception based on the value in the .swarmRemove any sets which are supersets of other sets. In other words, (1) no two sets in the output are in a subset relationship (2) every element in the input is a superset of some element in the output.import qualified Data.Set as Srss = map S.toList . S.toList . removeSupersets . S.fromList . map S.fromListrss [[1,2,3], [1]][[1]]rss [[1,2,3], [2,4], [2,3]] [[2,3],[2,4]]rss [[], [1], [2,3]][[]]rss [[1,2], [1,3], [2,3]][[1,2],[1,3],[2,3]]swarmGiven a list of nonempty sets, find a hitting set, that is, a set which has at least one element in common with each set in the list. It is not guaranteed to be the smallest possible such set, because that is NP-hard. Instead, we use a greedy algorithm that will give us a reasonably small hitting set: first, choose all elements in singleton sets, since those must necessarily be chosen. Now take any sets which are still not hit, and find an element which occurs in the largest possible number of remaining sets. Add this element to the set of chosen elements, and filter out all the sets it hits. Repeat, choosing a new element to hit the largest number of unhit sets at each step, until all sets are hit. This algorithm produces a hitting set which might be larger than optimal by a factor of lg(m), where m is the number of sets in the input.import qualified Data.Set as S&shs = smallHittingSet . map S.fromList shs ["a"] fromList "a"shs ["ab", "b"] fromList "b"shs ["ab", "bc"] fromList "b"shs ["acd", "c", "aef", "a"] fromList "ac" shs ["abc", "abd", "acd", "bcd"] fromList "cd")Here is an example of an input for which smallHittingSet does not produce a minimal hitting set. "bc" is also a hitting set and is smaller. b, c, and d all occur in exactly two sets, but d is unluckily chosen first, leaving "be" and "ac" unhit and necessitating choosing one more element from each.shs ["bd", "be", "ac", "cd"]fromList "cde"00144444 BSD-3-Clause Safe-Inferred*5689:;=?swarmThe type of directions. Used e.g., to indicate which way a robot will turn.swarmCaution: Do not alter this ordering, as there exist functions that depend on it (e.g. "nearestDirection" and "relativeTo").swarmA relative direction is one which is defined with respect to the robot's frame of reference; no special capability is needed to use them.swarmAn absolute direction is one which is defined with respect to an external frame of reference; robots need a compass in order to use them.NOTE: These values are ordered by increasing angle according to the standard mathematical convention. That is, the right-pointing direction, East, is considered the "reference angle" and the order proceeds counter-clockwise. See https://en.wikipedia.org/wiki/Polar_coordinate_system#ConventionsDo not alter this ordering, as there exist functions that depend on it (e.g. "nearestDirection" and "relativeTo").swarmDirection name is generated from the deepest nested data constructor e.g. DLeft becomes "left"swarm)Check if the direction is absolute (e.g. north or south). BSD-3-Clause Safe-Inferred "(*5689:;=?ͷswarm indicates whether the definition is known to be recursive.swarm)A monadic bind for commands, of the form c1 ; c2 or  x <- c1; c2.swarm$Delay evaluation of a term, written {...}>. Swarm is an eager language, but in some cases (e.g. for if statements and recursive bindings) we need to delay evaluation. The counterpart to {...} is force, where  force {t} = t. Note that  is just a constant, whereas  has to be a special syntactic form so its argument can get special treatment during evaluation.swarmRecord literals 1 = e1, x2 = e2, x3, ...] Names x without an accompanying definition are sugar for writing x=x.swarmRecord projection e.xswarmAnnotate a term with a typeswarmA variable with associated source location, used for variable binding sites. (Variable occurrences are a bare TVar which gets wrapped in a Syntax node, so we don't need LocVar for those.)swarm4Different runtime behaviors for delayed expressions.swarm1A simple delay, implemented via a (non-memoized) VDelay# holding the delayed expression.swarmA memoized delay, implemented by allocating a mutable cell with the delayed expression and returning a reference to it. When the  Maybe Var is Just, a recursive binding of the variable with a reference to the delayed expression will be provided while evaluating the delayed expression itself. Note that there is no surface syntax for binding a variable within a recursive delayed expression; the only way we can get Just here is when we automatically generate a delayed expression while interpreting a recursive let or def.swarmThe length of a tangible command. Short commands take exactly one tick to execute. Long commands may require multiple ticks.swarmWhether a command is tangible or not. Tangible commands have some kind of effect on the external world; at most one tangible command can be executed per tick. Intangible commands are things like sensing commands, or commands that solely modify a robot's internal state; multiple intangible commands may be executed per tick. In addition, tangible commands can have a  (either  or ) indicating whether they require only one, or possibly more than one, tick to execute. Long commands are excluded from atomic# blocks to avoid freezing the game.swarm;The meta type representing associativity of unary operator.swarmPrefix unary operator (see {|)swarmSuffix unary operator (see {})swarmNote: This is used for documentation purposes and complements  and 2 in that exactly one will accept a given constant.swarmWhether the constant is a tangible command, that has an external effect on the world. At most one tangible command may be executed per tick.swarmWhether the constant is a long command, that is, a tangible command which could require multiple ticks to execute. Such commands cannot be allowed in atomic blocks.swarmInformation about constants used in parsing and pretty printing.It would be more compact to represent the information by testing whether the constants are in certain sets, but using pattern matching gives us warning if we add more constants.swarm Match a TAnnotate without syntaxswarmMatch a TRcd without syntaxswarmMatch a TDelay without syntaxswarmMatch a TBind without syntaxswarmMatch a TDef without syntaxswarmMatch a TLet without syntaxswarm1Convenient infix pattern synonym for application.swarmMatch a TApp without syntaxswarmMatch a TLam without syntaxswarmMatch a TPair without syntaxswarm"Match an untyped term without its .swarmCOMPLETE pragma tells GHC using this set of pattern is complete for TermMake infix operation (e.g. 2 + 3%) a curried function application ( ((+) 2) 3).swarm length (getElemsInArea origin i (Map.fromList $ v2s i))) [0..8][1,5,13,25,41,61,85,113,145]:The last test is the sequence "Centered square numbers": https://oeis.org/A001844 BSD-3-Clause Safe-Inferred*5689:;=swarmRepresents the top-left and bottom-right coordinates of a bounding rectangle of cells in the world mapswarmWorld coordinates use (row,column) format, with the row increasing as we move down the screen. We use this format for indexing worlds internally, since it plays nicely with things like drawing the screen, and reading maps from configuration files. The  and ; functions convert back and forth between this type and , which is used when presenting coordinates externally to the player.swarm2Convert an external (x,y) location to an internal  value.swarmConvert an internal % value to an external (x,y) location. BSD-3-Clause Safe-Inferred"*5689:;=(swarmThe swarm universe consists of locations indexed by subworld. Not only is this datatype useful for planar (2D) coordinates, but is also used for named waypoints.swarmReturns ! if not within the same subworld. Safe-Inferred"*5689:;= 6swarmIncorporates an offset by -1, since the area is "inclusive" of the lower-right coordinate. Inverse of "cornersToArea".swarmConverts the displacement vector between the two diagonal corners of the rectangle into an AreaDimensions record. Adds one to both dimensions since the corner coordinates are "inclusive". Inverse of "upperLeftToBottomRight".   BSD-3-Clause Safe-Inferred"*5689:;= swarm;Orientation transformations are applied before translation.swarm e.g. For East, rotates 270 degrees.swarm&vertical flip, applied before rotationswarmThis is the point-wise equivalent of "applyOrientationTransform"swarmaffine transformation BSD-3-Clause Safe-Inferred"*5689:;=swarmA parent world shouldn't have to know the exact layout of a subworld to specify where exactly a portal will deliver a robot to within the subworld. Therefore, we define named waypoints in the subworld and the parent world must reference them by name, rather than by coordinate.swarmMetadata about a waypointswarm*Enforce global uniqueness of this waypointswarmIndicates which structure something came from for debugging purposes.swarmBasically "fmap" for the Location fieldswarmTranslation by a vectorswarmJSON representation is flattened; all keys are at the same level, in contrast with the underlying record. BSD-3-Clause Safe-Inferred"*5689:;=swarmNote: ? indicates that references a waypoint within the same subworld.swarm*Parameterized on waypoint dimensionality (additionalDimension4) and on the portal location specification method ( portalExitLoc). == additionalDimension As a member of the WorldDescription;, waypoints are only known within a a single subworld, so additionalDimension is  for the map of waypoint names to planar locations. At the Scenario level, in contrast, we have access to all subworlds, so we nest this map to planar locations in additional mapping layer by subworld. ==  portalExitLoc At the subworld parsing level, we only can obtain the planar location for portal  entrances , but the exits remain as waypoint names. At the Scenario-parsing level, we finally have access to the waypoints across all subworlds, and can therefore translate the portal exits to concrete planar locations.swarmNote that waypoints defined at the "root" level are still relative to the top-left corner of the map rectangle; they are not in absolute world coordinates (as with applying the "ul" offset).swarmThe following constraints must be enforced: * portals based on plural waypoint multiplicity can have multiple entrances but only a single exit * no two portals share the same entrance location * waypoint uniqueness within a subworld when the unique flag is specified Data flow:Waypoints are defined within a subworld and are namespaced by it. Optional intra-subworld uniqueness of Waypoints is enforced at WorldDescription parse time. Portals are declared within a subworld. The portal entrance must be a waypoint within this subworld. They can reference waypoints in other subworlds as exits, but these references are not validated until the Scenario parse level. Since portal  entrances are specified at the subworld level, validation that no entrances overlap can also be performed at that level.6However, enforcement of single-multiplicity on portal exits must be performed at scenario-parse level, because for a portal exit that references a waypoint in another subworld, we can't know at the single-WorldDescription level whether that waypoint has plural multiplicity.swarmA portal can be marked as "consistent", meaning that it represents a conventional physical passage rather than a "magical" teleportation.If there exists more than one "consistent" portal between the same two subworlds, then the portal locations must be spatially consistent between the two worlds. I.e. the space comprising the two subworlds forms a "conservative vector field".Verifying this is simple: For all of the portals between Subworlds A and B: * The coordinates of all "consistent" portal locations in Subworld A are subtracted from the corresponding coordinates in Subworld B. It does not matter which are exits vs. entrances. * The resulting "vector" from every pair must be equal.swarmAn implementation of  for  that does not require an  instance for the inner . DiscussionCompare to the  instance of :  instance Traversable Signed where traverse f (Positive x) = Positive  $+ f x traverse f (Negative x) = Negative  $ f x if we were to substitute  for f: ( traverse id (Positive x) = Positive  $- id x traverse id (Negative x) = Negative  $ id x ) our implementation essentially becomes  traverse id.6However, we cannot simply write our implementation as  traverse id, because the  function has an 3 constraint, which is superfluous for our purpose.Perhaps there is an opportunity to invent a typeclass for datatypes which consist exclusively of unary (or more ambitiously, non-nullary?) data constructors, for which a less-constrained : function could be automatically derived. Compare to the Comonad class and its extract function. BSD-3-Clause Safe-Inferred*5689:;="Aswarm5Achievements obtained while playing a single scenarioswarmAchievements that entail some aggregate of actions across scenariosswarmGuidelines: * prefer puns, pop culture references, etc. * should be a phrase in Title Case. * For achievements that are "obfuscated", this can be a vague "clue" as to what the attainment entails.swarmExplain the reference, e.g. in the form of a full quote from a movie, or something you might find in a fortune cookieswarm7Precisely what must be done to obtain this achievement.swarmHides the attainment process until after the achievement is attained. Best when the title + elaboration constitute a good clue.##  BSD-3-Clause Safe-Inferred"*5689:;=#)! BSD-3-Clause Safe-Inferred*5689:;=#swarm$from which scenario was it obtained?  " BSD-3-Clause Safe-Inferred*5689:;=& swarm6Extend a semigroup to a monoid by adding an identity ( ) and an annihilator (  ). That is, !ENothing <> e = e <> ENothing = e "EErase <> e = e <> EErase = EErase?This allows us to "erase" previous values by combining with  . The   function turns an   into a  by collapsing   and   both back into . swarmGeneric eliminator for   values. swarm Convert an   value to , turning both   and   into . swarm Inject a  value into   using   and  .  # BSD-3-Clause Safe-Inferred*5689:;=( swarmGenerate lenses but with no type signatures, so we can explicitly give type signatures and attach custom Haddock documentation to them. swarmGenerate lenses for the fields of a record type (with no type signatures), except for a given list of excluded fields.Especially useful in conjunction with the design pattern described in https://byorgey.wordpress.com/2021/09/17/automatically-updated-cached-views-with-lens/  $ BSD-3-Clause Safe-Inferred "%&(*5689:;=8! swarmHistory of the REPL with indices (0 is first entry) to the current line and to the first entry since loading saved history. We also (ab)use the length of the REPL as the index of current input line, since that number is one past the index of last entry. swarmAn item in the REPL history. swarmSomething entered by the user. swarm!A response printed by the system. swarm3Useful helper function to only get user input text. swarm1Useful helper function to filter out REPL output. swarm"Get the text of REPL input/output. swarm5What is being done with user input to the REPL panel? swarmThe user is typing at the REPL. swarm1The user is driving the base using piloting mode. swarm3A custom user key handler is processing user input. swarmThis data type tells us how to interpret the text typed by the player at the prompt (which is stored in Editor). swarmInterpret the prompt text as a regular command. The list is for potential completions, which we can cycle through by hitting Tab repeatedly swarm:Interpret the prompt text as "search this text in history" swarmNote: Instead of adding a dedicated field to the REPLHistory record, an early attempt entailed checking for:_replIndex > _replStart/However, executing an initial script causes a  REPLOutput to be appended to the REPL history, which increments the replIndex, and thus makes the Index greater than the Start even though the player has input not commands into the REPL.Therefore, a dedicated boolean is introduced into REPLHistory which simply latches True when the user has input a command.#An alternative is described here: https://github.com/swarm-game/swarm/pull/974#discussion_r1112380380 swarmThe current index in the REPL history (if the user is going back through the history using up/down keys). swarm>Sequence of REPL inputs and outputs, oldest entry is leftmost.swarm9The index of the first entry since loading saved history.?It will be set on load and reset on save (happens during exit). swarm>Create new REPL history (i.e. from loaded history file lines). swarm=Point the start of REPL history after current last line. See . swarmCurrent number lines of the REPL history - (ab)used as index of input buffer. swarmAdd new REPL input - the index must have been pointing one past the last element already, so we increment it to keep it that way. swarmGet the latest N items in history, starting with the oldest one.This is used to show previous REPL lines in UI, so we need the items sorted in the order they were entered and will be drawn top to bottom. swarmGiven some text, removes the REPLEntry within REPLHistory which is equal to that. This is used when the user enters in search mode and want to traverse the history. If a command has been used many times, the history will be populated with it causing the effect that search command always finds the same command. swarm=Get the last REPLEntry in REPLHistory matching the given text swarmThe current REPL control mode, i.e. how user input to the REPL panel is being handled. swarmHistory of things the user has typed at the REPL, interleaved with outputs the system has generated. swarmThe last thing the user has typed which isn't part of the history. This is used to restore the repl form after the user visited the history. swarm5The prompt where the user can type input at the REPL. swarmThe way we interpret text typed by the player in the REPL prompt. swarmThe type of the current REPL input which should be displayed to the user (if any). swarm#Whether the prompt text is a valid Term. swarmConvinience lens to get text from editor and replace it with new one that has the provided text.* * % BSD-3-Clause Safe-Inferred*5689:;=;+ swarmRun a parser "fully", consuming leading whitespace and ensuring that the parser extends all the way to eof. swarmRun a parser "fully", consuming leading whitespace (including the possibility that the input is nothing but whitespace) and ensuring that the parser extends all the way to eof.  & BSD-3-Clause Safe-Inferred"(*5689:;=JswarmWhen parsing a term using a quasiquoter (i.e. something in the Swarm source code that will be parsed at compile time), we want to allow antiquoting, i.e. writing something like $x to refer to an existing Haskell variable. But when parsing a term entered by the user at the REPL, we do not want to allow this syntax. swarm=List of reserved words that cannot be used as variable names.swarmSkip spaces and comments.swarmIn general, we follow the convention that every token parser assumes no leading whitespace and consumes all trailing whitespace. Concretely, we achieve this by wrapping every token parser using .swarm(A lexeme consisting of a literal string.swarmParse a case-insensitive reserved word, making sure it is not a prefix of a longer variable name, and allowing the parser to backtrack if it fails.swarmParse an identifier, i.e. any non-reserved string containing alphanumeric characters and underscores and not starting with a number.swarm;Parse an identifier together with its source location info.swarmParse a text literal (including escape sequences) in double quotes.swarmParse a positive integer literal token, in decimal, binary, octal, or hexadecimal notation. Note that negation is handled as a separate operator. swarmParse a Swarm language polytype, which starts with an optional quanitifation (forall followed by one or more variables and a period) followed by a type. Note that anything accepted by   is also accepted by  . swarm"Parse a Swarm language (mono)type.swarm$Parse Const as reserved words (e.g. Fail <$ reserved "fail")swarmAdd  to a parserswarmAdd  to a  parserswarmParse an atomic term, optionally trailed by record projections like t.x.y.z. Record projection binds more tightly than function application.swarmParse an atomic term.swarm Construct an , automatically filling in the Boolean field indicating whether it is recursive.swarm Construct an , automatically filling in the Boolean field indicating whether it is recursive. swarmParse a Swarm language term.swarmWhen semicolons are missing between definitions, for example: def a = 1 end def b = 2 end def c = 3 end The makeExprParser produces: App (App (TDef a) (TDef b)) (TDef x) This function fix that by converting the Apps into Binds, so that it results in: Bind a (Bind b (Bind c)) swarm,Precedences and parsers of binary operators.Map.map length binOps4fromList [(0,1),(2,1),(3,1),(4,6),(6,3),(7,2),(8,1)] swarm;Precedences and parsers of unary operators (currently only ).Map.map length unOpsfromList [(7,1)] swarmRun a parser on some input text, returning either the result or a pretty-printed parse error message. swarm/A utility for running a parser in an arbitrary . (which is going to be the TemplateHaskell Q monad --- see Swarm.Language.Parse.QQ$), with a specified source position. swarmParse some input  completely as a , consuming leading whitespace and ensuring the parsing extends all the way to the end of the input  . Returns either the resulting  (or Nothing if the input was only whitespace) or a pretty-printed parse error message. swarmA lower-level   which returns the megaparsec bundle error for precise error reporting. swarmA utility for converting a ParserError into a one line message:  line-nr: error-msg swarmA utility for converting a ParseError into a range and error message. swarm.A utility for converting a SrcLoc into a range  ' BSD-3-Clause Safe-Inferred*5689:;=L~ swarmA quasiquoter for Swarm polytypes, so we can conveniently write them down using concrete syntax and have them parsed into abstract syntax at compile time. This is used, for example, in writing down the concrete types of constants (see Swarm.Language.Typecheck).  ( BSD-3-Clause Safe-Inferred"(*25689:;=s swarmVarious reasons the body of an atomic might be invalid. swarm,The argument has too many tangible commands. swarm.The argument uses some way to duplicate code: def, let , or lambda. swarm;The argument referred to a variable with a non-simple type. swarmThe argument had a nested atomic swarm%The argument contained a long command swarmErrors that can occur during type checking. The idea is that each error carries information that can be used to help explain what went wrong (though the amount of information carried can and should be very much improved in the future); errors can then separately be pretty-printed to display them to the user. swarm&An undefined variable was encountered. swarm,A Skolem variable escaped its local context. swarm)Occurs check failure, i.e. infinite type. swarmError generated by the unifier. swarmType mismatch caught by . The given term was expected to have a certain type, but has a different type instead. swarmLambda argument type mismatch. swarmRecord field mismatch, i.e. based on the expected type we were expecting a record with certain fields, but found one with a different field set. swarm2A definition was encountered not at the top level. swarmA term was encountered which we cannot infer the type of. This should never happen. swarm/We can't infer the type of a record projection r.x7 if we don't concretely know the type of the record r. swarm-An attempt to project out a nonexistent field swarm$An invalid argument was provided to atomic. swarmSome unification variables ended up in a type, probably due to impredicativity. See  .https://github.com/swarm-game/swarm/issues/351 . swarmA type error along with various contextual information to help us generate better error messages. swarmunification-fd provides a function  which fully substitutes for any bound unification variables (for efficiency, it does not perform such substitution as it goes along). The   class is for anything which has unification variables in it and to which we can usefully apply .swarm>A class for getting the free unification variables of a thing. swarm,The concrete monad used for type checking. + is a monad transformer provided by the unification-fd library which supports various operations such as generating fresh variables and unifying things. swarm7A "join" where an expected thing meets an actual thing.swarm3A value along with its source (expected vs actual). swarm)The source of a type during typechecking. swarm9An expected type that was "pushed down" from the context. swarm9An actual/inferred type that was "pulled up" from a term. swarmA typechecking stack keeps track of what we are currently in the middle of doing during typechecking. swarm6A typechecking stack frame together with the relevant SrcLoc. swarmA frame to keep track of something we were in the middle of doing during typechecking. swarmChecking a definition. swarmInferring the LHS of a bind. swarmInferring the RHS of a bind. swarmGeneric eliminator for  '. Choose the first argument if the   is  , and the second argument if  .swarm Create a  < from an expected thing and an actual thing (in that order).swarm Create a   from a  thing together with another thing (which is assumed to have the opposite  ). swarm Convert a  # into a pair of (expected, actual). swarm6Push a frame on the typechecking stack within a local   computation. swarm#Get the current typechecking stack. swarm=Run a top-level inference computation, returning either a   or a fully resolved .swarmLook up a variable in the ambient type context, either throwing an  8 error if it is not found, or opening its associated p) with fresh unification variables via  .swarmGet the current type context.swarmCatch any thrown type errors and re-throw them with an added source location. swarm&Generate a fresh unification variable. swarmPerform a substitution over a v, substituting for both type and unification variables. Note that since vs do not have any binding constructs, we don't have to worry about ignoring bound variables; all variables in a v are free.swarm%Make sure no skolem variables escape. swarmunify t expTy actTy ensures that the given two types are equal. If we know the actual term t which is supposed to have these types, we can use it to generate better error messages.We first do a quick-and-dirty check to see whether we know for sure the types either are or cannot be equal, generating an equality constraint for the unifier as a last resort.swarmEnsure two types are the same. swarmTo   a p, we generate a fresh unification variable for each variable bound by the s2, and then substitute them throughout the type. swarm  is like   , except we substitute fresh type variables instead of unification variables. Such variables cannot unify with anything other than themselves. This is used when checking something with a polytype explicitly specified by the user. swarm  is the opposite of  : add a s> which closes over all free type and unification variables.Pick nice type variable names instead of reusing whatever fresh names happened to be used for the free variables.swarm Create a raw   with no context information.swarm Create a   value from a   and context.swarmThrow a  .swarmDecompose a type that is supposed to be a delay type. Also take the term which is supposed to have that type, for use in error messages.swarmDecompose a type that is supposed to be a command type. Also take the term which is supposed to have that type, for use in error messages.swarmDecompose a type that is supposed to be a function type. Also take the term which is supposed to have that type, for use in error messages.swarmDecompose a type that is supposed to be a product type. Also take the term which is supposed to have that type, for use in error messages. swarmTop-level type inference function: given a context of definition types and a top-level term, either return a type error or its type as a . swarmInfer the signature of a top-level expression which might contain definitions. swarmInfer the type of a term which does not contain definitions, returning a type-annotated term.%The only cases explicitly handled in   are those where pushing an expected type down into the term can't possibly help, e.g. most primitives, function application, and binds.#For most everything else we prefer   because it can often result in better and more localized type error messages. swarmInfer the type of a constant. swarm check t ty checks that t has type ty*, returning a type-annotated AST if so.We try to stay in checking mode as far as possible, decomposing the expected type as we go and pushing it through the recursion.swarm%Ensure a term is a valid argument to atomic&. Valid arguments may not contain def, let, or lambda. Any variables which are referenced must have a primitive, first-order type such as text or int (in particular, no functions, cmd, or delay). We simply assume that any locally bound variables are OK without checking their type: the only way to bind a variable locally is with a binder of the form  x <- c1; c2, where c1 is some primitive command (since we can't refer to external variables of type cmd a). If we wanted to do something more sophisticated with locally bound variables we would have to inline this analysis into typechecking proper, instead of having it be a separate, out-of-band check.+The goal is to ensure that any argument to atomic is guaranteed to evaluate and execute in some small, finite amount of time, so that it's impossible to write a term which runs atomically for an indefinite amount of time and freezes the rest of the game. Of course, nothing prevents one from writing a large amount of code inside an atomic block; but we want the execution time to be linear in the size of the code.We also ensure that the atomic block takes at most one tick, i.e. contains at most one tangible command. For example, atomic (move; move) is invalid, since that would allow robots to move twice as fast as usual by doing both actions in one tick.swarmAnalyze an argument to atomic: ensure it contains no nested atomic blocks and no references to external variables, and count how many tangible commands it will execute.swarm7A simple polytype is a simple type with no quantifiers. swarm0A simple type is a sum or product of base types. swarm;We can get the free variables in any polytype in a context. swarm1We can also get the free variables of a polytype. swarm/We can get the free unification variables of a v. swarmunification-fd does not provide an  instance for , so we must provide our own, in order to be able to store s in a .8 8 4) BSD-3-Clause Safe-Inferred"(*5689:;={ swarmWe can use the   value to replace unification variables when we don't care about them, e.g. to print out the shape of a type like  (_ -> _) * _ swarmType class for things that can be pretty-printed, given a precedence level of their context. swarm>Pretty-print a thing, with a context precedence level of zero. swarm$Render a pretty-printed document as Text. swarm(Pretty-print something and render it as Text. swarm&Render a pretty-printed document as a String. swarm*Pretty-print something and render it as a String. swarmOptionally surround a document with parentheses depending on the Bool argument. swarm#Surround a document with backticks. swarmTurn a  instance into a Doc#, lowercasing it in the process. swarm Format a ContextualTypeError" for the user and render it as Text. swarm Format a ContextualTypeError for the user. swarmGiven a type and its source, construct an appropriate description of it to go in a type mismatch error message. swarm?Check whether a type contains any unification variables at all. swarmCheck whether a type consists of a top-level type constructor immediately applied to unification variables. swarmReturn an English noun phrase describing things with the given top-level type constructor. swarmReturn an English noun phrase describing things with the given base type. swarmGenerate an appropriate message when the sets of fields in two record types do not match, explaining which fields are extra and which are missing.  * BSD-3-Clause Safe-Inferred"*5689:;=|O! ! + BSD-3-Clause Safe-Inferred*5689:;= swarm Transform a Throw e1 constraint into a Throw e29 constraint, by supplying an adapter function of type  (e1 -> e2). swarm Transform a Throw e constrint into a concrete Maybe, discarding the error. swarm Transform a Throw e constrint into a concrete Maybe$, logging any error as a warning. swarmRun a computation with an Accum effect (typically accumulating a list of warnings), ignoring the accumulated value. swarm2Convert a fused-effects style computation using a Throw e constraint into an ExceptT computation. This is mostly a stub to convert from one style to the other while we are in the middle of incrementally converting. Eventually this should not be needed. swarm"Log a single failure as a warning. swarm A version of / that also accumulates warnings.4Note that we can't generalize this to work over any > because it also needs to have a notion of "filtering". ( provides exactly the right abstraction. swarmFlipped version of   for convenience. , BSD-3-Clause Safe-Inferred"*5689:;= swarm+Get subdirectory from swarm data directory.=This will first look in Cabal generated path and then try a `data` directory in  path.The idea is that when installing with Cabal/Stack the first is preferred, but when the players install a binary they need to extract the `data` archive to the XDG directory. swarm#Get file from swarm data directory.See the note in  . swarm*Get a nice message suggesting to download `data` directory to . swarmGet path to swarm data, optionally creating necessary directories. This could fail if user has bad permissions on his own $HOME or $XDG_DATA_HOME which is unlikely. swarmGet path to swarm saves, optionally creating necessary directories. swarmGet path to swarm history, optionally creating necessary directories. swarm/Read all the .txt files in the data/ directory.  - BSD-3-Clause Safe-Inferred"*5689:;=d swarmGet path to swarm achievements, optionally creating necessary directories. swarmLoad saved info about achievements from XDG data directory. Returns a tuple of warnings and attained achievements. swarm3Save info about achievements to XDG data directory.  . BSD-3-Clause Safe-Inferred"*5689:;= swarmA record containing the results of the language processing pipeline. Put a % in, and get one of these out. A   contains:The elaborated + type-annotated term, plus the types of any embedded definitions ()The  of the termThe requirements context for any definitions embedded in the term () swarmGiven a $ value representing a Swarm program, Parse it (see Swarm.Language.Parse)Typecheck it (see Swarm.Language.Typecheck)Elaborate it (see Swarm.Language.Elaborate))Check what capabilities it requires (see Swarm.Language.Capability)!Return either the end result (or Nothing if the input was only whitespace) or a pretty-printed error message. swarmLike  ., but use a term that has already been parsed. swarmLike  %, but use explicit starting contexts. swarmLike  ., but use a term that has already been parsed.  / BSD-3-Clause Safe-Inferred"*5689:;=?l swarmConvert elements to one dimensional stream of nodes, that is easy to format and layout.9If you want to split the stream at line length, use the   function afterward. swarmToken stream that can be easily converted to text or brick widgets.=TODO: #574 Code blocks should probably be handled separately. swarmSimple text attributes that make it easier to find key info in descriptions. swarmInline leaf nodes.The raw node is from the raw_annotation extension, and can be used for typesentities invalid code. swarm3Markdown paragraphs that contain inline leaf nodes.The idea is that paragraphs do not have line breaks, and so the inline elements follow each other. In particular inline code can be followed by text without space between them (e.g. loggers). swarm The top-level markdown document.swarm7Surround some text in double quotes if it is not empty. swarm3Parse Markdown document, but throw on invalid code. swarm3Read Markdown document and parse&validate the code.+If you want only the document with code as  , use the  function.swarm/Read Markdown document without code validation. swarmConvert   to .Note that this will strip some markdown, emphasis and bold marks. If you want to get markdown again, use  . swarmThis is the naive and easy way to get text from markdown document. swarmGet chunks of nodes not exceeding length and broken at word boundary. swarmConvert   to markdown text.  0 BSD-3-Clause Safe-Inferred*5689:;= swarmA quasiquoter for Swarm language terms, so we can conveniently write them down using concrete syntax and have them parsed into abstract syntax at compile time. The quasiquoter actually runs the entire pipeline on them (parsing, typechecking, elaborating), so a quasiquoted Swarm program with a parse error or a type error will fail at Haskell compile time. This is useful for creating system robot programs (for example, see f).  1 Safe-Inferred*5689:;=c 2 BSD-3-Clause Safe-Inferred"*5689:;=a swarmAn objective is a condition to be achieved by a player in a scenario. swarmTypically, only the currently "active" objectives are displayed to the user in the Goals dialog. An objective is "active" if all of its prerequisites are met.However, some objectives may be "high-level", in that they may explain the broader intention behind potentially multiple prerequisites.Set this to option True to display this goal in the "upcoming" section even if the objective has currently unmet prerequisites. swarmBoolean expression of dependencies upon other objectives. Variables in this expression are the "id"s of other objectives, and become "true" if the corresponding objective is completed. The "condition" of the objective at hand shall not be evaluated until its prerequisite expression evaluates as True.Note that the achievement of these objective dependencies is persistent; once achieved, they still count even if their "condition" might not still hold. The condition is never re-evaluated once True. swarmThis is the authoritative "completion status" for all objectives. Note that there is a separate Set to store the completion status of prerequisite objectives, which must be carefully kept in sync with this. Those prerequisite objectives are required to have labels, but other objectives are not. Therefore only prerequisites exist in the completion map keyed by label. swarmTODO: #1044 Could also add an ObjectiveFailed constructor... swarmAn optional Achievement that is to be registered globally when this objective is completed. swarmA winning condition for the objective, expressed as a program of type cmd bool. By default, this program will be run to completion every tick (the usual limits on the number of CESK steps per tick do not apply). swarmAn explanation of the goal of the objective, shown to the player during play. It is represented as a list of paragraphs. swarmWhether the goal is displayed in the UI before completion. The goal will always be revealed after it is completed.4This attribute often goes along with an Achievement. swarmOptional name by which this objective may be referenced as a prerequisite for other objectives. swarmIndicates whether the objective is not required in order to "win" the scenario. Useful for (potentially hidden) achievements. If the field is not supplied, it defaults to False (i.e. the objective is mandatory to "win"). swarm"Dependencies upon other objectives swarmA very short (3-5 words) description of the goal for displaying on the left side of the Objectives modal. swarm5Concatenates all incomplete and completed objectives. swarm Returns the ObjectiveCompletion with the "incomplete" goals extracted to a separate tuple member. This is intended as input to a "fold".' ' 3 BSD-3-Clause Safe-Inferred*5689:;= swarm For debugging only (via Web API) swarmWe have "won" if all of the "unwinnable" or remaining "incomplete" objectives are "optional". swarmWe have "lost" if any of the "unwinnable" objectives not "optional". swarmThe first element of the returned tuple consists of "active" objectives, the second element "inactive". swarm,Used only by the web interface for debugging  4 BSD-3-Clause Safe-Inferred*5689:;= swarmrequired for maintaining the selection/navigation state among list items swarmTODO: #1044 the actual contents of these are not used yet, other than as a flag to pop up the Goal dialog. swarmThese are intended to be used as keys in a map of lists of goals. swarmGoals in this category have other goals as prerequisites. However, they are only displayed if the "previewable" attribute is true. swarmGoals in this category may be pursued in parallel. However, they are only displayed if the "hidden" attribute is false. swarmA goal's programmatic condition, as well as all its prerequisites, were completed. This is a "latch" mechanism; at some point the conditions required to meet the goal may no longer hold. Nonetheless, the goal remains "completed". swarmA goal that can no longer be achieved. If this goal is not an "optional" goal, then the player also Loses the scenario.$Note that currently the only way to Fail a goal is by way of a negative prerequisite that was completed.  5 BSD-3-Clause Safe-Inferred*5689:;=R swarmThis is only needed for constructing a Graph, which requires all nodes to have a key. swarmfor unlabeled objectives swarmCollect all of the constants that have a negation. This is necessary for enumerating all of the distinct nodes when constructing a Graph, as we treat a constant and its negation as distinct nodes. swarmUses the textual labels for those objectives that have them, and assigns arbitrary integer IDs for the remaining."Only necessary for constructing a Graph. swarmNOTE: Based strictly on the goal labels, the graph could potentially contain a cycle, if there exist mutually-exclusive goals. That is, if goal A depends on the NOT of "goal B". Goal B could then also depend on "NOT Goal A" (re-enforcing the mutual-exclusivity), or it could mandate a completion order, e.g.: Goal A and Goal B are simultaneously available to pursue. However, if the player completes Goal B first, then it closes off the option to complete Goal A. However, if Goal A is completed first, then the user is also allowed to complete Goal B.)To avoid a "cycle" in this circumstance, A> needs to exist as a distinct node from "NOT A" in the graph.  6 BSD-3-Clause Safe-Inferred"*5689:;= swarmPerforms monadic validation before returning the "pure" construction of a wrapper record. This validation entails: 1) Ensuring that all goal references utilized in prerequisites actually exist 2) Ensuring that the graph of dependencies is acyclic.  7 BSD-3-Clause Safe-Inferred"*5689:;=8 swarmVariable references swarm,Variable declarations without any references swarmDescends the syntax tree rooted at a variable declaration, accumulating variable references. Generates a "problem" if an associated variable reference is not encountered in the subtree for this declaration. swarmBuild up the bindings map as a function argument as we descend into the syntax tree. Aggregates unused bindings as we return from each layer.  8 Safe-Inferred"*5689:;=[swarmPretty print the type.swarm&Strip the type of its outermost layer.This allows us to strip lambda or command type and get the type of the bound variable.swarm(Check if this type is same as the given q.We use it to not print same type twice (e.g. inferred and generic). swarmFind the most specific term for a given position within the code.swarm0Helper function to explain function application. Note that  is often inserted internally, so if it shows up here we drop it.swarmpositionswarmnext element to inspect swarm parent termswarmabsolute offset within the file  9 BSD-3-Clause Safe-Inferred"*5689:;=  : BSD-3-Clause Safe-Inferred"*5689:;= swarmA keyboard input, represented as a key + modifiers. Invariant: the modifier list is always sorted. swarmSmart constructor for  . swarm(Parse a key combo with nothing after it. swarm!Parse a key combo like "M-C-F5", Down , or "C-x". swarmPretty-print a key combo, e.g. "C-M-F5". Right inverse to parseKeyCombo. Left inverse up to reordering of modifiers.  ; BSD-3-Clause Safe-Inferred)*5689:;=$ swarm:An environment is a mapping from variable names to values. swarmA value is a term that cannot (or does not) take any more evaluation steps on its own. swarmThe unit value. swarm An integer. swarm Literal text. swarm A direction. swarm A boolean. swarmA reference to a robot. swarm:An injection into a sum type. False = left, True = right. swarmA pair. swarmA closure, representing a lambda term along with an environment containing bindings for any free variables in the body of the lambda. swarmAn application of a constant to some value arguments, potentially waiting for more arguments. If a constant application is fully saturated (as defined by its ), whether it is a value or not depends on whether or not it represents a command (as defined by ). If a command (e.g.  ), it is a value, and awaits an G; frame which will cause it to execute. Otherwise (e.g. 5), it is not a value, and will immediately reduce. swarmA definition, which does not take effect until executed. The Bool/ indicates whether the definition is recursive. swarmThe result of a command, consisting of the result of the command as well as an environment of bindings from  commands. swarmAn unevaluated bind expression, waiting to be executed, of the form i.e. c1 ; c2 or  x <- c1; c2. We also store an  ' in which to interpret the commands. swarmA (non-recursive) delayed term, along with its environment. If a term would otherwise be evaluated but we don't want it to be (e.g.# as in the case of arguments to an 'if'-, or a recursive binding), we can stick a  on it, which turns it into a value. Delayed terms won't be evaluated until  is applied to them. swarm*A reference to a memory cell in the store. swarmA record value. swarmA keyboard input. swarmA  requirements command awaiting execution. swarm&Ensure that a value is not wrapped in  . swarmPretty-print a value. swarm Inject a value back into a term.  < BSD-3-Clause Safe-Inferred"*5689:;<=?Q swarm  governs values that can be parsed from a YAML (or JSON) file, but which also have access to an extra, read-only environment value.For things that don't care about the environment, the default implementation of   simply calls  from a  instance. swarmA   is a YAML 5 that can also depend on knowing an value of type e. The E used to stand for  EntityMap?, but now that it is generalized, it stands for Environment. swarmA generic wrapper for computations which also depend on knowing a value of type e. swarmLift a computation that does not care about the environment value. swarmLocally modify an environment. swarmLocally merge an environment with the current one for given action. swarmGet the current environment. swarmRead a value from a YAML file, providing the needed extra environment. swarm A variant of  for  : project out a field of an &, passing along the extra environment. swarm A variant of  for  ): project out an optional field of an &, passing along the extra environment. swarm A variant of  for any functor. swarm  name f value applies f to the  when value is a String and fails otherwise. swarm  name f value applies f to the  when value is an  and fails otherwise. swarm  name f value applies f to the  when value is an  and fails otherwise.  = BSD-3-Clause Safe-Inferred"*5689:;=swarm8A record explaining how to display an entity in the TUI.swarmAn internal attribute name.swarmDisplay priority. Entities with higher priority will be drawn on top of entities with lower priority.swarmThe display caches the current orientation of the entity, so we know which character to use from the orientation map.swarm)The default character to use for display.swarm!The attribute to use for display.swarmThis entity's display priority. Higher priorities are drawn on top of lower.swarm*Whether the entity is currently invisible.swarmFor robots or other entities that have an orientation, this map optionally associates different display characters with different orientations. If an orientation is not in the map, the  will be used.swarm8Look up the character that should be used for a display.swarmModify a display to use a ?3 character for entities that are hidden/unknown.swarmThe default way to display some terrain using the given character and attribute, with priority 0.swarmConstruct a default display for an entity that uses only a single display character, the default entity attribute, and priority 1.swarmConstruct a default robot display for a given orientation, with display characters "X^>v<"2, the default robot attribute, and priority 10.Note that the  is used for direction DDown1 and is overridden for the special base robot.> BSD-3-Clause Safe-Inferred"*5689:;=uswarm=A mapping from the defined attribute names to TUI attributes.swarm Colors of entities in the world.>Also used to color messages, so water is special and excluded.swarmThe default robot attribute.swarm3Some defined attribute names used in the Swarm TUI.swarm3Some defined attribute names used in the Swarm TUI.swarm3Some defined attribute names used in the Swarm TUI.swarm3Some defined attribute names used in the Swarm TUI.swarm3Some defined attribute names used in the Swarm TUI.swarm3Some defined attribute names used in the Swarm TUI.swarm3Some defined attribute names used in the Swarm TUI.swarmSome basic colors used in TUI.swarmSome basic colors used in TUI.swarmSome basic colors used in TUI.swarmSome basic colors used in TUI.swarmSome basic colors used in TUI.swarmSome basic colors used in TUI.swarmSome basic colors used in TUI.? BSD-3-Clause Safe-Inferred*5689:;=@@ BSD-3-Clause Safe-Inferred"*5689:;=mswarmThe different possible types of terrain. Unlike entities and robots, these are hard-coded into the game.swarmA map containing a  record for each different .  A BSD-3-Clause Safe-Inferred"*5689:;=swarmAn inventory is really just a bag/multiset of entities. That is, it contains some entities, along with the number of times each occurs. Entities can be looked up directly, or by name.swarm*A convenient synonym to remind us when an  is supposed to represent how many of something we have.swarmAn  is a data structure containing all the loaded entities, allowing them to be looked up either by name or by what capabilities they provide (if any).swarm-A record to hold information about an entity.The constructor for  is intentionally not exported. To construct one manually, use the  function.>There are two main constraints on the way entities are stored: We want to be able to easily modify an entity in one particular cell of the world (for example, painting one tree red).In an inventory, we want to store identical entities only once, along with a count.We could get (2) nicely by storing only names of entities, and having a global lookup table from names to entity records. However, storing names instead of actual entity records in the world makes (1) more complex: every time we modify an entity we would have to generate a fresh name for the modified entity and add it to the global entity table. This approach is also annoying because it means we can't just uses lenses to drill down into the properties of an entity in the world or in an inventory, but have to do an intermediate lookup in the global (mutable!) entity table.On the other hand, if we just store entity records everywhere, checking them for equality becomes expensive. Having an inventory be a map with entities themselves as keys sounds awful.)The solution we adopt here is that every Entity record carries along a hash value of all the other fields. We just assume that these hashes are unique (a collision is of course possible but extremely unlikely). Entities can be efficiently compared just by looking at their hashes; they can be stored in a map using hash values as keys; and we provide lenses which automatically recompute the hash value when modifying a field of an entity record. Note also that world storage is still efficient, too: thanks to referential transparency, in practice most of the entities stored in the world that are the same will literally just be stored as pointers to the same shared record.swarm+A hash value computed from the other fieldsswarm9The way this entity should be displayed on the world map.swarmThe name of the entity, used e.g. in an inventory display.swarmThe plural of the entity name, in case it is irregular. If this field is Nothing8, default pluralization heuristics will be used (see ).swarm A longer-form description. Each  value is one paragraph.swarmThe entity's orientation (if it has one). For example, when a robot moves, it moves in the direction of its orientation.swarm,If this entity grows, how long does it take?swarmThe name of a different entity obtained when this entity is grabbed.swarmProperties of the entity.swarm%Capabilities provided by this entity.swarm0Inventory of other entities held by this entity.swarmHow long an entity takes to regrow. This represents the minimum and maximum amount of time taken by one growth stage (there are two stages). The actual time for each stage will be chosen uniformly at random between these two values.swarmVarious properties that an entity can have, which affect how robots can interact with it.swarm5Robots can't move onto a cell containing this entity.swarmRobots can pick this up (via  or ).swarm4Obstructs the view of robots that attempt to "scout"swarm*Regrows from a seed after it is harvested.swarm1Regenerates infinitely when grabbed or harvested.swarm1Robots drown if they walk on this without a boat.swarmRobots automatically know what this is without having to scan it.swarm!Recompute an entity's hash value.swarmCreate an entity with no orientation, an empty inventory, providing no capabilities (automatically filling in the hash value).swarm#Find an entity with the given name.swarmFind all entities which are devices that provide the given capability.swarm Build an  from a list of entities. The idea is that this will be called once at startup, when loading the entities from a file; see .swarm&Load entities from a data file called  entities.yaml, producing either an  or a parse error.swarm>Make a lens for Entity that recomputes the hash after setting.swarmGet the hash of an entity. Note that this is a getter, not a lens; the Swarm.Game.Entity module carefully maintains some internal invariants ensuring that hashes work properly, and by golly, no one else is going to mess that up.swarmThe 9 explaining how to draw this entity in the world display.swarmThe name of the entity.swarmThe irregular plural version of the entity's name, if there is one.swarmGet a version of the entity's name appropriate to the number---the singular name for 1, and a plural name for any other number. The plural name is obtained either by looking it up if irregular, or by applying standard heuristics otherwise.swarm5A longer, free-form description of the entity. Each ! value represents a paragraph.swarm4The direction this entity is facing (if it has one).swarm2How long this entity takes to grow, if it regrows.swarmThe name of a different entity yielded when this entity is grabbed, if any.swarm&The properties enjoyed by this entity.swarm.Test whether an entity has a certain property.swarm4The capabilities this entity provides when equipped.swarm7The inventory of other entities carried by this entity.swarmLook up an entity in an inventory, returning the number of copies contained.swarmLook up an entity by name in an inventory, returning a list of matching entities. Note, if this returns some entities, it does *not* mean we necessarily have any in our inventory! It just means we *know about* them. If you want to know whether you have any, use  and see whether the resulting  is positive, or just use  in the first place.swarmLook up an entity by name and see how many there are in the inventory. If there are multiple entities with the same name, it just picks the first one returned from .swarmThe empty inventory.swarm*Create an inventory containing one entity.swarmInsert an entity into an inventory. If the inventory already contains this entity, then only its count will be incremented.swarm,Create an inventory from a list of entities.swarm=Create an inventory from a list of entities and their counts.swarmInsert a certain number of copies of an entity into an inventory. If the inventory already contains this entity, then only its count will be incremented.swarmCheck whether an inventory contains at least one of a given entity.swarmCheck whether an inventory has an entry for entity (used by robots).swarmCheck if the first inventory is a subset of the second. Note that entities with a count of 0 are ignored.swarmCheck whether an inventory is empty, meaning that it contains 0 total entities (although it may still  know about some entities, that is, have them as keys with a count of 0).swarmCompute the set of capabilities provided by the devices in an inventory.swarm;List elements that have at least one copy in the inventory.swarmList elements that possess a given Capability and exist with nonzero count in the inventory.swarm/Groups entities by the capabilities they offer.swarm;Delete a single copy of a certain entity from an inventory.swarmDelete a specified number of copies of an entity from an inventory.swarm8Delete all copies of a certain entity from an inventory.swarm=Get the entities in an inventory and their associated counts.swarmUnion two inventories.swarm-Subtract the second inventory from the first.swarm0Inventories are compared by hash for efficiency.swarm-Entities are compared by hash for efficiency.swarm-Entities are compared by hash for efficiency.swarmThe Hashable instance for Entity ignores the cached hash value and simply combines the other fields.swarmIf we have access to an !, we can parse the name of an ' as a string and look it up in the map.swarmDisplayswarm Entity nameswarmEntity descriptionswarm Propertiesswarm Capabilities::B BSD-3-Clause Safe-Inferred"*5689:;=swarmAll non-alphabetic sort criteria perform alphabetic tie-breaking. "Reverse ordering" only applies to the *primary* sort criteria; the secondary alphabetic sort is always in ascending order.C BSD-3-Clause Safe-Inferred*5689:;=?swarm#Update world in an inspectable way.This type is used for changes by e.g. the drill command at later tick. Using ADT allows us to serialize and inspect the updates.swarmA  consists of a  that specifies the initial world, a cache of loaded square tiles to make lookups faster, and a map storing locations whose entities have changed from their initial values.Right now the  simply holds on to all the tiles it has ever loaded. Ideally it would use some kind of LRU caching scheme to keep memory usage bounded, but it would be a bit tricky, and in any case it's probably not going to matter much for a while. Once tile loads can trigger robots to spawn, it would also make for some difficult decisions in terms of how to handle respawning.swarmAn entity tile is an array of possible entity values. Note it cannot be an unboxed array since entities are complex records which have to be boxed.swarm5A terrain tile is an unboxed array of terrain values.swarmA  represents an offset from the upper-left corner of some tile to a cell in its interior.swarm&If we think of the world as a grid of tiles, we can assign each tile some coordinates in the same way we would if each tile was a single cell. These are the tile coordinates.swarmA  WorldFun t e, represents a 2D world with terrain of type t. (exactly one per cell) and entities of type e (at most one per cell).swarm?Create a world function from a finite array of specified cells.swarmThe number of bits we need in each coordinate to represent all the locations in a tile. In other words, each tile has a size of 2^tileBits x 2^tileBits. Currently,  is set to 6, giving us 64x64 tiles, with 4096 cells in each tile. That seems intuitively like a good size, but I don't have a good sense for the tradeoffs here, and I don't know how much the choice of tile size matters.swarmThe number consisting of  many 1 bits. We can use this to mask out the tile offset of a coordinate.swarmConvert from a cell's coordinates to the coordinates of its tile, simply by shifting out  many bits.swarm8Find the coordinates of the upper-left corner of a tile.swarmThe offsets of the upper-left and lower-right corners of a tile: (0,0) to (, ).swarm9Compute the offset of a given coordinate within its tile.swarmAdd a tile offset to the coordinates of the tile's upper left corner. NOTE that for efficiency, this function only works when the first argument is in fact the coordinates of a tile's upper-left corner (i.e. it is an output of ). In that case the coordinates will end with all 0 bits, and we can add the tile offset just by doing a coordinatewise .swarm Create a new  from a .swarmLook up the terrain value at certain coordinates: try looking it up in the tile cache first, and fall back to running the  otherwise.This function does not ensure that the tile containing the given coordinates is loaded. For that, see .swarmA stateful variant of , which first loads the tile containing the given coordinates if it is not already loaded, then looks up the terrain value.swarmLook up the entity at certain coordinates: first, see if it is in the map of locations with changed entities; then try looking it up in the tile cache first; and finally fall back to running the .This function does not ensure that the tile containing the given coordinates is loaded. For that, see .swarmA stateful variant of , which first loads the tile containing the given coordinates if it is not already loaded, then looks up the terrain value.swarmUpdate the entity (or absence thereof) at a certain location, returning an updated  and a Boolean indicating whether the update changed the entity here. See also .swarmA stateful variant of , which also ensures the tile containing the given coordinates is loaded.swarm)Load the tile containing a specific cell.swarmLoad all the tiles which overlap the given rectangular region (specified as an upper-left and lower-right corner, inclusive).D Safe-Inferred*5689:;=?swarm>This datatype is a lightweight stand-in for the full-fledged Entity type without the baggage of all of its other fields. It contains the bare minimum display information for rendering.E BSD-3-Clause Safe-Inferred"*5689:;=swarmA recipe is just a list of input entities and a list of output entities (both with multiplicity). The idea is that it represents some kind of process where the inputs are transformed into the outputs.swarmAn ingredient list is a list of entities with multiplicity. It is polymorphic in the entity type so that we can use either entity names when serializing, or actual entity objects while the game is running.swarmThe inputs to a recipe.swarmThe outputs from a recipe.swarmOther entities which the recipe requires you to have, but which are not consumed by the recipe (e.g. a furnace).swarm%The time required to finish a recipe.swarmHow this recipe is weighted against other recipes. Any time there are multiple valid recipes that fit certain criteria, one of the recipes will be randomly chosen with probability proportional to its weight.swarm Given an $, turn a list of recipes containing names9 of entities into a list of recipes containing actual  records; or.swarmGiven an already loaded 6, try to load a list of recipes from the data file  recipes.yaml.swarm3Build a map of recipes either by inputs or outputs.swarm5Build a map of recipes indexed by output ingredients.swarm4Build a map of recipes indexed by input ingredients.swarm/Build a map of recipes indexed by requirements.swarmGet a list of all the recipes for the given entity. Look up an entity in either an  or  depending on whether you want to know recipes that consume or produce the given entity, respectively.swarmFigure out which ingredients (if any) are lacking from an inventory to be able to carry out the recipe. Requirements are not consumed and so can use equipped.swarmFigure out if a recipe is available, but it can be lacking items.swarmTry to make a recipe, deleting the recipe's inputs from the inventory. Return either a description of which items are lacking, if the inventory does not contain sufficient inputs, or an inventory without inputs and function adding outputs if it was successful.swarm/Try to make a recipe, but do not insert it yet.F BSD-3-Clause Safe-Inferred"*5689:;=" swarm.)A  saves the original  and   that are being evaluated; if Ctrl-C is used to cancel a computation while we are in the middle of evaluating a cell, the  can be reset to .swarm0Once evaluation is complete, we cache the final   in the , so that subsequent lookups can just use it without recomputing anything.swarm3 represents a store, indexing integer locations to s.swarm)A continuation is just a stack of frames.swarmA frame is a single component of a continuation stack, explaining what to do next after we finish evaluating the currently focused term.swarmWe were evaluating the first component of a pair; next, we should evaluate the second component which was saved in this frame (and push a 1 frame on the stack to save the first component).swarmWe were evaluating the second component of a pair; when done, we should combine it with the value of the first component saved in this frame to construct a fully evaluated pair.swarmFArg t e says that we were evaluating the left-hand side of an application, so the next thing we should do is evaluate the term t (the right-hand side, i.e.. argument of the application) in environment e. We will also push an  frame on the stack.swarmFApp v says that we were evaluating the right-hand side of an application; once we are done, we should pass the resulting value as an argument to v.swarm FLet x t2 e% says that we were evaluating a term t1 in an expression of the form let x = t1 in t21, that is, we were evaluating the definition of x+; the next thing we should do is evaluate t2 in the environment e extended with a binding for x.swarmWe are executing inside a  block. If an exception is raised, we will execute the stored term (the "catch" block).swarmWe were executing a command; next we should take any environment it returned and union it with this one to produce the result of a bind expression.swarmWe were executing a command that might have definitions; next we should take the resulting   and add it to the robot's K&, along with adding this accompanying S and  to the robot's K.swarmWe were executing a definition; next we should take the resulting value and return a context binding the variable to the value.swarmAn FExec frame means the focused value is a command, which we should now execute.swarmWe are in the process of executing the first component of a bind; once done, we should also execute the second component in the given environment (extended by binding the variable, if there is one, to the output of the first command).swarmDiscard any environment generated as the result of executing a command.swarm6Apply specific updates to the world and current robot.The : is used to track the original command for error messages.swarmUpdate the memory cell at a certain location with the computed value.swarm3Signal that we are done with an atomic computation.swarmWe are in the middle of running a computation for all the nearby robots. We have the function to run, and the list of robot IDs to run it on.swarmWe are in the middle of evaluating a record: some fields have already been evaluated; we are focusing on evaluating one field; and some fields have yet to be evaluated.swarmWe are in the middle of evaluating a record field projection.(:*:)swarmAllocate a new memory cell containing an unevaluated expression with the current environment. Return the index of the allocated cell.swarm"Look up the cell at a given index.swarmSet the cell at a given index.swarmIs the CESK machine in a final (finished) state? If so, extract the final value and store.swarmInitialize a machine state with a starting term along with its type; the term will be executed or just evaluated depending on whether it has a command type or not.swarmLike 2, but also take an explicit starting continuation.swarm)Cancel the currently running computation.swarm Reset any  s in the . We need to use this any time a running computation is interrupted, either by an exception or by a Ctrl+C.swarmTake a continuation, and the pretty-printed expression which is the focus of the continuation (i.e. the expression whose value will be given to the continuation) along with its top-level precedence, and pretty-print the whole thing.As much as possible, we try to print to look like an *expression* with a currently focused part, that is, we print the continuation from the inside out instead of as a list of frames. This makes it much more intuitive to read.swarmPretty-print a single continuation frame, given its already pretty-printed focus. In particular, given a frame and its "inside" (i.e. the expression or other frames being focused on, whose value will eventually be passed to this frame), with the precedence of the inside's top-level construct, return a pretty-printed version of the entire frame along with its top-level precedence.swarmPretty-print a special "prefix application" frame, i.e. a frame formatted like X inner. Unlike typical applications, these associate to the *right*, so that we can print something like X Y Z inner with no parens.44H Safe-Inferred*5689:;=Eswarm(Time elapsed until winning the scenario.swarm)Ticks elapsed until winning the scenario.swarmSize of the user's program.I Safe-Inferred"*5689:;=Haswarm7Time when the scenario was started including time zone.swarm9The best code size of the scenario, measured in AST size.swarmThe best code size of the scenario, measured in character count.swarm8The best status of the scenario, measured in game ticks.swarm=The best status of the scenario, measured in real world time.swarmUses the start time of the play-attempt to de-dupe records that are from the same game. The start time should be sufficient to uniquely identify a game.J BSD-3-Clause Safe-Inferred*5689:;=K swarmAn entry in a robot's log.swarmThe time at which the entry was created. Note that this is the first field we sort on.swarm(Whether this log records a said message.swarm/The name of the robot that generated the entry.swarm-The ID of the robot that generated the entry.swarm,Location of the robot at log entry creation.swarmThe text of the log entry.swarmSource of the robot log.swarmLog produced by swarmLog produced by swarm'Log produced by an exception or system.swarmSeverity of the error - critical errors are bugs and should be reported as Issues.K BSD-3-Clause Safe-Inferred#"(*15689:;=n0swarmA record that stores the information for all definitions stored in a swarm$Map definition names to their types.swarmMap definition names to the capabilities required to evaluate/execute them.swarmMap definition names to their values. Note that since definitions are delayed, the values will just consist of  s pointing into the store.swarmA store containing memory cells allocated to hold definitions.swarmA value of type ? is a record representing the state of a single robot. The f parameter is for tracking whether or not the robot has been assigned a unique ID.swarmA cached view of the capabilities this robot has. Automatically generated from .swarm:Robot templates have no ID; concrete robots definitely do.swarmWith a robot template, we may or may not have a location. With a concrete robot we must have a location.swarm(The phase of a robot description record.swarmThe robot record has just been read in from a scenario description; it represents a template that may later be instantiated as one or more concrete robots.swarm:The robot record represents a concrete robot in the world.swarm A unique identifier for a robot.swarmA concrete robot, with a unique ID number and a specific location.swarmA template robot, i.e. a template robot record without a unique ID number, and possibly without a location.swarm&The robot's current CEK machine state.swarmThe robot's context.swarmThe creation date of the robot.swarmRobots are not entities, but they have almost all the characteristics of one (or perhaps we could think of robots as very special sorts of entities), so for convenience each robot carries an  record to store all the information it has in common with any .Note there are various lenses provided for convenience that directly reference fields inside this record; for example, one can use  instead of writing  . .swarm?Is this robot extra heavy (thus requiring tank treads to move)?swarmThe (unique) ID number of the robot. This is only a Getter since the robot ID is immutable.swarmThe robot's current location, represented as (x,y). This is only a getter, since when changing a robot's location we must remember to update the robotsByLocation" map as well. You can use the updateRobotLocation function for this purpose.swarmHas the 3 been updated since the last time it was viewed?swarmThe ID number of the robot's parent, that is, the robot that built (or most recently reprogrammed) this robot, if there is one.swarm/Is the robot currently running an atomic block?swarm&Does this robot wish to self destruct?swarmIs this robot a "system robot"? System robots are generated by the system (as opposed to created by the user) and are not subject to the usual capability restrictions.swarm The need for  is a bit technical, and I hope I can eventually find a different, better way to accomplish it. Ideally, we would want each robot to execute a single command at every game tick, so that e.g. two robots executing move;move;move and  repeat 3 move$ (given a suitable definition of repeat) will move in lockstep. However, the second robot actually has to do more computation than the first (it has to look up the definition of repeat, reduce its application to the number 3, etc.), so its CESK machine will take more steps. It won't do to simply let each robot run until executing a command---because robot programs can involve arbitrary recursion, it is very easy to write a program that evaluates forever without ever executing a command, which in this scenario would completely freeze the UI. (It also wouldn't help to ensure all programs are terminating---it would still be possible to effectively do the same thing by making a program that takes a very, very long time to terminate.) So instead, we allocate each robot a certain maximum number of computation steps per tick (defined in f), and it suspends computation when it either executes a command or reaches the maximum number of steps, whichever comes first.It seems like this really isn't something the robot should be keeping track of itself, but that seemed the most technically convenient way to do it at the time. The robot needs some way to signal when it has executed a command, which it currently does by setting tickSteps to zero. However, that has the disadvantage that when tickSteps becomes zero, we can't tell whether that happened because the robot ran out of steps, or because it executed a command and set it to zero manually.Perhaps instead, each robot should keep a counter saying how many commands it has executed. The loop stepping the robot can tell when the counter increments.swarmThe name of a robot.swarmThe name of a robot template.swarmThe  of a robot. This is a special lens that automatically sets the 8 to the orientation of the robot every time you do a get operation. Technically this does not satisfy the lens laws---in particular, the get/put law does not hold. But we should think of the  as being simply a cache of the displayed entity's direction.swarmSet a robot's location. This is unsafe and should never be called directly except by the updateRobotLocation: function. The reason is that we need to make sure the robotsByLocation map stays in sync.swarm%A template robot's location. Unlike , this is a lens, since when dealing with robot templates there is as yet no robotsByLocation map to keep up-to-date.swarm(Which way the robot is currently facing.swarmThe robot's inventory.swarmThe robot's context.swarmInstantiate a robot template to make it into a concrete robot, by providing a robot ID. Concrete robots also require a location; if the robot template didn't have a location already, just set the location to (0,0) by default. If you want a different location, set it via  before calling .swarmA separate inventory for equipped devices, which provide the robot with certain capabilities.Note that every time the inventory of equipped devices is modified, this lens recomputes a cached set of the capabilities the equipped devices provide, to speed up subsequent lookups to see whether the robot has a certain capability (see )swarmThe robot's own private message log, most recent message last. Messages can be added both by explicit use of the Log6 command, and by uncaught exceptions. Stored as a  Data.Sequence so that we can efficiently add to the end and also process from beginning to end. Note that updating via this lens will also set the .swarmA hash of a robot's entity record and equipped devices, to facilitate quickly deciding whether we need to redraw the robot info panel.swarm+Does a robot know of an entity's existence?swarmGet the set of capabilities this robot possesses. This is only a getter, not a lens, because it is automatically generated from the . The only way to change a robot's capabilities is to modify its .swarm'A general function for creating robots.swarm5Is the robot actively in the middle of a computation?swarmActive) robots include robots that are waiting;  is true if the robot actually wants to take another step right now (this is a subset of active robots).swarm2The time until which the robot is waiting, if any.swarm#, etc.) as well as combinators (S, I, C, K, B, ) we will use both for elaboration and later as a compilation target.swarmA variable valid in one context is also valid in another extended context with additional variables.swarmA term valid in one context is also valid in another extended context with additional variables (which the term does not use).swarm$Check that a particular type has an  instance, and run a computation in a context provided with an  constraint. The other checkX functions are similar.swarmLook up a variable name in the context, returning a type-indexed de Bruijn index.swarmCheck that a term has a given type, and if so, return a corresponding elaborated and type-indexed term. Note that this also deals with subtyping: for example, if we check that the term 3 has type  World Int/, we will get back a suitably lifted value (i.e. const 3).swarmGet the underlying base type of a term which either has a base type or a World type.swarmApply one term to another term, automatically handling promotion and lifting, via the fact that World is Applicative. That is, (1) if a term of type T is used where a term of type World T is expected, it will automatically be promoted (by an application of const); (2) if a function of type (T1 -> T2 -> ... -> Tn) is applied to any arguments of type (World Ti), the function will be lifted to (World T1 -> World T2 -> ... -> World Tn).swarmInfer the type of an operator: turn a raw operator into a type-indexed constant. However, some operators are polymorphic, so we also provide a list of type arguments. For example, the type of the negation operator can be either (Int -> Int) or (Float -> Float) so we provide it as an argument.Currently, all operators take at most one type argument, so (Maybe SomeTy) might seem more appropriate than [SomeTy], but that is just a coincidence; in general one can easily imagine operators that are polymorphic in more than one type variable, and we may wish to add such in the future.swarmGiven a raw operator and the terms the operator is applied to, select which types should be supplied as the type arguments to the operator. For example, for an operator like + we can just select the type of its first argument; for an operator like if;, we must select the type of its second argument, since if : Bool -> a -> a -> a. In all cases we must also select the underlying base type in case the argument has a World type. For example if +# is applied to an argument of type  World Int we still want to give + the type Int -> Int -> Int$. It can be lifted to have type #World Int -> World Int -> World Int but that will be taken care of by application, which will insert the right combinators to do the lifting.swarmTypecheck the application of an operator to some terms, returning a typed, elaborated version of the application.swarm6Infer the type of a term, and elaborate along the way.swarmTry to resolve a ---containing only : names for terrain, entities, and robots---into a real < with references to actual terrain, entities, and robots.swarmTry to resolve one cell item name into an actual item (terrain, entity, robot, etc.).swarmInfer the type of a let expression, and elaborate into a series of lambda applications.swarmInfer the type of an overlay. expression, and elaborate into a chain of <> (over) operations.swarmTesting base type representations for equality to yield reflected type-level equalities.swarmTesting type representations for equality to yield reflected type-level equalities.01111N BSD-3-Clause Safe-Inferred)*125689:;=gswarmThese explicitly open terms are an intermediate stage in the bracket abstraction algorithm, i.e. they represent terms which have been only partially abstracted.swarmClosed, fully abstracted terms. All computation is represented by combinators. This is the ultimate target for the bracket abstraction operation.swarm!Bracket abstraction: convert the  to an #, then project out the embedded &. GHC can see this is total since - is the only constructor that can produce an  with an empty environment.swarm Type-preserving conversion from  to  ( + the * instance). Taken directly from Kiselyov.  O BSD-3-Clause Safe-Inferred"(*5689:;=swarmSkip spaces and comments.swarmIn general, we follow the convention that every token parser assumes no leading whitespace and consumes all trailing whitespace. Concretely, we achieve this by wrapping every token parser using .swarm(A lexeme consisting of a literal string.swarm!A positive integer literal token.swarmParse a case-insensitive reserved word, making sure it is not a prefix of a longer variable name, and allowing the parser to backtrack if it fails.swarmParse an identifier, i.e. any non-reserved string containing alphanumeric characters and underscores and not starting with a number.P BSD-3-Clause Safe-Inferred*15689:;=swarmLoad and typecheck all world descriptions from `worlds/*.world`. Emit a warning for each one which fails to parse or typecheck.swarmLoad a file containing a world DSL term, throwing an exception if it fails to parse or typecheck.swarm!Strip a leading directory from a .Q BSD-3-Clause Safe-Inferred")*5689:;=swarmExtract a list of all entities mentioned in a given world DSL term.swarm$Offset a world by a multiple of the skip8 in such a way that it satisfies the given predicate.swarmOffset the world so the base starts in a 32x32 patch containing at least one of each of a list of required entities.swarmOffset the world so the base starts on empty spot next to tree and grass.swarmOffset the world so the base starts in a good patch (near necessary items), next to a tree.R BSD-3-Clause Safe-Inferred)*5689:;=Uswarm4Interpret an abstracted term into the host language.swarm,Interpret a constant into the host language.swarmInterprect a reflection.swarmInterpret a rotation.S BSD-3-Clause Safe-Inferred*15689:;=swarm=Run a typechecked world description DSL term to produce a .swarm+Simple adapter function to convert a plain Coords -> CellVal function into a  value.T BSD-3-Clause Safe-Inferred ()*15689:;=-swarm1Interpret a compiled term into the host language.U Safe-Inferred*5689:;=swarmConversion from native Haskell types to their swarm-lang equivalents, useful for implementing swarm  =https://github.com/swarm-game/swarm/wiki/Commands-Cheat-Sheetcommands in Haskell.V BSD-3-Clause Safe-Inferred"*5689:;=?swarmA map from names to robots, used to look up robots in scenario descriptions.swarmA robot template paired with its definition's index within the Scenario fileswarm Create a  from a list of robot templates.swarmLook up a thing by name, throwing a parse error if it is not found.swarm Look up an entity by name in an /, throwing a parse error if it is not found.swarmLook up a robot by name in a /, throwing a parse error if it is not found.W BSD-3-Clause Safe-Inferred"*5689:;=?swarmStateless cells used for the World Editor. These cells contain the bare minimum display information for rendering.swarm,Supplements a cell with waypoint informationswarmA single cell in a world map, which contains a terrain value, and optionally an entity and robot.swarmA single cell in a world map, which contains a terrain value, and optionally an entity and robot. It is parameterized on the Entity type to facilitate less stateful versions of the Entity type in rendering scenario data.swarm(Re-usable serialization for variants of PCellswarmParse a tuple such as [grass, rock, base] into a . The entity and robot, if present, are immediately looked up and converted into  and TRobot: values. If they are not found, a parse error results.  X BSD-3-Clause Safe-Inferred"*5689:;=Sswarm#A world palette maps characters to  values.swarmWe want to identify all of the unique (terrain, entity facade) pairs. However,  EntityFacade includes a Display record, which contains more fields than desirable for use as a unique key. Therefore, we extract just the entity name for use in a (terrain, entity name) key, and couple it with the original (terrain, entity facade) pair in a Map.swarmAll alphanumeric characters. These are used as supplemental map placeholders in case a pre-existing display character is not available to re-use.swarmNote that display characters are not unique across different entities! However, the palette KeyMap as a conveyance serves to dedupe them.  Y Safe-Inferred"*5689:;=swarm?Upper-left and lower-right coordinates of the map to be saved.swarm1Stores the *world coords* of the upper-left clickswarmThis field has deferred initialization; it gets populated when a game is initialized.%%Z BSD-3-Clause Safe-Inferred"*5689:;=swarmstructure definitions from parents shall be accessible by childrenswarmearlier placements will be overlaid on top of later placements in the YAML fileswarmDestructively overlays one direct child structure upon the input structure. However, the child structure is assembled recursively.swarmOverlays all of the "child placements", such that the children encountered earlier in the YAML file supersede the later ones (due to use of "foldr" instead of "foldl").swarmPaint a world map using a 8, turning it from a raw string into a nested list of  values by looking up each character in the palette, failing if any character in the raw map is not contained in the palette.[ BSD-3-Clause Safe-Inferred"*15689:;=?Yswarm$A pared-down (stateless) version of WorldDescription3 just for the purpose of rendering a Scenario fileswarmA description of a world parsed from a YAML file. This type is parameterized to accommodate Cells that utilize a less stateful Entity type.  \ Safe-Inferred*5689:;=  ] BSD-3-Clause Safe-Inferred""%&*5689:;<=?WswarmA 8 contains all the information to describe a scenario.swarm*Custom attributes defined in the scenario.swarmThe author of the scenario.swarm3Whether the scenario should start in creative mode.swarm0A high-level description of the scenario, shown e.g. in the menu.swarm+Any custom entities used for this scenario.swarmList of entities that should be considered "known", so robots do not have to scan them.swarmThe name of the scenario.swarm!Waypoints and inter-world portalsswarm3A sequence of objectives for the scenario (if any).swarm)Any custom recipes used in this scenario.swarmThe starting robots for the scenario. Note this should include the base.swarm3The seed used for the random number generator. If Nothing6, use a random seed / prompt the user for the seed.swarmAn optional solution of the scenario, expressed as a program of type cmd a?. This is useful for automated testing of the win condition.swarmOptionally, specify the maximum number of steps each robot may take during a single tick.swarmThe version number of the scenario schema. Currently, this should always be 1, but it is ignored. In the future, this may be used to convert older formats to newer ones, or simply to print a nice error message when we can't read an older format.swarmThe subworlds of the scenario. The "root" subworld shall always be at the head of the list, by construction.swarmLoad a scenario with a given name from disk, given an entity map to use. This function is used if a specific scenario is requested on the command line.swarmLoad a scenario from a file.77^ BSD-3-Clause Safe-Inferred"(*5689:;=swarmGenerate a "skeleton" scenario with placeholders for certain required fields_ Safe-Inferred"*5689:;=swarmA  ScenarioInfo record stores metadata about a scenario: its canonical path and status. By way of the ScenarioStatus record, it stores the most recent status and best-ever status.swarmA ScenarioStatus stores the status of a scenario along with appropriate metadata:  NotStarted, or Played . The Played status has two sub-states:  Attempted or  Completed.swarmThese launch parameters are used in a number of ways: * Serializing the seed/script path for saves * Holding parse status from form fields, including Error info * Carrying fully-validated launch parameters.?Type parameters are utilized to support all of these use cases.swarm&The path of the scenario, relative to data/scenarios.swarmThe status of the scenario.swarmUpdate the current  ScenarioInfo record when quitting a game.Note that when comparing "best" times, shorter is not always better! As long as the scenario is not completed (e.g. some do not have win condition) we consider having fun _longer_ to be better.` BSD-3-Clause Safe-Inferred*5689:;=/ swarmA scenario collection is a tree of scenarios, keyed by name, together with an optional order. Invariant: every item in the scOrder exists as a key in the scMap.swarmA scenario item is either a specific scenario, or a collection of scenarios (*e.g.* the scenarios contained in a subdirectory).swarm%Retrieve the name of a scenario item.swarmAccess and modify ScenarioItems in collection based on their path.swarm?Canonicalize a scenario path, making it usable as a unique key.swarm:Convert a scenario collection to a list of scenario items.swarm9Load all the scenarios from the scenarios data directory.swarmThe name of the special file which indicates the order of scenarios in a folder.swarmRecursively load all scenarios from a particular directory, and also load the 00-ORDER file (if any) giving the order for the scenarios.swarm,How to transform scenario path to save path.swarm>Load saved info about played scenario from XDG data directory.swarm6Save info about played scenario to XDG data directory.swarmLoad a scenario item (either a scenario, or a subdirectory containing a collection of scenarios) from a particular path.  a BSD-3-Clause Safe-Inferred "%&(*5689:;=swarmThe  specifies how to determine the center of the world viewport.swarm4The view should be centered on an absolute position.swarm/The view should be centered on a certain robot.swarmThere is no winning condition.swarmNOTE: It is possible to continue to achieve "optional" objectives even after the game has been won (or deemed unwinnable).swarmThere are one or more objectives remaining that the player has not yet accomplished.swarmThe player has won. The boolean indicates whether they have already been congratulated.swarmThe player has completed certain "goals" that preclude (via negative prerequisites) the completion of all of the required goals. The boolean indicates whether they have already been informed.swarm8A data type to represent the current status of the REPL.swarmThe REPL is not doing anything actively at the moment. We persist the last value and its type though. INVARIANT: the Value stored here is not a VResult.swarm>A command entered at the REPL is currently being run. The q represents the type of the expression that was entered. The  Maybe Value starts out as Nothing and gets filled in with a result once the command completes.swarm oldRID JWorldTickJ JJJJJJJJJJJ swarmRun the robots from the beginning until the focused robot (noninclusive).swarm'Run a single step of the focused robot.swarmRun robots after the (previously) focused robot and finish the tick.swarmIncludes the SHA1 of the program text for the purpose of corroborating solutions on a leaderboard.swarmBy default, robots may make a maximum of 100 CESK machine steps during one game tick.swarm:Record to pass information needed to create an initial ! record when starting a scenario.swarmIn this stage in the UI pipeline, both fields have already been validated, and Nothing( means that the field is simply absent.swarmType for describing how far away a robot is from the base, which determines what kind of communication can take place.swarm Close; communication is perfect.swarm/Mid-range; communication is possible but lossy.swarm#Far; communication is not possible.swarm/The list of entities that have been discovered.swarmA queue of global announcements. Note that this is distinct from the "messageQueue", which is for messages emitted by robots./Note that we put the newest entry to the right.swarmThe list of available commands.swarmThe list of available recipes.swarmIs the user in creative mode (i.e. able to do anything without restriction)?swarm/The filepath of the currently running scenario.This is useful as an index to  scenarios collection, see .swarm6The catalog of all entities that the game knows about.swarm.Map of in-game achievements that were attainedswarmHow to step the game -  or  for debugging the  machine.swarm/A counter used to generate globally unique IDs.swarmCode that is run upon scenario start, before any REPL interaction.swarm4The currently installed input handler and hint text.swarmThe names of entities that should be considered "known", that is, robots know what they are without having to scan them.swarmLast time message queue has been viewed (used for notification).swarmA queue of global messages./Note that we put the newest entry to the right.swarmThe current state of the world (terrain and entities only; robots are stored in the ).  is used instead of  because we need to be able to store terrain values in unboxed tile arrays.swarm+Whether the world view needs to be redrawn.swarm,Pseudorandom generator initialized at start.swarm4All recipes the game knows about, indexed by inputs.swarm5All recipes the game knows about, indexed by outputs.swarmAll recipes the game knows about, indexed by requirement/catalyst.swarm%The index of the next it{index} valueswarmThe current status of the REPL.swarm?All the robots that currently exist in the game, indexed by ID.swarmThe maximum number of CESK machine steps a robot may take during a single tick.swarmThe names of all robots that currently exist in the game, indexed by location (which we need both for e.g. the Salvage command as well as for actually drawing the world). Unfortunately there is no good way to automatically keep this up to date, since we don't just want to completely rebuild it every time the  changes. Instead, we just make sure to update it every time the location of a robot changes, or a robot is created or destroyed. Fortunately, there are relatively few ways for these things to happen.swarm=Get a list of all the robots that are "watching" by location.swarm The current .swarmThe initial seed that was used for the random number generator, and world generation.swarm3The number of ticks elapsed since the game started.swarm,How to determine whether the player has won.swarmHow to win (if possible). This is useful for automated testing and to show help to cheaters (or testers).swarm Includes a  of named locations and an "Edge list" (graph) that maps portal entrances to exitsswarm:Whether the world map is supposed to be scrollable or not.swarm%Whether the game is currently paused.swarm6Get a list of all the robots at a particular location.swarmGet all the robots within a given Manhattan distance from a location.swarmThe base robot, if it exists.swarm8The names of the robots that are currently not sleeping.swarmThe names of the robots that are currently sleeping, indexed by wake up time. Note that this may not include all sleeping robots, particularly those that are only taking a short nap (e.g. wait 1).swarmRead-only list of words, for use in building random robot names.swarmRead-only list of words, for use in building random robot names.swarmThe current center of the world view. Note that this cannot be modified directly, since it is calculated automatically from the 0. To modify the view center, either set the  , or use .swarmThe current robot in focus. It is only a 5 because this value should be updated only when the  is specified to be a robot.0Technically it's the last robot ID specified by <, but that robot may not be alive anymore - to be safe use .swarmThe current rule for determining the center of the world view. It updates also, viewCenter and focusedRobotName to keep everything synchronize.swarm&Whether the repl is currently working.swarmEither the type of the command being executed, or of the last commandswarmGet the notification list of messages from the point of view of focused robot.swarmReconciles the possibilities of log messages being omnipresent and robots being in different worldsswarm?Given a current mapping from robot names to robots, apply a 8 to derive the location it refers to. The result is ? because the rule may refer to a robot which does not exist.swarmWe started playing directly from command line, no menu to showswarmStack of scenario item lists. INVARIANT: the currently selected menu item is ALWAYS the same as the scenario currently being played. See  /https://github.com/swarm-game/swarm/issues/1064 and  -https://github.com/swarm-game/swarm/pull/1065.swarmAn entry in the inventory list displayed in the info panel. We can either have an entity with a count in the robot's inventory, an entity equipped on the robot, or a labelled separator. The purpose of the separators is to show a clear distinction between the robot's  inventory and its equipped devices.swarmCreate a brick  of scenario items from a .swarmGiven a  and a  which is the canonical path to some folder or scenario, construct a 1 stack focused on the given item, if possible.::c BSD-3-Clause Safe-Inferred"*5689:;=/swarm6Use this to store error messages on individual fieldsswarm0UI elements to configure scenario launch optionsswarm0UI elements to configure scenario launch optionsd BSD-3-Clause Safe-Inferred"*5689:;=swarmCalled before any particular scenario is selected, so we supply some Nothings as defaults to the ValidatedLaunchParams.swarmIf the selected scenario has been launched with an initial script before, set the file browser to initially open that script's directory. Then set the launch dialog to be displayed.Note that the FileBrowser widget normally allows multiple selections ("marked" files). However, there do not exist any public "setters" set the marked files, so we have some workarounds: * When the user marks the first file, we immediately close the FileBrowser widget. * We re-instantiate the FileBrowser from scratch every time it is opened, so that it is not possible to mark more than one file. * The "marked file" is persisted outside of the FileBrowser state, and the "initial directory" is set upon instantiation from that external state.  e BSD-3-Clause Safe-Inferred "%&(*5689:;= )swarmThe main record holding the UI state. For access to the fields, see the lenses below.swarm:The amount of accumulated real time. Every time we get a Frame event, we accumulate the amount of real time that happened since the last frame, then attempt to take an appropriate number of ticks to "catch up", based on the target tick rate.See  1https://gafferongames.com/post/fix_your_timestep/ .swarmA counter used to track how many frames have been rendered since the last time we updated the ticks/frame statistics.swarmA counter used to track how many ticks have happened in the current frame, so we can stop when we get to the tick cap.swarmThe time of the last Frame event.swarm'The time of the last info widget updateswarmThe currently active Scenario description, useful for starting over.swarmA counter used to track how many ticks have happened since the last time we updated the ticks/frame statistics.swarm&Map of achievements that were attainedswarm Attribute mapswarmCheat mode, i.e. are we allowed to turn creative mode on and off?swarm When this is Just, it represents a popup box containing an error message that is shown on top of the rest of the UI.swarm!Computed frames per milli secondsswarmThe focus ring is the set of UI panels we can cycle among using the Tab key.swarmStatus of the scenario goal: whether there is one, and whether it has been displayed to the user initially.swarm8When running with --autoplay, suppress the goal dialogs.5For developement, the --cheat flag shows goals again.swarmHide robots on the world map.swarmThe hash value of the focused robot entity (so we can tell if its inventory changed) along with a list of the items in the focused robot's inventory.swarmInformation about the Git repository (not present in release).swarmThe  record.swarmThe  recordswarmThe  record.swarmGet the currently focused ' from the robot info panel (if any).swarmGet the currently focused entity from the robot info panel (if any). This is just like  but forgets the distinction between plain inventory items and equipped devices.swarmGiven the focused robot, populate the UI inventory list in the info panel with information about its inventory.swarmA default/empty  record.swarmExtract the scenario which would come next in the menu from the currently selected scenario (if any). Can return Nothing if either we are not in the  NewGameMenu<, or the current scenario is the last among its siblings.swarmContext for the REPL commands to execute in. Contains the base robot context plus the it variable that refer to the previously computed values. (Note that `it{n}` variables are set in the base robot context; we only set it here because it's so transient)     h BSD-3-Clause Safe-Inferred"*5689:;=Ci Safe-Inferred*5689:;=Eswarmtop left corner coordsswarmcurrent coordsswarmbottom right corner coordsswarmcurrent coordsswarm full boundsswarmcurrent coordsj BSD-3-Clause Safe-Inferred"%&*5689:;=L swarmInitialize the  from scratch.swarm;Add some system failures to the list of messages in the .swarmBased on the command line options, should we skip displaying the menu?swarm7Initialize the more persistent parts of the app state, i.e. the  and . This is split out into a separate function so that in the integration test suite we can call this once and reuse the resulting states for all tests.swarm Construct an  from an already-loaded  and  , given the  the app was started with.swarmLoad a Scenario and start playing the game.swarmRe-initialize the game from the stored reference to the current scenario.Note that "restarting" is intended only for "scenarios"; with some scenarios, it may be possible to get stuck so that it is either impossible or very annoying to win, so being offered an option to restart is more user-friendly.Since scenarios are stored as a Maybe in the UI state, we handle the Nothing case upstream so that the Scenario passed to this function definitely exists.swarmLoad a Scenario and start playing the game, with the possibility for the user to override the seed.swarm Modify the , appropriately when starting a new scenario.swarm?Modify the UI state appropriately when starting a new scenario.swarmCreate an initial app state for a specific scenario. Note that this function is used only for unit tests, integration tests, and benchmarks.In normal play, an 9 already exists and we simply need to update it using .swarmFor convenience, the  corresponding to the classic game with seed 0. This is used only for benchmarks and unit tests.  k Safe-Inferred*5689:;=M7l Safe-Inferred"*5689:;=Qswarm Render a display as a UI widget.swarm Render the  for a specific location.swarmGet the . for a specific location, by combining the s for the terrain, entity, and robots at the location, and taking into account "static" based on the distance to the robot being viewed.swarmGet the . for a specific location, by combining the 6s for the terrain, entity, and robots at the location.swarm>>>>>>>>>>>>>>>>>>>>>>>>>>>???@@@@@@@@@@@@@@@@@@@AAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMM MMMMMMMMMM MMMMMMMMMMMMMMMNNNNNNNNNNNNNNNOO OO OOOOOOOOOOOOOOOOOOOOOOOOOO OPPPQQQQQQRRRRSTTTTTTTTTTTTTTTUUUUUUUUUUUUUVVVVVVVVVVVVVWWWWWWWWWWWWWWWWWWWXXXXXXXXXXXXXXXYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZZZ[[[[[[[[[[[[[[[\\\\\\\\\\\]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]^^_____________ _________________________```````````````````aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccdddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffggggggggggghhhhhiiiiiiiijjjjjjjjjjjkllllllllllllllllmmmmmmmmmmmmmmmmnnnnnoooppppppqqqqqqqqqqqqqqrrrrrsssssssttttttttttttttttttttuuuuuuuuuuuuuuvvvvvvvvvvvvwwwwwwww www wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxxxxxxxxxxxxxxxxyyyyyzzzzzzzz$&&&&&&&&&&&&&&&&& (((((((((((((((((((//88888 AAAAAAAAAAAAAABCCCCCCCCCCCEEEFGGGKKKKKKKKSW````aaajjjttttttttttttttttttttuuuuuuuuuuuuuuuuuuvvvvvvwwwww swarm-0.4-ISnx5FXhZ2Y66vKOx5hQmESwarm.Game.LocationSwarm.TUI.Model!Control.Carrier.Accum.FixedStrictData.BoolExpr.SimplifySwarm.Constant#Swarm.Game.Scenario.Objective.LogicSwarm.Game.Scenario.StyleSwarm.Language.ContextSwarm.Language.TypesSwarm.Language.Typecheck.UnifySwarm.ReadableIORefSwarm.TUI.BorderSwarm.TUI.ListSwarm.TUI.Model.NameSwarm.TUI.Panel Swarm.UtilSwarm.Language.DirectionSwarm.Language.SyntaxSwarm.Language.ModuleSwarm.Language.ElaborateSwarm.Language.CapabilitySwarm.Language.RequirementSwarm.Language.Typed*Swarm.Game.Scenario.Scoring.GenericMetricsSwarm.Game.World.CoordsSwarm.Game.Universe#Swarm.Game.Scenario.Topography.Area(Swarm.Game.Scenario.Topography.Placement2Swarm.Game.Scenario.Topography.Navigation.Waypoint0Swarm.Game.Scenario.Topography.Navigation.Portal"Swarm.Game.Achievement.Definitions"Swarm.Game.Achievement.Description!Swarm.Game.Achievement.AttainmentSwarm.Util.ErasableSwarm.Util.LensSwarm.TUI.Model.ReplSwarm.Util.ParseSwarm.Language.ParseSwarm.Language.Parse.QQSwarm.Language.TypecheckSwarm.Language.PrettySwarm.Game.FailureSwarm.Util.EffectSwarm.Game.ResourceLoading"Swarm.Game.Achievement.PersistenceSwarm.Language.PipelineSwarm.Language.Text.MarkdownSwarm.Language.Pipeline.QQ$Swarm.Game.Scenario.Scoring.CodeSizeSwarm.Game.Scenario.Objective&Swarm.Game.Scenario.Objective.WinCheckSwarm.TUI.Model.Goal#Swarm.Game.Scenario.Objective.Graph(Swarm.Game.Scenario.Objective.ValidationSwarm.Language.LSP.VarUsageSwarm.Language.LSP.HoverSwarm.Language.LSPSwarm.Language.KeySwarm.Language.ValueSwarm.Util.YamlSwarm.Game.DisplaySwarm.TUI.AttrSwarm.TUI.View.CustomStylingSwarm.Game.TerrainSwarm.Game.EntitySwarm.TUI.Inventory.SortingSwarm.Game.World+Swarm.Game.Scenario.Topography.EntityFacadeSwarm.Game.RecipeSwarm.Game.ExceptionSwarm.Game.CESK+Swarm.Game.Scenario.Scoring.ConcreteMetrics Swarm.Game.Scenario.Scoring.BestSwarm.Game.LogSwarm.Game.RobotSwarm.Game.World.SyntaxSwarm.Game.World.TypecheckSwarm.Game.World.AbstractSwarm.Game.World.ParseSwarm.Game.World.LoadSwarm.Game.World.GenSwarm.Game.World.InterpretSwarm.Game.World.EvalSwarm.Game.World.CompileSwarm.Game.ValueSwarm.Game.Scenario.RobotLookup#Swarm.Game.Scenario.Topography.Cell+Swarm.Game.Scenario.Topography.WorldPaletteSwarm.TUI.Editor.Model(Swarm.Game.Scenario.Topography.Structure/Swarm.Game.Scenario.Topography.WorldDescriptionSwarm.TUI.Editor.JsonSwarm.Game.ScenarioSwarm.TUI.Editor.PaletteSwarm.Game.Scenario.StatusSwarm.Game.ScenarioInfoSwarm.Game.StateSwarm.TUI.Model.MenuSwarm.TUI.Launch.ModelSwarm.TUI.Launch.PrepSwarm.TUI.Model.UISwarm.Game.Step Swarm.VersionSwarm.TUI.View.AchievementSwarm.TUI.Editor.UtilSwarm.TUI.Model.StateUpdateSwarm.TUI.Editor.MaskingSwarm.TUI.View.CellDisplaySwarm.TUI.View.UtilSwarm.TUI.View.ObjectiveSwarm.TUI.Launch.ViewSwarm.TUI.Editor.ViewSwarm.TUI.Controller.UtilSwarm.TUI.Launch.ControllerSwarm.TUI.Editor.ControllerSwarm.TUI.ControllerSwarm.TUI.ViewSwarm.Doc.Pedagogy Swarm.Doc.Gen Swarm.Web Swarm.App Paths_swarmControl.Monad.Combinators.ExprPrefixSuffixInfixLInfixNInfixRVCApp Data.Set.LenssetOfTDef seedProgramFExecGrabHarvest Swarm.GameRobotrobotEnvrobotCtxSayLogevalStepsPerTicksafeTogglePause"linear-1.22-CweU3WfsHaKIdmCbKRR07d Linear.Affineorigin.-^.+^.-.DiffAffinePPointvty-5.38-LuyDwwaUPbsAolUGRFpMkVGraphics.Vty.Attributes.Color FullColor ColorMode240 ColorMode16 ColorMode8NoColor ColorModeAccumCrunAccum execAccum evalAccum$fAlgebra:+:AccumC$fMonadIOAccumC$fMonadFixAccumC$fMonadFailAccumC$fMonadPlusAccumC $fMonadAccumC$fAlternativeAccumC$fApplicativeAccumC$fFunctorAccumC$fMonadTransAccumC cannotBeTruereplace swarmRepoUrlwikiUrlwikiCheatSheet PrerequisiteAndOrNotIdObjectiveLabelprerequisiteOptions toBoolExpr$fFromJSONPrerequisite$fToJSONPrerequisite$fEqPrerequisite$fShowPrerequisite$fGenericPrerequisite$fFunctorPrerequisite$fFoldablePrerequisite CustomAttrnamefgbgstyleHexColor StyleFlagStandoutItalic Strikethrough Underline ReverseVideoBlinkDimBoldstyleFlagJsonOptions$fToJSONStyleFlag$fFromJSONStyleFlag$fToJSONCustomAttr$fEqCustomAttr$fShowCustomAttr$fGenericCustomAttr$fFromJSONCustomAttr $fEqHexColor$fShowHexColor$fGenericHexColor$fFromJSONHexColor$fToJSONHexColor $fEqStyleFlag$fOrdStyleFlag$fShowStyleFlag$fGenericStyleFlagCtxunCtxVarempty singletonlookupdeleteassocs addBindingunion withBinding withBindings $fAsEmptyCtx $fMonoidCtx$fSemigroupCtx$fEqCtx $fShowCtx $fFunctorCtx $fFoldableCtx$fTraversableCtx $fDataCtx $fGenericCtx $fFromJSONCtx $fToJSONCtxWithUUtoUfromU UPolytypePolytypePolyForallUCtxTCtxUTypeTypeTypeFTyBaseFTyVarFTyCmdFTyDelayFTySumFTyProdFTyFunFTyRcdFBaseTyBVoidBUnitBIntBTextBDirBBoolBActorBKeyPolyUnitUTyDelayUTyCmdUTyRcdUTyFunUTyProdUTySumUTyKeyUTyActorUTyBoolUTyDirUTyTextUTyIntUTyUnitUTyVoidUTyVarUTyBaseTyDelayTyCmdTyRcd:->::*::+:TyKeyTyActorTyBoolTyDirTyTextTyIntTyUnitTyVoidTyVarTyBasetyVarsucata mkVarName$fUnifiableMap $fIsStringFix$fIsStringUTerm$fWithUf $fWithUFix $fShowPoly$fEqPoly $fFunctorPoly$fFoldablePoly$fTraversablePoly $fDataPoly $fGenericPoly$fFromJSONPoly $fToJSONPoly $fShowTypeF $fEqTypeF$fFunctorTypeF$fFoldableTypeF$fTraversableTypeF$fGenericTypeF$fGeneric1TYPETypeF$fUnifiableTypeF $fDataTypeF$fFromJSONTypeF $fToJSONTypeF $fEqBaseTy $fOrdBaseTy $fShowBaseTy $fDataBaseTy$fGenericBaseTy$fFromJSONBaseTy$fToJSONBaseTy $fFromJSONFix $fToJSONFix $fGenericFix $fDataIntVar $fDataUTerm $fDataFix UnifyStatusApart MightUnifyEqual unifyCheck$fMonoidUnifyStatus$fSemigroupUnifyStatus$fEqUnifyStatus$fOrdUnifyStatus$fReadUnifyStatus$fShowUnifyStatus ReadableIORef mkReadonly readIORef BorderLabels HBorderLabels plainHBorder plainBorder centerLabel leftLabel rightLabel bottomLabels topLabelshBorderWithLabelsborderWithLabelshandleListEventWithSeparatorsNameFocusablePanelWorldEditorPanelControl REPLInput WorldCache WorldExtentWorldPositionIndicatorEntityPaintListEntityPaintListItem TerrainListTerrainListItem InventoryListInventoryListItemMenuListAchievementListScenarioConfigControl GoalWidgets ScenarioList InfoViewport ModalViewportButton CancelButtonKeepPlayingButtonStartOverButton QuitButton NextButton GoalWidgetObjectivesList GoalSummaryScenarioConfigPanelFocusableScriptSelector SeedSelectorStartGameButtonScenarioConfigPanelScenarioConfigFileSelectorScenarioConfigPanelControl REPLPanel WorldPanelWorldEditorPanel RobotPanel InfoPanelWorldEditorFocusable BrushSelectorEntitySelector AreaSelectorOutputPathSelector MapSaveButtonClearEntityButton$fEqName $fOrdName $fShowName $fReadName $fEqButton $fOrdButton $fShowButton $fReadButton$fBoundedButton $fEnumButton$fEqGoalWidget$fOrdGoalWidget$fShowGoalWidget$fReadGoalWidget$fBoundedGoalWidget$fEnumGoalWidget$fEqScenarioConfigPanel$fOrdScenarioConfigPanel$fShowScenarioConfigPanel$fReadScenarioConfigPanel $fEqScenarioConfigPanelFocusable!$fOrdScenarioConfigPanelFocusable"$fShowScenarioConfigPanelFocusable"$fReadScenarioConfigPanelFocusable%$fBoundedScenarioConfigPanelFocusable"$fEnumScenarioConfigPanelFocusable$fEqFocusablePanel$fOrdFocusablePanel$fShowFocusablePanel$fReadFocusablePanel$fBoundedFocusablePanel$fEnumFocusablePanel$fEqWorldEditorFocusable$fOrdWorldEditorFocusable$fShowWorldEditorFocusable$fReadWorldEditorFocusable$fBoundedWorldEditorFocusable$fEnumWorldEditorFocusablepanel $fNamedPaneln?sortPairmaxOnmaximum0 cycleEnum listEnumsindexWrapNonEmptyuniq binTuples histogramfindDupbothallEqual surfaceEmpty applyWhen readFileMay readFileMayTacquireAllWithExt isIdentChar replaceLastfailTshowTshowLowTreflow indefinite indefiniteQsingularSubjectVerbpluralnumbersquotequotebquoteparensbrackets commaListholdsOrisJustOr isRightOr isSuccessOrliftText<+=<%=%%=<<.=<>= _NonEmptyremoveSupersetssmallHittingSet$fToJSONTimeSpec$fFromJSONTimeSpec Direction DAbsolute DRelativePlanarRelativeDirDForwardDLeftDBackDRight RelativeDirDPlanarDDown AbsoluteDirDEastDNorthDWestDSouthdirectionSyntax isCardinalallDirs$fFromJSONKeyAbsoluteDir$fToJSONKeyAbsoluteDir$fToJSONAbsoluteDir$fFromJSONAbsoluteDir$fToJSONPlanarRelativeDir$fFromJSONPlanarRelativeDir $fEqDirection$fOrdDirection$fShowDirection$fReadDirection$fGenericDirection$fDataDirection$fHashableDirection$fToJSONDirection$fFromJSONDirection$fEqRelativeDir$fOrdRelativeDir$fShowRelativeDir$fReadRelativeDir$fGenericRelativeDir$fDataRelativeDir$fHashableRelativeDir$fToJSONRelativeDir$fFromJSONRelativeDir$fEqPlanarRelativeDir$fOrdPlanarRelativeDir$fShowPlanarRelativeDir$fReadPlanarRelativeDir$fGenericPlanarRelativeDir$fDataPlanarRelativeDir$fHashablePlanarRelativeDir$fEnumPlanarRelativeDir$fBoundedPlanarRelativeDir$fEqAbsoluteDir$fOrdAbsoluteDir$fShowAbsoluteDir$fReadAbsoluteDir$fGenericAbsoluteDir$fDataAbsoluteDir$fHashableAbsoluteDir$fEnumAbsoluteDir$fBoundedAbsoluteDirSyntaxSrcLocNoLocSyntax'_sLoc_sTerm_sTypeTermTerm'TUnitTConstTDirTIntTAntiIntTText TAntiTextTBoolTRobotTRefTRequireDeviceTRequire SRequirementsTVarSPairSLamSAppSLetSDefSBindSDelaySRcdSProj SAnnotateLocVarLVlvSrcLoclvVar DelayType SimpleDelay MemoizedDelayMUnAssocS MBinAssocLNR ConstMeta ConstMFunc ConstMUnOp ConstMBinOpConstDocbriefDoclongDoc ConstInfosyntaxfixity constMetaconstDoc tangibilityConstNoopWait SelfdestructMoveBackupPushStrideTurnPlaceGiveEquipUnequipMakeHasEquippedCountDrillUseBuildSalvage ReprogramListenViewAppearCreateHaltTimeScoutWhereamiWaypointDetectResonateDensitySniffChirpWatchSurveilHeadingBlockedScanUploadIshereIsemptySelfParentBaseMeetMeetAllWhoamiSetnameRandomRunIfInlInrCaseFstSndForceReturnTry UndefinedFailNegEqNeqLtGtLeqGeqAddSubMulDivExpFormatConcatCharsSplitCharAtToCharAppFSwapAtomicInstantKeyInstallKeyHandlerTeleportAs RobotNamed RobotNumberedKnows maxSniffRange maxScoutRangemaxStrideRangeallConstarityisCmd isUserFunc isOperatorisBuiltinFunction isTangibleisLong constInfolocVarToSyntax'$fIsStringConstDoc$fMonoidSrcLoc$fSemigroupSrcLoc$fPlatedSyntax' $fPlatedTerm' $fEqTerm' $fShowTerm'$fFunctorTerm'$fFoldableTerm'$fTraversableTerm' $fDataTerm'$fGenericTerm'$fFromJSONTerm' $fToJSONTerm' $fEqSyntax' $fShowSyntax'$fFunctorSyntax'$fFoldableSyntax'$fTraversableSyntax' $fDataSyntax'$fGenericSyntax'$fFromJSONSyntax'$fToJSONSyntax' $fEqLocVar $fOrdLocVar $fShowLocVar $fDataLocVar$fGenericLocVar$fFromJSONLocVar$fToJSONLocVar $fEqSrcLoc $fOrdSrcLoc $fShowSrcLoc $fDataSrcLoc$fGenericSrcLoc$fFromJSONSrcLoc$fToJSONSrcLoc $fEqDelayType$fShowDelayType$fDataDelayType$fGenericDelayType$fFromJSONDelayType$fToJSONDelayType $fEqConstInfo$fOrdConstInfo$fShowConstInfo$fEqTangibility$fOrdTangibility$fShowTangibility$fReadTangibility $fEqLength $fOrdLength $fShowLength $fReadLength$fBoundedLength $fEnumLength $fEqConstMeta$fOrdConstMeta$fShowConstMeta $fEqMUnAssoc $fOrdMUnAssoc$fShowMUnAssoc $fEqMBinAssoc$fOrdMBinAssoc$fShowMBinAssoc $fEqConstDoc $fOrdConstDoc$fShowConstDoc $fEqConst $fOrdConst $fEnumConst$fBoundedConst $fDataConst $fShowConst$fGenericConst$fFromJSONConst $fToJSONConst TAnnotateTProjTRcdTDelayTBindTLet:$:TAppTLamTPair TRequirementsSTermsLocsTermsTypenoLocmkOpmkOp' unfoldAppseraseSerase freeVarsS freeVarsT freeVarsVmapFreeSasTreemeasureAstSizeUModuleTModuleModule moduleAST moduleCtxtrivMod $fShowModule $fEqModule$fFunctorModule $fDataModule$fGenericModule$fFromJSONModule$fToJSONModule elaborate wrapForcesForce CapabilityCPowerCMoveCBackupCPush CMovemultiple CMoveheavyCTurn CSelfdestructCGrabCHarvestCPlaceCGiveCEquipCUnequipCMakeCCount CRecondirCBuildCSalvageCDrill CSenseloc CSensefront CSensehere CDetectloc CDetectcountCDetectdistanceCDetectdirection CWakeselfCScanCRandomCAppearCCreateCListenCLogCFormatCConcatCSplit CCharcountCCodeCFloatCCond CNegationCCompareCOrientCArithCEnvCLambda CRecursion CReprogramCMeetCWhoamiCSetname CTeleportCAtomicCSwapCTimeabsCTimerelCTryCSumCProdCRecordCDebug CHandleinputCHaltCGodcapabilityName constCaps$fFromJSONCapability$fToJSONCapability$fEqCapability$fOrdCapability$fShowCapability$fReadCapability$fEnumCapability$fBoundedCapability$fGenericCapability$fHashableCapability$fDataCapability$fFromJSONKeyCapability$fToJSONKeyCapabilityReqCtx RequirementscapReqsdevReqsinvReqs RequirementReqCapReqDevReqInv singletonCap singletonDev singletonInvinsert requirements$fMonoidRequirements$fSemigroupRequirements$fEqRequirements$fOrdRequirements$fShowRequirements$fDataRequirements$fGenericRequirements$fFromJSONRequirements$fToJSONRequirements$fEqRequirement$fOrdRequirement$fShowRequirement$fReadRequirement$fGenericRequirement$fHashableRequirement$fDataRequirement$fFromJSONRequirement$fToJSONRequirementTyped_value _polytype _requires $fShowTyped $fEqTyped$fGenericTyped$fFromJSONTyped $fToJSONTypedpolytyperequiresvalueMetricProgress Attempted CompleteduntaggedJsonOptions getMetric chooseBetter$fToJSONProgress$fFromJSONProgress $fEqMetric $fOrdMetric $fShowMetric $fReadMetric$fGenericMetric$fFromJSONMetric$fToJSONMetric $fEqProgress $fOrdProgress$fShowProgress$fReadProgress$fGenericProgressLocationnorthsoutheastwest applyTurn toDirection relativeTonearestDirection fromDirection manhattan euclideangetElemsInArea $fToJSONPoint$fFromJSONPoint $fToJSONKeyV2$fFromJSONKeyV2 $fFromJSONV2 $fToJSONV2BoundsRectangleCoordsunCoords locToCoords coordsToLoc$fWrappedCoords$fRewrappedCoordst $fEqCoords $fOrdCoords $fShowCoords $fIxCoords$fGenericCoordsCosmic _subworld_planar SubworldNameDefaultRootSubworldrenderWorldName$fFromJSONSubworldName $fShowCosmic $fEqCosmic $fOrdCosmic$fFunctorCosmic$fGenericCosmic$fToJSONCosmic$fShowSubworldName$fEqSubworldName$fOrdSubworldName$fGenericSubworldName$fToJSONSubworldNameDistanceMeasure Measurable InfinitelyFarplanarsubworlddefaultCosmicLocation cosmoMeasureoffsetBy$fFromJSONCosmic$fEqDistanceMeasure$fOrdDistanceMeasureAreaDimensions rectWidth rectHeightrenderRectDimensionsinvertYupperLeftToBottomRight cornersToAreaisEmptygetAreaDimensions Placementsrcoffsetorient Orientationupflipped StructureNamedefaultOrientationreorientWaypointapplyOrientationTransform$fFromJSONOrientation$fFromJSONPlacement $fEqPlacement$fShowPlacement$fEqOrientation$fShowOrientation$fEqStructureName$fOrdStructureName$fShowStructureName$fGenericStructureName$fFromJSONStructureNamewpConfigwpLocWaypointConfigwpNamewpUnique WaypointName OriginatedparentparseWaypointConfigmodifyLocationoffsetWaypoint$fFromJSONWaypointConfig$fFromJSONWaypoint$fShowWaypoint $fEqWaypoint$fShowWaypointConfig$fEqWaypointConfig$fShowWaypointName$fEqWaypointName$fOrdWaypointName$fGenericWaypointName$fFromJSONWaypointName$fShowOriginated$fEqOriginated$fFunctorOriginatedPortalentranceexitInfo consistentreorient PortalExitexit subworldName Navigation waypointsportalsAnnotatedDestinationenforceConsistency reorientation destination WaypointMapfailUponDuplicationfailWaypointLookupvalidatePartialNavigationvalidatePortalsensureSpatialConsistencysequenceSigned$fFromJSONPortal $fShowPortal $fEqPortal$fShowPortalExit$fEqPortalExit$fGenericPortalExit$fFromJSONPortalExit$fShowAnnotatedDestination$fEqAnnotatedDestination$fShowNavigation$fEqNavigationGameplayAchievementCraftedBitcoinRobotIntoWaterAttemptSelfDestructBase DestroyedBase LoseScenarioGetDisorientedGlobalAchievementCompletedSingleTutorialCompletedAllTutorialsLookedAtAboutScreenCategorizedAchievementAchievementInfotitlehumorousElaborationattainmentProcesseffort isObfuscated FlavorTextFreeform FTQuotation Quotation attributioncontentExpectedEffortTrivialEasyModerate Gruelling!categorizedAchievementJsonOptionslistAchievements$fToJSONGlobalAchievement$fFromJSONGlobalAchievement$fToJSONGameplayAchievement$fFromJSONGameplayAchievement $fFromJSONCategorizedAchievement$fToJSONCategorizedAchievement$fEqCategorizedAchievement$fOrdCategorizedAchievement$fShowCategorizedAchievement$fGenericCategorizedAchievement$fEqGameplayAchievement$fOrdGameplayAchievement$fShowGameplayAchievement$fBoundedGameplayAchievement$fEnumGameplayAchievement$fGenericGameplayAchievement$fEqGlobalAchievement$fOrdGlobalAchievement$fShowGlobalAchievement$fBoundedGlobalAchievement$fEnumGlobalAchievement$fGenericGlobalAchievement$fEqAchievementInfo$fShowAchievementInfo$fGenericAchievementInfo$fFromJSONAchievementInfo$fToJSONAchievementInfo$fEqFlavorText$fShowFlavorText$fGenericFlavorText$fFromJSONFlavorText$fToJSONFlavorText $fEqQuotation$fShowQuotation$fGenericQuotation$fFromJSONQuotation$fToJSONQuotation$fEqExpectedEffort$fOrdExpectedEffort$fShowExpectedEffort$fBoundedExpectedEffort$fEnumExpectedEffort$fGenericExpectedEffort$fFromJSONExpectedEffort$fToJSONExpectedEffortdescribe Attainment _achievement_maybeScenarioPath _obtainedAt$fGenericAttainment achievementmaybeScenarioPath obtainedAtachievementJsonOptions$fToJSONAttainment$fFromJSONAttainment$fSemigroupAttainment$fOrdAttainment$fEqAttainmentErasableENothingEEraseEJusterasableerasableToMaybemaybeToErasable$fMonoidErasable$fSemigroupErasable$fShowErasable $fEqErasable $fOrdErasable$fFunctorErasablemakeLensesNoSigsmakeLensesExcluding REPLHistory REPLHistItem REPLEntry REPLOutput getREPLEntry isREPLEntry replItemText$fToJSONREPLHistItem$fToSampleREPLHistItem$fShowREPLHistory$fEqREPLHistItem$fOrdREPLHistItem$fShowREPLHistItem$fReadREPLHistItem REPLStateReplControlModeTypingPilotingHandling REPLPrompt CmdPrompt SearchPromptTimeDirNewerOlderreplHasExecutedManualInput replIndexreplSeqnewREPLHistoryrestartREPLHistory replLength addREPLItemgetLatestREPLHistoryItemsmoveReplHistIndexgetCurrentItemTextreplIndexIsAtInput removeEntry lastEntry defaultPrompt newREPLEditor initREPLState$fEqReplControlMode$fBoundedReplControlMode$fEnumReplControlMode $fEqTimeDir $fOrdTimeDir $fShowTimeDirreplControlMode replHistoryreplLastreplPromptEditorreplPromptTypereplType replValidreplPromptTextfully fullyMaybeParser reservedWords parsePolytype parseTypeunTuple parseTermbinOpsunOps runParser runParserTHreadTerm readTerm'showShortError showErrorPos getLocRange $fShowStmt$fEqAntiquoting$fOrdAntiquoting$fShowAntiquotingtyQInvalidAtomicReason TooManyTicksAtomicDupingThingNonSimpleVarType NestedAtomic LongConstTypeErr UnboundVar EscapedSkolemInfiniteUnifyErrMismatchLambdaArgMismatchFieldsMismatchDefNotTopLevel CantInfer CantInferProj UnknownProj InvalidAtomic ImpredicativeContextualTypeErrCTE cteSrcLoccteStack cteTypeErr HasBindings applyBindingsTCJoinSourceExpectedActualTCStackLocatedTCFrameTCFrameTCDefTCBindLTCBindR withSourcegetJoin withFrame getTCStackrunTCfreshsubstUunify instantiate skolemize generalizeinferTop inferModuleinfer inferConstcheck isSimpleUType $fShowJoin&$fFallibleTypeFIntVarContextualTypeErr$fHasBindingsModule$fHasBindingsSyntax'$fHasBindingsTerm'$fHasBindingsCtx$fHasBindingsPoly$fHasBindingsUTerm $fFreeVarsCtx$fFreeVarsPoly$fFreeVarsUTerm$fShowContextualTypeErr $fShowTypeErr$fShowInvalidAtomicReason $fShowSource $fEqSource $fOrdSource$fBoundedSource $fEnumSource$fShowLocatedTCFrame $fShowTCFrame $fOrdIntVarWildcard BulletListbulletListHeaderbulletListItems PrettyPrec prettyPrecppr docToText prettyText docToString prettyStringpparens prettyShowLow prettyBindingprettyEquality prettyTuple prettyPrecAppappliedTermPrecprettyTypeErrText prettyTypeErrtypeDescription hasAnyUVarsisTopLevelConstructor tyNounPhrasebaseTyNounPhrasefieldMismatchMsg$fPrettyPrecTCFrame$fPrettyPrecLocatedTCFrame$fPrettyPrecInvalidAtomicReason$fPrettyPrecTypeErr$fPrettyPrecTerm'$fPrettyPrecSyntax'$fPrettyPrecConst$fPrettyPrecCapability$fPrettyPrecDirection$fPrettyPrecCtx$fPrettyPrecPoly$fPrettyPrecPoly0$fPrettyPrecTypeF$fPrettyPrecUTerm$fPrettyPrecFix$fPrettyPrecIntVar$fPrettyPrecBaseTy$fPrettyPrecText$fPrettyPrecBulletList$fPrettyPrecWildcard $fEqWildcard $fOrdWildcard$fShowWildcard SystemFailureAssetNotLoadedScenarioNotFoundOrderFileWarning CustomFailure NoOrderFile MissingFiles DanglingFilesLoadingFailure DoesNotExistEntryNotCanNotParseYamlCanNotParseMegaparsecDoesNotTypecheck Duplicate CustomMessageEntry DirectoryFileAsset AchievementDataHistorySave AssetDataAppAssetNameGenerationEntitiesRecipesWorlds ScenariosScript$fPrettyPrecAssetData$fPrettyPrecAsset$fPrettyPrecEntry$fPrettyPrecLoadingFailure$fPrettyPrecOrderFileWarning$fPrettyPrecSystemFailure$fShowSystemFailure$fEqOrderFileWarning$fShowOrderFileWarning$fShowLoadingFailure $fEqEntry $fShowEntry $fEqAsset $fShowAsset $fEqAssetData$fShowAssetData withThrow throwToMaybethrowToWarningignoreWarnings asExceptTwarn traverseWforMWsimpleErrorHandlegetDataDirSafegetDataFileNameSafe dataNotFoundgetSwarmXdgDataSubdirgetSwarmXdgDataFilegetSwarmSavePathgetSwarmHistoryPath readAppDatagetSwarmAchievementsPathloadAchievementsInfosaveAchievementsInfo ProcessedTermprocessTermEither processTermprocessParsedTerm processTerm'processParsedTerm'$fToJSONProcessedTerm$fFromJSONProcessedTerm$fDataProcessedTerm$fShowProcessedTerm$fEqProcessedTerm$fGenericProcessedTermToStreamtoStream StreamNode StreamNode'TextNodeCodeNodeRawNodeTxtAttrStrongEmphasisNodeLeafTextLeafRawLeafCode LeafCodeBlock ParagraphnodesDocument paragraphsfindCodefromText fromTextMtoTextchunksOf docToMark$fToJSONParagraph$fIsInlineParagraph$fHasAttributesParagraph$fRangeableParagraph$fFromJSONDocument$fToJSONDocument$fIsBlockParagraphDocument$fIsStringParagraph$fIsStringDocument$fIsListDocument$fHasAttributesDocument$fRangeableDocument$fToStreamParagraph$fToStreamNode$fEqStreamNode'$fShowStreamNode'$fFunctorStreamNode' $fEqDocument$fShowDocument$fFunctorDocument$fFoldableDocument$fTraversableDocument$fSemigroupDocument$fMonoidDocument $fEqParagraph$fShowParagraph$fFunctorParagraph$fFoldableParagraph$fTraversableParagraph$fSemigroupParagraph$fMonoidParagraph$fEqNode $fShowNode $fFunctorNode$fFoldableNode$fTraversableNode $fEqTxtAttr $fShowTxtAttr $fOrdTxtAttrtmQScenarioCodeMetricssourceTextLengthastSizeCodeSizeDeterminators initialCode hasUsedREPLcodeSizeFromDeterminator$fEqScenarioCodeMetrics$fOrdScenarioCodeMetrics$fShowScenarioCodeMetrics$fReadScenarioCodeMetrics$fGenericScenarioCodeMetrics$fToJSONScenarioCodeMetrics$fFromJSONScenarioCodeMetrics$fShowCodeSizeDeterminators Objective_objectiveGoal_objectiveTeaser_objectiveCondition _objectiveId_objectiveOptional_objectivePrerequisite_objectiveHidden_objectiveAchievementPrerequisiteConfig previewablelogic$fFromJSONPrerequisiteConfig $fEqObjective$fShowObjective$fGenericObjective$fToJSONObjective$fEqPrerequisiteConfig$fShowPrerequisiteConfig$fGenericPrerequisiteConfig$fToJSONPrerequisiteConfigObjectiveCompletioncompletionBuckets completedIDs AnnouncementObjectiveCompletedCompletionBuckets incomplete completed unwinnableobjectiveAchievementobjectiveCondition objectiveGoalobjectiveHidden objectiveIdobjectiveOptionalobjectivePrerequisiteobjectiveTeaserlistAllObjectives addCompleted addUnwinnable setIncomplete addIncompleteextractIncomplete$fFromJSONObjective$fToSampleObjective$fShowObjectiveCompletion$fGenericObjectiveCompletion$fFromJSONObjectiveCompletion$fToJSONObjectiveCompletion$fShowAnnouncement$fGenericAnnouncement$fToJSONAnnouncement$fShowCompletionBuckets$fGenericCompletionBuckets$fFromJSONCompletionBuckets$fToJSONCompletionBucketsPrereqSatisfaction objectivedepsprereqsSatisfieddidWindidLoseisPrereqsSatisfiedisUnwinnablePrereq isUnwinnablepartitionActiveObjectivesgetActiveObjectivesgetSatisfactiongetDistinctConstants$fToSamplePrereqSatisfaction$fGenericPrereqSatisfaction$fToJSONPrereqSatisfaction$fToJSONSigned$fGenericSigned GoalDisplay _goalsContent _listWidget_focus GoalTracking announcementsgoals GoalEntryHeaderGoalSpacerCategorizedGoals GoalStatusUpcomingActiveFailedshouldSkipSelection$fToSampleGoalTracking$fGenericGoalTracking$fToJSONGoalTracking$fShowGoalStatus$fEqGoalStatus$fOrdGoalStatus$fBoundedGoalStatus$fEnumGoalStatus$fGenericGoalStatus$fToJSONGoalStatus$fToJSONKeyGoalStatusfocus goalsContent listWidgetemptyGoalDisplayhasAnythingToShowhasMultipleGoalsconstructGoalMapEdges GraphInfo actualGraph isAcyclicsccInfonodeIDs ObjectiveIdLabelOrdinalgetConstFromSigned getNegatedIdsgetObjectivesById assignIds makeGraphmakeGraphEdgesisAcyclicGraph makeGraphInfo $fToJSONArray $fToJSONSCC$fToSampleGraphInfo$fShowGraphInfo$fGenericGraphInfo$fToJSONGraphInfo$fEqObjectiveId$fOrdObjectiveId$fShowObjectiveId$fGenericObjectiveId$fToJSONObjectiveIdvalidateObjectivesUsageusagesproblems BindingSitesVarUsage BindingTypeLambdaLetBindtoErrPoscheckOccurrencesgetUsage $fMonoidUsage$fSemigroupUsage$fEqBindingType$fShowBindingType showHoverInfonarrowToPosition renderDoctreeToMarkdownexplain$fExplainableTypePoly$fExplainableType()lspMaindiagnosticSourcePrefixdebugvalidateSwarmCodeshowTypeErrorPoshandlersKeyCombo mkKeyComboparseKeyComboFull parseKeyCombospecialKeyNamesprettyKeyCombo $fNames'M1 $fNames':+: $fNames'M10 $fEqKeyCombo $fOrdKeyCombo$fShowKeyCombo$fGenericKeyCombo$fFromJSONKeyCombo$fToJSONKeyCombo$fToJSONModifier $fToJSONKey$fFromJSONModifier $fFromJSONKeyEnvValueVUnitVIntVTextVDirVBoolVRobotVInjVPairVCloVDefVResultVBindVDelayVRefVRcdVKey VRequirements stripVResult prettyValue valueToTerm $fEqValue $fShowValue$fGenericValue$fFromJSONValue $fToJSONValue FromJSONE parseJSONE parseJSONE'ParserEWithErunEliftElocalEwithEgetEdecodeFileEitherE..:..:?..!= withTextE withObjectE withArrayE$fFromJSONEe(,)$fFromJSONEe[]$fFromJSONEeInt $fFunctorWith$fApplicativeWith $fMonadWith$fMonadFailWith$fAlternativeWithDisplay AttributeADefaultARobotAEntityAWorldATerrainPriority$fToJSONAttribute$fFromJSONAttribute$fSemigroupDisplay $fEqDisplay $fOrdDisplay $fShowDisplay$fGenericDisplay$fHashableDisplay $fEqAttribute$fOrdAttribute$fShowAttribute$fGenericAttribute$fHashableAttributecurOrientation defaultChar displayAttrdisplayPriority invisibleorientationMap displayCharhiddendefaultTerrainDisplaydefaultEntityDisplaydefaultRobotDisplay$fMonoidDisplay$fToJSONDisplay$fFromJSONEDisplayDisplay$fFromJSONDisplay toAttrName swarmAttrMap entityAttr worldPrefixworldAttributes robotAttrdirtAttr grassAttr stoneAttriceAttr waterAttrrockAttr plantAttr highlightAttr notifAttrinfoAttrboldAttr italicAttrdimAttrdefAttrcustomEditFocusedAttrredAttr greenAttrblueAttr yellowAttrcyanAttr lightCyanAttr magentaAttrtoStyle toAttrColor toAttrPair TerrainTypeStoneTDirtTGrassTIceTBlankT readTerraingetTerrainDefaultPaletteChargetTerrainWord terrainMap$fFromJSONTerrainType$fMonoidTerrainType$fSemigroupTerrainType$fEqTerrainType$fOrdTerrainType$fShowTerrainType$fReadTerrainType$fBoundedTerrainType$fEnumTerrainType Inventory EntityMapentitiesByName entitiesByCapEntity GrowthTimeEntityProperty UnwalkablePortableOpaqueGrowableLiquidKnowndefaultGrowthTimemkEntitylookupEntityName deviceForCapbuildEntityMap loadEntities entityHash entityDisplay entityName entityPlural entityNameForentityDescriptionentityOrientation entityGrowth entityYieldsentityProperties hasPropertyentityCapabilitiesentityInventory lookupByName countByNamefromList fromElems insertCountcontains contains0plus isSubsetOfinventoryCapabilitiesextantElemsWithCapabilityentitiesByCapability deleteCount deleteAllelems difference$fFromJSONEntityProperty$fToJSONEntityProperty $fEqInventory$fHashableInventory$fToJSONEntity$fFromJSONEntity $fOrdEntity $fEqEntity$fHashableEntity$fFromJSONEEntityMapEntity$fMonoidEntityMap$fSemigroupEntityMap $fEqEntityMap$fShowEntityMap$fGenericEntityMap$fFromJSONEntityMap$fToJSONEntityMap$fShowInventory$fGenericInventory$fFromJSONInventory$fToJSONInventory $fShowEntity$fGenericEntity$fEqGrowthTime$fOrdGrowthTime$fShowGrowthTime$fReadGrowthTime$fGenericGrowthTime$fHashableGrowthTime$fFromJSONGrowthTime$fToJSONGrowthTime$fEqEntityProperty$fOrdEntityProperty$fShowEntityProperty$fReadEntityProperty$fEnumEntityProperty$fBoundedEntityProperty$fGenericEntityProperty$fHashableEntityPropertyInventorySortOptionsInventorySortOrderByNaturalAlphabetic ByQuantityByTypeInventorySortDirection Ascending DescendingdefaultSortOptionsrenderSortMethodcycleSortOrdercycleSortDirection sortInventory$fEnumInventorySortOrder$fBoundedInventorySortOrder$fEqInventorySortOrder$fEnumInventorySortDirection$fBoundedInventorySortDirection$fEqInventorySortDirection WorldUpdate ReplaceEntity updatedLocoriginalEntity newEntityWorld MultiWorldWorldFunWFgetWFrunWFworldFunFromArraynewWorldlookupCosmicTerrain lookupTerrainlookupTerrainMlookupCosmicEntity lookupEntity lookupEntityMupdateupdateMloadCell loadRegion$fBifunctorWorldFun$fWrappedTileCoords$fRewrappedTileCoordst$fWrappedTileOffset$fRewrappedTileOffsett$fEqWorldUpdate$fOrdWorldUpdate$fShowWorldUpdate$fGenericWorldUpdate$fFromJSONWorldUpdate$fToJSONWorldUpdate$fEqTileOffset$fOrdTileOffset$fShowTileOffset$fIxTileOffset$fGenericTileOffset$fEqTileCoords$fOrdTileCoords$fShowTileCoords$fIxTileCoords$fGenericTileCoords$fFunctorWorldFun$fSemigroupWorldFun$fMonoidWorldFun EntityFacade EntityNamemkFacade$fToJSONEntityFacade$fEqEntityFacadeRecipe _recipeInputs_recipeOutputs_recipeRequirements _recipeTime _recipeWeightIngredientList $fEqRecipe $fOrdRecipe $fShowRecipe$fFunctorRecipe$fFoldableRecipe$fTraversableRecipe$fGenericRecipe$fFromJSONRecipe$fToJSONRecipe MissingType MissingInputMissingCatalystMissingIngredient recipeInputs recipeOutputsrecipeRequirements recipeTime recipeWeight loadRecipes outRecipeMap inRecipeMap reqRecipeMap recipesForknowsIngredientsFormakemake'$fFromJSONEEntityMapRecipe$fFromJSONRecipe0$fToJSONRecipe0$fShowMissingIngredient$fEqMissingIngredient$fShowMissingType$fEqMissingTypeExnFatal InfiniteLoop Incapable CmdFailedUser IncapableFix FixByEquip FixByObtain formatExnformatIncapableFixformatIncapable$fEqExn $fShowExn $fGenericExn $fFromJSONExn $fToJSONExn$fEqIncapableFix$fShowIncapableFix$fGenericIncapableFix$fFromJSONIncapableFix$fToJSONIncapableFix RobotUpdate AddEntity LearnEntityCESKInOutUpWaitingCell BlackholeVStoreAddrContFrameFSndFFstFArgFAppFLetFTry FUnionEnvFLoadEnvFDefFBind FDiscardEnv FImmediateFUpdate FFinishAtomicFMeetAllFRcdFProj TickNumber getTickNumberaddTicks emptyStoreallocate lookupCellsetCell finalValue initMachine initMachine'cancelresetBlackholes$fPrettyTickNumber$fPrettyPrecCESK$fEqCESK $fShowCESK $fGenericCESK$fFromJSONCESK $fToJSONCESK $fEqFrame $fShowFrame$fGenericFrame$fFromJSONFrame $fToJSONFrame$fEqRobotUpdate$fOrdRobotUpdate$fShowRobotUpdate$fGenericRobotUpdate$fFromJSONRobotUpdate$fToJSONRobotUpdate $fShowStore $fEqStore$fGenericStore$fFromJSONStore $fToJSONStore $fShowCell$fEqCell $fGenericCell$fFromJSONCell $fToJSONCell$fEqTickNumber$fOrdTickNumber$fShowTickNumber$fReadTickNumber$fGenericTickNumber$fFromJSONTickNumber$fToJSONTickNumberDurationMetrics_scenarioElapsed_scenarioElapsedTicksscenarioOptions$fEqDurationMetrics$fOrdDurationMetrics$fShowDurationMetrics$fReadDurationMetrics$fGenericDurationMetricsAttemptMetrics_scenarioDurationMetrics_scenarioCodeMetricsscenarioElapsedscenarioElapsedTicksemptyDurationMetricemptyAttemptMetric$fToJSONDurationMetrics$fFromJSONDurationMetrics$fEqAttemptMetrics$fOrdAttemptMetrics$fShowAttemptMetrics$fReadAttemptMetrics$fGenericAttemptMetricsscenarioCodeMetricsscenarioDurationMetrics$fToJSONAttemptMetrics$fFromJSONAttemptMetrics ProgressStats_scenarioStarted_scenarioAttemptMetricsBestByCriteria BestByTime BestByTicksBestByCharCount BestByAstSizedescribeCriteria$fOrdZonedTime $fEqZonedTime$fEqProgressStats$fOrdProgressStats$fShowProgressStats$fReadProgressStats$fGenericProgressStats$fEqBestByCriteria$fOrdBestByCriteria$fBoundedBestByCriteria$fEnumBestByCriteria$fShowBestByCriteria BestRecords_scenarioBestByTime_scenarioBestByTicks_scenarioBestByCharCount_scenarioBestByAstSizeProgressMetricscenarioAttemptMetricsscenarioStarted emptyBest updateBest$fToJSONProgressStats$fFromJSONProgressStats$fShowBestRecords$fEqBestRecords$fOrdBestRecords$fReadBestRecords$fGenericBestRecordsscenarioBestByAstSizescenarioBestByCharCountscenarioBestByTicksscenarioBestByTime getBestGroups$fToJSONBestRecords$fFromJSONBestRecordsLogEntry_leTime _leSource _leRobotName _leRobotID _leLocation_leText LogLocation OmnipresentLocated LogSourceSaidLogged ErrorTrace ErrorLevelDebugWarningErrorCritical$fShowLogEntry $fEqLogEntry $fOrdLogEntry$fGenericLogEntry$fFromJSONLogEntry$fToJSONLogEntry$fShowLogLocation$fEqLogLocation$fOrdLogLocation$fGenericLogLocation$fFromJSONLogLocation$fToJSONLogLocation$fShowLogSource $fEqLogSource$fOrdLogSource$fGenericLogSource$fFromJSONLogSource$fToJSONLogSource$fShowErrorLevel$fEqErrorLevel$fOrdErrorLevel$fGenericErrorLevel$fFromJSONErrorLevel$fToJSONErrorLevel leLocation leRobotID leRobotNameleSourceleTextleTime RobotContext$fEqRobotContext$fShowRobotContext$fGenericRobotContext$fFromJSONRobotContext$fToJSONRobotContextRobotR RobotPhase TemplateRobot ConcreteRobotRIDdefReqsdefStoredefTypesdefValsemptyRobotContext$fAtRobotContext$fIxedRobotContext$fGenericRobotR$fToJSONRobotR $fEqRobotR $fShowRobotRmachine robotContextrobotCreatedAt robotEntity robotHeavyrobotID robotLocationrobotLogUpdated robotParentID runningAtomic selfDestruct systemRobot tickSteps robotName trobotName robotDisplayunsafeSetRobotLocationtrobotLocationrobotOrientationrobotInventory trobotContextinstantiateRobotequippedDevicesrobotLog inventoryHash robotKnowsrobotCapabilitiesmkRobotisActive wantsToStep waitingUntil getResulthearingDistance$fFromJSONEEntityMapRobotR$fToSampleRobotRWExpWIntWFloatWBoolWCellWVarWOpWSeedWCoordWHashWLetWOverlayWImportOpModPerlinReflectRotMaskOverlayAbsAxisXYRot0Rot90Rot180Rot270CellVal RawCellValCellTag CellTerrain CellEntity CellRobot$fPrettyPrecCellTag$fPrettyPrecCellVal$fPrettyPrecRot$fPrettyPrecAxis$fEqWExp $fShowWExp$fEqOp$fOrdOp$fShowOp$fEqAxis $fOrdAxis $fShowAxis $fBoundedAxis $fEnumAxis$fEqRot$fOrdRot $fShowRot $fBoundedRot $fEnumRot $fEqCellVal $fShowCellVal $fEqCellTag $fOrdCellTag $fShowCellTag $fEnumCellTag$fBoundedCellTagCNilCConsWorldMapSomeTySomeTTyTTyBaseTTyWorldBFloatBCellCheckErrApplyErr NoInstanceUnboundBadType BadDivType UnknownImport NotAThing NotAnythingTTermIdxVZVSAppendHasConstembedCLitCCellCFICIfCNotCNegCAbsCAndCOrCAddCSubCMulCDivCIDivCModCEqCNeqCLtCLeqCGtCGeqCMaskCSeedCCoordCHashCPerlinCReflectCRotCOverKIBCΦNotFunIsFun Applicable$$OverEmptyTTyCellTTyFloatTTyIntTTyBool.$$$$..$$.idxToNat weakenVarweakencheckEqcheckOrdcheckNum checkIntegral checkEmpty checkOvermapSome getBaseTypeapplyapplyToinferOp typeArgsForapplyOp resolveCellresolveCellIteminferLet inferOverlay$fEmptyCellVal $fOverCellVal $fOverDouble $fOverInteger $fOverBool$fPrettyPrecTTerm$fHasConstTTerm$fApplicableTTerm$fPrettyPrecBase$fTestEqualityTYPEBase$fPrettyPrecTTy$fTestEqualityTYPETTy$fPrettyPrecCheckErr $fShowSome $fShowTTy $fShowBase$fShowCheckErr $fShowTTerm $fShowIdxOTermWBTermBAppBConstbracketconv$fHasConstBTerm$fApplicableBTerm$fApplicableOTerm$fHasConstOTerm $fShowBTerm ParserErrorsepByNEsclexemesymbol operatorCharoperatorintegerOrFloatreserved identifierbracescomma parseWExpAtom parseWExp parseCell parseCellItem parseCellTag parseNameparseIf parsePerlinparseAbsparseLet parseOverlay parseMask parseImport$fFromJSONWExp loadWorlds loadWorldstripDirSeedextractEntities findOffset findPatchWithfindTreeOffsetfindGoodOrigin interpBTerm interpConst interpReflect interpRotrunWorld NoFunParamsCTermCFunCConstcompile compileConstunarybinary compileMask compileHash compilePerlincompileReflect compileRotrunCTerm$fApplicableCTermValuableasValueVRect$fValuableEither$fValuableMaybe$fValuableRobotR$fValuableEntity$fValuablePoint $fValuable(,) $fValuableV2 $fValuableInt$fValuableInt32RobotMap IndexedTRobot RobotName buildRobotMapgetThing getEntitygetRobot$fShowRobotName $fEqRobotName$fOrdRobotName$fGenericRobotName$fFromJSONRobotNameCellPaintDisplay AugmentedCell waypointCfg standardCellPCell cellTerrain cellEntity cellRobots$fFromJSONE(,)PCell $fToJSONPCell$fFromJSONE(,)AugmentedCell$fToJSONPCell0$fEqAugmentedCell$fShowAugmentedCell $fEqPCell $fShowPCell TerrainWith WorldPalette unPalettecellToTerrainPairtoCellPaintDisplaytoKeygetUniqueTerrainFacadePairsconstructPaletteconstructWorldMapgenericCharacterPool prepForJson$fFromJSONE(,)WorldPalette$fEqWorldPalette$fShowWorldPaletteMapEditingBounds _boundsRect_boundsPersistDisplayUntil_boundsSelectionStep EntityPaintFacadeRefBoundsSelectionStepUpperLeftPendingLowerRightPendingSelectionComplete getDisplaytoFacade getEntityName$fEqEntityPaint WorldEditor_isWorldEditorEnabled _terrainList_entityPaintList_paintedTerrain_editingBounds_editorFocusRing_outputFilePath_lastWorldEditorMessageboundsPersistDisplayUntil boundsRectboundsSelectionStep editingBoundseditorFocusRingentityPaintListisWorldEditorEnabledlastWorldEditorMessageoutputFilePathpaintedTerrain terrainListinitialWorldEditorMergedStructure PStructure Structurearea structures placementsInheritedStructureDefsNamedStructure structureoverlaySingleStructuremergeStructurespaintMapreadMap$fFromJSONE(,)PStructure$fFromJSONE(,)NamedStructure$fEqPStructure$fShowPStructure$fEqNamedStructure$fShowNamedStructureWorldDescriptionPaintWorldDescriptionPWorldDescription offsetOrigin scrollablepaletteul navigation worldName worldProg!$fFromJSONE(,,,)PWorldDescription$fToJSONPWorldDescription$fShowPWorldDescriptionSkeletonScenarioversion descriptioncreativeentitiesworldrobots$fToJSONSkeletonScenario$fGenericSkeletonScenarioScenario_scenarioVersion _scenarioName_scenarioAuthor_scenarioDescription_scenarioCreative _scenarioSeed_scenarioAttrs_scenarioEntities_scenarioRecipes_scenarioKnown_scenarioWorlds_scenarioNavigation_scenarioRobots_scenarioObjectives_scenarioSolution_scenarioStepsPerTick$fShowScenario scenarioAttrsscenarioAuthorscenarioCreativescenarioDescriptionscenarioEntities scenarioKnown scenarioNamescenarioNavigationscenarioObjectivesscenarioRecipesscenarioRobots scenarioSeedscenarioSolutionscenarioStepsPerTickscenarioVersionscenarioWorldsgetScenarioPath loadScenarioloadScenarioFile$fFromJSONE(,)ScenariomakeSuggestedPaletteconstructScenarioScenarioInfoPair ScenarioInfo _scenarioPath_scenarioStatusScenarioStatus NotStartedPlayedSerializableLaunchParamsParameterizableLaunchParams LaunchParamsseedValgetLaunchParams$fToJSONScenarioStatus$fFromJSONScenarioStatus$fToJSONScenarioInfo$fFromJSONScenarioInfo$fEqScenarioInfo$fOrdScenarioInfo$fShowScenarioInfo$fReadScenarioInfo$fGenericScenarioInfo$fEqScenarioStatus$fOrdScenarioStatus$fShowScenarioStatus$fReadScenarioStatus$fGenericScenarioStatus#$fToJSONParameterizableLaunchParams%$fFromJSONParameterizableLaunchParams$$fGenericParameterizableLaunchParams!$fReadParameterizableLaunchParams!$fShowParameterizableLaunchParams $fOrdParameterizableLaunchParams$fEqParameterizableLaunchParams scenarioPathscenarioStatusupdateScenarioInfoOnFinishScenarioCollectionSCscOrderscMap ScenarioItemSISingle SICollectionscenarioItemNamescenarioItemByPathnormalizeScenarioPathscenarioCollectionToListflatten loadScenariosloadScenarioInfosaveScenarioInfo$fShowScenarioCollection$fShowScenarioItem _SISingle _NotStartedViewCenterRule VCLocationVCRobot$fEqViewCenterRule$fOrdViewCenterRule$fShowViewCenterRule$fGenericViewCenterRule$fFromJSONViewCenterRule$fToJSONViewCenterRule WinConditionNoWinCondition WinConditions WinStatusOngoingWon Unwinnable REPLStatusREPLDone REPLWorking$fShowWinCondition$fGenericWinCondition$fFromJSONWinCondition$fToJSONWinCondition$fShowWinStatus$fGenericWinStatus$fFromJSONWinStatus$fToJSONWinStatus$fEqREPLStatus$fShowREPLStatus$fGenericREPLStatus$fFromJSONREPLStatus$fToJSONREPLStatus Notifications_notificationsCount_notificationsContent RunStatusRunning ManualPause AutoPause_NoWinCondition_WinConditionstoggleRunStatus$fToSampleWinCondition$fMonoidNotifications$fSemigroupNotifications$fEqNotifications$fShowNotifications$fGenericNotifications$fFromJSONNotifications$fToJSONNotifications $fEqRunStatus$fShowRunStatus$fGenericRunStatus$fFromJSONRunStatus$fToJSONRunStatus GameStateStep WorldTick RobotStep SingleStepSBeforeSSingleSAfter CodeToRunSolutionSourceScenarioSuggestedPlayerAuthoredSha1notificationsContentnotificationsCountgetRunCodePath parseCodeFileGameStateConfig initAdjList initNameList initEntities initRecipes initWorldMapValidatedLaunchParams RobotRangeCloseMidRangeFarallDiscoveredEntitiesannouncementQueueavailableCommandsavailableRecipes creativeModecurrentScenarioPath entityMapgameAchievementsgameStepgensyminitiallyRunCode inputHandler knownEntitieslastSeenMessageTime messageQueue multiWorld needsRedrawrandGen recipesIn recipesOut recipesReqreplNextValueIndex replStatusrobotMaprobotStepsPerTickrobotsByLocationrobotsWatching runStatusseedticks winCondition winSolutionworldNavigationworldScrollablepausedrobotsAtLocation robotsInArea baseRobot activeRobots waitingRobotsadjListnameList viewCenterfocusedRobotIDviewCenterRule replWorkingreplActiveTypemessageNotificationsmessageIsRecentmessageIsFromNearbyapplyViewCenterRulerecalcViewCentermodifyViewCenterunfocus viewingRegion focusedRobot focusedRangeclearFocusedRobotLogUpdated addTRobotaddRobotaddRobotToLocation emitMessage sleepUntil sleepForever activateRobotwakeUpRobotsDoneSleepingwakeWatchingRobots deleteRobotremoveRobotFromLocationMap initGameStatescenarioToGameState$fEqRobotRange$fOrdRobotRangeModal _modalType _modalDialog ButtonActionCancel KeepPlaying StartOver QuitActionNext ModalType HelpModal RecipesModal CommandsModal MessagesModalEntityPaletteModalTerrainPaletteModal RobotsModalScenarioEndModal QuitModalKeepPlayingModalDescriptionModal GoalModalScenarioOutcomeWinModal LoseModal$fShowModalType$fShowScenarioOutcomeMenuNoMenuMainMenu NewGameMenuAchievementsMenu MessagesMenu AboutMenu MainMenuEntryNewGameTutorial AchievementsMessagesAboutQuit modalDialog modalTypemainMenu$fEqMainMenuEntry$fOrdMainMenuEntry$fShowMainMenuEntry$fReadMainMenuEntry$fBoundedMainMenuEntry$fEnumMainMenuEntryInventoryListEntry SeparatorInventoryEntry EquippedEntry_NoMenu _MainMenu _NewGameMenu_AchievementsMenu _MessagesMenu _AboutMenumkScenarioList mkNewGameMenu$fEqInventoryListEntry _Separator_InventoryEntry_EquippedEntryFileBrowserControl _fbWidget_maybeSelectedFile_fbIsDisplayedEditingLaunchParamstoSerializableParamsfromSerializableParamsLaunchControls _fileBrowser_seedValueEditor_scenarioConfigFocusRing_isDisplayedFor fbIsDisplayedfbWidgetmaybeSelectedFile LaunchOptions _controls_editingParams fileBrowserisDisplayedForscenarioConfigFocusRingseedValueEditorcontrols editingParamsswarmLangFileExtensiontoValidatedParamsparseSeedInputparseWidgetParamsmakeFocusRingWithinitEditorWidgetinitConfigPanelinitFileBrowserWidgetprepareLaunchDialogUIState_uiMenu _uiPlaying _uiCheatMode _uiFocusRing_uiLaunchConfig_uiWorldCursor_uiWorldEditor_uiREPL _uiInventory_uiInventorySort_uiInventorySearch_uiMoreInfoTop_uiMoreInfoBot_uiScrollToEnd_uiError_uiModal_uiGoal _uiHideGoals_uiAchievements _uiShowFPS _uiShowREPL _uiShowZero _uiShowDebug_uiHideRobotsUntil_uiInventoryShouldUpdate_uiTPF_uiFPS_lgTicksPerSecond _tickCount _frameCount_frameTickCount_lastFrameTime_accumulatedTime _lastInfoTime _uiAttrMap _scenarioRefaccumulatedTime frameCountframeTickCount lastFrameTime lastInfoTime scenarioRef tickCountuiAchievements uiAttrMap uiCheatModeuiErroruiFPS uiFocusRinguiGoal uiHideGoalsuiHideRobotsUntil uiInventoryuiInventorySearchuiInventoryShouldUpdateuiInventorySortuiLaunchConfiguiMenuuiModal uiMoreInfoBot uiMoreInfoTop uiPlayinguiREPL uiScrollToEnd uiShowDebug uiShowFPS uiShowREPL uiShowZerouiTPF uiWorldCursor uiWorldEditor uiShowRobotslgTicksPerSecond initFocusRingdefaultInitLgTicksPerSecond initUIState GrabbingCmdGrab'Harvest'Swap'Push' MoveFailure failIfBlocked failIfDrown RobotFailureThrowExnDestroy IgnoreFailMoveFailureDetailsMoveFailureMode PathBlocked PathLiquidHasRobotStepStateSKpairCompletionsWithExceptions exceptions completionscompletionAnnouncementQueuegameTickfinishGameTickinsertBackRobot runRobotIDs singleStephypotheticalWinCheckevalPTgetNowhypotheticalRobot evaluateCESKrunCESK flagRedraw zoomWorldentityAtupdateEntityAt robotWithID robotWithNameuniformweightedChoice randomNamecreateLogEntrytraceLog traceLogShow constCapsForensureCanExecute hasCapabilityhasCapabilityForcmdExncmdExnWithAchievementraisewithExceptions tickRobot tickRobotRec stepRobot updateWorldapplyRobotUpdatesprocessImmediateFrameupdateWorldAndRobotsstepCESK evalConst addSeedBot execConstaddWatchedLocationpurgeFarAwayWatchesisPrivilegedBotisNearbyOrExemptgrantAchievementverbGrabbingCmdverbedGrabbingCmd formatDevicesprovisionChildupdateRobotLocationonTargetevalCmp compareValues incompatCmp incomparable evalArithsafeDivsafeExpupdateDiscoveredEntitiesupdateAvailableRecipesupdateAvailableCommands$fEqGrabbingCmd$fShowGrabbingCmdNewReleaseFailureFailedReleaseQueryNoMainUpstreamReleaseOnDevelopmentBranchOldUpstreamReleaseisSwarmReleaseTagupstreamReleaseVersion tagToVersiongetNewerReleaseVersion$fShowNewReleaseFailure RuntimeStateAppEventWebUpstreamVersion WebCommand RunWebCode infoScroll modalScrollinitRuntimeState$fShowAppEvent$fShowWebCommandAppStateappDataeventLog scenarios stdAdjList stdEntityMap stdNameList stdRecipesupstreamReleasewebPortworldslogEventmkGameStateConfigAppOptsuserSeed userScenario scriptToRunautoPlayspeed cheatMode colorMode userWebPort repoGitInfo gameState runtimeStateuiState focusedItem focusedEntitypopulateInventoryListdefaultAppOpts nextScenario topContext padAllEvenlygetCompletionIcondrawAchievementsMenuUIdrawAchievementListItemsingleAchievementDetailsgetEntitiesForListgetEditingBounds getContentAt getTerrainAtisOutsideTopLeftCornerisOutsideBottomRightCornerisOutsideRegiongetEditedMapRectangle initAppStateinitPersistentStateconstructAppState startGame restartGamestartGameWithSeedscenarioToAppStateattainAchievementattainAchievement'initAppStateForScenario classicGame0shouldHideWorldCell HideEntityHideAllEntities HideNoEntityHideEntityUnknownTo renderDisplaydrawLocdisplayTerrainCelldisplayRobotCelldisplayEntityCell hidingMode displayLoc displayLocRaw staticDisplay displayStatic staticChar getStatic EllipsisSide BeginningEnd generateModaldrawType drawMarkdowndrawLabeledTerrainSwatchdescriptionTitlemaxModalWindowWidth curMenuNamequitMsglocationToStringdisplayParagraphslayoutParagraphs withEllipsis maybeScrollmakeListWidgetrenderGoalsDisplaydrawGoalListItemsingleGoalDetailsdrawFileBrowseroptionDescriptiondrawLaunchConfigPaneldrawWorldEditordrawLabeledEntitySwatchdrawTerrainSelectorlistDrawTerrainElementdrawEntityPaintSelectorlistDrawEntityPaintElementFKey BackspaceKey EscapeKeyShiftKeyMetaChar ControlCharCharKey openModalisRunningModalsetFocusimmediatelyRedrawWorldloadVisibleRegionmouseLocToWorldCoordsupdateFocusRingcacheValidatedInputscacheValidatedSeedInput handleFBEventhandleLaunchOptionsEventactivateWorldEditorFunctionhandleCtrlLeftClickhandleRightClickhandleMiddleClickhandleWorldEditorPanelEventupdateAreaBounds saveMapFile handleEvent getTutorialsquitGame runFrameUIrunFrameticksPerFrameCap runFrameTicks runGameTickUI runGameTickupdateUIhandleREPLEventrunBaseWebCodevalidateREPLFormadjReplHistIndexhandleWorldEvent scrollViewkeyToDir adjustTPShandleInfoPanelEvent$fEqCompletionTypedrawUIdrawTPS chooseCursor drawDialog drawModalMenu drawKeyMenu drawKeyCmd drawWorlddrawRobotPaneldrawItemdrawLabelledEntityName drawInfoPanelexplainFocusedItemdrawREPL TutorialInfo scenarioPairtutIndexsolutionCommandsdescriptionCommands CoverageInfotutInfonovelSolutionCommandsgenerateIntroductionsSequencerenderTutorialProgression PageAddress entityAddresscommandsAddresscapabilityAddressrecipesAddress SheetTypeCommands Capabilities EditorTypeEmacsVSCode GenerateDocs RecipeGraphEditorKeywordsSpecialKeyNames CheatSheetTutorialCoveragenoPageAddresses generateDocsbuiltinFunctionList editorListkeywordsCommandskeywordsDirections operatorNames commandsPagecapabilityPage$fEqGenerateDocs$fShowGenerateDocs$fEqPageAddress$fShowPageAddress $fEqSheetType$fShowSheetType$fEnumSheetType$fBoundedSheetType$fEqEditorType$fShowEditorType$fEnumEditorType$fBoundedEditorTypeWebStartResult WebStarted WebStartError ToplevelAPISwarmAPIRobotIDswarmApiapidocsBSmkAppwebMain defaultPortstartWebThread$fToSampleText$fToCaptureTYPECapture'$fFromHttpApiDataRobotID EventHandlerappappMaindemoWebenablePasteMode,fused-effects-1.1.2.2-6En1cmV8tf16WX0BA1s3xpControl.Effect.Accum.InternalAccumbaseGHC.BaseMonoidpureControl.Effect.Accumaddlookfmap Data.TuplefstsndlooksControl.AlgebrarunAlgebraLookextractConstFromSignedgetDataFileName getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDir text-1.2.5.0Data.Text.InternalText,unification-fd-0.11.2-10nGBFM9NSRCQtHAyha5T3Control.Unification.TypesUTermData.Functor.FixedpointFixControl.Unification.IntVarIntVar Data.Maybe fromMaybeGHC.EnumEnumcatchIO GHC.MaybeMaybeJust Data.EitherEitherRightLeft#either-5.0.2-G48uex5M2rtHY41Bu8sB5yData.Either.Validation ValidationSuccessFailureLength TangibilityShortLongshortlong requirements' Linear.Vector^+^down cardinalDirsNothingData.Functor.IdentityIdentityData.Traversable sequenceA#boolexpr-0.2-DXvqsOjE6aA2WeolnrW8Rv Data.BoolExprSigned ApplicativeFunctor Traversableidtraversesequence replStart Antiquoting locIdentifier textLiteralinteger parseConst parseLocGparseLoc parseTermAtomparseTermAtom2sLetsDeffixDefMissingSemisControl.Monad.Fail MonadFailControl.UnificationFreeVars IntBindingTSourcedjoinedmkJoingetCtxaddLocToTypeErr noSkolems=:= mkRawTypeErr mkTypeErr throwTypeErrdecomposeDelayTydecomposeCmdTydecomposeFunTydecomposeProdTy validAtomic analyzeAtomicisSimpleUPolytypeghc-prim GHC.ClassesOrdcontainers-0.6.5.1Data.Set.InternalSetGHC.ShowShowmapM'witherable-0.4.2-J9hZjZvsPvZ1DGvIiNnb6B Witherabledirectory-1.3.6.2 System.Directory.Internal.CommonXdgData quoteMaybe fromTextPure prettyType getInnerTypeeqexplainFunctiondescend$aeson-2.1.2.1-HxqWYVrLN48IB6S2r9ccPmData.Aeson.Types.FromJSON parseJSONFromJSONData.Aeson.Types.Internal.:.:?.!= GHC.TypesInt _entityHash_entityDisplay _entityName _entityPlural_entityDescription_entityOrientation _entityGrowth _entityYields_entityProperties_entityCapabilities_entityInventory rehashEntity hashedLensnonzeroEntitiesgetSortCompartor EntityTile TerrainTile TileOffset TileCoordstileBitstileMask tileCoords tileOrigin tileBounds tileOffset plusOffsetGHC.BitsxorresolveRecipesbuildRecipeMapmissingIngredientsFor unlinesExText prettyCont prettyFrame prettyPrefix _defTypes_defReqs_defVals _defStore_robotCapabilities_equippedDevices RobotLocationGHC.IOFilePath convertWF mkPCellJson orderFileNameloadScenarioDirscenarioPathToSavePathloadScenarioItemdefaultRobotStepsPerTickData.Map.InternalMap!lens-5.2.2-7fMhTmpX9jcKZj7Hhz7WWBControl.Lens.TypeGetterDoubleclearWatchingRobots buildWorld brick-1.9-HbgRGqf2qDiAcffMzqeFYxBrick.Widgets.ListListControl.Effect.Throw.InternalThrowControl.Effect.Catch.InternalCatchOrdering addWarningsskipMenuscenarioToUIStatehandleMainMenuEvent advanceMenuhandleMainEventsafeAutoUnpausesaveScenarioInfoOnFinishNocheatsaveScenarioInfoOnQuit zoomGameState doGoalUpdatesstripCmd resetREPLrunInputHandlerhandleREPLEventPilotinghandleREPLEventTyping tabCompletehandleRobotPanelEventhandleInventoryListEventhandleInventorySearchEvent makeEntitydescriptionModaldrawNewGameMenuUImakeBestScoreRows drawGameUIdrawClockDisplay clockEquippeddrawTime maybeDrawTime replHeightrenderErrorDialog drawModaldescriptionWidgetmessagesWidget recipesWith drawRecipetimeEdrawRobotMachine drawLogEntryreplPromptAsWidget CommandAccumextractCommandUsagesgetDescCommands getCommandscomputeCommandIntroductionsloadScenarioCollection recipeLevelsignoredEntities hiddenNode.~>.---<>