h*"55      !"#$%&'()*+,-./0123456 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g hijklmnopqrstuvwxyz{|}~         !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"""""""""""########$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&''''''''''''''''''''''((((((((((((((((((())))))))))))))))))))))))))))))) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) * * * * * * * * + + + + + + + + + + + + + + +                                                                                                                                                                                            , , , , , , , , , , , , , , , , , , , - - - - - - - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 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 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 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 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 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 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 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6666666666666666666666666666666677777777777777777777777777777777777777777777777778888888888888888888889999999999999999999::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;<<<<<<<<<<<<<<<<<<<<<<<<<<====================================================>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>?????????????????@@@@@@@@@AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFFFFFFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHIIIJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPQRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRSTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTUUUVWWWWWWWWWWXXYYYYZZZZZZZZZZZZZZ[\]]]]]]]]]]]^^^____________________________________________________````aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabccdeffgggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggghhiiiiijjjkkkkkkkkkkklllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllmmmmmnnnnnnnnooooooopqqqrrrrrrsssssssssssssssssssssstttttttttttttttttuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvwwxxxxxxxxxxxxxxxxxxyyyyyyyyyyyyyyyyyyzzzzzzzz{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{|}}}}}~~~~                                                                                                                                !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""################################################################################################################################$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))********************************************************************************************************************************++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,--------------------------------------------------------------------------------------------------------------------------------................................................................................................................................////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222233333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444440.25.21 Safe-Inferred"  Safe-Inferred"*6futharkAST metrics are simply a collection from identifiable node names to the number of times that node appears.6767  Safe-Inferred"6:futhark&Whether an option accepts an argument.<futharkThe 5! becomes part of the help pretty.>futharkSpecification if a single command line option. The option must have a long name, and may also have a short name.In the action, the option argument (if any) is stored as in the char*-typed variable optarg.EfutharkGenerate an option parser as a function of the given name, that accepts the given command line options. The result is a function that should be called with argc and argv'. The function returns the number of argv# elements that have been processed.If option parsing fails for any reason, the entire process will terminate with error code 1. >?@ABCD:;<=E >?@ABCD:;<=E  Safe-Inferred"FfutharkPrettyprint a C expression.Gfuthark$Prettyprint a list of C definitions.HfutharkPrettyprint a single C type.Ifuthark Prettyprint a single identifier.JfutharkPrettyprint a single function.Kfuthark Prettyprint a list of functions.FGHIJKFGHIJK  Safe-Inferred"tLfuthark rtsc atomics.hMfuthark rtsc uniform.hNfuthark rtsc free_list.hOfuthark rtsc event_list.hPfuthark rtscgpu.hQfuthark rtscgpu_prototypes.hRfuthark rtschalf.hSfuthark rtsclock.hTfuthark rtsc scalar_f16.hUfuthark rtscscalar.hVfuthark rtsc scheduler.hWfuthark rtscserver.hXfuthark rtsctiming.hYfuthark rtsctuning.hZfuthark rtscutil.h[futhark rtscvalues.h\futhark rtscerrors.h]futhark rtsc ispc_util.h^futhark rtsccache.h_futhark rtsc context.h`futhark rtsccontext_prototypes.hafuthark rtscbackends/opencl.hbfuthark rtscbackends/cuda.hcfuthark rtscbackends/hip.hdfuthark rtsc backends/c.hefuthark rtscbackends/multicore.hffuthark rtsccopy.hL_`fNOPQRSTUVWXYZ[\^M]abcdeL_`fNOPQRSTUVWXYZ[\^M]abcde  Safe-Inferred"gfuthark rtscuda prelude.cugg Safe-Inferred"hfuthark rts javascript server.jsifuthark rts javascript values.jsjfuthark rts javascriptwrapperclasses.jshijhij Safe-Inferred"Skfuthark rtsopencl transpose.cllfuthark rtsopencl prelude.clmfuthark rtsopenclcopy.clklmklm Safe-Inferred"nfuthark rtspython memory.pyofuthark rtspython opencl.pypfuthark rtspythonpanic.pyqfuthark rtspython scalar.pyrfuthark rtspython server.pysfuthark rtspython tuning.pytfuthark rtspython values.pynopqrstnopqrst Safe-Inferred"ufutharkThe Lefts are pure text; the Rights are the contents of interpolations.uu Safe-Inferred"#+5futhark:The outcome of attempted to find a route through a vertex.5futhark-No sink could be reached through this vertex.5futharkA cycle was detected. A sink can be reached through this vertex if a sink can be reached from the vertex at this depth. If no sink can be reached from the vertex at this depth, then the graph should be updated by these actions. Until the vertex is reached, the status of these vertices are pending.5futhark?A sink was found. This is the id of the vertex connected to it.5futharkCreates a set of edges where no edge is reversed or exhausted.futharkLike  but for a single vertex.futharkInitial y* state before any vertex has been visited.futharkInsert a new vertex into the graph. If its variable already is represented in the graph, the original graph is returned.futharkAdjust the vertex with this specific id. When no vertex with that id is a member of the graph, the original graph is returned.futharkConnect the vertex with this id to a sink. When no vertex with that id is a member of the graph, the original graph is returned.futharkAdd these edges to the vertex with this id. When no vertex with that id is a member of the graph, the original graph is returned.futhark2Does a vertex for the given id exist in the graph?futhark%Returns the vertex with the given id.futharkReturns whether a vertex with the given id exists in the graph and is connected directly to a sink.futhark route src g attempts to find a path in g+ from the source connected vertex with id src. If a sink is found, all edges along the path will be reversed to create a route, and the id of the vertex that connects to the sink is returned.futharkrouteMany srcs g attempts to create a  in g from every vertex in srcs. Returns the ids for the vertices connected to each found sink.futharkfold g f (a, vs) et i folds f over the vertices in g2 that can be reached from the vertex with handle i accessed via an edge of type et. Each vertex v= may be visited up to two times, once for each type of edge e pointing to it, and each time f a e v% is evaluated to produce an updated a value to be used in future f% evaluations or to be returned. The vs set records which f a e v evaluations already have taken place. The function returns an updated y1 set recording the evaluations it has performed.futharkreduce g r vs et i returns x* if a sink can be reached via the vertex v with id i in g. Otherwise it returns w  (r x et v) where x is the 5 aggregate of all values produced by reducing the vertices that are available via the edges of v. et" identifies the type of edge that v, is accessed by and thereby which edges of v that are available. vs caches reductions of vertices that previously have been visited in the graph.0The reduction of a cyclic reference resolves to 5.*}~z|{yvwx*}~z|{yvwx Safe-Inferred"8futharkA mapping from package paths to their chosen revisions. This is the result of the version solver.futharkA structure corresponding to a  futhark.pkg file, including comments. It is an invariant that duplicate required packages do not occcur (the parser will verify this).futharkThe name of the package.futharkAn entry in the required section of a  futhark.pkg file.futharkName of the required package.futharkThe minimum revision.futharkAn optional hash indicating what this revision looked like the last time we saw it. Used for integrity checking.futharkWraps a value with an annotation of preceding line comments. This is important to our goal of being able to programmatically modify the  futhark.pkg$ file while keeping comments intact.futharkA line comment.futharkThe dependencies of a (revision of a) package is a mapping from package paths to minimum versions (and an optional hash pinning).futharkA package path is a unique identifier for a package, for example  github.comuserfoo.futharkTurn a package path (which always uses forward slashes) into a file path in the local file system (which might use different slashes).futharkVersions of the form (0,0,0)-timestamp+hash are treated specially, as a reference to the commit identified uniquely with hash (typically the Git commit ID). This function detects such versions.futharkcommitVersion timestamp commit constructs a commit version.futharkUnfortunately, Data.Versions has a buggy semver parser that collapses consecutive zeroes in the metadata field. So, we define our own parser here. It's a little simpler too, since we don't need full semver.futhark9The name of the file containing the futhark-pkg manifest.futharkPossibly given a package path, construct an otherwise-empty manifest file.futharkPrettyprint a package manifest such that it can be written to a  futhark.pkg file.futhark3The required packages listed in a package manifest.futharkWhere in the corresponding repository archive we can expect to find the package files.futharkAdd new required package to the package manifest. If the package was already present, return the old version.5futharkCheck if the manifest specifies a required package with the given package path.futhark6Remove a required package from the manifest. Returns 5 if the package was not found in the manifest, and otherwise the new manifest and the  that was present.futharkParse a pretty as a . The 5 is used for any error messages.futhark%Read contents of file and pass it to .futharkPrettyprint a build list; one package per line and newline-terminated.0*+,-./0123450*+,-./012345 Safe-Inferred" futharkA profiling report contains all profiling information for a single benchmark (meaning a single invocation on an entry point on a specific dataset).futharkMapping memory spaces to bytes.futhark+A thing that has occurred during execution.futharkShort, single line.futharkIn microseconds.futharkLong, may be multiple lines.futhark:Read a profiling report from a bytestring containing JSON.futhark4Read a profiling report from a text containing JSON.   Safe-Inferred"1futhark Encoded form.futharkAs the user typed it.5futhark Encoded form.5futharkAs the user typed it.futharkLike nub$, but without the quadratic runtime.futharkLike nubBy$, but without the quadratic runtime.futharkLike &, but monadic and generalised to any 5.futhark chunk n a splits a into n!-size-chunks. If the length of a is not divisible by n', the last chunk will have fewer than n' elements (but it will never be empty).futhark chunks ns a splits a, into chunks determined by the elements of ns. It must hold that sum ns == length a, or the resulting list may contain too few chunks, or not all elements of a.futharkchunkLike xss ys chunks the elements of ys to match the elements of xss-. The sum of the lengths of the sublists of xss must match the length of ys.futharkLike 5%, but returns zero for an empty list.futharkLike 5%, but returns zero for an empty list.futhark dropAt i n drops n elements starting at element i.futhark takeLast n l takes the last n elements of l.futhark dropLast n l drops the last n elements of l.futharkA combination of 5 and 5.futharkA combination of  and 5futharkReturn the list element at the given index, if the index is valid.futhark3Return the first element of the list, if it exists.futhark=Lookup a value, returning also the index at which it appears.futharkLike 5, but from the end.futharkLike 5, but produces three lists.futharkReturn the list element at the given index, if the index is valid, along with the elements before and after.futharkReturn the first list element that satisifes a predicate, along with the elements before and after.futharkCompute a hash of a text that is stable across OS versions. Returns the hash as a text as well, ready for human consumption.futharkLike 5, but produces text.futhark7The Unix environment when the Futhark compiler started.futharkTrue if the environment variable, viewed as an integer, has at least this numeric value. Returns False if variable is unset or not numeric.futharkThe time at which the process started - or more accurately, the first time this binding was forced.futharkAre we running in a terminal capable of fancy commands and visualisation?futharkIs this handle connected to a terminal capable of fancy commands and visualisation?futharkLike 5, but also wraps exceptions when the indicated binary cannot be launched, or some other exception is thrown. Also does shenanigans to handle improperly encoded outputs.futhark7Every non-directory file contained in a directory tree.futhark b3, and the returned array guarantee that for i < j:!not ( dep (ret !! j) (ret !! i) ).futhark5, but only if FUTHARK_COMPILER_DEBUGGING% is set to to the appropriate level... Safe-Inferred"ܛfutharkCalculate the given permutation of the list. It is an error if the permutation goes out of bounds.futhark Produce the inverse permutation.futharkReturn the first dimension not affected by the permutation. For example, the permutation [1,0,2] would return 2.futharkCompose two permutations, with the second given permutation being applied first.futharkCheck whether the first list is a permutation of the second, and if so, return the permutation. This will also find identity permutations (i.e. the lists are the same) The implementation is naive and slow.futharkIf l is an index into the array a, then transposeIndex k n l. is an index to the same element in the array transposeArray k n a.futharkIf perm, is conceptually a map of a transposition, isMapTranspose perm returns the number of dimensions being mapped and the number dimension being transposed. For example, we can consider the permutation  [0,1,4,5,2,3]5 as a map of a transpose, by considering dimensions [0,1], [4,5], and [2,3] as single dimensions each.If the input is not a valid permutation, then the result is undefined.None"futhark9Round a single-precision floating point number correctly.futharkRound a single-precision floating point number upwards correctly.futharkRound a single-precision floating point number downwards correctly.futhark9Round a double-precision floating point number correctly.futharkRound a double-precision floating point number upwards correctly.futharkRound a double-precision floating point number downwards correctly.futharkThe next representable single-precision floating-point value in the given direction.futharkThe next representable double-precision floating-point value in the given direction.futharkThe system-level lgamma() function.futharkThe system-level  lgammaf() function.futharkThe system-level tgamma() function.futharkThe system-level  tgammaf() function.futharkThe system-level hypot function.futharkThe system-level hypotf function.futharkThe system-level erf() function.futharkThe system-level erff() function.futharkThe system-level erfc() function.futharkThe system-level erfcf() function.futharkThe system-level cbrt function.futharkThe system-level cbrtf function.futharkThe system-level ldexp function.futharkThe system-level ldexpf function.futharkThe system-level copysign function.futharkThe system-level  copysignf function. Safe-Inferred"futharkThis wrapper allows you to use a type that is an instance of the true class whenever the simile class is required.futharkA twist on the 5? type class that is more friendly to symbolic representations.futharkLike (, but rounds towards positive infinity.   Safe-Inferred"#"5'(%5&5555#$555555555555555)55555 Safe-Inferred"e futhark&Stale pretty document stored in state.futharkThe last successfully compiled file content. Using VirtualFile for convenience, we can use anything with {version, content}futharkPositionMapping between current and stale file content. Nothing if last type-check is successful.futharkA mapping between current file content and the stale (last successful compiled) file content. Currently, only supports entire line mapping, more detailed mapping might be achieved via referring to haskell-language-server@efb4b945futharkThe mapping from stale position to current. e.g. staleToCurrent[2] = 4 means "line 2" in the stale file, corresponds to "line 4" in the current file.5futhark+The mapping from current position to stale.futhark9Compute PositionMapping using the diff between two texts.futharkTransform current Pos to the stale pos for query Note: line and col in Pos is larger by onefuthark9Transform stale Loc gotten from stale AST to current Loc. Safe-Inferred"@futhark*Typeclass for monads that support logging.futharkAdd one log entry.futharkAppend an entire log.futharkTypeclass for things that can be turned into a single-entry log.futhark1An efficiently catenable sequence of log entries.futharkTransform a log into pretty. Every log entry becomes its own line (or possibly more, in case of multi-line entries). Safe-Inferred"futharkMonads that support a stateful package registry. These are also required to be instances of 5 because most package registry operations involve network operations.futharkA package registry is a mapping from package paths to information about the package. It is unlikely that any given registry is global; rather small registries are constructed on-demand based on the package paths referenced by the user, and may also be combined monoidically. In essence, the PkgRegistry is just a cache.futharkA temporary directory in which we store Git checkouts while running. This is to avoid constantly re-cloning. Will be deleted when  futhark pkg terminates. In principle we could keep this around for longer, but then we would have to 'git pull' now and then also. Note that the cache is stateful - we are going to use  git checkout to move around the history. It is generally not safe to have multiple operations running concurrently.futharkInformation about a package. The name of the package is stored separately.futharkLook up information about a specific commit, or HEAD in case of Nothing.futharkInformation about a version of a single package. The version number is stored separately.futharkThe commit ID can be used for verification ("freezing"), by storing what it was at the time this version was last selected.futhark7Timestamp for when the revision was made (rarely used).futharkGet the absolute path to a package directory on disk, as well as relative paths to files that should be installed from this package. Composing the package directory and one of these paths refers to a local file (pointing into the cache) and is valid at least until the next cache operation.futharkThe manifest is stored as a monadic action, because we want to fetch them on-demand. It would be a waste to fetch it information for every version of every package if we only actually need a small subset of them.5futharkCreate memoisation around a  action to ensure that multiple inspections of the same revisions will not result in potentially expensive IO operations.futhark6Lookup information about a given version of a package.futharkRetrieve information about a package based on its package path. This uses Semantic Import Versioning when interacting with repositories. For example, a package  github.comuserrepo6 will match version 0.* or 1.* tags only, a package  github.comuserrepo/v2$ will match 2.* tags, and so forth..futhark=Given a package path, look up information about that package.futhark:Look up information about a specific version of a package.futhark%Find the newest version of a package. Safe-Inferred">futharkA mapping of package revisions to the dependencies of that package. Can be considered a  without the option of obtaining more information from the Internet. Probably useful only for testing the solver.5futharkA rough build list is like a build list, but may contain packages that are not reachable from the root. Also contains the dependencies of each package.5futharkGiven a list of immediate dependency minimum version constraints, find dependency versions that fit, including transitive dependencies.futharkRun the solver, producing both a package registry containing a cache of the lookups performed, as well as a build list.futharkPerform package resolution with only pre-known information. This is useful for testing. Safe-Inferred"futharkPrint a doc with styling to the given file; stripping colors if the file does not seem to support such things.futharkLike , but with a final newline.futharkLike , but to stdout.futharkLike , but with a final newline.futharkProduce text suitable for printing on the given handle. This mostly means stripping any control characters if the handle is not a terminal.futharkPrettyprint a value to a 5, appropriately wrapped.futharkPrettyprint a value to a 5 on a single line.futharkPrettyprint a value to a 5, appropriately wrapped.futhark Convert a 5 to text. This ignores any annotations (i.e. it will be non-coloured output).futhark Convert a 5 to a 5 , through . Intended for debugging.futharkPrettyprint a value to a 5 on a single line.futhark,Prettyprint a list enclosed in curly braces.futharkLike *, but put a linebreak after every element.futhark The document  ds separates ds1 with commas and encloses them with parentheses.futharkMake sure that the given document is printed on just a single line.futharkSplits the string into words and permits line breaks between all of them.futharkStack and prepend a list of 5 s to another 5?, separated by a linebreak. If the list is empty, the second 51 will be returned without a preceding linebreak.futharkSurround the given document with enclosers and add linebreaks and indents.futharkPrettyprint on a single line up to at most some appropriate number of characters, with trailing ... if necessary. Used for error messages.futharkLike ", but a newline after every comma.futhark&Separate with semicolons and newlines.futharkSeparate with commas.futharkSeparate with linebreaks.futhark The document  p d encloses the document d in parenthesis if p is True, and otherwise yields just d.555555555555555555555555555555555555555555555555555555555555555555566666666666666666666666666666 !, ! Safe-Inferred"[futharkLike a , but also grouped in compound ways that are not supported by raw values. You cannot parse or read these in standard ways, and they cannot be elements of arrays.futharkThe structure of a compound value, parameterised over the actual values. For most cases you probably want .futharkMust not be single value.futhark4Create a tuple for a non-unit list, and otherwise a futharkIf the value is a tuple, extract the components, otherwise return a singleton list of the value.96666666666666666666666666666666666 6666666666 66 Safe-Inferred" futharkAn error that is not the users fault, but a bug (or limitation) in the compiler. Compiler passes should only ever report this error - any problems after the type checker are *our* fault, not the users. These are generally thrown as IO exceptions, and caught at the top level.futharkA compiler error.futharkAn error that happened due to something the user did, such as provide incorrect code or options.futharkAn internal compiler error. The second pretty is extra data for debugging, which can be written to a file.futharkThere are two classes of internal errors: actual bugs, and implementation limitations. The latter are already known and need not be reported.futhark.Print an error intended for human consumption.futhark Raise an " based on a prettyprinting result.futhark Raise an  based on a string.futhark Raise an " based on a prettyprinting result.futhark Throw an  that is a .futhark Throw an  that is a .futharkLike  , but with a 5.futharkLike  , but with a 5. Safe-Inferred"futharkInformation about a progress bar to render. The "progress space" spans from 0 and up to the 0, but can be visualised in any number of steps.futhark%Number of steps in the visualisation.futharkThe logical upper bound.futharkThe current position in the progress bar, relative to the upper bound.futharkRender the progress bar.futharkRender a spinner - a kind of progress bar where there is no upper bound because we don't know how long it'll take. You certainly know these from THE INTERNET. The non-negative integer is how many "steps" have been taken. The spinner looks best if this is incremented by one for every call. Safe-Inferred"futharkA table entry. Consists of the content as well as how it should be styled..futharkMakes a table entry.futharkProduce a table from a list of entries and a padding amount that determines padding from the right side of the widest entry in each column. Safe-Inferred"futharkA name tagged with some integer. Only the integer is used in comparisons, no matter the type of vn.futharkThe abstract (not really) type representing names in the Futhark compiler. 54s, being lists of characters, are very slow, while 5s are based on byte-arrays.futharkA fancier name for () - encodes no uniqueness information. Also has a different prettyprinting instance.futharkThe uniqueness attribute of a type. This essentially indicates whether or not in-place modifications are acceptable. With respect to ordering,  is greater than .futhark-May have references outside current function.futhark'No references outside current function.futhark7Convert a name to the corresponding list of characters.futhark7Convert a list of characters to the corresponding name.futhark$Convert a name to the corresponding 5.futhark Convert a 5 to the corresponding name.futhark/A human-readable location string, of the form filename:lineno:columnno?. This follows the GNU coding standards for error messages: 8https://www.gnu.org/prep/standards/html_node/Errors.htmlThis function assumes that both start and end position is in the same file (it is not clear what the alternative would even mean).futharkLike , but locStrRel prev now prints the location now- with the file name left out if the same as prev. This is useful when printing messages that are all in the context of some initially printed location (e.g. the first mention contains the file name; the rest just line and column name).futhark, but for text.futhark, but for text.futharkGiven a list of strings representing entries in the stack trace and the index of the frame to highlight, produce a final newline-terminated string for showing to the user. This string should also be preceded by a newline. The most recent stack frame must come first in the list.futhark Return the tag contained in the .futhark!Return the name contained in the .futharkReturn the base  converted to a string.futharkEnclose a string in the prefered quotes used in error messages. These are picked to not collide with characters permitted in identifiers.$%&#$) $%&#$)  Safe-Inferred"ofutharkA name source is conceptually an infinite sequence of names with no repeating entries. In practice, when asked for a name, the name source will return the name along with a new name source, which should then be used in place of the original.The 6 instance is based on how many names have been extracted from the name source.futhark9Produce a fresh name, using the given name as a template.futharkA blank name source.futhark=A new name source that starts counting from the given number.! Safe-Inferred"26futharkBoolean negation.6futharkBitwise complement.6futharkNumerical negation.6futharkAbsolute/numerical value.% &#$)2" Safe-Inferred" ]futhark&Whether an option accepts an argument.futharkSpecification if a single command line option. The option must have a long name, and may also have a short name.When the statement is being executed, the argument (if any) will be stored in the variable optarg.futharkGenerate option parsing code that accepts the given command line options. Will read from sys.argv.If option parsing fails for any reason, the entire process will terminate with error code 1.  # Safe-Inferred"!2futharkThe input type. Contains: current position previous charcurrent input stringbytes consumed so far$ Safe-Inferred"!futharkPrelude embedded as 5 values, one for every file.% Safe-Inferred"Pfuthark+Conversion operators try to generalise the from t0 x to t1 instructions from LLVM.futharkZero-extend the former integer type to the latter. If the new type is smaller, the result is a truncation.futharkSign-extend the former integer type to the latter. If the new type is smaller, the result is a truncation.futharkConvert value of the former floating-point type to the latter. If the new type is smaller, the result is a truncation.futharkConvert a floating-point value to the nearest unsigned integer (rounding towards zero).futharkConvert a floating-point value to the nearest signed integer (rounding towards zero).futhark6Convert an unsigned integer to a floating-point value.futhark3Convert a signed integer to a floating-point value.futharkConvert an integer to a boolean value. Zero becomes false; anything else is true.futharkConvert a boolean to an integer. True is converted to 1 and False to 0.futharkConvert a float to a boolean value. Zero becomes false; | anything else is true.futharkConvert a boolean to a float. True is converted to 1 and False to 0.futharkComparison operators are like s, but they always return a boolean value. The somewhat ugly constructor names are straight out of LLVM.futharkAll types equality.futharkUnsigned less than.futharkUnsigned less than or equal.futharkSigned less than.futharkSigned less than or equal.futharkFloating-point less than.futhark"Floating-point less than or equal.futharkBoolean less than.futharkBoolean less than or equal.futharkBinary operators. These correspond closely to the binary operators in LLVM. Most are parametrised by their expected input and output types.futharkInteger addition.futharkFloating-point addition.futharkInteger subtraction.futharkFloating-point subtraction.futharkInteger multiplication.futharkFloating-point multiplication.futharkUnsigned integer division. Rounds towards negativity infinity. Note: this is different from LLVM.futhark>Unsigned integer division. Rounds towards positive infinity.futharkSigned integer division. Rounds towards negativity infinity. Note: this is different from LLVM.futhark with uniqueness information, used for function return types.futharkA type with shape and uniqueness information, used declaring return- and parameters types.futharkA type with existentially quantified shapes - used as part of function (and function-like) return types. Generally only makes sense when used in a list.futharkA type with shape information, used for describing the type of variables.futhark>The type of a value. When comparing types for equality with 6, shapes must match.futhark1Token, index space, element type, and uniqueness.futhark:A string representing a specific non-default memory space.futhark!The memory space of a block. If , this is the "default" space, whatever that is. The exact meaning of the  depends on the backend used. In GPU kernels, for example, this is used to distinguish between constant, global and shared memory spaces. In GPU-enabled host code, it is used to distinguish between host memory () and GPU space.futharkA special kind of memory that is a statically sized array of some primitive type. Used for private memory on GPUs.futhark>A class encompassing types containing array shape information.futhark0Return the rank of an array with the given size.futhark5Check whether one shape if a subset of another shape.futharkThe size of an array type as merely the number of dimensions, with no further information.futharkLike  but some of its elements may be bound in a local environment instead. These are denoted with integral indices.futharkThe size of this dimension.futhark"Something that may be existential.futharkThe size of an array as a list of subexpressions. If a variable, that variable must be in scope where this array is used.futharkThe size of an array type as a list of its dimension sizes, with the type of sizes being parametric.futhark2Whether some operator is commutative or not. The 6: instance returns the least commutative of its arguments.futharkstripDims n shape strips the outer n dimensions from shape.futharkIf the argument is a , return its component.futharkIf the slice is all s, return the components.futhark3The dimensions of the array produced by this slice.futhark.The shape of the array produced by this slice.futharkA slice with a stride of one.futharkFix the ?s of a slice. The number of indexes must equal the length of  for the slice.futharkFurther slice the >s of a slice. The number of slices must equal the length of  for the slice.futharkCreate array of given type and shape, with undefined elements. futhark51st arg is the new shape, 2nd arg is the input array. futharkPermute the dimensions of the input array. The list of integers is a list of dimensions (0-indexed), which must be a permutation of [0,n-1], where n1 is the number of dimensions in the input array. futharkUpdate an accumulator at the given index with the given value. Consumes the accumulator and produces a new one. If , perform a run-time bounds check and ignore the write if out of bounds (like Scatter). futharkWhich kind of reshape is this? futhark*New shape is dynamically same as original. futharkAny kind of reshaping. futhark4Apart from being Opaque, what else is going on here? futharkNo special operation. futhark,Print the argument, prefixed by this string. futharkA body consists of a sequence of statements, terminating in a list of result values. futhark5The result of a body is a sequence of subexpressions. futhark3A pairing of a subexpression and some certificates. futharkA sequence of statements. futharkA local variable binding. futharkPat. futhark Auxiliary information statement. futhark Expression. futhark3Auxilliary Information associated with a statement. futhark?A pattern is conceptually just a list of names and their types. futharkA single statement. futhark1Convert a statement list to a statement sequence. futhark1Convert a statement sequence to a statement list. futhark,The first statement in the sequence, if any. futhark+The last statement in the sequence, if any. futhark Construct a   with no certificates. futhark Construct a   from a variable name. futhark Construct a   from subexpressions. futhark Construct a   from variable names. futharkThe  of a  , if it exists. futharkThe loop iterator varfuthark!The type of the loop iterator varfutharkThe number of iterations.% &#$)      , Safe-Inferred"9 futharkA monad that stores a name source. The following is a good instance for a monad in which the only state is a  NameSource vn:  instance MonadFreshNames vn MyMonad where getNameSource = get putNameSource = put futharkRun a computation needing a fresh name source and returning a new one, using   and  # before and after the computation. futhark9Produce a fresh name, using the given name as a template. futharkAs newName, but takes a 5 for the name template.6futharkProduce a fresh *, using the given base name as a template. futharkProduce a fresh *, using the given base name as a template. futharkProduce a fresh %, using the given name as a template. futharkProduce a fresh , using the given 1 as a template, but possibly modifying the name. futharkProduce a fresh %, using the given name as a template.  - Safe-Inferred", futhark Construct a   that is a  . futhark reshapeOuter newshape n oldshape returns a  % expression that replaces the outer n dimensions of oldshape with newshape. futhark reshapeInner newshape n oldshape returns a  % expression that replaces the inner m-n dimensions (where m is the rank of oldshape) of src with newshape. futhark!reshapeIndex to_dims from_dims is transforms the index list is" (which is into an array of shape  from_dims) into an index list is'", which is into an array of shape to_dims. is must have the same length as  from_dims, and is' will have the same length as to_dims. futharkunflattenIndex dims i: computes a list of indices into an array with dimension dims given the flat index i2. The resulting list will have the same size as dims. futharkflattenIndex dims is computes the flat index of is into an array with dimensions dims. The length of dims and is must be the same. futharkGiven a length n list of dimensions dims, sizeSizes dims will compute a length n+1 list of the size of each possible array slice. The first element of this list will be the product of dims!, and the last element will be 1.  . Safe-Inferred" futharkThe class of representations whose annotations can be prettyprinted.  / Safe-Inferred"F futhark4A monad transformer that carries around an extended  . Its  ( method will first look in the extended  , and then use the   method of the underlying monad. futhark>A constraint that indicates two representations have the same   representation. futharkThe class of things that can provide a scope. There is no overarching rule for what this means. For a  +, it is the corresponding pattern. For a  , is is the parameters. futhark,The class of monads that not only provide a  1, but also the ability to locally extend it. A 6 containing a  - is the prototypical example of such a monad. futharkRun a computation with an extended type environment. Note that this is intended to *add* to the current type environment, it does not replace it. futharkThe class of applicative functors (or more common in practice: monads) that permit the lookup of variable types. A default method for   exists, which is sufficient (if not always maximally efficient, and using 6 to fail) when   is defined. futharkReturn the type of the given variable, or fail if it is not in the type environment. futharkReturn the info of the given variable, or fail if it is not in the type environment. futharkReturn the type environment contained in the applicative functor. futharkReturn the result of applying some function to the type environment. futharkA scope is a mapping from variable names to information about that name. futhark!How some name in scope was bound. futhark"Extend the monadic scope with the   the given value. futharkThe scope of a loop form. futharkThe scope of a pattern. futharkThe scope of a pattern element. futhark$The scope of some lambda parameters. futhark.The scope of some function or loop parameters. futharkIf two scopes are really the same, then you can convert one to the other. futhark3Run a computation in the extended type environment.  0 Safe-Inferred"I futhark This representation supports an   for its  .. This is used for some simplification rules. futharkTransform every sub-  of this op. futharkA function for monadically traversing any sub-statements of the given op for some representation. futharkExpress a monad expression on a syntax node. Each element of this structure expresses the action to be performed on a given child. futharkExpress a monad mapping operation on a syntax node. Each element of this structure expresses the operation to be performed on a given child. futharkMost bodies are enclosed in a scope, which is passed along for convenience. futhark/A mapper that simply returns the tree verbatim. futharkMap a monadic action across the immediate children of an expression. Importantly, the mapping does not descend recursively into subexpressions. The mapping is done left-to-right. futharkLike   , but in the 6 monad. futharkA no-op traversal. futharkAs  $, but do not construct a result AST. futharkA helper for defining  .  1 Safe-Inferred" futharkRephrasing any fragments inside an Op from one representation to another. futharkA collection of functions that together allow us to rephrase some IR fragment, in some monad m . If we let m be the 6 monad, we can conveniently do rephrasing that might fail. This is useful if you want to see if some IR in e.g. the Kernels rep actually uses any Kernels-specific operations. futharkRephrase an entire program. futharkRephrase a function definition. futharkRephrase an expression. futharkRephrase a statement. futharkRephrase a pattern. futharkRephrase a pattern element.6futharkRephrase a parameter. futharkRephrase a body. futharkRephrase a lambda.  2 Safe-Inferred" futharkThe  of a parameter. futharkThe  of a parameter. futharkAn  corresponding to a parameter. futharkAn $ corresponding to a pattern element. futharkThe type of a name bound by a . futharkSet the rep of a . futharkReturn a list of the s bound by the  . futharkReturn a list of the s bound by the  . futhark1Return a list of the typess bound by the pattern. futhark0Return the number of names bound by the pattern. futharkCreate a pattern using  as the attribute. 3 Safe-Inferred" futharkEither return precomputed free names stored in the attribute, or the freshly computed names. Relies on lazy evaluation to avoid the work. futharkA class indicating that we can obtain free variable information from values of this type. futhark+A computation to build a free variable set. futharkA set of names. Note that the 60 instance is a dummy that treats everything as 6 if 6, and otherwise 6. futharkRetrieve the data structure underlying the names representation. futhark*Retrieve the set of tags in the names set. futhark(Does the set of names contain this name? futhark,Does the set of names not contain this name? futhark(Construct a name set from a list. Slow. futhark,Turn a name set into a list of names. Slow. futhark(Construct a name set from a single name. futhark"The intersection of two name sets. futharkDo the two name sets intersect? futhark-Subtract the latter name set from the former. futharkMap over the names in a set. futhark-Consider a variable to be bound in the given   computation. futhark"Take note of a variable reference. futhark*Take note of a set of variable references. futharkReturn the set of variable names that are free in the given statements and result. Filters away the names that are bound by the statements. futhark/The free variables of some syntactic construct. futhark1The names bound by the bindings immediately in a  . futharkThe names bound by a binding. futhark The names bound by the bindings. futharkThe class of integer types that can be used for constructing  s. futhark7The type of an expression, known to be an integer type. futhark>The class of numeric types that can be used for constructing  s. futhark-Construct a typed expression from an integer. futharkConstruct a numeric expression from a boolean expression. This can be used to encode arithmetic control flow. futharkA   tagged with a phantom type used to provide type-safe construction. Does not guarantee that the underlying expression is actually type correct. futharkA primitive expression parametrised over the representation of free variables. Note that the 6, 5, and 6< instances perform automatic (but simple) constant folding.Note also that the 6 instance assumes  semantics! futharkThis expression is of type . futharkThis expression is of type . futharkThis expression is of type . futharkThis expression is of type . futharkThis is a boolean expression. futharkThis expression is of type  . futharkThis expression is of type 6. futharkThis expression is of type 6. futhark True if the   has at least this many nodes. This can be much more efficient than comparing with 6 for large  s, as this function is lazy. futharkPerform quick and dirty constant folding on the top level of a PrimExp. This is necessary because we want to consider e.g. equality modulo constant folding. futharkLifted logical conjunction. futharkLifted logical conjunction. futharkLifted relational operators; assuming signed numbers in case of integers. futharkLifted relational operators; assuming signed numbers in case of integers. futharkLifted relational operators; assuming signed numbers in case of integers. futharkLifted relational operators; assuming signed numbers in case of integers. futharkLifted relational operators; assuming signed numbers in case of integers. futharkLifted bitwise operators. The right-shift is logical, *not* arithmetic. futharkLifted bitwise operators. The right-shift is logical, *not* arithmetic. futharkLifted bitwise operators. The right-shift is logical, *not* arithmetic. futharkLifted bitwise operators. The right-shift is logical, *not* arithmetic. futharkLifted bitwise operators. The right-shift is logical, *not* arithmetic. futharkUntyped smart constructor for sign extension that does a bit of constant folding. futharkUntyped smart constructor for zero extension that does a bit of constant folding. futhark Evaluate a   in the given monad. Invokes 6 on type errors. futhark!The type of values returned by a  4. This function returning does not imply that the   is type-correct.6futhark/Is the expression a constant zero of some sort?6futhark.Is the expression a constant one of some sort?6futhark3Is the expression a constant negative of some sort? futhark If the given   is a constant of the wrong integer type, coerce it to the given integer type. This is a workaround for an issue in the 6 instance. futharkBoolean-valued PrimExps. futharkBoolean-valued PrimExps. futharkConversion from Bool to  futhark#Boolean negation smart constructor. futharkSMax on 32-bit integers. futharkSMin on 32-bit integers. futharkSMax on 64-bit integers. futharkSMin on 64-bit integers. futharkSign-extend to 32 bit integer. futharkSign-extend to 64 bit integer. futharkZero-extend to 32 bit integer. futharkZero-extend to 64 bit integer. futhark16-bit float minimum. futhark32-bit float minimum. futhark64-bit float minimum. futhark16-bit float maximum. futhark32-bit float maximum. futhark64-bit float maximum. futharkConvert result of some integer expression to have the same type as another, using sign extension. futhark)Produce a mapping from the leaves of the   to their designated types. futharkMultiplication of untyped  )s, which must have the same type. Uses  for integer operations. futharkDivision of untyped  s, which must have the same type. For integers, this is unsafe signed division. futharkAddition of untyped  (s, which must have the same type. Uses  for integer operations. futharkSubtraction of untyped  (s, which must have the same type. Uses  for integer operations. futharkEquality of untyped  !s, which must have the same type.   3 2 4 4 4 4 4 7 7 6 6 46 Safe-Inferred"? futharkRepresentations in which all annotations support name substitution. futharkA type that is an instance of this class supports substitution of any names contained within. futharksubstituteNames m e replaces the variable names in e* with new names, based on the mapping in m$. It is assumed that all names in e( are unique, i.e. there is no shadowing. futharkThe substitutions to be made are given by a mapping from names to names.  7 Safe-Inferred" futhark8Representations in which all decorations are renameable.futharkMembers of class  can be uniquely renamed.futharkRename the given value such that it does not contain shadowing, and has incorporated any substitutions present in the  environment.futhark)The monad in which renaming is performed.futharkRename variables such that each is unique. The semantics of the program are unaffected, under the assumption that the program was correct to begin with. In particular, the renaming may make an invalid program valid.futharkRename bound variables such that each is unique. The semantics of the expression is unaffected, under the assumption that the expression was correct to begin with. Any free variables are left untouched.futharkRename bound variables such that each is unique. The semantics of the binding is unaffected, under the assumption that the binding was correct to begin with. Any free variables are left untouched, as are the names in the pattern of the binding.futharkRename bound variables such that each is unique. The semantics of the body is unaffected, under the assumption that the body was correct to begin with. Any free variables are left untouched.futharkRename bound variables such that each is unique. The semantics of the lambda is unaffected, under the assumption that the body was correct to begin with. Any free variables are left untouched. Note in particular that the parameters of the lambda are renamed.futharkProduce an equivalent pattern but with each pattern element given a new name.futharkRename the bound variables in something (does not affect free variables).futharkRename statements, then rename something within the scope of those statements.6futharkProduce a map of the substitutions that should be performed by the renamer.futharkPerform a renaming using the   instance. This only works if the argument does not itself perform any name binding, but it can save on boilerplate for simple types.futharkRename variables in binding position. The provided VNames are associated with new, fresh names in the renaming environment.futharkRename some statements, then execute an action with the name substitutions induced by the statements active.8 Safe-Inferred"hfutharkRepresentation-specific attributes; also means the rep supports some basic facilities.futharkGiven a pattern, construct the type of a body that would match it. An implementation for many representations would be .futharkA type class for operations.futharkLike , but for arbitrary ops.futhark,Should we try to hoist this out of branches?futhark.Compute the data dependencies of an operation.futharkA handy shorthand for properties that we usually want for things we stuff into ASTs.futharkisBuiltInFunction k is 6 if k is an element of .futhark0A map of all built-in functions and their types.futharkIf the expression is a  , return it, otherwise 5.futharkAn expression is safe if it is always well-defined (assuming that any required certificates have been checked) in any context. For example, array indexing is not safe, as the index may be out of bounds. On the other hand, adding two numbers cannot fail.futhark"Return the variable names used in * subexpressions. May contain duplicates.futharkIf the  is a  return the variable name.futharkDoes the given lambda represent a known commutative function? Based on pattern matching and checking whether the lambda represents a known arithmetic operator; don't expect anything clever here.futharkA   with empty .futhark-The certificates associated with a statement.futhark Add certificates to a statement.futharkConstruct the type of an expression that would match the pattern.futhark1Keep only those attributes that are relevant for   expressions.futhark Safe-Inferred"Pfuthark5A description of how a single variable has been used.futharkA usage table.futhark*Remove these entries from the usage table.futhark&Look up a variable in the usage table.futharkIs the variable present in the usage table? That is, has it been used?futhark5Expand the usage table based on aliasing information.futharkHas the variable been consumed?futhark"Has the variable been used in the   of a body?futharkHas the given name been used directly (i.e. could we rename it or remove it without anyone noticing?)futharkIs this name used as the size of something (array or memory block)?futharkConstruct a usage table reflecting that these variables have been used.futharkConstruct a usage table where the given variable has been used in this specific way.futharkConstruct a usage table where the given variable has been consumed.futharkConstruct a usage table where the given variable has been used in the   of a body.futharkConstruct a usage table where the given variable has been used as an array or memory size.futharkConstruct a usage table where the given names have been used as an array or memory size.futharkA kind of usage.7futharkA kind of usage.futharkA kind of usage.7futharkA kind of usage.7futharkCheck whether the bits that are set in the first argument are also set in the second.futharkx - y, but for .futharkProduce a usage table reflecting the use of the free variables in a single statement.futharkUsage table reflecting use in pattern. In particular, free variables in the decorations are considered used as sizes, even if they are also bound in this pattern.? Safe-Inferred"SafutharkThis monad is used for computing metrics. It internally keeps track of what we've seen so far. Use  to add more stuff.futhark'Compute the metrics for some operation.futhark#Add this node to the current tally.futharkEnclose a metrics counting operation. Most importantly, this prefixes the name of the context to all the metrics computed in the enclosed operation.futhark"Compute the metrics for a program.futharkCompute metrics for this body.futhark#Compute metrics for this statement.futhark Compute metrics for this lambda. 67 67@ Safe-Inferred"WfutharkA mapping from a variable name v,, to those variables on which the value of v is dependent. The intuition is that we could remove all other variables, and v would still be computable. This also includes names bound in loops or by lambdas.futhark1Compute the data dependencies for an entire body.7futharkExtend names with direct dependencies in deps.futharkDetermine the variables on which the results of applying anonymous function lam to inputs depend.futharkLike , but lam/ is a binary operation with a neutral element.futhark%findNecessaryForReturned p merge deps) computes which of the loop parameters (merge3) are necessary for the result of the loop, where p given a loop parameter indicates whether the final value of that parameter is live after the loop. deps is the data dependencies of the loop body. This is computed by straightforward fixpoint iteration.  A Safe-Inferred"\ futhark#Phantom type for number of threads.futhark/Phantom type for the block size of some kernel.futhark5Phantom type for the number of blocks of some kernel.futharkA wrapper supporting a phantom type for indicating what we are counting.futharkThe class of some kind of configurable size. Each class may impose constraints on the valid values.futhark%A threshold with an optional default.futharkThe number of thread blocks.futharkLikely not useful on its own, but querying the maximum can be handy.futharkA bespoke size with a default.futharkAmount of registers available per threadblock. Mostly meaningful for querying the maximum.futharkAmount of L2 cache memory, in bytes. Mostly meaningful for querying the maximum.futharkAn indication of which comparisons have been performed to get to this point, as well as the result of each comparison.futhark$The default value for the size. If 5(, that means the backend gets to decide.B Safe-Inferred"efutharkThe class of operations that can be given aliasing information. This is a somewhat subtle concept that is only used in the simplifier and when using "rep adapters".futharkAdd aliases to this op.futhark/What we require of an aliasable representation.futharkA tuple of a mapping from variable names to their aliases, and the names of consumed variables.futhark'The aliases of what is returned by the  %, and what is consumed inside of it.futhark&Everything consumed in the expression.futhark&The aliases of the let-bound variable.futharkA wrapper around ) to get around the fact that we need an 6) instance, which 'AliasDec does not have.futhark%The rep for the basic representation.futhark/Remove alias information from an aliased scope.futhark(Remove alias information from a program.futhark)Remove alias information from a function.futhark,Remove alias information from an expression.futhark)Remove alias information from statements.futhark#Remove alias information from body.futhark%Remove alias information from lambda.futhark&Remove alias information from pattern.futharkAugment a body decoration with aliasing information provided by the statements and result of that body.futharkAugment a pattern with aliasing information provided by the expression the pattern is bound to.futharkGiven statements (with aliasing information) and a body result, produce aliasing information for the corresponding body as a whole. The aliasing includes names bound in the body, i.e. which are not in scope outside of it. Note that this does *not* include aliases of results that are not bound in the statements!futharkThe aliases of the result and everything consumed in the given statements.futhark+The variables consumed in these statements.futharkA helper function for computing the aliases of a sequence of statements. You'd use this while recursing down the statements from first to last. The  parameter is the current "state" of aliasing, and the function then returns a new state. The main thing this function provides is proper handling of transitivity and "reverse" aliases.             %  &  #$        ) C Safe-Inferred"q|futharkA type class for indicating that this operation can be lifted into the simplifier representation.futhark:Constraints that let us transform a representation into a  representation.7futhark$Simplifier information about a body.futhark+Simplifier information about an expression.7futhark%The free variables in the expression.futhark5The information associated with a let-bound variable.futhark>Representative phantom type for the simplifier representation.futhark)Remove simplifier information from scope.futharkAdd simplifier information to scope. All the aliasing information will be vacuous, however.futhark,Remove simplifier information from function.futhark-Remove simplifier information from statement.futhark*Remove simplifier information from lambda.futhark(Remove simplifier information from body.futhark.Remove simplifier information from expression.futhark+Remove simplifier information from pattern.futhark&Add simplifier information to pattern.futhark+Produce a body with simplifier information.futhark0Produce a statement with simplifier information.futhark1Produce simplifier information for an expression.7futhark Construct a  statement.futhark Construct  statements.futhark Construct a  body.futhark Construct a  lambda.7futhark Construct a  expression.futhark Construct a  function definition.D Safe-Inferred"smfuthark,Perform alias analysis on a Futhark program.futhark#Perform alias analysis on function.futharkPerform alias analysis on Body.futhark%Perform alias analysis on statements.futhark$Perform alias analysis on statement.futhark%Perform alias analysis on expression.futhark!Perform alias analysis on lambda.E Safe-Inferred"=}futhark6The class of representations that can be type-checked.futhark/Used at top level; can be locally changed with .futhark$The type checker runs in this monad.7futharkThe environment contains a variable table and a function table. Type checking happens with access to this environment. The function table is only initialised at the very beginning, but the variable table will be extended during type-checking when let-expressions are encountered.7futharkThe 7 data structure is used to keep track of which variables have been consumed, as well as whether a violation has been detected.7futharkA tuple of a return type and a list of parameters, possibly named.futhark A type error.futhark6Information about an error during type checking. The 7? instance for this type produces a human-readable description.futharkSignal a type error.futharkAdd information about what is being type-checked to the current context. Liberal use of this combinator makes it easier to track type errors, as the strings are added to type errors signalled via .7futharkMark a name as bound. If the name has been bound previously in the program, report a type error.7futharkProclaim that we have made read-only use of the given variable. No-op unless the variable is array-typed.futhark5Proclaim that we have written to the given variables.futharkType check two mutually exclusive control flow branches. Think if. This interacts with consumption checking, as it is OK for an array to be consumed in both branches.7futharkPermit consumption of only the specified names. If one of these names is consumed, the consumption will be rewritten to be a consumption of the corresponding alias set. Consumption of anything else will result in a type error.7futharkGiven the immediate aliases, compute the full transitive alias set (including the immediate aliases).7futharkcheckAnnotation loc s t1 t2 checks if t2 is equal to t1 . If not, a  is raised.futhark require ts se* causes a '(TypeError vn)' if the type of se* is not a subtype of one of the types in ts.futhark Variant of  working on variable names.futharkType check a program containing arbitrary type information, yielding either a type error or a program with complete type information.futhark;Check a slicing operation of an array of the provided type.7futharkRemove all aliases from the 7.==F Safe-Inferred" futharkA compiler pipeline is conceptually a function from programs to programs, where the actual representation may change. Pipelines can be composed using their 7 instance.futhark5Configuration object for running a compiler pipeline.futhark3A compilation always ends with some kind of action.futharkThe main Futhark compiler driver monad - basically some state tracking on top if 5.futharkRun a  action.futhark&Run the pipeline on the given program.futhark1Construct a pipeline from a single compiler pass.futhark0Conditionally run pipeline if predicate is true.futhark(Create a pipeline from a list of passes.$G Safe-Inferred".futhark8A heuristic for setting the default value for something.futhark&A size that can be assigned a default.futharkThe value supplies by a heuristic can depend on some device information. This will be translated into a call to clGetDeviceInfo(). Make sure to only request info that can be casted to a scalar type.futhark9The type of OpenCL device that this heuristic applies to.futharkAll of our heuristics.H Safe-Inferred"futharkConvert an expression to a  . The provided function is used to convert expressions that are not trivially  s. This includes constants and variable names, which are passed as s.futharkLike  , but for a .futharkConvert s of a given type.futharkShorthand for constructing a   of type .futharkShorthand for constructing a   of type , from a leaf.futharkShorthand for constructing a   of type .futharkShorthand for constructing a   of type , from a leaf.futharkShorthand for constructing a   of type .futharkShorthand for constructing a   of type , from a leaf.futharkShorthand for constructing a   of type .futharkShorthand for constructing a   of type , from a leaf.futhark5Applying a monadic transformation to the leaves in a  .futharkAs , but in the identity monad.futhark3Substituting names in a PrimExp with other PrimExpsfuthark Convert a  slice to a   slice.futhark Convert a   slice to a  slice.   I Safe-Inferred"7futharkA simple rule is a top-down rule that can be expressed as a pure function.futhark9A function that, given a subexpression, returns its type.futhark?A function that, given a variable name, returns its definition.7futharkIf we are replicating a scratch array (possibly indirectly), just turn it into a scratch by itself.futharkTry to simplify the given  , returning a new  * and certificates that it must depend on.J Safe-Inferred"[9futhark"Phantom type for a count of bytes.futhark%Phantom type for a count of elements.futharkA function call argument.futharkLike !, but with a required/known type.futharkA side-effect free expression whose execution will produce a single primitive value.futharkA mapping from names of tuning parameters to their class, as well as which functions make use of them (including transitively).futharkThe volatility of a memory access or variable. Feel free to ignore this for backends where it makes no sense (anything but C and similar low-level things)futhark1A block of imperative code. Parameterised by an , which allows extensibility. Concrete uses of this type will instantiate the type parameter with e.g. a construct for launching GPU kernels.futharkNo-op. Crucial for the 6 instance.futharkA for-loop iterating the given number of times. The loop parameter starts counting from zero and will have the same (integer) type as the bound. The bound is evaluated just once, before the loop is entered.futharkWhile loop. The conditional is (of course) re-evaluated before every iteration of the loop.futharkDeclare a memory block variable that will point to memory in the given memory space. Note that this is distinct from allocation. The memory block must be the target of either an  or a / before it can be used for reading or writing.futharkConstruct the Python array being returned from an entry point.futhark Perform an . It is expected that these functions are each specialised on which spaces they operate on, so that is not part of their arguments.futhark&Copy from one memory block to another.futharkAllocate a memory block of the given size in the given memory space, saving a reference in the given variable name.futharkRead a scalar from the given memory block with the given index and in the given memory space.futharkWrite a scalar to the given memory block with the given index and in the given memory space.futharkA substitute expression compiler, tried before the main compilation function.futharkA set of operations that fail for every operation involving non-default memory spaces. Uses plain pointers and malloc for memory management.7futharkIs this name a valid Python identifier? If not, it should be escaped before being emitted.7futharkIf the provided text is a valid identifier, then return it verbatim. Otherwise, escape it such that it becomes valid.futhark7A constructor that takes no arguments and does nothing.futharkA  where the function is a variable and every argument is a simple .futhark#The ctypes type corresponding to a .futhark"The Numpy type corresponding to a .futhark"The Numpy type corresponding to a , taking sign into account.futharkConvert from scalar to storage representation for the given type.futharkConvert from storage to scalar representation for the given type.futharkTell me how to compile a v, and I'll Compile any  PrimExp v for you.7futhark Compile an  using sequential nested loops, but parameterised over how to do the reads and writes.7futhark Compile an $ using sequential nested loops and / of individual scalars. This always works, but can be pretty slow if those reads and writes are costly.44S Safe-Inferred"'futhark*Python code (as a string) that calls the initiatialize_opencl_object5 procedure. Should be put in the class constructor.T Safe-Inferred"6futharkMapping memory blocks to sizes. These memory blocks are CPU memory that we know are used in particularly simple ways (no reference counting necessary). To cut down on allocator pressure, we keep these allocations around for a long time, and record their sizes so we can reuse them if possible (and realloc() when needed).futhark (dst,src)!-space mapping to copy functions.futharkHide definitions of those entries that satisfy some predicate.futharkHide these definitions, if they are protected by certificates in the set of names.futharkNote that these names are tokens for the corresponding accumulators. The names must already be present in the symbol table.//` Safe-Inferred" futhark,Some index expressions can be simplified to s, while others produce another index expression (which may be further simplifiable).futhark#Try to simplify an index operation.a Safe-Inferred"futhark2A collection of both top-down and bottom-up rules.7futhark A collection of bottom-up rules.7futharkA collection of top-down rules.futharkContext for a rule applied during bottom-up traversal of the program. Takes a symbol table and usage table as arguments.futharkContext for a rule applied during top-down traversal of the program. Takes a symbol table as argument.7futharkA collection of rules grouped by which forms of statements they may apply to.futharkA simplification rule takes some argument and a statement, and tries to simplify the statement.futharkAn efficient way of encoding whether a simplification rule should even be attempted.futharkGive it a shot.futhark Don't bother.futhark6The monad in which simplification rules are evaluated.7futhark Execute a  action. If succesful, returns the result and a list of new bindings.futhark1Construct a rule book from a collection of rules.futharksimplifyStm lookup stm) performs simplification of the binding stm. If simplification is possible, a replacement list of bindings is returned, that bind at least the same names as the original binding (and possibly more, for intermediate results).futharksimplifyStm uses stm) performs simplification of the binding stm. If simplification is possible, a replacement list of bindings is returned, that bind at least the same names as the original binding (and possibly more, for intermediate results). The first argument is the set of names used after this binding.""b Safe-Inferred"7futharkMove out results of a conditional expression whose computation is either invariant to the branches (only done for results used for existentials), or the same in both branches.7futharkRemove the return values of a branch, that are not actually used after a branch. Standard dead code removal can remove the branch if *none* of the return values are used, but this rule is more precise.c Safe-Inferred"dfuthark+foldClosedForm look foldfun accargs arrargs, determines whether each of the results of foldfun# can be expressed in a closed form.futhark+loopClosedForm pat respat merge bound bodys determines whether the do-loop can be expressed in a closed form.7futhark Lambda-boundd Safe-Inferred"futhark#Standard loop simplification rules.e Safe-Inferred"tfuthark"A set of simplification rules for  s. Includes rules from &Futhark.Optimise.Simplify.Rules.Simple.f Safe-Inferred"futharkA set of standard simplification rules. These assume pure functional semantics, and so probably should not be applied after memory block merging.futharkTurn copy(x) into x iff x? is not used after this copy statement and it can be consumed.>This simplistic rule is only valid before we introduce memory.7futharkIf an expression produces an array with a constant zero anywhere in its shape, just turn that into a Scratch.g Safe-Inferred"!8futharkMake a hoisted Op safe. The SubExp is a boolean that is true when the value of the statement will actually be used.7futharkA function that protects a hoisted operation (if possible). The first operand is the condition of the   we have hoisted out of (or equivalently, a boolean indicating whether a loop has nonzero trip count).futhark+Blocker for hoisting out of parallel loops.futhark-Blocker for hoisting out of sequential loops.futhark%Blocker for hoisting out of branches.7futharkMark that we have changed something and it would be a good idea to re-run the simplifier.futharkIndicate in the symbol table that we have descended into a loop.7futharkWe are willing to hoist potentially unsafe statements out of loops, but they must be protected by adding a branch on top of them.7futharkWe are willing to hoist potentially unsafe statements out of matches, but they must be protected by adding a branch on top of them. (This means such hoisting is not worth it unless they are in turn hoisted out of a loop somewhere.)7futharkStatements that are not worth hoisting out of loops, because they are unsafe, and added safety (by 7$) may inhibit further optimisation.futharkSimplify a single body.7futharkSimplify a single body.7futharkSimplify a single  .futharkBlock hoisting of  $ statements introduced by migration.futharkStatement is a scalar read from a single element array of rank one.7futhark Scrutinee.futharkPattern of previosu cases.futharkPattern of this case.4h Safe-Inferred"#5futhark Simplify a  $, including copy propagation. If a   refers to a name that is a , the node turns into a  .futharkLike , but where leaves may be s.i Safe-Inferred"%futharkSimplify the given program. Even if the output differs from the output, meaningful simplification may not have taken place - the order of bindings may simply have been rearranged.futhark.Run a simplification operation to convergence.futharkSimplify the given function. Even if the output differs from the output, meaningful simplification may not have taken place - the order of bindings may simply have been rearranged. Runs in a loop until convergence.futharkSimplify just a single  .futharkSimplify a sequence of  s.j Safe-Inferred"&futhark*Run copy propagation on an entire program.futhark(Run copy propagation on some statements.futhark#Run copy propagation on a function.k Safe-Inferred"'mfuthark,The phantom type for the Seq representation.futharkSimplify a sequential program.             %  &  #$        ) l Safe-Inferred"E,futharkLike  , but just for s.futhark)How to compute a single reduction result.futhark$How to compute a single scan result.futharkThe essential parts of a 4 factored out (everything except the input arrays).futharkThe "main" lambda of the Screma. For a map, this is equivalent to . Note that the meaning of the return value of this lambda depends crucially on exactly which Screma this is. The parameters will correspond exactly to elements of the input arrays, however.futhark/Information about computing a single histogram.futhark Race factor RF means that only 1/RF bins are used.futhark'A second-order array combinator (SOAC).futhark Scatter  length  inputs  lambda specScatter maps values from a set of input arrays to indices and values of a set of output arrays. It is able to write multiple values to multiple outputs each of which may have multiple dimensions. inputs, is a list of input arrays, all having size  length(, elements of which are applied to the  lambda3 function. For instance, if there are two arrays,  lambda3 will get two values as input, one from each array. spec specifies the result of the  lambda and which arrays to write to. lambda& is a function that takes inputs from  inputs" and returns values according to  spec-. It returns values in the following manner: >index_0, index_1, ..., index_n, value_0, value_1, ..., value_mFor each output in  spec,  lambda returns  i *  j index values and  j output values, where  i> is the number of dimensions (rank) of the given output, and  j= is the number of output values written to the given output.7For example, given the following scatter specification:  ([x1, y1, z1 , 2, arr1), ([x2, y2], 1, arr2)] lambda> will produce 6 (3 * 2) index values and 2 output values for  arr1, and 2 (2 * 1) index values and 1 output value for arr2. Additionally, the results are grouped, so the first 6 index values will correspond to the first two output values, and so on. For this example,  lambda should return a total of 11 values, 8 index values and 3 output values. See also .futhark Hist  length  inputarrays  dest-arrays-and-ops bucketfun5The final lambda produces indexes and values for the s.futhark7A combination of scan, reduction, and map. The first ! is the size of the input arrays.futharkHow the results of a scatter operation should be written. Each element of the list consists of a v (often a +) specifying which array to scatter to, a - describing the shape of that array, and an 6 describing how many elements should be written to that array for each invocation of the scatter.7futhark:What are the sizes of reduction results produced by these s?futhark1How many reduction results are produced by these s?futhark5Combine multiple scan operators to a single operator.7futhark:What are the sizes of reduction results produced by these s?futhark1How many reduction results are produced by these s?futhark:Combine multiple reduction operators to a single operator.futharkThe types produced by a single %, given the size of the input array.futharkConstruct a lambda that takes parameters of the given types and simply returns them unchanged.futhark'Is the given lambda an identity lambda?futhark3A lambda with no parameters that returns no values.futharkConstruct a Screma with possibly multiple scans, and the given map function.futharkConstruct a Screma with possibly multiple reductions, and the given map function.futharkConstruct a Screma with possibly multiple scans, and identity map function.futharkConstruct a Screma with possibly multiple reductions, and identity map function.futhark*Construct a Screma corresponding to a map.futhark6Does this Screma correspond to a scan-map composition?futhark)Does this Screma correspond to pure scan?futhark8Does this Screma correspond to a reduce-map composition?futhark-Does this Screma correspond to a pure reduce?futharkDoes this Screma correspond to a simple map, without any reduction or scan results?futhark splitScatterResults  scatter specification resultsSplits the results array into indices and values according to the specification.See  for more information.futhark groupScatterResults'  scatter specification results-Blocks the index values and result values of  results according to the specification. This is the simpler version of groupScatterResults, which doesn't return any information about shapes or output arrays.See  for more information,futhark groupScatterResults  scatter specification results-Blocks the index values and result values of  results according to the  scatter specification.This function is used for extracting and grouping the results of a scatter. In the SOACS representation, the lambda inside a  returns all indices and values as one big list. This function groups each value with its corresponding indices (as determined by the  of the output array).The elements of the resulting list correspond to the shape and name of the output parameters, in addition to a list of values written to that output parameter, along with the array indices marking where to write them to.See  for more information.futhark/A mapper that simply returns the SOAC verbatim.futharkMap a monadic action across the immediate children of a SOAC. The mapping does not descend recursively into subexpressions and is done left-to-right.futharkA helper for defining  .futharkThe type of a SOAC.futharkType-check a SOAC.futharkPrettyprint the given Screma.futharkPrettyprint the given Stream.futharkPrettyprint the given Scatter.futhark*Prettyprint the given histogram operation.m Safe-Inferred"JTfutharkTurns a binding of a redomap into two seperate bindings, a map binding and a reduce" binding (returned in that order).$Reuses the original pattern for the reduce&, and creates a new pattern with new s for the result of the map.futharkTurn a Screma into a Scanomap (possibly with mapout parts) and a Redomap. This is used to handle Scremas that are so complicated that we cannot directly generate efficient parallel code for them. In essense, what happens is the opposite of horisontal fusion.futharkTurn a stream SOAC into statements that apply the stream lambda to the entire input.futharkSplit the parameters of a stream reduction lambda into the chunk size parameter, the accumulator parameters, and the input chunk parameters. The integer argument is how many accumulators are used.       n Safe-Inferred"Mfuthark%The rep for the basic representation.             %  &  #$        ) o Safe-Inferred"VhfutharkThe constraints that a monad must uphold in order to be used for first-order transformation.futharkThe constraints that must hold for a rep in order to be the target of first-order transformation.futharkFirst-order-transform a single function, with the given scope provided by top-level constants.futhark0First-order-transform these top-level constants.futharkFirst transform any nested   or   elements, then apply  if the expression is a SOAC.futharkTransform a single  into a do-loop. The body of the lambda is untouched, and may or may not contain further s depending on the given rep.futhark+Recursively first-order-transform a lambda.p Safe-Inferred"Vfuthark$The first-order transformation pass.q Safe-Inferred"XFfuthark1Interchange Scan With Inner Map. Tries to turn a  scan(map) into a @map(scan)futhark3Interchange Reduce With Inner Map. Tries to turn a  reduce(map) into a @map(reduce)futharkDoes this reduce operator contain an inner map, and if so, what does that map look like? Safe-Inferred"ZfutharkA mapping from external variable names to the corresponding internalised subexpressions.futharkAdd opaque types. If the types are already known, they will not be added.futhark;Add a function definition to the program being constructed.futhark Construct an   statement, but taking attributes into account. Always use this function, and never construct   directly in the internaliser!7futharkExecute the given action if / is true, otherwise just return an empty list.7futharkExecute the given action if / is true, otherwise just return an empty list.          r Safe-Inferred"^futharkReshape the arguments to a function so that they fit the expected shape declarations. Not used to change rank of arguments. Assumes everything is otherwise type-correct.s Safe-Inferred"b-7futharkNever constructed.futharkDoes this rep contain  s in its  s? A rep must be an instance of this class for the simplification rules to work.futharkRemove all arguments to the map that are simply replicates. These can be turned into free variables instead.7futharkLike  , but for .futhark0Remove inputs that are not used inside the SOAC.7futharkSome of the results of a reduction (or really: Redomap) may be dead. We remove them here. The trick is that we need to look at the data dependencies to see that the "dead" result is not actually used for computing one of the live ones.7futharkIf we are writing to an array that is never used, get rid of it.t Safe-Inferred"f\ futharkThe call graph is a mapping from a function name, i.e., the caller, to a record of the names of functions called *directly* (not transitively!) by the function.>We keep track separately of the functions called by constants.7futharkA unique (at least within a function) name identifying a function call. In practice the first element of the corresponding pattern.futhark.Is the given function known to the call graph?futhark(Does the first function call the second?futhark/Is the function called in any of the constants?futhark&All functions called by this function.futharkbuildCallGraph prog build the program's call graph.futharkProduce a mapping of the number of occurences in the call graph of each function. Only counts functions that are called at least once.7futharkbuildCallGraph ftable fg fname updates fg% with the contributions of function fname.u Safe-Inferred"w.futhark8The reason why some expression cannot be converted to a  value.futhark,The expression is not a (tuple-)SOAC at all.futhark/A definite representation of a SOAC expression.futharkOne array input to a SOAC - a SOAC may have multiple inputs, but all are of this form. Only the array inputs are expressed with this type; other arguments, such as initial accumulator values, are plain expressions. The transforms are done left-to-right, that is, the first element of the  list is applied first.futhark0A view of the last transformation to be applied.futhark1A view of the first transformation to be applied.futhark:A sequence of array transformations, heavily inspired by Data.Seq. You can decompose it using  and , and grow it by using  and . These correspond closely to the similar operations for sequences, except that appending will try to normalise and simplify the transformation sequence.The data type is opaque in order to enforce normalisation invariants. Basically, when you grow the sequence, the implementation will try to coalesce neighboring permutations, for example by composing permutations and removing identity transformations.futharkA single, simple transformation. If you want several, don't just create a list, use  instead.futhark*A permutation of an otherwise valid input.futhark(A reshaping of an otherwise valid input.futhark#A reshaping of the outer dimension.futhark2A reshaping of everything but the outer dimension.futhark2Replicate the rows of the array a number of times.futharkAn array indexing operation.futharkThe empty transformation list.futhark#Is it an empty transformation list?futhark7Decompose the input-end of the transformation sequence.futhark8Decompose the output-end of the transformation sequence.futhark6Add a transform to the end of the transformation list.futharky Safe-Inferred" futharkWhether we are doing horizontal or vertical fusion. Note that vertical also includes "diagonal" fusion, where some producer results are also produced by the final SOAC.futhark1A fused SOAC contains a bit of extra information.futharkThe actual SOAC.futhark vs then after the substitution  v' |-> vs (and v points to nothing).futharkRenames the keys of the loop tape. Useful for fixing the the names in the loop tape after a loop rename.77| Safe-Inferred"d} Safe-Inferred"~ Safe-Inferred" Safe-Inferred"7futharkA classification of a free variable based on its adjoint. The 6 stored is *not* the adjoint, but the primal variable.7futhark"Adjoint is already an accumulator.7futharkCurrently has no adjoint, but should be given one, and is an array with this shape and element type.7futhark?Does not need an accumulator adjoint (might still be an array).futharkPerform VJP on a Map. The 0 list is the adjoints of the result of the map. Safe-Inferred"47futharkA type to keep track of and seperate values corresponding to different parts of the loop.7futharkA convenience function to bring the components of a for-loop into scope and throw an error if the passed   is not a for-loop.7futharkA convenience function to rename a for-loop and then bind the renamed components.7futharkIs the loop a while-loop?7futhark?Augments a while-loop to also compute the number of iterations.7futhark Converts a   into a  !. Requires that the surrounding   is annotated with a  #[bound(n)] attribute, where n is an upper bound on the number of iterations of the while-loop. The resulting for-loop will execute for n iterations on all inputs, so the tighter the bound the better.7futharknestifyLoop n bound loop transforms a loop into a depth-n loop nest of bound-iteration loops. This transformation does not preserve the original semantics of the loop: n and bound may be arbitrary and have no relation to the number of iterations of loop.7futharkstripmine n pat loop stripmines a loop into a depth-n loop nest. An additional bound - (floor(bound^(1/n)))^n-iteration remainder loop is inserted after the stripmined loop which executes the remaining iterations so that the stripmined loop is semantically equivalent to the original loop.7futharkStripmines a statement. Only has an effect when the statement's expression is a for-loop with a #[stripmine(n)] attribute, where n is the nesting depth.7futharkForward pass transformation of a loop. This includes modifying the loop to save the loop values at each iteration onto a tape as well as copying any consumed arrays in the loop's body and consuming said copies in lieu of the originals (which will be consumed later in the reverse pass).7futharkConstruct a loop value-pattern for the adjoint of the given variable.7futhark/Reverses a loop by substituting the loop index.7futharkPures a substitution which substitutes values in the reverse loop body with values from the tape.7futhark7Transforms a for-loop into its reverse-mode derivative.futhark3Transforms a loop into its reverse-mode derivative. Safe-Inferred"h Safe-Inferred" Safe-Inferred"ufuthark pdUnOp op x% computes the partial derivatives of op with respect to x.futharkpdBinOp op x y% computes the partial derivatives of op with respect to x and y.futharkpdBuiltin f args i$ computes the partial derivative of f applied to args2 with respect to each of its arguments. Returns 5 if no such derivative is known. Safe-Inferred" 7futharkPreprocess statements before differentiating. For now, it's just stripmining. Safe-Inferred"; Safe-Inferred"7futharkWhether we apply only the innermost AD operators, or all of them. The former is very useful for debugging, but probably not useful for actual compilation. Safe-Inferred"7futharkGiven -[2, x] returns  (-2, [x])7futharkGiven  (-2, [x]) returns  -[1, 2, x]7futharkGiven [[2, x], -[x]] returns [[x]]7futharkGiven a list of   that we know are non-negative (>= 0), determine whether we can say for sure that the given * is non-negative. Conservatively returns 7 if there is any doubt.TODO: We need to expand this to be able to handle cases such as i*n + g < (i + 1) * n, if it is known that g < n , eg. from a SegSpace or a loop form.7futhark,Is e1 symbolically less than or equal to e2? Safe-Inferred"futharkReturns true if the intervals are self-overlapping, meaning that for a given dimension d, the stride of d is larger than the aggregate spans of the lower dimensions.   Safe-Inferred"futharkLMAD's representation consists of a general offset and for each dimension a stride, number of elements (or shape), and permutation. Note that the permutation is not strictly necessary in that the permutation can be performed directly on LMAD dimensions, but then it is difficult to extract the permutation back from an LMAD.LMAD algebra is closed under composition w.r.t. operators such as permute, index and slice. However, other operations, such as reshape, cannot always be represented inside the LMAD algebra.It follows that the general representation of an index function is a list of LMADS, in which each following LMAD in the list implicitly corresponds to an irregular reshaping operation.However, we expect that the common case is when the index function is one LMAD -- we call this the "nice" representation.)Finally, the list of LMADs is kept in an LMAD together with the shape of the original array, and a bit to indicate whether the index function is contiguous, i.e., if we instantiate all the points of the current index function, do we get a contiguous memory interval?By definition, the LMAD / \sigma + \{ (n_1, s_1), \ldots, (n_k, s_k) \}  , where n and s denote the shape and stride of each dimension, denotes the set of points: \{ ~ \sigma + i_1 * s_1 + \ldots + i_m * s_m ~ | ~ 0 \leq i_1 < n_1, \ldots, 0 \leq i_m < n_m ~ \} futharkA single dimension in an .futharkA complete permutation.futharkIndices passed to an LMAD. Must always match the rank of the LMAD.futharkThe shape of an index function.futharkCreate an LMAD that is existential in everything except shape.futharkPermute dimensions.7futhark Computes the maximum span of an . The result is the lowest and highest flat values representable by that .7futhark0Conservatively flatten a list of LMAD dimensionsSince not all LMADs can actually be flattened, we try to overestimate the flattened array instead. This means that any "holes" in betwen dimensions will get filled out. conservativeFlatten :: (IntegralExp e, Ord e, Pretty e) => LMAD e -> LMAD e7futhark+Very conservative GCD calculation. Returns 5 if the result cannot be immediately determined. Does not recurse at all.futharkReturns True if the two s could be proven disjoint.Uses some best-approximation heuristics to determine disjointness. For two 1-dimensional arrays, we can guarantee whether or not they are disjoint, but as soon as more than one dimension is involved, things get more tricky. Currently, we try to conservativelyFlatten( any LMAD with more than one dimension.7futharkDynamically determine if two  are equal.;True if the dynamic values of their constituents are equal.futharkDynamically determine if two  are equal.True if offset and constituent  are equal.futharkReturns true if two s are equivalent.v and the fork depth1) increases from u to v, then u is within a conditional branch.2) decreases from u to v, then v binds the result of two or more branches.After the graph has been built and routed, this can be used to delay reads into deeper branches to reduce their likelihood of manifesting.8futhark.How many bodies the variable is nested within.8futharkAn id for the subgraph within which the variable exists, defined at the body level. A read may only be delayed to a point within its own subgraph.8futharkIncrement the fork depth for variables graphed by this action.8futhark>Increment the body depth for variables graphed by this action.8futhark9Change the graph id for variables graphed by this action.8futhark0Capture body stats produced by the given action.8futhark5Can applications of this function be moved to device?8futharkGet the 8# corresponding to the current body.8futhark;Get the body depth of the current body (its nesting level). !!!!!!!!!!!! !!!!!!!!!!!! Safe-Inferred"o'98futharkThe state used by a 8 monad.8futharkMaps variables in the original program to names to be used by rewrites.8futharkStatements to be added as a prologue before rewritten statements.8futharkThe state used by a 8 monad.8futharkA source to generate new s from.8futharkA table of variables in the original program which have been migrated to device. Each variable maps to a tuple that describes: *  of the original variable. * Type of the original variable. * Name of the single element array holding the migrated value. * Whether the original variable still can be used on the host.8futhark2Whether non-migration optimizations may introduce " kernels at the current location.8futharkThe monad used to perform migration-based synchronization reductions.!futhark8An optimization pass that migrates host statements into ? kernels to reduce the number of host-device synchronizations.8futharkOptimize a function definition. Its type signature will remain unchanged.8futharkOptimize a body. Scalar results may be replaced with single-element arrays.8futhark"Optimize a sequence of statements.8futharkOptimize a single statement, rewriting it into one or more statements to be appended to the provided  . Only variables with continued host usage will remain in scope if their statement is migrated.8futhark#Optimize an accumulator input. The  is the accumulator token.8futharkOptimize a host operation.   statements are added to kernel code that depends on migrated scalars.8futhark"Append the given string to a name.8futhark'An initial state to use when running a 8 monad.8futharkPerform non-migration optimizations without introducing any GPUBody kernels.8futhark Create a 5 that binds the array of a migrated variable binding.8futharkx 8 arr registers that the value of x has been migrated to arr[0].8futharkx 8 arr registers that the value of x! also is available on device as arr[0].8futharkrecordMigration host x arr# records the migration of variable x to arr[0]. If host5 then the original binding can still be used on host.8futharkpe 8 (dev, stms) registers that the variable pe/ in the original program has been migrated to dev and rebinds the variable if deemed necessary, adding an index statement to the given statements.8futharkuseScalar stms n3 returns a variable that binds the result bound by n in the original program. If the variable has been migrated to device and have not been copied back to host a new variable binding will be added to the provided statements and be returned.8futharkCreate an expression that reads the first element of a 1-dimensional array.8futhark;A shorthand for binding a single variable to an expression.8futharkReturns the array alias of se if it is a variable that has been migrated to device. Otherwise returns Nothing.8futharkstoreScalar stms se t returns a variable that binds a single element array that contains the value of se in the original program. If se is a variable that has been migrated to device, its existing array alias will be used. Otherwise a new variable binding will be added to the provided statements and be returned. t is the type of se.8futharkMap a variable name to itself or, if the variable no longer can be used on host, the name of a single element array containing its value.8futharkLike 8 but for a %. Constants are mapped to themselves.8futharkLike 8 but for a  .9futharkApply 8 to a list of results.9futharkMigrate a statement to device, ensuring all its bound variables used on host will remain available with the same names.9futharkCreate a GPUBody kernel that executes a single statement and stores its results in single element arrays.9futhark'An initial state to use when running a 8 monad.9futharkRewrite 1 dependencies to scalars that have been migrated.9futharkRewrite 1 dependencies to scalars that have been migrated.9futharkRewrite generic lambda dependencies to scalars that have been migrated.9futharkRewrite generic body dependencies to scalars that have been migrated.9futharkRewrite kernel body dependencies to scalars that have been migrated.9futharkRewrite migrated scalar dependencies within anything. The returned statements must be added to the scope of the rewritten construct.9futhark?Create a fresh name, registering which name it is a rewrite of.9futharkRewrite all bindings introduced by a body (to ensure they are unique) and fix any dependencies that are broken as a result of migration or rewriting.9futharkRewrite all bindings introduced by a sequence of statements (to ensure they are unique) and fix any dependencies that are broken as a result of migration or rewriting.9futharkRewrite all bindings introduced by a single statement (to ensure they are unique) and fix any dependencies that are broken as a result of migration or rewriting.0NOTE: GPUBody kernels must be rewritten through 9.9futharkRewrite all bindings introduced by a pattern (to ensure they are unique) and fix any dependencies that are broken as a result of migration or rewriting.9futharkRewrite the binding introduced by a single pattern element (to ensure it is unique) and fix any dependencies that are broken as a result of migration or rewriting.9futharkFix any   certificate references that are broken as a result of migration or rewriting.9futharkRewrite the bindings introduced by an expression (to ensure they are unique) and fix any dependencies that are broken as a result of migration or rewriting.9futharkRewrite the binding introduced by a single parameter (to ensure it is unique) and fix any dependencies that are broken as a result of migration or rewriting.9futhark2Return the name to use for a rewritten dependency.9futhark#Update the variable names within a  ) to account for migration and rewriting.9futhark#Update the variable names within a  ) to account for migration and rewriting.9futharkUpdate the variable names of certificates to account for migration and rewriting.9futhark"Update any variable name within a ) to account for migration and rewriting.9futharkUpdate the variable names within a type to account for migration and rewriting.9futharkUpdate the variable names within an existential type to account for migration and rewriting.!! Safe-Inferred"09futhark2The monad used for rewriting a GPUBody to use the s that are returned from kernels it is merged with rather than the results that they bind.The state is a prologue of statements to be added at the beginning of the rewritten kernel body.9futhark,Usage statistics for some set of statements.9futhark'The variables that the statements bind.9futharkThe variables that the statements depend upon, i.e. the free variables of each statement and the root aliases of every array that they observe.9futharkA group is a subsequence of statements, usually either only GPUBody statements or only non-GPUBody statements. The 91 statistics of those statements are also stored.9futharkThe statements of the group.9futhark8The usage statistics of the statements within the group.9futharkAn entry in an 9.9futhark3A value returned from within a GPUBody kernel. In let res = gpu { x } this is x.9futharkThe type of the 9.9futhark9The name of the variable that binds the return value for 9. In let res = gpu { x } this is res.9futharkThe index of the group that 9 is bound in.9futharkIf 7 then the entry key is a variable that binds the same value as the 9. Otherwise it binds an array with an outer dimension of one whose row equals that value.9futharkA map from variable tags to !s returned from within GPUBodies.9futharkThe state used by a 9 monad.9futharkAll statements that already have been processed from the sequence, divided into alternating groups of non-GPUBody and GPUBody statements. Blocks at even indices only contain non-GPUBody statements. Blocks at odd indices only contain GPUBody statements.9futharkThe monad used to reorder statements within a sequence such that its GPUBody statements can be merged into as few possible kernels.9futhark A set of  tags that denote the root aliases of all arrays that some statement consumes.9futhark A set of  tags that denote all variables that some group of statements binds.9futhark A set of  tags that denote all variables that some group of statements depend upon. Those must be computed before the group statements.!futhark.An optimization pass that reorders and merges  statements to eliminate memory transactions and reduce the number of kernel launches.9futhark%All free variables of a construct as 9.9futharkConvert   to an integer set of name tags.9futhark1Optimize a lambda and determine its dependencies.9futhark/Optimize a body and determine its dependencies.9futharkOptimize a sequence of statements and determine their dependencies.9futharkOptimizes and reorders a single statement within a sequence while tracking the declaration, observation, and consumption of its dependencies. This creates sequences of GPUBody statements that can be merged into single kernels.9futharkInline some functions and remove the resulting dead functions.!futharkremoveDeadFunctions prog removes the functions that are unreachable from the main function from the program.!!!!!! Safe-Inferred"U9futhark2Main helper function for Register-and-Block Tiling9futharkTries to identify the following pattern: code followed by some Screma followed by more code.9futharkChecks that all streamed arrays are variant to exacly one of the two innermost parallel dimensions, and conversely, for each of the two innermost parallel dimensions, there is at least one streamed array variant to it. The result is the number of the only variant parallel dimension for each array.9futharkChecks that all streamed arrays are variant to exacly one of the two innermost parallel dimensions, and conversely, for each of the two innermost parallel dimensions, there is at least one streamed array variant to it. The result is the number of the only variant parallel dimension for each array.!futharkExpects a kernel statement as argument. CONDITIONS for 3D tiling optimization to fire are: 1. a) The kernel body can be broken into scalar-code-1 ++ [Redomap stmt] ++ scalar-code-2. b) The kernels has a per-thread result, and obviously the result is variant to the 3rd dimension (counted from innermost to outermost) 2. For the Redomap: a) the streamed arrays are one dimensional b) each of the array arguments of Redomap are variant to exactly one of the three innermost-parallel dimension of the kernel. This condition can be relaxed by interchanging kernel dimensions whenever possible. 3. For scalar-code-1: a) each of the statements is a slice that produces one of the streamed arraysmmBlkRegTiling :: Stm GPU -> TileM (Maybe (Stms GPU, Stm GPU)) mmBlkRegTiling (Let pat aux (Op (SegOp (SegMap SegThread{} seg_space ts old_kbody))))!!!! Safe-Inferred"e9futharkInformation about a loop that has been tiled inside a kernel, as well as the kinds of changes that we would then like to perform on the kernel.9futharkStatements that we insert directly into every thread-private SegMaps. This is for things that cannot efficiently be computed once in advance in the prelude SegMap, primarily (exclusively?) array slicing operations.9futhark&A tile (or an original untiled array).9futharkWe classify the inputs to the tiled loop as whether they are tileable (and with what permutation of the kernel indexes) or not. In practice, we should have at least one tileable array per loop, but this is not enforced in our representation.!futharkThe pass definition.9futharkMove statements from prelude to postlude if they are not used in the tiled statement anyway. Also, fail if the provided Stm uses anything from the resulting prelude whose size is not free in the prelude.9futharkPartition prelude statements preceding a tiled loop (or something containing a tiled loop) into three categories:1) Group-level statements that are invariant to the threads in the group.2) Thread-variant statements that should be computed once with a segmap_thread_scalar.3) Thread-variant statements that should be recomputed whenever they are needed.The third category duplicates computation, so we only want to do it when absolutely necessary. Currently, this is necessary for results that are views of an array (slicing, rotate, etc) and which results are used after the prelude, because these cannot be efficiently represented by a scalar segmap (they'll be manifested in memory). To avoid unnecessarily moving computation from category 2 to category 3 simply because they depend on a category 3 result, everything in category 3 is also in category 2. This is efficient only when category 3 contains exclusively "free" or at least very cheap expressions (e.g. index space transformations).!! Safe-Inferred"9futhark-Remove the unused return values of a GPUBody.!! !!! ! Safe-Inferred"[!futharkThe pass for GPU kernels.!futharkThe pass for multicore.!!!! Safe-Inferred"!!!!   %  &  #$                 )      !!!! Safe-Inferred"!!!!!!!!!!!!!!!! Safe-Inferred"9futharkThe input stmsfuthark'The allocations currently being loweredfuthark%The other statements processed so far!!!!!! Safe-Inferred"9futharkThe input stmsfuthark0The lifted allocations and associated statementsfuthark%The other statements processed so farfuthark'(Names we need to lift, consumed names)!!!!!! Safe-Inferred"!!!! Safe-Inferred"d!futharkThe pass from  to .!! Safe-Inferred"!futharkThe pass from   to !.!futhark Convert some   stms to !.!!!! Safe-Inferred"39futhark m_x and at the end of analysis it is removed from the successfully coalesced table if m_x is unsuccessful. Storing m_x would probably be sufficient if memory would not be reused--e.g., by register allocation on arrays--the x discriminates between memory being reused across semantically different arrays (searched in vartab field)."futharkAccess summaries of uses and writes of destination and source respectively."futharkCertificates of the destination, which must be propagated to the source. When short-circuiting reaches the array creation point, we must check whether the certs are in scope for short-circuiting to succeed."futharkCoalesced Access Entry"futharkFree variable substitutions"futhark>Information about a memory block: type, shape, name and ixfun."futharklet x = copy b^{lu}"futharklet x[i] = b^{lu}"futharklet x = concat(a, b^{lu})"futhark1transitive, i.e., other variables aliased with b."futharkThe access summary of all references (reads and writes) to the destination of a coalescing entry"futharkThe access summary of all writes to the source of a coalescing entry"futhark;Summary of all memory accesses at a given point in the code"futharkThe access summary was statically undeterminable, for instance by having multiple lmads. In this case, we should conservatively avoid all coalescing."futharkA conservative estimate of the set of accesses up until this point."futhark2An LMAD specialized to TPrimExps (a typed primexp)"futharkmaps array-variable names to various info, including types, memory block and index function, etc."futharkCompute the union of two " . If two " do not refer to the same destination memory and use the same index function, the first " is returned."futharkGet the names of array s in a   and the corresponding " information for each array."futhark%Get the names of arrays in a list of   and the corresponding " information for each array."futharkGet memory blocks in a list of  6 that are used for unique arrays in the same list of  ."futharkTrue+ if the expression returns a "fresh" array."futharkMemory-block removal from active-coalescing table should only be handled via this function, it is easy to run into infinite execution problem; i.e., the fix-pointed iteration of coalescing transformation assumes that whenever a coalescing fails it is recorded in the inhibit table."futharkpromotion from active-to-successful coalescing tables should be handled with this function (for clarity).9futhark&merges entries in the coalesced table."futharkAttempt to convert a  to a PrimExp.First look in " to see if we have recorded the scalar value of the argument. Otherwise look up the type of the argument and return a   if it is a .9futharkAttempt to extract the  from a ."futharkthe kind of coalescingfutharkdestination mem_block info f_m_x[i] (must be ArrayMem) (Maybe IxFun) -- the inverse ixfun of a coalesced array, such that -- ixfuns can be correctly constructed for aliases;futhark-substitutions for free vars in index function6""""""""""""""""""""""""""""""""""""""""""""""""""""""6"""""""""""""""""""""""""""""""""""""""""""""""""""""" Safe-Inferred"Ϧ"futhark,contains the already allocated memory blocks"futhark/variable info, including var-to-memblock assocs"futhark/the inherited inhibitions from the previous try"futharkfor statements such as transpose, reshape, index, etc., that alias an array variable: maps var-names to pair of aliased var name and index function transformation. For example, for let b = a[slc] it should add the binding  b |-> (a, slice slc )"futharkkeeps track of memory block aliasing. this needs to be implemented"futharkContains symbol information about the variables in the program. Used to determine if a variable is non-negative."futhark&A list of known relations of the form  <  , typically gotten from   and ."futhark(A list of the asserts encountered so far9futhark"An inverse aliasing transformation9futhark A direct aliasing transformation9futhark=Get alias and (direct) index function mapping from expression9futharkThis was former createsAliasedArrOK from DataStructs While Rearrange creates aliased arrays, we do not yet support them because it would mean we have to "reverse" the index function, for example to support coalescing in the case below, let a = map f a0  let b = transpose a let y[4] = copy(b)  we would need to assign to a as index function, the inverse of the transpose, such that, when creating b by transposition we get a directly-mapped array, which is expected by the copying in y[4]. For the moment we support only transposition and VName-expressions, but rotations and full slices could also be supported.This function complements 9 by returning a function that applies the inverse index function transformation."futharkfills in the TopdownEnv table"futharkThe topdown handler for loops."futharkGet direct aliased index function. Returns a triple of current memory block to be coalesced, the destination memory block and the index function of the access in the space of the destination block."futharkLike ", but this version returns 56 if the value is not currently subject to coalescing.9futharkGiven a  , walk the 9 until found in the Map."futhark We assume x is in vartab and we add the variables that x aliases for as long as possible following a chain of direct-aliasing operators, i.e., without considering aliasing of if-then-else, loops, etc. For example:  x0 = if c then ... else ...  x1 = rearrange r1 x0   x2 = reverse x1  y[slc] = x2  We assume vartab constains a binding for x2&, and calling this function with x2, as argument should also insert entries for x1 and x0 to vartab, of course if their aliasing operations are invertible. We assume inverting aliases has been performed by the top-down pass."""""""""""""""""""""""""""""""""""""""""""" Safe-Inferred" "futharkChecks whether the index function can be translated at the current program point and also returns the substitutions. It comes down to answering the question: "can one perform enough substitutions (from the bottom-up scalar table) until all vars appearing in the index function are defined in the current scope?""futhark.Translates free variables in an access summary9futharkThis function computes the written and read memory references for the current statement"futharkThis function: 1. computes the written and read memory references for the current statement (by calling getUseSumFromStm) 2. fails the entries in active coalesced table for which the write set overlaps the uses of the destination (to that point)"futhark1Check for memory overlap of two access summaries.This check is conservative, so unless we can guarantee that there is no overlap, we return 7."futharkComputes the total aggregated access summary for a loop by expanding the access summary given according to the iterator variable and bounds of the loop.Corresponds to:" \bigcup_{j=0}^{jComputes to total access summary over a multi-dimensional map.9futharkHelper function that aggregates the accesses of single LMAD according to a given iterator value, a lower bound and a span.If successful, the result is an index function with an extra outer dimension. The stride of the outer dimension is computed by taking the difference between two points in the index function.The function returns Underterminable if the iterator is free in the output LMAD or the dimensions of the input LMAD .9futharkTakes a  and converts it into a   with type .9futharkA pair of written and written+read memory locations, along with their associated array and the index function used"""""""""""""""" Safe-Inferred"ܔ"futhark4Produce aliases for constants and for each function."futhark4Produce aliases for constants and for each function."""""""" Safe-Inferred" 9futhark/Maps a variable or memory block to its aliases.9futhark9> allows us to abstract over representations by supplying the 9 function."futhark2LU-table for the constants, and for each function.#futhark let A = segmap (..) xs -- A indexes into xs > let B = segmap (..) A -- B indexes into A Then B also derives all A's array-accesses, like xs. Runs in n:futharkExtend a context with another context. We never have to consider the case where VNames clash in the context, since they are unique.:futhark*Wrapper around the constructur of Context.:futhark/Create a singular varInfo with no dependencies.:futhark)Create a singular context from a segspace#futhark Analyse each entry and accumulate the results.#futhark*Analyse each statement in a function body.:futhark/Analyse each statement in a list of statements.:futharkSame as analyseStmsPrimitive, but change the resulting context into a varInfo, mapped to pattern.:futharkAnalyse a rep statement and return the updated context and array index descriptors.#futharkGets the dependencies of each dimension and either returns a result, or adds a slice to the context.:futhark!Analyse statements in a rep body.:futharkReturns an intmap of names, to be used as dependencies in construction of VariableInfos.:futhark,Reduce a DimFix into its set of dependencies:futhark>Recursively lookup vnames until vars with no deps are reached.-#############################################-############################################# Safe-Inferred":futharkProduce a coalescing permutation that will be used to create a manifest of the array. Returns Nothing if the array is already in the optimal layout or if the array access is too complex to confidently determine the optimal layout. Map each list of # in the IndexTable to a permutation in a generic way that can be handled uniquely by each backend.#futhark8Reasons common to all backends to not manifest an array.:futharklike mapMaybe, but works on nested maps. Eliminates "dangling" maps / rows with missing (Nothing) values.#futharkGiven an ordering function for #, and an IndexTable, return a LayoutTable. We remove entries with no results after :########## Safe-Inferred":futharkUsed to keep track of which pairs of arrays and permutations we have already created manifests for, in order to avoid duplicates.:futharkA map from the name of an expression to the expression that defines it.:futhark/Recursively transform the statements in a body.:futharkRecursively transform the statements in the body of a SegGroup kernel.:futhark;Transform the statements in the body of a SegThread kernel.#### Safe-Inferred"b#futhark5The optimisation performed on the GPU representation.#futhark4The optimisation performed on the MC representation.#### Safe-Inferred"""#futharkA pipeline used by all current compilers. Performs inlining, fusion, and various forms of cleanup. This pipeline will be followed by another one that deals with parallelism and memory.:futharkThis is the pipeline that applies the AD transformation and subsequent interesting optimisations.#futharkThe pipeline used by the CUDA, HIP, and OpenCL backends, but before adding memory information. Includes #.#futharkThe pipeline used by the sequential backends. Turns all parallelism into sequential loops. Includes #.$futharkRun #:, then add memory information (and optimise it slightly).$futharkRun #7, then add memory information (and optimise it a lot).$futharkRun # and then convert to multicore representation (and do a bunch of optimisation).$futharkRun $! and then add memory information.###$$$$###$$$$ Safe-Inferred"%P $futhark2Is this character a valid member of an identifier?$futhark6Consume whitespace (including skipping line comments).$futhark=Consume whitespace after the provided parser, if it succeeds.$futhark keyword k parses k/, which must not be immediately followed by a $ character. This ensures that iff is not seen as the if keyword followed by f.. Sometimes called the "maximum munch" rule.:futharkParse an integer value.:futharkParse a floating-point value.:futharkParse a boolean value.$futhark'Defined in this module for convenience.$futharkParse a floating-point type.$futharkParse an integer type.$futharkParse a primitive type.$$$$$$$$$$$$$$$$ Safe-Inferred"%$futharkParse a   given a leaf parser.$$   $$ Safe-Inferred"(:futharkThis record contains parser for all the representation-specific bits. Essentially a manually passed-around type class dictionary, because ambiguities make it impossible to write this with actual type classes.$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Safe-Inferred"Q$futharkThe program described by a single Futhark file. May depend on other files.$futharkA top-level binding.$futharkA module parameter.$futharkA module binding.$futharkModule expression.$futhark)The contents of another file as a module.$futharkFunctor application. The first mapping is from parameter names to argument names, while the second maps names in the constructed module to the names inside the functor.$futharkCanonical reference to a Futhark code file. Does not include the .fut extension. This is most often a path relative to the working directory of the compiler. In a multi-file program, a file is known by exactly one import name, even if it is referenced relatively by different names by files in different subdirectories.$futharkModule type binding.$futharkA type refinement.$futharkA module type expression.$futhark'A spec is a component of a module type.$futharkAbstract type.$futharkA type parameter.$futhark%A type parameter that must be a size.$futhark%A type parameter that must be a type.$futhark,The liftedness of a type parameter. By the Ord instance, Unlifted < SizeLifted < Lifted.$futharkMay only be instantiated with a zero-order type of (possibly symbolically) known size.$futharkMay only be instantiated with a zero-order type, but the size can be varying.$futhark+May be instantiated with a functional type.$futharkType Declarations$futharkFunction Declarations$futharkJust if this function is an entry point. If so, it also contains the externally visible interface. Note that this may not strictly be well-typed after some desugaring operations, as it may refer to abstract types that are no longer in scope.$futharkIf $ is null, then the &' are brought into scope at this point.$futharkInformation about the external interface exposed by an entry point. The important thing is that that we remember the original source-language types, without desugaring them at all. The annoying thing is that we do not require type annotations on entry points, so the types can be either ascribed or inferred.$futharkA parameter of an entry point.%futharkPart of the type of an entry point. Has an actual type, and maybe also an ascribed type expression. Note that although size expressions in the elaborated type can contain variables, they are no longer in scope, and are considered more like equivalence classes.%futharkDocumentation strings, including source location. The string may contain newline characters, but it does not contain comment prefix markers.%futharkA pattern as used most places where variables are bound (function parameters, let expressions, etc).%futharkA literal in a pattern.%futharkWhether the loop is a for -loop or a while-loop.%futharkA case in a match expression.%futharkAn entry in a record literal.%futhark The Futhark expression language.This allows us to encode whether or not the expression has been type-checked in the Haskell type of the expression. Specifically, the parser will produce expressions of type Exp & ., and the type checker will convert these to Exp & , in which type information is always present and all names are unique.%futharkA polymorphic integral literal.%futharkA polymorphic decimal literal.%futhark?A string literal is just a fancy syntax for an array of bytes.%futharkA parenthesized expression.%futharkTuple literals, e.g., {1+3, {x, y+z}}.%futharkRecord literals, e.g.  {x=2,y=3,z}.%futharkArray literals, e.g., [ [1+x, 3], [2, 1+4] ]7. Second arg is the row type of the rows of the array.%futharkArray value constants, where the elements are known to be constant primitives. This is a fast-path variant of % that will never be constructed by the parser, but may result from normalisation later on. Has exactly the same semantics as an %.%futhark1An attribute applied to the following expression.%futhark;Numeric negation (ugly special case; Haskell did it first).%futharkLogical and bitwise negation.%futharkFail if the first expression does not return true, and return the value of the second expression if it does.%futharkAn n-ary value constructor.%futhark+0; first two types are operands, third is result.%futhark2+*; first type is operand, second is result.%futhark+2*; first type is operand, second is result.%futharkField projection as a section: (.x.y.z).%futharkArray indexing as a section: (.[i,j]).%futharkType ascription: e : t.%futharkSize coercion: e :> t.%futharkAn annotation inserted by the type checker on constructs that are "function calls" (either literally or conceptually). This annotation encodes the result type, as well as any existential sizes that are generated here.%futharkAn "application expression" is a semantic (not syntactic) grouping of expressions that have "funcall-like" semantics, mostly meaning that they can return existential sizes. In our type theory, these are all thought to be bound to names (*Administrative Normal Form*), but as this is not practical in a real language, we instead use an annotation (%) that stores the information we need, so we can pretend that an application expression was really bound to a name.%futharkFunction application. Parts of the compiler expects that the function expression is never itself an % . Use the & function to maintain this invariant, rather than constructing % directly.The  Maybe VNames are existential sizes generated by this argument. May have duplicates across the program, but they will all produce the same value (the expressions will be identical).%futharkA match expression.%futharkA binding of a size in a pattern (essentially a size parameter in a let expression).%futhark6A name qualified with a breadcrumb of module accesses.%futhark8A slicing of an array (potentially multiple dimensions).%futhark"An indexing of a single dimension.%futhark&Whether a bound for an end-point of a %/ or a range literal is inclusive or exclusive.%futhark%May be "down to" if step is negative.%futharkDefault binary operators.%futharkA pseudo-operator standing in for any normal identifier used as an operator (they all have the same fixity).%futharkNot a real operator, but operator with this as a prefix may be defined by the user.%futharkNot a real operator, but operator with this as a prefix may be defined by the user.%futhark |>%futhark<| Misc%futharkAn identifier consists of its name and the type of the value bound to the identifier.%futharkInformation about which parts of a parameter are consumed. This can be considered kind of an effect on the function.%futharkDoes not consume the parameter.%futharkConsumes the parameter.%futharkAn unstructured syntactic type with type variables and possibly shape declarations - this is what the user types in the source program. These are used to construct &s in the type checker.&futhark8A type argument expression passed to a type constructor.&futhark0A dimension declaration expression for use in a %'. Syntactically includes the brackets.&futharkThe size of the dimension is this expression (or whatever), all of which free variables must be in scope.&futharkNo dimension declaration.&futharkThe return type version of a &.&futharkThe return type version of a &.&futhark6A value type contains full, manifest size information.&futharkA type with uniqueness information, used for function return types&futharkA type with consumption information, used for function parameters (but not in function types).&futharkA "structural" type with shape annotations and no aliasing information, used for declarations.&futhark)An argument passed to a type constructor.&futharkAn expanded Futhark type is either an array, or something that can be an element of an array. When comparing types for equality, function parameter names are ignored. This representation permits some malformed types (arrays of functions), but importantly rules out arrays-of-arrays.&futharkTypes that can be elements of arrays. This representation does allow arrays of records of functions, which is nonsensical, but it convolutes the code too much if we try to statically rule it out.&futharkThe aliasing corresponds to the lexical closure of the function.&futharkTypes that can appear to the right of a function arrow. This just means they can be existentially quantified.&futhark0The name (if any) of a function parameter. The 6 and 65 instances always compare values of this type equal.&futharkThe size of an array type is a list of its dimension sizes. If 53, that dimension is of a (statically) unknown size.&futhark9The elaborated size of a dimension is just an expression.&futharkThe payload of an attribute.&futharkThe value of an &.&futharkA class for converting ordinary Haskell values to primitive Futhark values.&futharkNon-array values.&futharkLow-level primitive types.&futharkSome information. The dual to &&futharkNo information functor. Usually used for placeholder type- or aliasing information.&futhark Create a & from a name.&futhark Create a & from a constant integer.&futhark.The number of dimensions contained in a shape.&futharkstripDims n shape strips the outer n dimensions from shape , returning 53 if this would result in zero or fewer dimensions.&futharkThe name of a type parameter.&futhark Construct an % node, with type information.&futhark Construct an % node, without type information.% &#$)&&&&&&&&&&&&&&&&&&&&%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%&&&&&&&&&&&&&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%$$$$$$$$$$$$$$$$%%%%$$$$$$$$$$$$$$$$$$$$&$$$$$$$$$$$$&&&&&%%%%&&&&&&&&&&&&&&&&&&&&&&&&%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%&&&&&&&&&&&&&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%$$$$$$$$$$$$$$$$%%%%$$$$$$$$$$$$$$$$$$$$&$$$$$$$$$$$$&&&&&%%%%&&&& Safe-Inferred"Y(futhark'The class of things that we can map an ( across.(futharkMap a monadic action across the immediate children of an object. Importantly, the ( action is not invoked for the object itself, and the mapping does not descend recursively into subexpressions. The mapping is done left-to-right.(futharkExpress a monad mapping operation on a syntax node. Each element of this structure expresses the operation to be performed on a given child.(futharkAn (& that just leaves its input unchanged.(futharkRemove all annotations from an expression, but retain the name/scope information. ((((((((((( ((((((((((( Safe-Inferred"[r(futhark+Does this record map correspond to a tuple?(futhark0Construct a record map corresponding to a tuple.(futhark1Increasing field names for a tuple (starts at 0).(futharkSort fields by their name; taking care to sort numeric fields by their numeric value. This ensures that tuples and tuple-like records match.(((((((( Safe-Inferred"z(futhark8A case (of a match expression) with no type annotations.(futhark+A Futhark program with no type annotations.(futhark A spec with no type annotations.(futhark'A declaration with no type annotations.(futhark*A module binding with no type annotations.(futhark/A module type binding with no type annotations.(futhark(A type binding with no type annotations.(futhark0A function declaration with no type annotations.(futhark#A pattern with no type annotations.(futhark*A type parameter with no type annotations.(futhark2A module type expression with no type annotations.(futhark-A module expression with no type annotations.(futhark'An expression with no type annotations.(futhark!A slice with no type annotations.(futhark"An index with no type annotations.(futhark'An identifier with no type annotations.(futharkAn unchecked type expression.(futhark:A type with no aliasing information but shape annotations.(futhark,A type-checked case (of a match expression).(futhark.A known scalar type with no shape annotations.(futharkA type-checked type parameter.(futhark(A known type arg with shape annotations.(futhark)An Futhark program with type information.(futharkA type-checked specification.(futharkA type-checked declaration.(futhark&A type-checked module type expression.(futhark A type-checked module parameter.)futhark!A type-checked module expression.)futhark#A type-checked module type binding.)futharkA type-checked module binding.)futhark%A type binding with type information.)futhark.An constant declaration with type information.)futhark A pattern with type information.)futhark0An application expression with type information.)futhark$An expression with type information.)futharkA slice with type information.)futharkAn index with type information.)futhark2An identifier with type- and aliasing information.)futharkThe nature of something predefined. For functions, these can either be monomorphic or overloaded. An overloaded builtin is a list valid types it can be instantiated with, to the parameter and result type, with 5- representing the overloaded parameter type.)futhark Where does this dimension occur?)futharkImmediately in the argument to ).)futharkIn a function parameter type.)futharkIn a function return type.)futhark-The name of the default program entry point (main).)futharkReturn the dimensionality of a type. For non-arrays, this is zero. For a one-dimensional array it is one, for a two-dimensional it is two, and so forth.)futhark5Return the shape of a type - for non-arrays, this is 5.)futhark/Change the shape of a type to be just the rank.)futharkPerform a traversal (possibly including replacement) on sizes that are parameters in a function type, but also including the type immediately passed to the function. Also passes along a set of the parameter names inside the type that have come in scope at the occurrence of the dimension.)futhark Return the uniqueness of a type.)futharkunique t is 6' if the type of the argument is unique.)futharkdiet t< returns a description of how a function parameter of type t consumes its argument.)futharkConvert any type to one that has rank information, no alias information, and no embedded names.)futhark)Remove uniquenss information from a type.)futharkUses %.)futhark Convert to &)futhark Convert to &)futharkPreserves relation between % and .)futharkPreserves relation between % and .)futhark peelArray n t4 returns the type resulting from peeling the first n array dimensions from t . Returns Nothing if t has less than n dimensions.)futhark arrayOf u s t constructs an array type. The convenience compared to using the & constructor directly is that t can itself be an array. If t is an n-dimensional array, and s is a list of length n, the resulting type is of an n+m dimensions.)futharkLike )>, but you can pass in uniqueness info of the resulting array.)futharkstripArray n t removes the n outermost layers of the array. Essentially, it is the type of indexing an array of type t with n indexes.)futharkCreate a record type corresponding to a tuple with the given element types.)futharkDoes this type corespond to a tuple? If so, return the elements of that tuple.)futharkSort the constructors of a sum type in some well-defined (but not otherwise significant) manner.)futhark Is this a $?)futhark Is this a $?)futharkThe name, if any.)futharkA special expression representing no known size. When present in a type, each instance represents a distinct size. The type checker should _never_ produce these - they are a (hopefully temporary) thing introduced by defunctorisation and monomorphisation. They represent a flaw in our implementation. When they occur in a return type, they can be replaced with freshly created existential sizes. When they occur in parameter types, they can be replaced with size parameters.)futharkMatch the dimensions of otherwise assumed-equal types. The combining function is also passed the names bound within the type (from named parameters or return types).)futharkSet the uniqueness attribute of a type. If the type is a record or sum type, the uniqueness of its components will be modified.)futharkThe type of a basic value.)futharkThe type of an Futhark term. The aliasing will refer to itself, if the term is a non-tuple-typed variable.)futharkThe type of a function with the given parameters and return type.)futharkfoldFunType ts ret creates a function type (&) that takes ts as parameters and returns ret.)futharkExtract the parameter types and return type from a type. If the type is not an arrow type, the list of parameter types is empty.)futharkThe type scheme of a value binding, comprising the type parameters and the actual type.)futharkThe names that are brought into scope by this value binding (not including its own parameter names, but including any existential sizes).)futhark#The type names mentioned in a type.)futhark orderZero t is 6 if the argument type has order 0, i.e., it is not a function type, does not contain a function type as a subcomponent, and may not be instantiated with a function type.)futharkpatternOrderZero pat is 68 if all of the types in the given pattern have order 0.)futhark*The set of identifiers bound in a pattern.)futhark$The set of names bound in a pattern.)futhark0Each name bound in a pattern alongside its type.)futhark(The type of values bound by the pattern.)futharkThe type matched by the pattern, including shape declarations if present.)futharkWhen viewed as a function parameter, does this pattern correspond to a named parameter of some type?)futharkNames of primitive types to types. This is only valid if no shadowing is going on, but useful for tools.)futharkIf this type corresponds to the builtin "acc" type, return the type of the underlying array.)futhark Find the  corresponding to a builtin. Crashes if that name cannot be found.)futharkA map of all built-ins.)futhark-Is this include part of the built-in prelude?)futhark-Is the position of this thing builtin as per )8? Things without location are considered not built-in.)futharkThe largest tag used by an intrinsic - this can be used to determine whether a / refers to an intrinsic or a user-defined name.)futhark-Create a name with no qualifiers from a name.)futhark8Add another qualifier (at the head) to a qualified name.)futhark*The modules imported by a Futhark program.)futhark-The modules imported by a single declaration.)futharkThe set of module types used in any exported (non-local) declaration.)futharkExtract a leading $((name, namespace, file), remainder) from a documentation comment string. These are formatted as `name`@namespace[@file]. Let us hope that this pattern does not occur anywhere else.)futharkGiven an operator name, return the operator that determines its syntactical properties.)futhark-Find instances of typed holes in the program.)futharkStrip semantically irrelevant stuff from the top level of expression. This is used to provide a slightly fuzzy notion of expression equality.Ideally we'd implement unification on a simpler representation that simply didn't allow us.)futharkIf these two expressions are structurally similar at top level as sizes, produce their subexpressions (which are not necessarily similar, but you can check for that!). This is the machinery underlying expresssion unification. We assume that the expressions have the same type.)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))(((())))(((((((((((((((((()))))))(()))((()(((()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))(((())))(((((((((((((((((()))))))(()))((()(((( Safe-Inferred"#)futharkClass for type constructors that represent annotations. Used in the prettyprinter to either print the original AST, or the computed decoration.)futharkExtract value, if any.)futharkA class for types that are variable names in the Futhark source language. This is used instead of a mere  instance because in the compiler frontend we want to print VNames differently depending on whether the FUTHARK_COMPILER_DEBUGGING environment variable is set, yet in the backend we want to always print VNames with the tag. To avoid erroneously using the  instance for VNames, we in fact only define it inside the modules for the core language (as an orphan instance).)futhark9Prettyprint name as string. Only use this for debugging.)futharkDepending on the environment variable FUTHARK_COMPILER_DEBUGGING, VNames are printed as either the name with an internal tag, or just the base name. ))))))) ))))))) Safe-Inferred"N*futharkA lexical token. It does not itself contain position information, so in practice the parser will consume tokens tagged with a source position.*futhark+Suffix a zero if the last character is dot.******************************************************************************************************************************************************************************************** Safe-Inferred"r:futharkGiven a starting position, produce tokens from the given text (or a lexer error). Returns the final position.**********************************************************************************:: Safe-Inferred"C*futharkA syntax error.:futharkNote: reverse order.*futharkA comment consists of its starting and end position, as well as its text. The contents include the comment start marker.+futhark&Move the end position back one column.!******++**************+****+**+"*!******++**************+****+**+"* Safe-Inferred":::::++********:9 :9  Safe-Inferred"Y+futhark/Parse an entire Futhark program from the given 5 , using the 5' as the source name for error messages.+futhark/Parse an entire Futhark program from the given 5 , using the 5 as the source name for error messages. Also returns the comments encountered.+futhark+Parse an Futhark expression from the given 5 , using the 5' as the source name for error messages.+futhark1Parse a Futhark module expression from the given 5 , using the 5' as the source name for error messages.+futhark%Parse an Futhark type from the given 5 , using the 5' as the source name for error messages.+futharkParse either an expression or a declaration; favouring declarations in case of ambiguity.++++++********++++++******** Safe-Inferred"l+futharkA set of names.+futharkThe set of names in an +.+futhark:Set subtraction. Do not consider those variables as free.:futharkAs +, but for lists.+futhark3Compute the set of free variables of an expression.+futharkFree variables in pattern (including types of the bound identifiers).+futharkFree variables in the type (meaning those that are used in size expression).++++++++++++ Safe-Inferred"%&&&&&&&&&&$$$$ &%%%%%%%%%%%%%%%%%%%%%%%%%%%#$&&&&&&&&%%&&&&&&%%%$$$$$$&&&%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%%%$$$$$$$$$$$$$$$$$$$$$$$$$$$$&&%%%%)&&&&&&&()))((())())))))))))((((((((((((((((())(())))((()))))))))))))))))()))))))))))))))))))))))))))))))))))))))))((()))++++++)))))) Safe-Inferred"++futhark6Modules produces environment with this representation.+futharkA mapping from names (which always exist in some namespace) to a unique (tagged) name.+futharkType parameters, list of parameter types (optinally named), and return type. The type parameters are in scope in both parameter types and the return type. Non-functional values have only a return type.+futharkA binding from a name to its definition as a type. We allow a return type here to support type abbreviations that hide some inner sizes (these must necessarily be $ or $).+futhark Representation of a module type.+futhark"Abstract types in the module type.+futharkA parametric functor consists of a set of abstract types, the environment of its parameter, and the resulting module type.+futharkRepresentation of a module, which is either a plain environment, or a parametric module ("functor" in SML).+futhark0A mapping of abstract types to their liftedness.+futharkThe space inhabited by a name.+futharkFunctions and values.+futharkA mapping from import names to imports. The ordering is significant.+futharkThe result of type checking some file. Can be passed to further invocations of the type checker.+futharkAbstract types.+futhark:The environment made available when importing this module.+futharkThe environment at the bottom of the file. Includes local parts.+futharkCreate an import name immediately from a file path specified by the user.+futhark We resolve '..' paths here and assume that no shenanigans are going on with symbolic links. If there is, too bad. Don't do that.+futhark Create a .fut file corresponding to an $.+futhark7Produce a human-readable canonicalized string from an $.+futhark5Produce a human-readable canonicalized text from an $.,$+++++++++++++++++++++++++++++++++++++++++++,$+++++++++++++++++++++++++++++++++++++++++++ Safe-Inferred"+futhark7Information about what is at the given source location.+futharkWhat a name is bound to.+futharkWhere was a bound variable actually bound? That is, what is the location of its definition?:futhark*All bindings of everything in the program.+futharkInformation about what's at the given source position. Returns 5 if there is nothing there, including if the source position is invalid. +++++++++'( +++++++++'( Safe-Inferred"+futhark A fully evaluated Futhark value.+futharkThe shape of an array.+futharkA shape is a tree to accomodate the case of records. It is parameterised over the representation of dimensions.+futharkPrettyprint value.+futhark The value in the textual format.+futhark,Does the value correspond to an empty array?+futharkString representation of an empty array with the provided element type. This is pretty ad-hoc - don't expect good results unless the element type is a primitive.+futharkConvert a Futhark value in the externally observable data format to an interpreter value.++++++++++++++++++++++++++++++++++++++++++++++++++++ Safe-Inferred",futharkThe interpreter context. All evaluation takes place with respect to a context, and it can be extended with more definitions, which is how the REPL works.,futharkAn error occurred during interpretation due to an error in the user program. Actual interpreter errors will be signaled with an IO exception (6).,futhark'The actual type- and value environment.:futharkA TermValue with a 54 type annotation is an intrinsic or an existential.:futhark6A polymorphic value that must be instantiated. The & provided is un-evaluated, but parts of it can be evaluated using the provided : function.:futhark3An expression evaluator that embeds an environment.:futhark*The monad in which evaluation takes place.,futhark(What is the reason for this break point?,futhark&An explicit breakpoint in the program.,futharkA:futharkDisregard any existential sizes computed during this action. This is used so that existentials computed during one iteration of a loop or a function call are not remembered the next time around.,futhark,Prettyprint the error for human consumption.:futhark:, but with 0 as 1.:futharkExpand type based on information that was not available at type-checking time (the structure of abstract types).:futharkEvaluate all possible sizes, except those that contain free variables in the set of names.,futharkThe initial environment contains definitions of the various intrinsic functions.,futharkProduce a context, based on the one passed in, where all of the provided imports have been openened in order.,futharkExecute the named function on the given arguments; may fail horribly if these are ill-typed.,,,,,,,,,,,,,,,,,,,,,,,,,,+++++,,,,,,,,,,,,,,,,,,,,,,,,,,+++++ Safe-Inferred",futharkA tree is just an instantiation of the free monad with a list monad.The important thing is that we use it to represent the original structure of arrayss, as this matters for aliasing. Each : constructor corresponds to an array dimension. Only non-arrays have a :/ at the top level. See Note [Alias Inference].,futharkAs ,>, but returns components of a top-level tuple type piecemeal.,futhark"Only exposed for testing purposes.,futharkHow many core language values are needed to represent one source language value of the given type?,futhark7Convert an external primitive to an internal primitive.,futharkConvert an external primitive value to an internal primitive value.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, Safe-Inferred",futharkMonomorphise a list of top-level declarations. A module-free input program is expected, so only value declarations and type declaration are accepted.,, Safe-Inferred",futharkPerform the transformation.,, Safe-Inferred"t,futhark%A function for internalising lambdas.,,,,,, Safe-Inferred",futhark0The types that are visible to the outside world.,futharkRetrieve those type bindings that should be visible to the outside world. Currently that is everything at top level that does not have type parameters.,,,,,, Safe-Inferred":futhark5A pairing of a lexical closure and a module function.:futharkA non-parametric module.:futharkA substitution from names in the original program to names in the generated/residual program.:futhark(A general-purpose substitution of names.,futharkPerform defunctorisation.,, Safe-Inferred"n:futhark2Flatten a pattern. Returns a list of identifiers.,,,,,,,,,,,, Safe-Inferred":futharkSymbol table used for local variable lookups during expression evaluation.,futhark#How to evaluate a builtin function.,futharkThe intermediate values produced by an expression - in particular, these may not be on the server.,futhark2A Haskell-level value or a variable on the server.,futharkThe type of a ,* - either a value type or a function type.,futharkIns, then outs.,futharkA ScriptValue is either a base value or a partially applied function. We don't have real first-class functions in FutharkScript, but we sort of have closures.,futharkIns, then outs. Yes, this is the opposite of more or less everywhere else.,futharkA FutharkScript expression. This is a simple AST that might not correspond exactly to what the user wrote (e.g. no parentheses or source locations). This is fine for small expressions, which is all this is meant for.,futharkServer-side variable, *not* Futhark variable (these are handled in ,).,futharkA function called in a , expression can be either a Futhark function or a builtin function.,futharkLike a :, but keeps a bit more state to make FutharkScript more convenient.,futharkRun an action with a , produced by an existing :&, without shutting it down at the end.,futharkStart a server, execute an action, then shut down the server. Similar to :.,futhark.futharkCompile things to ..futharkCompile to an , where the type (which must still be a primitive) is deduced monadically..futhark*Compile where we know the type in advance..futharkA type class that helps ensuring that the type annotation in a . is correct..futhark7Create a typed variable from a name and a dynamic type..futharkExtract type from a ...futharkA typed variable, which we can turn into a typed expression, or use as the target for an assignment. This is used to aid in type safety when doing code generation, by keeping the types straight. It is still easy to cheat when you need to.:futharkMaps the arrays backing each accumulator to their update function and neutral elements. This works because an array name can only become part of a single accumulator throughout its lifetime. If the arrays backing an accumulator is not in this mapping, the accumulator is scatter-like..futhark)The symbol table used during compilation.:futharkUser-extensible environment.:futhark.Name of the function we are compiling, if any.:futharkThe set of attributes that are active on the enclosing statements (including the one we are currently compiling).:futharkThe . is 7# if a copy if required. If it is 5, then a copy/assignment of a memory block somewhere takes care of this array..futhark;Every non-scalar variable must be associated with an entry..futhark6When an array is declared, this is where it is stored..futhark,An alternate way of compiling an allocation..futharkHow to compile an  ..futharkHow to compile some  ..futharkHow to compile an  ..futharkAn operations set for which the expression compiler always returns ...futharkExecute a code generation action, returning the code that was emitted..futhark$Emit some generated imperative code..futhark;Emit a warning about something the user should be aware of..futhark&Emit a function in the generated code..futhark+Check if a function of a given name exists.:futharkHow many value parameters are accepted by this entry point? This is used to determine which of the function parameters correspond to the parameters of the original function (they must all come at the end)..futharkGenerate an expression that is true if the subexpressions match the case pasttern.:futhark+Note: a hack to be used only for functions.:futharkLike ., but does not create new declarations. Note: a hack to be used only for functions..futhark Another hack..futharkCreate variable of some provided dynamic type. You'll need this when you are compiling program code of Haskell-level unknown type. For other things, use other functions..futharkCreate . of some provided dynamic type. No guarantee that the dynamic type matches the inferred type..futharkCreate . of some fixed type..futhark.Convert a typed variable to a size (a SubExp)..futhark9Convert a typed variable to a similarly typed expression..futhark;Extract the underlying variable name from a typed variable..futhark Generate a , prefixed with . if it exists..futhark Generate a , prefixed with . if it exists./futharkThe active attributes, including those for the statement currently being compiled.:futhark,Add more attributes to what is returning by /./futharkGet the current symbol table./futharkRun an action with a modified symbol table. All changes to the symbol table will be reverted once the action is done!/futhark.In which memory space is this array allocated?/futharkIn the case of a histogram-like accumulator, also sets the index parameters.:futharkCopy from here to there; both destination and source may be indexeded./futharkCopy from here to there; both destination and source be indexeded. If so, they better be arrays of enough dimensions. This function will generally just Do What I Mean, and Do The Right Thing. Both destination and source must be in scope./futharkAs /, but implicitly es the indexes./futharkcompileAlloc pat size space allocates n bytes of memory in space, writing the result to pat4, which must contain a single memory-typed element./futharkThe number of bytes needed to represent the array in a straightforward contiguous format, as an  expression./futharkIs this indexing in-bounds for an array of the given shape? This is useful for things like scatter, which ignores out-of-bounds writes./futharkExecute a code generation action, wrapping the generated code within a  with the given description./futhark>Declare an array in row-major order in the given memory block./futharkLike /, but permute the in-memory representation of the indices as specified./futhark Uses linear/iota index function./futhark Uses linear/iota index function./futharkCreate a sequential  loop covering a space of the given shape. The function is calling with the indexes for a given iteration./futharkUntyped assignment./futharkTyped assignment./futharkConstructing an ad-hoc function that does not correspond to any of the IR functions in the input program./futharkGenerate constants that get put outside of all functions. Will be executed at program startup. Action must return the names that should should be made available. This one has real sharp edges. Do not use inside .,. Do not use any variable from the context./futharkdIndexSpace f dims i: computes a list of indices into an array with dimension dims given the flat index i2. The resulting list will have the same size as dims'. Intermediate results are passed to f./futharkLike /, but invent some new names for the indexes based on the given template................................///.//................//////........../........////////. ............./////////////////////////......................................///.//................//////........../........////////. ............./////////////////////////./3/3 Safe-Inferred"b/futhark Compile a ' program to sequential imperative code././. Safe-Inferred"/futharkCompile Futhark program to wasm program (some assembly required).'The triple that is returned consists of.Generated C code (to be passed to Emscripten).JavaScript wrapper code that presents a nicer interface to the Emscripten-produced code (this should be put in a  .class.js file by itself).!Options that should be passed to emcc.// Safe-Inferred"/futharkCompile the program to Python.// Safe-Inferred"/futhark$Compile the program to sequential C. / / Safe-Inferred"|/futharkThe mechanism that will be used for performing the atomic update. Approximates how efficient it will be. Ordered from most to least efficient./futharkCan be done by efficient swaps./futharkRequires explicit locking./futharkA function for generating code for an atomic update. Assumes that the bucket is in-bounds./futhark+Locking strategy used for an atomic update./futharkArray containing the lock./futhark'Value for us to consider the lock free./futharkWhat to write when we lock it./futhark What to write when we unlock it./futharkA transformation from the logical lock index to the physical position in the array. This can also be used to make the lock array smaller./futharkIndicates whether to vectorize a chunk loop or keep it sequential. We use this to allow falling back to sequential chunk loops in cases we don't care about trying to vectorize./futhark7Information about the locks available for accumulators./futharkIs there an atomic  corresponding to this ?/futharkTry to extract invariant allocations. If we assume that the given  is the body of a , then it is always safe to move the immediate allocations to the prebody./futharkEmit code for the chunk loop, given an action that generates code for a single iteration.The action is called with the (symbolic) index of the current iteration./futharkEmit code for a sequential loop over each vector lane, given and action that generates code for a single iteration. The action is called with the symbolic index of the current iteration./futharkGiven a piece of code, if that code performs an assignment, turn that assignment into an extraction of element from a vector on the right hand side, using a passed index for the extraction. Other code is left as is./futharkGiven an action that may generate some code, put that code into an ISPC kernel./futharkLike sLoopNest, but puts a vectorized loop at the innermost layer.,////////////////////////////////////////////,//////////////////////////////////////////// Safe-Inferred"T// Safe-Inferred":futhark&A SegBinOp with auxiliary information.:futharkThe array in which we write the intermediate results, indexed by the flat/physical thread ID./futhark$Generate code for a SegRed construct/futharkLike /), but where the body is a monadic action.:futhark7Arrays for storing group results shared between threads////// Safe-Inferred"// Safe-Inferred":futharkSplit some list into chunks equal to the number of values returned by each :futharkAtomic Histogram approach The implementation has three sub-strategies depending on the type of the operator 1. If values are integral scalars, a direct-supported atomic update is used. 2. If values are on one memory location, e.g. a float, then a CAS operation is used to perform the update, where the float is casted to an integral scalar. 1. and 2. currently only works for 32-bit and 64-bit types, but GCC has support for 8-, 16- and 128- bit types as well. 3. Otherwise a locking based approach is used// Safe-Inferred" /futharkCompile the program././. Safe-Inferred" 0futhark9Compile the program to ImpCode with multicore operations.0futhark'Multicore-related command line options.0futhark)Operations for generating multicore code.0000//00000000000/00000//00000000000/0 Safe-Inferred" 0futharkCompile Futhark program to wasm-multicore program (some assembly required).'The triple that is returned consists of.Generated C code (to be passed to Emscripten).JavaScript wrapper code that presents a nicer interface to the Emscripten-produced code (this should be put in a  .class.js file by itself).!Options that should be passed to emcc.00 Safe-Inferred"+0futhark,Transient state tracked by the ISPC backend.0futharkCompile the program to C and ISPC code using multicore operations.0futhark;Compiler operations specific to the ISPC multicore backend.:futhark#Expose a struct to both ISPC and C.:futharkISPC has no string literals, so this makes one in C and exposes it via an external function, returning the name.:futharkSet memory in ISPC:futharkUnref memory in ISPC:futharkAllocate memory in ISPC:futharkFree memory in ISPC:futharkGiven a ImpCode function, generate all the required machinery for calling it in ISPC, both in a varying or uniform context. This involves handling for the fact that ISPC cannot pass structs by value to external functions.:futhark(Handle logging an error message in ISPC.:futharkGiven the name and type of a parameter, return the C type used to represent it. We use uniform pointers to varying values for lexical memory blocks, as this generally results in less gathers/scatters.:futharkCompile a block of code with ISPC specific semantics, falling back to generic C when this semantics is not needed. All recursive constructors are duplicated here, since not doing so would cause use to enter regular generic C codegen with no escape.:futharkPrepare a struct with memory allocted in the scope and populate its fields with values:futhark6Get memory from the memory struct into local variables:futharkWrite back potentially changed memory addresses and sizes to the memory struct:futharkRead back potentially changed memory addresses and sizes to the memory struct into local variables:futharkCan the given code produce an error? If so, we can't use foreach loops, since they don't allow for early-outs in error handling.:futharkLike GenericC.cachingMemory, but adapted for ISPC codegen.:futhark-Extend the set of dependencies with a new one:futhark+Find all the dependencies in a body of code:futhark>Take a list of dependencies and iterate them to a fixed point.:futharkFind roots of variance. These are memory blocks declared in the current scope as well as loop indices of foreach loops.:futharkAnalyze variability in a body of code and run an action with info about that variability in the compiler state.:futhark!Get the variability of a variable:futhark,Get the variability qualifiers of a variable000000 Safe-Inferred"''0futhark:Various extra configuration of the kernel being generated.0futharkCan this kernel execute correctly even if previous kernels failed?0futharkDoes whatever launch this kernel check for shared memory capacity itself?0futharkNumber of blocks.0futhark Block size.0futharkVariables that are specially in scope inside the kernel. Operationally, these will be available at kernel compile time (which happens at run-time, with access to machine-specific information).0futharkIs there an atomic  corresponding to this ?0futharkThe mechanism that will be used for performing the atomic update. Approximates how efficient it will be. Ordered from most to least efficient.0futhark Supported directly by primitive.0futharkCan be done by efficient swaps.0futharkRequires explicit locking.0futharkA function for generating code for an atomic update. Assumes that the bucket is in-bounds.0futhark+Locking strategy used for an atomic update.0futharkArray containing the lock.0futhark'Value for us to consider the lock free.0futharkWhat to write when we lock it.0futhark What to write when we unlock it.0futharkA transformation from the logical lock index to the physical position in the array. This can also be used to make the lock array smaller.0futharkA mapping from dimensions of nested SegOps to already computed local thread IDs. Only valid in non-virtualised case.0futharkMapping from dimensions of nested SegOps to how many iterations the virtualisation loop needs.0futhark7Information about the locks available for accumulators.0futharkWhich target are we ultimately generating code for? While most of the kernels code is the same, there are some cases where we generate special code based on the ultimate low-level API we are targeting.0futharkGenerate a constant device array of 32-bit integer zeroes with the given number of elements. Initialised with a replicate.0futharkAssign iterations of a for-loop to all threads in the kernel. The passed-in function is invoked with the (symbolic) iteration. The body must contain thread-level code. For multidimensional loops, use 0.0futharkAssign iterations of a for-loop to threads in the threadblock. The passed-in function is invoked with the (symbolic) iteration. For multidimensional loops, use 0.0futharkIterate collectively though a multidimensional space, such that all threads in the block participate. The passed-in function is invoked with a (symbolic) point in the index space.0futharkIf we are touching these arrays, which kind of fence do we need?0futharkGiven available register and a list of parameter types, compute the largest available chunk size given the parameters for which we want chunking and the available resources. Used in , and 2 (with primitive non-commutative operators only).0futhark+Perform a scalar write followed by a fence.0futhark>Do an atomic update corresponding to a binary operator lambda.:futharkChange every memory block to be in the global address space, except those who are in the shared memory space. This only affects generated code - we still need to make sure that the memory is actually present on the device (and declared as variables in the kernel).0futharkFor many kernels, we may not have enough physical blocks to cover the logical iteration space. Some blocks thus have to perform double duty; we put an outer loop to accomplish this. The advantage over just launching a bazillion threads is that the cost of memory expansion should be proportional to the number of *physical* threads (hardware parallelism), not the amount of application parallelism.0futharkThe default kernel attributes.0futharkRetrieve a size of the given size class and put it in a variable with the given name.0futharkCompute kernel attributes from ; including synthesising block-size and thread count if no grid is provided.:futhark"Perform a Replicate with a kernel.0futhark"Perform a Replicate with a kernel.:futharkPerform an Iota with a kernel.0futharkPerform an Iota with a kernel.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Safe-Inferred");futhark9Produce partially scanned intervals; one per threadblock.0futharkCompile < instance to host-level code with calls to various kernels.00 Safe-Inferred"*:0futharkCompile  instance to host-level code with calls to a single-pass kernel.00 Safe-Inferred"*0futharkCompile < instance to host-level code with calls to various kernels.00 Safe-Inferred"2 ;futhark?Auxiliary information for a single reduction. A slug holds the  operator for a single reduction, the different arrays required throughout stages one and two, and a global mem destination for the final result of the particular reduction.;futhark3Intermediate arrays needed for the given reduction.;futharkVarious useful precomputed information for block-level SegOps.;futhark3The sizes of nested iteration spaces in the kernel.;futharkflattenArray k flat arr flattens the outer k dimensions of arr to flat. (Make sure flat< is the sum of those dimensions or you'll have a bad time.);futharkapplyLambda lam dests args emits code that: Binds each parameter of lam% to the corresponding element of args,, interpreted as a (name,slice) pair (as in /&). Use an empty list for a scalar.Executes the body of lam. Binds the s that are the   of lam to the provided dest/s, again interpreted as the destination for a /.;futharkAs applyLambda, but first rename the names in the lambda. This makes it safe to apply it in multiple places. (It might be safe anyway, but you have to be more careful - use this if you are in doubt.);futhark*Find the sizes of nested parallelism in a  body.0futhark4Precompute various constants and useful information.0futhark*Make use of various precomputed constants.00000000000000 Safe-Inferred"90futharkCompile  instance code.00 Safe-Inferred";{0futhark Compile a ! program to low-level parallel code, with either CUDA or OpenCL characteristics.0futhark Compile a ! program to low-level parallel code, with either CUDA or OpenCL characteristics.1futhark Compile a ! program to low-level parallel code, with either CUDA or OpenCL characteristics.001.001. Safe-Inferred";1futhark3Compile the program to ImpCode with OpenCL kernels.1.1. Safe-Inferred"k1futhark1Compile the program to ImpCode with CUDA kernels.1.1. Safe-Inferred">1futhark,Compile the program to C with calls to CUDA. 1 1 Safe-Inferred"?0;;;;;;;; Safe-Inferred"M+*1futharkMonads that support type checking. The reason we have this internal interface is because we use distinct monads for checking expressions and declarations.1futhark$The type checker runs in this monad.;futharkWhich names have been used.;futharkCurrently type-checking at the top level? If false, we are inside a module.1futhark&A mapping from import import names to +s. This is used to resolve import declarations.1futhark0Information about an error during type checking.1futhark9A collection of extra information regarding a type error.1futharkA single note.1futharkPrettyprint type error.1futharkPrettyprint type error, without location information. This can be used for cases where the location is printed in some other way.1futharkAttach a reference to documentation explaining the error in more detail.1futharkAn unexpected functor appeared!1futhark#An unknown variable was referenced.1futhark,A name prefixed with an underscore was used.1futharkRun a 1 computation.1futharkRetrieve the current +.1futhark$The name of the current file/import.1futharkAre we type-checking at the top level, or are we inside a nested module?1futhark4We are now going to type-check the body of a module.1futharkLook up a module type.1futharkLook up an import.1futhark Evaluate a 1! computation within an extended (not replaced) environment.1futharkMap source-level names to fresh unique internal names, and evaluate a type checker context with the mapping active.1futharkMap single source-level name to fresh unique internal names, and evaluate a type checker context with the mapping active.1futharkBind these identifiers in the name map and also check whether they have been used.1futharkIndicate that this name has been used. This is usually done implicitly by other operations, but sometimes we want to make a "fake" use to avoid things like top level functions being considered unused.1futharkElaborate the given qualified name in the given namespace at the given location, producing the corresponding unique %!. Fails if the name is a module.1futharkElaborate the given qualified name in the given namespace at the given location, producing the corresponding unique %.1futharkElaborate the given name in the given namespace at the given location, producing the corresponding unique .1futharkDoes a type with this name already exist? This is used for warnings, so it is OK it's a little unprincipled.1futharkTry to prepend qualifiers to the type names such that they represent how to access the type in some scope.1futharkTurn a 5 1 into an actual error.1futharkAll signed integer types.1futharkAll unsigned integer types.1futharkAll integer types.1futharkAll floating-point types.1futharkAll number types.1futharkAll primitive types.1futharkThe +( corresponding to the intrinsics module.1futhark8The names that are available in the initial environment.1futharkConstruct the name of a new type variable given a base description and a tag number (note that this is distinct from actually constructing a VName; the tag here is intended for human consumption but the machine does not care).1futharkType-check an attribute.111111111111111111111111111111111111111111......+++++++++++++1++++++++++++++111111++++111111111111111111111111111111111111111111111+++++++++++++1++++++++++++++111111++++111 Safe-Inferred"T 1futharkClass of types which allow for substitution of types with no annotations for type variable names.1futhark!Substitutions to apply in a type.1futharkA type substitution may be a substitution or a yet-unknown substitution (but which is certainly an overloaded primitive type!).1futharkDetermine which of the sizes in a type are used as sizes outside of functions in the type, and which are not. The former are said to be "witnessed" by this type, while the latter are not. In practice, the latter means that the actual sizes must come from somewhere else.1futharkFigure out which of the sizes in a binding type must be passed explicitly, because their first use is as something else than just an array dimension.1futharkFigure out which of the sizes in a parameter type must be passed explicitly, because their first use is as something else than just an array dimension.1futharkEnsure that the dimensions of the RetType are unique by generating new names for them. This is to avoid name capture.1futhark#Check a type expression, producing:The checked expression.9Size variables for any anonymous sizes in the expression.The elaborated type.The liftedness of the type.1futharkRetrieve notes describing the purpose or origin of the given &. The location is used as the *current* location, for the purpose of reporting relative locations.2futhark3Replace all type variables with their substitution.2futhark:Replace any top-level type variable with its substitution.;futharkIs the given type variable the name of an abstract type or type parameter, which we cannot substitute?;futhark:If the given type variable is nonrigid, what is its level?2futharkUnifies two types.2futhark?Assert that this type must be one of the given primitive types.2futhark,Assert that this type must support equality.2futhark)Assert that this type must be zero-order.2futhark8Assert that this type must be valid as an array element.2futharkIn mustHaveConstr usage c t fs , the type t must have a constructor named c that takes arguments of types ts.2futharkAssert that some type must have a field with this name and type.2futharkLike unification, but creates new size variables where mismatches occur. Returns the new dimensions thus created.2futharkPerform a unification of two types outside a monadic context. The first list of type parameters are rigid but may have liftedness constraints; the second list of type parameters are allowed to be instantiated. All other types are considered rigid with no constraints.7112111112222222211111111111111111111111122222222222222271121111122222222111111111111111111111111222222222222222 Safe-Inferred"h;futharkThe integer encodes an equivalence class, so we can keep track of sizes that are statically identical.;futharkTo deduplicate size expressions, we want a looser notation of equality than the strict syntactical equality provided by the Eq instance on Exp. This newtype wrapper provides such a looser notion of equality.;futharkThese now have monomorphic types in the given action. This is used to handle shadowing.;futharkAsks the introduced variables in a set of argument, that is arguments not currently in scope.;futharkGets and removes expressions that could not be calculated when the arguments set will be unscoped. This should be called without argset in scope, for good detection of intros.;futharkCreates a new expression replacement if needed, this always produces normalised sizes. (e.g. single variable or constant);futharkarrowArg takes a return type and returns it with the existentials bound moved at the right of arrows. It also gives the new set of parameters to consider.2futhark0Monomorphise a list of top-level value bindings.22 Safe-Inferred"k;futharkMain monad of this module, the state as 3 parts: * the VNameSource to produce new names * the [Binding] is the accumulator for the result It behave a bit like a writer * the [BindModifier] is the current list of modifiers to apply to the introduced bindings It behave like a reader for attributes modifier, and as a state for assertion, they have to be in the same list to conserve their order Direct interaction with the inside state should be done with caution, that's why their no instance of ;.;futharkFrom now, we say an expression is "final" if it's going to be stored in a let-bind or is at the end of the body e.g. after all lets2futhark#Fully normalise top level bindings.22 Safe-Inferred"nN2futharkConvert a program in source Futhark to a program in the Futhark core language.;futharkOnly returns those pattern names that are not used in the pattern itself (the "non-existential" part, you could say).;futharkPromote to dimension type as appropriate for the original type. Also return original type.;futhark&Overloaded operators are treated here.;futharkHandle intrinsic functions. These are only allowed to be called in the prelude, and their internalisation may involve inspecting the AST.22 Safe-Inferred";futharkDefunctionalization monad. The Reader environment tracks both the current Env as well as the set of globally defined dynamic functions. This is used to avoid unnecessarily large closure environments.;futharkEnvironment mapping variable names to their associated static value.;futharkJust if this is a polymorphic binding that must be instantiated.;futharkA static value stores additional information about the result of defunctionalization of an expression, aside from the residual expression.;futhark-The Env is the lexical closure of the lambda.;futharkThe constructor that is actually present, plus the others that are not.;futharkThe pair is the StaticVal and residual expression of this function as a whole, while the second StaticVal is its body. (Don't trust this too much, my understanding may have holes.);futharkReturns the defunctionalization environment restricted to the given set of variable names.;futharkRun a computation in the defunctionalization monad. Returns the result of the computation, a new name source, and a list of lifted function declations.;futharkCreate a new top-level value declaration with the given function name, return type, list of parameters, and body expression.;futharkLooks up the associated static value for a given name in the environment.;futharkCombine the shape information of types as much as possible. The first argument is the orignal type and the second is the type of the transformed expression. This is necessary since the original type may contain additional information (e.g., shape restrictions) from the user given annotation.;futharkDefunctionalization of an expression. Returns the residual expression and the associated static value in the defunctionalization monad.;futharkSame as ;%, except it ignores the static value.;futharkDefunctionalize the function argument to a SOAC by eta-expanding if necessary and then defunctionalizing the body of the introduced lambda.;futhark8Defunctionalize an indexing of a single array dimension.;futharkDefunctionalize a let-bound function, while preserving parameters that have order 0 types (i.e., non-functional).;futhark Check if a ; and a given application depth corresponds to a fully applied dynamic function.;futharkConverts a dynamic function ; into a list of dimensions, a list of parameters, a function body, and the appropriate static value for applying the function at the given depth of partial application.;futharkConverts a pattern to an environment that binds the individual names of the pattern to their corresponding types wrapped in a ; static value.;futharkGiven a closure environment, construct a record pattern that binds the closed over variables. Insert wildcard for any patterns that would otherwise clash with size parameters.;futharkCompute the corresponding type for the *representation* of a given static value (not the original possibly higher-order value).;futharkConstruct the type for a fully-applied dynamic function from its static value and the original types of its arguments.;futharkMatch a pattern with its static value. Returns an environment with the identifier components of the pattern mapped to the corresponding subcomponents of the static value. If this function returns 5, then it corresponds to an unmatchable case. These should only occur for % expressions.;futharkGiven a pattern and the static value for the defunctionalized argument, update the pattern to reflect the changes in the types.;futharkConvert a record (or tuple) type to a record static value. This is used for "unwrapping" tuples and records that are nested in ; static values.;futharkDefunctionalize a top-level value binding. Returns the transformed result as well as an environment that binds the name of the value binding to the static value of the transformed body. The boolean is true if the function is a ;.;futhark1Defunctionalize a list of top-level declarations.2futharkTransform a list of top-level value bindings. May produce new lifted function definitions, which are placed in front of the resulting list of declarations.22 Safe-Inferred"}2futharkApply type abbreviations from a list of top-level declarations. A module-free input program is expected, so only value declarations and type declaration are accepted.22 Safe-Inferred"2futharkConvert a program in source Futhark to a program in the Futhark core language.22 Safe-Inferred"S 2futharkThe state is a set of constraints and a counter for generating type names. This is distinct from the usual counter we use for generating unique names, as these will be user-visible.2futharkWhat was the source of some existential size? This is used for using the same existential variable if the same source is encountered in multiple locations.;futharkWrap a function name to give it a vacuous Eq instance for SizeSource.2futhark=Type checking happens with access to this environment. The 2 will be extended during type-checking as bindings come into scope.;futharkInstantiate a type scheme with fresh type variables for its type parameters. Returns the names of the fresh type variables, the instance list, and the instantiated type.;futharkCreate a new type name and insert it (unconstrained) in the substitution map.3futharkGet the type of an expression, with top level type variables substituted. Never call ); directly (except in a few carefully inspected locations)!3futharkGet the type of an expression, with all type variables substituted. Slower than 3', but sometimes necessary. Never call ); directly (except in a few carefully inspected locations)!3futhark 0)3futharkType-check a top-level (or module-level) function definition. Despite the name, this is also used for checking constant definitions, by treating them as 0-ary functions.;futharkThis is "fixing" as in "setting them", not "correcting them". We only make very conservative fixing.;futharkExtract all the shape names that occur in positive position (roughly, left side of an arrow) in a given type.;futharkVerify certain restrictions on function parameters, and bail out on dubious constructions.These restrictions apply to all functions (anonymous or otherwise). Top-level functions have further restrictions that are checked during let-generalisation.;futharkMove existentials down to the level where they are actually used (i.e. have their "witnesses"). E.g. changes ?[n].bool -> [n]bool to bool -> ?[n].[n]bool ;futharkFind all type variables in the given type that are covered by the constraints, and produce type parameters that close over them.The passed-in list of type parameters is always prepended to the produced list of type parameters.333333 Safe-Inferred"3futharkType check a program containing no type information, yielding either a type error or a program with complete type information. Accepts a mapping from file names (excluding extension) to previously type checked results. The $ is used to resolve relative imports.3futharkType check a single expression containing no type information, yielding either a type error or the same expression annotated with type information. Also returns a list of type parameters, which will be nonempty if the expression is polymorphic. See also 3.3futharkType check a single declaration containing no type information, yielding either a type error or the same declaration annotated with type information along the Env produced by that declaration. See also 3.3futharkType check a single module expression containing no type information, yielding either a type error or the same expression annotated with type information along the Env produced by that declaration. See also 3.3futharkAn initial environment for the type checker, containing intrinsics and such.3futharkProduce an environment, based on the one passed in, where all of the provided imports have been open;ened in order. This could in principle also be done with 3, but this is more precise. 333311111.33 333311111.33 Safe-Inferred"u3futharkA loaded, type-checked program. This can be used to extract information about the program, but also to speed up subsequent reloads.;futharkThe ? is the name source just *before* the module was type checked.3futharkFinal name source.;futharkA type-checked file.;futhark3The name generation state after checking this file.;futhark6The warnings that were issued from checking this file.;futharkThe type-checked file.;futharkIf mapped to Nothing, treat it as present. This is used when reloading programs.3futharkA mapping from absolute pathnames to pretty representing a virtual file system. Before loading a file from the file system, this mapping is consulted. If the desired pathname has an entry here, the corresponding pretty is used instead of loading the file from disk.3futharkNote that the location may be 5. This essentially only happens when the problem is that a root file cannot be found.3futhark>Not actually an error, but we want them reported with errors.;futhark)Modification time of the underlying file.;futharkRead the content and modification time of a file. Check if the file exits in VFS before interact with file system directly.3futharkThe + of a 3/, as expected by e.g. type checking functions.3futharkAll warnings of a 3.3futhark>The absolute paths of the files that are part of this program.3futharkA "loaded program" containing no actual files. Use this as a starting point for 3;futharkFind out how many of the old imports can be used. Here we are forced to be overly conservative, because our type checker enforces a linear ordering.3futhark2Extend a loaded program with (possibly new) files.3futharkLoad some new files, reusing as much of the previously loaded program as possible. This does not *extend* the currently loaded program the way 3? does it, so it is always correct (if less efficient) to pass 3.3futhark'Read and type-check some Futhark files.3futharkRead (and parse) all source files (including the builtin prelude) corresponding to a set of root files.3futharkExtra functions that should be marked as entry points; only applies to the immediate files, not any imports imported.futharkThe files to read.33+++++++..33333333333333+++++++..333333333333 Safe-Inferred"u3futhark!The state of the language server.3futharkThe loaded program.3futharkThe stale data, stored to provide PositionMapping when requested. All files that have been opened have an entry.3futharkInitial state.3futharkGet the contents of a stale (last successfully complied) file's contents.3futhark#Get the PositionMapping for a file.3futharkUpdate the state with another pair of file_path and contents. Could do a clean up becausae there is no need to store files that are not in lpFilePaths prog.3futharkUpdate the state with another pair of file_path and PositionMapping. 333333333 333333333 Safe-Inferred"3futharkRetrieve hover info for the definition referenced at the given file at the given line and column number (the two 6s).3futharkFind the location of the definition referenced at the given file at the given line and column number (the two 6s).;futhark-Query the AST for information at certain Pos.3futhark*Entry point for computing PositionMapping.3futharkConvert a Futhark ' to an LSP ;.3futharkCreate an LSP ; from a Futhark &.3333333333 Safe-Inferred"s;futhark6Publish diagnostics from a Uri to Diagnostics mapping.3futhark'Send warning diagnostics to the client.3futhark%Send error diagnostics to the client.3futhark,The maximum number of diagnostics to report.3futharkThe source of the diagnostics. (That is, the Futhark compiler, but apparently the client must be told such things...)33333333 Safe-Inferred"j3futharkExclude those test cases that have tags we do not wish to run.4futharkRun  futhark test.44 Safe-Inferred"ȃ4futharkRun  futhark run.44 Safe-Inferred"4futharkRun  futhark query.44 Safe-Inferred"-4futharkRun futhark profile.44 Safe-Inferred"g<futhark$The monad in which futhark-pkg runs.<futhark5Install the packages listed in the build list in the lib directory of the current working directory. Since we are touching the file system, we are going to be very paranoid. In particular, we want to avoid corrupting the lib- directory if something fails along the way.The procedure is as follows:1) Create a directory lib~new. Delete an existing lib~new if necessary. 2) Populate lib~new based on the build list. 3) Rename lib to lib~old. Delete an existing lib~old if necessary. 4) Rename lib~new to lib+5) If the current package has package path p, move  lib~old/p to  lib~new/p. 6) Delete lib~old.Since POSIX at least guarantees atomic renames, the only place this can fail is between steps 3, 4, and 5. In that case, at least the lib~old2 will still exist and can be put back by the user.4futharkRun  futhark pkg.44 Safe-Inferred"G4futhark futhark imports4futhark  futhark hash4futhark futhark dataget4futhark futhark check-syntax4futhark futhark thanks4futhark futhark tokens444444444444 Safe-Inferred"4futhark"Some of these only make sense for futhark literate$, but enough are also sensible for futhark script that we can share them.<futharkThe collection of file paths (all inside the image directory) produced during directive execution.4futharkThe configuration before any user-provided options are processed.4futhark+Common command line options that transform 4.4futharkStart up (and eventually shut down) a Futhark server corresponding to the provided program. If the program has a .fut/ extension, it will be compiled automatically.4futharkRun futhark literate.444444444444444444444444444444 Safe-Inferred"ћ4futharkRun futhark script.44 Safe-Inferred"4futharkRun  futhark eval.44 Safe-Inferred"A4futharkRun  futhark defs.44 Safe-Inferred"<futharkClosed interval, as in  System.Random.4futharkRun futhark dataset.44 Safe-Inferred"(4futharkRun futhark datacmp44 Safe-Inferred"|4futharkRun  futhark check.44 Safe-Inferred"$<futharkTerminal colors used when printing the comparisons. Some of these are not colors ways of emphasising text.<futharkThe header color.<futhark Okay color<futharkA second okay color<futharkWarning color.<futharkWhen something fails.<futharkDefault color.<futhark Bold text.<futharkUnderline text.<futhark;Record that summerizes a comparison between two benchmarks.<futhark)What factor the benchmark is improved by.<futhark Memory usage.<futharkIf the speedup was significant.<futhark$Colors to use for a terminal device.<futhark(Colors to use for a non-terminal device.<futhark'Reads a file without throwing an error.<futhark5Converts DataResults to a Map with the text as a key.<futhark;Converts BenchResults to a Map with the file path as a key.<futharkGiven a file path to a json file which has the form of a futhark benchmark result, it will try to parse the file to a Map of Maps. The key in the outer most dictionary is a file path the inner key is the dataset.<futharkWill return a text with an error saying there is a missing program in a given result.<futharkWill return a text with an error saying there is a missing dataset in a given result.<futhark7Will return texts that say there are a missing program.<futharkWill return texts that say there are missing datasets for a program.<futharkFinds the keys two Maps does not have in common and returns a appropiate error based on the functioned passed.<futhark)Compares the memory usage of two results.<futhark?Compares two results and thereby computes the Speed Up records.<futharkGiven two Maps containing datasets as keys and results as values, compare the results and return the errors in a tuple.<futharkGiven two Maps containing program file paths as keys and values as datasets with results. Compare the results for each dataset in each program and return the errors in a tuple.<futharkFormats memory usage such that it is human readable. If the memory usage is not significant an empty text is returned.<futharkGiven a SpeedUp record the memory usage will be formatted to a colored human readable text.<futharkGiven a text shorten it to a given length and add a suffix as the last word.<futharkGiven a text add padding to the right of the text in form of spaces.<futharkGiven a SpeedUp record print the SpeedUp in a human readable manner.<futharkGiven a Map of SpeedUp records where the key is the program, print the SpeedUp in a human readable manner.<futharkGiven a Map of programs with dataset speedups and relevant errors, print the errors and print the speedups in a human readable manner.4futharkRun futhark benchcmp44 Safe-Inferred"-4futharkRun  futhark bench.44 Safe-Inferred"<futharkDepth-first list of thresholds to tune in order, and a corresponding assignment of ancestor thresholds to ensure that they are used.<futharkThe performance difference in percentage that triggers a non-monotonicity warning. This is to account for slight variantions in run-time.4futharkRun futhark autotune44 Safe-Inferred" <futharkWe keep a mapping of the names we have actually documented, so we can generate an index.<futharkLocal module types that show up in the interface. These should be documented, but clearly marked local.<futharkA set of names that we should not generate links to, because they are uninteresting. These are for example type parameters.4futhark%renderFiles important_imports imports; produces HTML files documenting the type-checked program imports, with the files in important_imports considered most important. The HTML files must be written to the specific locations indicated in the return value, or the relative links will be wrong.<futharkThe header documentation (which need not be present) can contain an abstract and further sections.44 Safe-Inferred"^4futharkRun  futhark doc.44 Safe-Inferred" <futhark)Are we currently stopped at a breakpoint?<futhark$Skip breakpoints at these locations.<futharkThe currently loaded file.<futharkRepresentation of breaking at a breakpoint, to allow for navigating through the stack frames and such.<futhark>Index of the current breakpoint (with 0 being the outermost).4futharkRun  futhark repl.44 Safe-Inferred"4futharkPrint the result to stdout.4futhark.Print the result to stdout, alias annotations.4futhark%Print last use information to stdout.4futharkPrint fusion graph to stdout.4futhark)Print interference information to stdout.4futhark(Print memory alias information to stdout4futhark/Print result of array access analysis on the IR4futharkPrint call graph to stdout.4futhark.Print metrics about AST node counts to stdout.4futharkConvert the program to sequential ImpCode and print it to stdout.4futhark:Convert the program to GPU ImpCode and print it to stdout.4futharkConvert the program to CPU multicore ImpCode and print it to stdout.4futharkThe  futhark c action.4futharkThe futhark opencl action.4futharkThe  futhark cuda action.4futharkThe  futhark hip action.4futharkThe futhark multicore action.4futharkThe  futhark ispc action.4futharkThe futhark python action.4futharkThe futhark pyopencl action.4futharkThe  futhark wasm action.4futharkThe futhark wasm-multicore action.44444444444444444444444444444444444444444444 Safe-Inferred"~4futharkRun  futhark c44 Safe-Inferred"4futharkRun  futhark py44 Safe-Inferred""4futharkRun futhark pyopencl.44 Safe-Inferred"s4futharkRun futhark opencl44 Safe-Inferred"4futharkRun  futhark c44 Safe-Inferred"4futharkRun futhark multicore.44 Safe-Inferred"o4futharkRun futhark multicore.44 Safe-Inferred"4futharkRun  futhark hip.44 Safe-Inferred"<futharkA human-readable description of the representation expected or contained, usable for error messages.<futharkNothing is distinct from a empty pipeline - it means we don't even run the internaliser.<futharkIf true, prints programs as raw ASTs instead of their prettyprinted form.<futhark3What to do with the program after it has been read.<futharkJust print it.<futhark(Run the type checker; print type errors.<futharkRun this pipeline.<futhark,Partially evaluate away the module language.<futharkDefunctorise and normalise.<futhark)Defunctorise, normalise and monomorphise.<futhark6Defunctorise, normalise, monomorphise and lambda-lift.<futharkDefunctorise, normalise, monomorphise, lambda-lift and defunctionalise.<futharkGet a Futhark pipeline from the configuration - an empty one if none exists.4futharkEntry point. Non-interactive, except when reading interpreter input from standard input.44 Safe-Inferred"/4futharkRun  futhark cuda.44 Safe-Inferred"{4futharkRun  futhark c44 Safe-Inferred"-<futharkCatch all IO exceptions and print a better error message if they happen.4futharkThe futhark executable.44<                                                           !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"""""""""""########$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & && & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) * * * * * * * * + + + + + + + + + + + + + + +                                                                                                                                                                                , , , , ,, , , , , , , , , , , , , , - - - - - - - . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 0 0 0 0 0 0 0 0 0 0 0 000000000000000000111111111111111111111222222222223333333333333333333333333333333333333333333333333333333333333333333333333333333344444444555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555556666666666666666666666666666666666666666677777777777777777777777777777777777777777777777778888888888888888888889999999999999999999::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;<<<<<<<<<<<<<<<<<<<<<<<<<<====================================================>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>?????????????????@@@@@@@@@AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFFFFFFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHIIIJJJJJJJJJJJJJJJJJJJJJ JJJJJJJJJJJJ JJJJJJJJJJJ J JJJJJJJJJJJJJJJJJJJJJJ JJJJJ JJJJJJJJJJ JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ J KKKKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPQRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRSTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTUUUVWWWWWWWWWWXXYYYYZZZZZZZZZZZZZZ[\]]]]]]]]]]]^^^_____________________________ _______________________````aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabccdeffgggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggghhiiiiijjjkkkkkkkkkkklllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllmmmmmnnnnnnnnooooooopqqq rrrrrrsssssssssssssssssssssstttttttttttttttttuuuuuuuuuuuuuuuuuu u uuu uuuuuuuuuuuuuuuuuuuuuuuuuuuu uuuuuuuuuuuuuuuuuuuuuuuuuvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvwwxxxxxxxxx xxxxxxxxxyyyyyyyyyyyyyyyyyyzzzzzzzz{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ {{{{{{{{{{{{{{{{{|}}}}}~~~~                                                                                                                                         !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""#########################################################################"############################################################$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$  $$    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%%   %%% %%%%%%%%%%%%%% %%% % %%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%   %   %%%%%%%%%%%%%%%%%%% %%%%%% % % %%%%% %%%%%   %%% %%%%%%%  %%%%%%%  %%%%%%%%%%%%%%%%%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&      &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&   &&&&&&&&&&&&&&&   &&&&&&&'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''((( ((( ((($($$$$ %   (((((((((((  ((   (((((((  ( ((((( ((( ((((((((((((((((((((((((((((((((((((((((( (((((((((((((((((((((((((((((((((((((((((((((((()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))#))))))**********************%***** *************************************************** ******** *******(**&&&&&******************************************++++++++++++++++++++++++++++++++++++++++++++*++++++ ++++++++++++%$ +++++++)+++++++++++ ++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,--------------------------------------------------------------------------------------------------------------------%-----------(----..................  "...............................-------------..................---.----- ...................... .......................-.... ............-.....-....////////////////////////////////////////////////////////////////////////////%//////%///////////////////////////////////////+//**(////////000+000000+0+00000000000+00000000000000000000000000000000000000*00000/ 0000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222211111111122211122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222223232323232323232323232323332323232323333333333333333333333333333333333333333232323333333333333333333  33333333333333333*333333233!!!%!2333323%3%3%3%3%3%3%3%3%3%3%3%3%3%3%3%3%3%3%3%322423424)4224,.4444444241422422444244422224244454545474;4441>4>4>4@4C4C4C4C4EE4E424E4E4E4E4E4E4E44I4I424N4O4O4O4Q4R4RRRU44Y4Y4Y4_4_4_4_4_4_4a4a4a4ab4b4c4f4g4g4g4g4g4g4g4l4l444s,s4s4s4t4t4u4v4v4v4v4v4444v4v4y4y4y4y4z4{4444444444444444444455552255555552555555555554454454452545545544555445445445445555555.555555555555555555555555555555550555555555555555555555555555555555555555555555555555155555555555666666666666666666666666666666666666665/6666666$6661664666#6666656666666666666666666666666666666666666666666666666666666666666666666666777777777777777777777777777777777777777767777777777777777777777777477777 777*777,777777777777777777777777777777777777777777777777777777777778888188888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888%88888888888888888888888888888888888888899999%9999999999999999999999999999999999999999999999999899999999&futhark-0.25.21-6BnU65lrPN5Au2nLzXE5RPLanguage.Futhark.Core Futhark.TestFuthark.Internalise.MonadFuthark.Pkg.TypesFuthark.IR.SyntaxFuthark.Util.PrettyLanguage.Futhark.Parser.MonadLanguage.Futhark.QueryFuthark.Analysis.Metrics.Type)Futhark.CodeGen.Backends.GenericC.Options(Futhark.CodeGen.Backends.GenericC.PrettyFuthark.CodeGen.RTS.CFuthark.CodeGen.RTS.CUDAFuthark.CodeGen.RTS.JavaScriptFuthark.CodeGen.RTS.OpenCLFuthark.CodeGen.RTS.PythonFuthark.Format7Futhark.Optimise.ReduceDeviceSyncs.MigrationTable.GraphFuthark.Profile Futhark.UtilFuthark.IR.Prop.RearrangeFuthark.Util.CMathFuthark.Util.IntegralExpFuthark.LSP.PositionMappingFuthark.Util.LogFuthark.Pkg.InfoFuthark.Pkg.SolveFuthark.Test.Values Futhark.ErrorFuthark.Util.ProgressBarFuthark.Util.TableFuthark.FreshNames*Futhark.CodeGen.Backends.GenericPython.AST.Futhark.CodeGen.Backends.GenericPython.Options%Language.Futhark.Parser.Lexer.WrapperLanguage.Futhark.PreludeLanguage.Futhark.PrimitiveFuthark.IR.Syntax.CoreFuthark.Compiler.ConfigFuthark.IR.Prop.ConstantsFuthark.IR.Prop.TypesFuthark.IR.RetTypeFuthark.IR.RepFuthark.MonadFreshNamesFuthark.IR.Prop.ReshapeFuthark.IR.PrettyFuthark.IR.Prop.ScopeFuthark.IR.TraversalsFuthark.IR.RephraseFuthark.IR.Prop.PatFuthark.IR.Prop.NamesFuthark.IR.Prop.TypeOfFuthark.Analysis.PrimExpFuthark.Transform.SubstituteFuthark.Transform.RenameFuthark.IR.PropFuthark.IR.Prop.Aliases Futhark.PassFuthark.Builder.ClassFuthark.BuilderFuthark.ConstructFuthark.Analysis.UsageTableFuthark.Analysis.Metrics!Futhark.Analysis.DataDependenciesFuthark.IR.GPU.SizesFuthark.IR.AliasesFuthark.Optimise.Simplify.RepFuthark.Analysis.AliasFuthark.IR.TypeCheckFuthark.Pipeline!Futhark.CodeGen.OpenCL.Heuristics Futhark.Analysis.PrimExp.Convert&Futhark.Optimise.Simplify.Rules.SimpleFuthark.CodeGen.ImpCode"Futhark.CodeGen.ImpCode.Sequential!Futhark.CodeGen.ImpCode.MulticoreFuthark.CodeGen.ImpCode.GPUFuthark.CodeGen.ImpCode.OpenCL"Futhark.CodeGen.Backends.SimpleRep(Futhark.CodeGen.Backends.GenericC.Server%Futhark.CodeGen.Backends.GenericC.CLI&Futhark.CodeGen.Backends.GenericPython-Futhark.CodeGen.Backends.PyOpenCL.Boilerplate'Futhark.CodeGen.Backends.GenericC.Monad'Futhark.CodeGen.Backends.GenericC.Types-Futhark.CodeGen.Backends.GenericC.EntryPoints&Futhark.CodeGen.Backends.GenericC.Code%Futhark.CodeGen.Backends.GenericC.Fun#Futhark.CodeGen.ImpGen.GPU.ToOpenCL!Futhark.CodeGen.Backends.GenericC0Futhark.CodeGen.Backends.SequentialC.Boilerplate/Futhark.CodeGen.Backends.MulticoreC.Boilerplate$Futhark.CodeGen.Backends.GenericWASMFuthark.CodeGen.Backends.GPUFuthark.Analysis.SymbolTable%Futhark.Optimise.Simplify.Rules.IndexFuthark.Optimise.Simplify.Rule%Futhark.Optimise.Simplify.Rules.Match*Futhark.Optimise.Simplify.Rules.ClosedForm$Futhark.Optimise.Simplify.Rules.Loop'Futhark.Optimise.Simplify.Rules.BasicOpFuthark.Optimise.Simplify.Rules Futhark.Optimise.Simplify.Engine!Futhark.Analysis.PrimExp.SimplifyFuthark.Optimise.SimplifyFuthark.Transform.CopyPropagateFuthark.IR.SeqFuthark.IR.SOACS.SOAC Futhark.ToolsFuthark.IR.SOACS%Futhark.Transform.FirstOrderTransform Futhark.Pass.FirstOrderTransform"Futhark.Pass.ExtractKernels.ISRWIM!Futhark.Internalise.AccurateSizesFuthark.IR.SOACS.SimplifyFuthark.Analysis.CallGraphFuthark.Analysis.HORep.SOAC Futhark.Optimise.Fusion.GraphRep!Futhark.Optimise.Fusion.ComposingFuthark.Analysis.HORep.MapNest!Futhark.Optimise.Fusion.TryFusionFuthark.Optimise.FusionFuthark.AD.Rev.MonadFuthark.AD.Rev.ScatterFuthark.AD.Rev.ScanFuthark.AD.Rev.ReduceFuthark.AD.Rev.MapFuthark.AD.Rev.LoopFuthark.AD.Rev.HistFuthark.AD.Rev.SOACFuthark.AD.DerivativesFuthark.AD.RevFuthark.AD.FwdFuthark.Pass.ADFuthark.Analysis.AlgSimplifyFuthark.IR.Mem.IntervalFuthark.IR.Mem.LMADFuthark.IR.Mem Futhark.Pass.ExplicitAllocationsFuthark.IR.SegOpFuthark.IR.Mem.SimplifyFuthark.IR.SeqMem$Futhark.Pass.ExplicitAllocations.SeqFuthark.IR.MC.OpFuthark.IR.MCMem Futhark.IR.MCFuthark.IR.GPU.Op)Futhark.Pass.ExtractKernels.BlockedKernel(Futhark.Pass.ExtractKernels.Distribution'Futhark.Pass.ExtractKernels.Interchange+Futhark.Pass.ExtractKernels.DistributeNestsFuthark.IR.GPU!Futhark.Pass.ExtractKernels.ToGPUFuthark.Pass.ExtractMulticore(Futhark.Pass.ExtractKernels.StreamKernel&Futhark.Pass.ExtractKernels.IntrablockFuthark.Pass.ExtractKernels!Futhark.Optimise.TileLoops.SharedFuthark.Optimise.Sink1Futhark.Optimise.ReduceDeviceSyncs.MigrationTable"Futhark.Optimise.ReduceDeviceSyncsFuthark.Optimise.MergeGPUBodiesFuthark.Optimise.HistAccsFuthark.Optimise.GenRedOptFuthark.Optimise.CSE Futhark.Optimise.InliningDeadFunFuthark.Optimise.BlkRegTilingFuthark.Optimise.TileLoopsFuthark.IR.GPU.SimplifyFuthark.Optimise.UnstreamFuthark.IR.GPUMemFuthark.Pass.SimplifyFuthark.Pass.LowerAllocationsFuthark.Pass.LiftAllocations&Futhark.Pass.ExplicitAllocations.SegOp#Futhark.Pass.ExplicitAllocations.MC$Futhark.Pass.ExplicitAllocations.GPUFuthark.Pass.ExpandAllocationsFuthark.Optimise.EntryPointMemFuthark.Optimise.DoubleBuffer1Futhark.Optimise.ArrayShortCircuiting.DataStructs5Futhark.Optimise.ArrayShortCircuiting.TopdownAnalysis2Futhark.Optimise.ArrayShortCircuiting.MemRefAggregFuthark.Analysis.MemAliasFuthark.Analysis.LastUse5Futhark.Optimise.ArrayShortCircuiting.ArrayCoalescing%Futhark.Optimise.ArrayShortCircuitingFuthark.Analysis.Interference2Futhark.Optimise.MemoryBlockMerging.GreedyColoring#Futhark.Optimise.MemoryBlockMergingFuthark.Analysis.PrimExp.TableFuthark.Analysis.AccessPattern#Futhark.Optimise.ArrayLayout.Layout&Futhark.Optimise.ArrayLayout.TransformFuthark.Optimise.ArrayLayoutFuthark.Passes Language.Futhark.Primitive.ParseFuthark.Analysis.PrimExp.ParseFuthark.IR.ParseLanguage.Futhark.SyntaxLanguage.Futhark.TraversalsLanguage.Futhark.TupleLanguage.Futhark.PropLanguage.Futhark.Pretty$Language.Futhark.Parser.Lexer.TokensLanguage.Futhark.ParserLanguage.Futhark.FreeVarsLanguage.Futhark.Semantic#Language.Futhark.Interpreter.ValuesLanguage.Futhark.InterpreterFuthark.Internalise.TypesValues"Futhark.Internalise.ReplaceRecordsFuthark.Internalise.LiftLambdasFuthark.Internalise.LambdasFuthark.Internalise.Entry Futhark.Internalise.DefunctoriseFuthark.Internalise.BindingsFuthark.ScriptFuthark.Test.Spec Futhark.Bench"Language.Futhark.TypeChecker.MatchLanguage.Futhark.WarningsFuthark.CodeGen.ImpGen!Futhark.CodeGen.ImpGen.Sequential'Futhark.CodeGen.Backends.SequentialWASM)Futhark.CodeGen.Backends.SequentialPython$Futhark.CodeGen.Backends.SequentialC%Futhark.CodeGen.ImpGen.Multicore.Base(Futhark.CodeGen.ImpGen.Multicore.SegScan'Futhark.CodeGen.ImpGen.Multicore.SegRed'Futhark.CodeGen.ImpGen.Multicore.SegMap(Futhark.CodeGen.ImpGen.Multicore.SegHist Futhark.CodeGen.ImpGen.Multicore#Futhark.CodeGen.Backends.MulticoreC&Futhark.CodeGen.Backends.MulticoreWASM&Futhark.CodeGen.Backends.MulticoreISPCFuthark.CodeGen.ImpGen.GPU.Base*Futhark.CodeGen.ImpGen.GPU.SegScan.TwoPass-Futhark.CodeGen.ImpGen.GPU.SegScan.SinglePass"Futhark.CodeGen.ImpGen.GPU.SegScan!Futhark.CodeGen.ImpGen.GPU.SegRed"Futhark.CodeGen.ImpGen.GPU.SegHist Futhark.CodeGen.ImpGen.GPU.Block!Futhark.CodeGen.ImpGen.GPU.SegMapFuthark.CodeGen.ImpGen.GPUFuthark.CodeGen.ImpGen.OpenCL!Futhark.CodeGen.Backends.PyOpenCL Futhark.CodeGen.Backends.COpenCLFuthark.CodeGen.ImpGen.HIPFuthark.CodeGen.Backends.HIPFuthark.CodeGen.ImpGen.CUDAFuthark.CodeGen.Backends.CCUDA"Language.Futhark.TypeChecker.Monad"Language.Futhark.TypeChecker.Types"Language.Futhark.TypeChecker.Unify Futhark.Internalise.Monomorphise!Futhark.Internalise.FullNormaliseFuthark.Internalise.Exps#Futhark.Internalise.Defunctionalise"Futhark.Internalise.ApplyTypeAbbrsFuthark.Internalise(Language.Futhark.TypeChecker.Terms.Monad&Language.Futhark.TypeChecker.Terms.Pat'Language.Futhark.TypeChecker.Terms.Loop"Language.Futhark.TypeChecker.Names$Language.Futhark.TypeChecker.Modules(Language.Futhark.TypeChecker.Consumption"Language.Futhark.TypeChecker.TermsLanguage.Futhark.TypeCheckerFuthark.Compiler.ProgramFuthark.LSP.StateFuthark.LSP.ToolFuthark.LSP.DiagnosticFuthark.LSP.CompileFuthark.LSP.HandlersFuthark.CLI.LSPFuthark.CompilerFuthark.VersionFuthark.Util.OptionsFuthark.Compiler.CLIFuthark.CLI.TestFuthark.CLI.RunFuthark.CLI.QueryFuthark.CLI.ProfileFuthark.CLI.PkgFuthark.CLI.MiscFuthark.CLI.LiterateFuthark.CLI.ScriptFuthark.CLI.EvalFuthark.CLI.DefsFuthark.CLI.DatasetFuthark.CLI.DatacmpFuthark.CLI.CheckFuthark.CLI.BenchcmpFuthark.CLI.BenchFuthark.CLI.AutotuneFuthark.Doc.GeneratorFuthark.CLI.DocFuthark.CLI.REPLFuthark.ActionsFuthark.CLI.WASMFuthark.CLI.PythonFuthark.CLI.PyOpenCLFuthark.CLI.OpenCLFuthark.CLI.MulticoreWASMFuthark.CLI.MulticoreISPCFuthark.CLI.MulticoreFuthark.CLI.HIPFuthark.CLI.DevFuthark.CLI.CUDA Futhark.CLI.CFuthark.CLI.MainfutharkFutharkData.Traversable mapAccumL Data.List partitionFuthark.Util.Loc Futhark.IR AlgSimplifySofPLanguage.Futhark.Parser.LexerLanguage.Futhark.Parser.ParserLanguage.FutharkSegScan.SinglePasscompileSegScanSegRed compileSegRed Paths_futharkbaseGHC.IntInt8Int16Int32Int64GHC.WordWord8Word16Word32Word64+futhark-data-1.1.0.1-HLShquotPQ8BlDSQHd1cHL Futhark.DataValue valueTextFuthark.Data.CompareMismatch compareValues!half-0.3.1-Ajq4ccbao5C9n5rmJzszSzNumeric.Half.InternalHalf mtl-2.3.1Control.Monad.Error.Class throwError%srcloc-0.6.0.1-5zw0E8kperi5PcByJY7aGMData.LoclocOf'megaparsec-9.6.1-2HbjEScO2Z43HE8duRX5FJText.Megaparsec.ErrorerrorBundlePretty*prettyprinter-1.7.1-K7lZCiMltRx2iIXqCBwwCmPrettyprinter.InternalPretty8prettyprinter-ansi-terminal-1.1.3-FGFWuhoKeLgA2c0863Tvjp&Prettyprinter.Render.Terminal.Internal AnsiStyleColorBlackRedGreenYellowBlueMagentaCyanWhitecolorbgColor colorDull bgColorDullbold italicized underlinedLLocated locOfListSrcLocLocPossrclocOf%versions-6.0.7-5ju3gYKTvKB5dbXp1mdAF3 Data.VersionsChunkAlphanumReleaseSemVer_svMajor_svMinor_svPatch _svPreRel_svMeta prettySemVer AstMetrics$fReadAstMetrics$fShowAstMetricsOptionArgument NoArgumentRequiredArgumentOptionalArgumentOptionoptionLongNameoptionShortNameoptionArgumentoptionDescription optionActiongenerateOptionParserexpTextdefinitionsTexttypeTextidTextfuncText funcsTextatomicsHuniformH freeListH eventListHgpuHgpuPrototypesHhalfHlockH scalarF16HscalarH schedulerHserverHtimingHtuningHutilHvaluesHerrorsH ispcUtilHcacheHcontextHcontextPrototypesHbackendsOpenclH backendsCudaH backendsHipH backendsCHbackendsMulticoreHcopyH preludeCUserverJsvaluesJswrapperclassesJs transposeCL preludeCLcopyCLmemoryPyopenclPypanicPyscalarPyserverPytuningPyvaluesPyparseFormatStringResultProduced FoundSinkVisitedEdgeTypeNormalReversedEdgesToSinkToNodes Exhaustion Exhausted NotExhaustedRoutingNoRoute FromSourceFromNodeVertexvertexId vertexMeta vertexRouting vertexEdgesIdSetIdGraphemptyvertex declareEdgesoneEdgenoneinsertadjust connectToSinkaddEdgesmemberlookupisSinkConnectedroute routeManyfoldreduce $fMonoidEdges$fSemigroupEdges$fSemigroupResult$fMonoidRoutingResult$fSemigroupRoutingResult $fEqResult $fEqEdgeType $fOrdEdgeType $fShowEdges $fEqEdges $fOrdEdges $fShowRouting $fEqRouting $fOrdRouting$fShowExhaustion$fEqExhaustion$fOrdExhaustion BuildList unBuildList PkgManifestmanifestPkgPathmanifestRequiremanifestEndCommentsRequired requiredPkgrequiredPkgRev requiredHash Commentedcomments commentedComment PkgRevDepsPkgPathpkgPathFilePathisCommitVersion commitVersion parseVersion futharkPkgnewPkgManifestprettyPkgManifest pkgRevDepspkgDiraddRequiredToManifestremoveRequiredFromManifestparsePkgManifestparsePkgManifestFromFileprettyBuildList$fMonoidPkgRevDeps$fSemigroupPkgRevDeps$fTraversableCommented$fFoldableCommented$fFunctorCommented $fEqBuildList$fShowBuildList$fShowPkgManifest$fEqPkgManifest$fShowRequired $fEqRequired$fShowCommented $fEqCommented$fShowPkgRevDepsProfilingReportprofilingEventsprofilingMemoryProfilingEvent eventName eventDurationeventDescriptiondecodeProfilingReportprofilingReportFromText$fFromJSONProfilingEvent$fToJSONProfilingEvent$fFromJSONProfilingReport$fToJSONProfilingReport$fEqProfilingReport$fOrdProfilingReport$fShowProfilingReport$fEqProfilingEvent$fOrdProfilingEvent$fShowProfilingEvent EncodedTextUserTextnubOrdnubByOrd mapAccumLMchunkchunks chunkLikemaxinummininumdropAttakeLastdropLast mapEitherpartitionMaybemaybeNth maybeHeadlookupWithIndex splitFromEndsplitAt3focusNth focusMaybehashTextshowTextunixEnvironmentisEnvVarAtLeast startupTime fancyTerminalhFancyTerminalrunProgramWithExitCodedirectoryContentstoPOSIX fromPOSIXtrimpmapIOinteractWithFileSafely convFloat zEncodeText atMostChars invertMap cartesian traverseFoldfixPoint concatMapMtopologicalSort debugTraceMrearrangeShaperearrangeInverserearrangeReachrearrangeComposeisPermutationOftransposeIndexisMapTranspose roundFloat ceilFloat floorFloat roundDouble ceilDouble floorDouble nextafterf nextafterlgammalgammaftgammatgammafhypothypotferferfferfcerfcfcbrtcbrtfldexpldexpfcopysign copysignfWrapped wrappedValue IntegralExpquotremdivmodsgnpowdivUpnextMul$fIntegralExpWrapped $fNumWrapped $fEnumWrapped $fEqWrapped $fOrdWrapped $fShowWrapped StaleFile staleContent staleMappingPositionMappingmappingFromDiff toStalePos toCurrentLoc$fShowStaleFile$fShowPositionMapping MonadLoggerlogMsgaddLogToLogtoLogLogtoText $fMonoidLog$fSemigroupLog $fToLogText $fToLogList$fMonadLoggerIO$fMonadLoggerRWST$fMonadLoggerRWST0$fMonadLoggerWriterTMonadPkgRegistrygetPkgRegistryputPkgRegistrymodifyPkgRegistry PkgRegistryCacheDirPkgInfo pkgVersionspkgLookupCommit PkgRevInfo pkgGetFiles pkgRevCommitpkgRevGetManifest pkgRevTimeGetFilesgetFiles GetManifest getManifest lookupPkgRevpkgInfo lookupPackagelookupPackageRevlookupNewestRev$fEqGetManifest$fShowGetManifest $fEqGetFiles$fShowGetFiles$fMonoidPkgRegistry$fSemigroupPkgRegistry$fEqPkgRevInfo$fShowPkgRevInfo PkgRevDepInfo solveDeps solveDepsPure$fFunctorPkgOp$fShowRoughBuildListhPutDoc hPutDocLnputDocputDocLndocTextForHandle prettyStringprettyStringOneLine prettyTextdocText docStringprettyTextOneLineppTuple' ppTupleLines' prettyTupleprettyTupleLinesapplyoneLinetextwrapannot nestedBlockshorten commastack semistackcommasepstackparensIf $fPrettyHalf CompoundValueCompound ValueRecord ValueTuple ValueAtom mkCompound unCompound$fPrettyValueType $fPrettyValue$fPrettyCompound$fTraversableCompound$fFoldableCompound$fFunctorCompound $fEqCompound $fOrdCompound$fShowCompound InternalErrorError CompilerError ExternalError ErrorClass CompilerBugCompilerLimitationprettyCompilerError externalErrorexternalErrorSinternalErrorS compilerBugcompilerLimitation compilerBugScompilerLimitationS$fExceptionInternalError$fShowInternalError$fEqErrorClass$fOrdErrorClass$fShowErrorClass ProgressBarprogressBarStepsprogressBarBoundprogressBarElapsed progressBarprogressSpinnerEntrymkEntry hPutTable$fShowRowTemplateVNameName NoUniqueness Uniqueness NonuniqueUnique nameToStringnameFromString nameToText nameFromTextlocStr locStrRellocText locTextRelprettyStacktracebaseTagbaseName baseStringquote$fPrettyUniqueness$fMonoidUniqueness$fSemigroupUniqueness$fPrettyNoUniqueness$fMonoidNoUniqueness$fSemigroupNoUniqueness $fPrettyName $fOrdVName $fEqVName $fShowVName $fShowName$fEqName $fOrdName$fIsStringName$fSemigroupName$fEqNoUniqueness$fOrdNoUniqueness$fShowNoUniqueness$fEqUniqueness$fOrdUniqueness$fShowUniqueness VNameSourcenewNameblankNameSource newNameSource$fMonoidVNameSource$fSemigroupVNameSource$fLiftBoxedRepVNameSource$fEqVNameSource$fOrdVNameSourcePyProg PyClassDefClassPyFunDefDefPyExceptCatchPyStmtIfTryWhileForWithAssignAssignOpAssertRaiseExpReturnPassImportFunDefClassDefEscapePyArg ArgKeywordArgPyIdxIdxRangeIdxExpPyExpIntegerBoolFloatStringRawStringLiteralVarBinOpUnOpCondIndexCallTupleListFieldDictLambdaNone $fPrettyPyExp $fPrettyPyArg $fPrettyPyIdx$fPrettyPyExcept$fPrettyPyClassDef$fPrettyPyFunDef$fPrettyPyStmt$fPrettyPyProg $fEqPyProg $fShowPyProg$fEqPyClassDef$fShowPyClassDef $fEqPyStmt $fShowPyStmt $fEqPyFunDef$fShowPyFunDef $fEqPyExcept$fShowPyExcept $fEqPyArg $fShowPyArg $fEqPyExp $fShowPyExp $fEqPyIdx $fShowPyIdx$fEqUnOp $fShowUnOp LexerError AlexInputalexInputPrevChar alexGetByte alexGetPosinitialLexerState$fShowLexerErrorpreludeConvOpZExtSExtFPConvFPToUIFPToSIUIToFPSIToFPIToBBToIFToBBToFCmpOpCmpEqCmpUltCmpUleCmpSltCmpSleFCmpLtFCmpLeCmpLltCmpLleAddFAddSubFSubMulFMulUDivUDivUpSDivSDivUpFDivFModUModSModSQuotSRemSMinUMinFMinSMaxUMaxFMaxShlLShrAShrAndOrXorPowFPowLogAndLogOrSafetyUnsafeSafeOverflow OverflowWrap OverflowUndefNot ComplementAbsFAbsSSignumUSignumFSignum PrimValueIntValue FloatValue BoolValue UnitValue Float16Value Float32Value Float64Value Int8Value Int16Value Int32Value Int64ValuePrimTypeIntType FloatTypeUnitFloat16Float32Float64 allIntTypes allFloatTypes allPrimTypesintValue intValueType valueIntegral floatValuefloatValueType primValueTypeblankPrimValue onePrimValueallUnOps allBinOps allCmpOps allConvOpsdoUnOp doComplementdoAbsdoFAbs doSSignum doUSignumdoBinOpdoAdddoMuldoSDivdoSModdoPowdoConvOp flipConvOpdoZExtdoSExtdoFPConvdoFPToUIdoFPToSIdoUIToFPdoSIToFPdoCmpOpdoCmpEqdoCmpUltdoCmpUledoCmpSltdoCmpSledoFCmpLtdoFCmpLe intToWord64 intToInt64 binOpType cmpOpTypeunOpType convOpTypeprimFunszeroIshoneIsh negativeIsh zeroIshInt oneIshInt intByteSize floatByteSize primByteSize primBitSizecommutativeBinOpassociativeBinOp convOpFun prettySigned$fPrettyIntType$fPrettyFloatType$fPrettyPrimType$fBoundedPrimType$fEnumPrimType$fPrettyIntValue$fPrettyFloatValue$fOrdFloatValue$fEqFloatValue$fPrettyPrimValue $fPrettyUnOp $fOrdOverflow $fEqOverflow $fPrettyBinOp $fPrettyCmpOp$fPrettyConvOp $fEqConvOp $fOrdConvOp $fShowConvOp $fEqCmpOp $fOrdCmpOp $fShowCmpOp $fEqBinOp $fOrdBinOp $fShowBinOp $fEqSafety $fOrdSafety $fShowSafety$fShowOverflow $fOrdUnOp $fEqPrimValue$fOrdPrimValue$fShowPrimValue$fShowFloatValue $fEqIntValue $fOrdIntValue$fShowIntValue $fEqPrimType $fOrdPrimType$fShowPrimType $fEqFloatType$fOrdFloatType$fShowFloatType$fEnumFloatType$fBoundedFloatType $fEqIntType $fOrdIntType $fShowIntType $fEnumIntType$fBoundedIntType OpaqueTypes OpaqueType OpaqueRecord OpaqueSum OpaqueArrayOpaqueRecordArrayEntryPointType TypeOpaqueTypeTransparent ValueType SignednessUnsignedSignedAttrsunAttrsAttrAttrNameAttrIntAttrComp ErrorMsgPart ErrorStringErrorValErrorMsgPatElem patElemName patElemDec FlatSlice FlatDimIndexSliceunSliceDimIndexDimFixDimSliceParam paramAttrs paramNameparamDecSubExpConstantCertsunCertsIdent identName identTypeDietConsumeObserve ObservePrim DeclExtTypeDeclTypeExtTypeTypeTypeBasePrimAccArrayMemSpaceIdSpace DefaultSpace ScalarSpace ArrayShape shapeRank subShapeOfRankExtShapeExtSizeExtFreeShape ShapeBase shapeDims CommutativityNoncommutative Commutative stripDimsdimFix sliceIndices sliceDims sliceShape unitSlicefixSlice sliceSlice flatSliceDimsflatSliceStrideserrorMsgArgTypesoneAttrinAttrs withoutAttrsmapAttrs$fMonoidCommutativity$fSemigroupCommutativity$fMonoidShapeBase$fSemigroupShapeBase$fTraversableShapeBase$fFoldableShapeBase$fFunctorShapeBase$fTraversableExt $fFoldableExt $fFunctorExt $fMonoidRank$fSemigroupRank$fArrayShapeRank $fMonoidCerts$fSemigroupCerts$fArrayShapeShapeBase$fArrayShapeShapeBase0$fBifoldableTypeBase$fBifunctorTypeBase$fTraversableTypeBase$fFoldableTypeBase$fFunctorTypeBase$fBitraversableTypeBase $fOrdIdent $fEqIdent$fTraversableDimIndex$fFoldableDimIndex$fFunctorDimIndex$fFoldableSlice$fFunctorSlice$fTraversableSlice$fFoldableFlatDimIndex$fFunctorFlatDimIndex$fTraversableFlatDimIndex$fFoldableFlatSlice$fFunctorFlatSlice$fTraversableFlatSlice$fTraversablePatElem$fFoldablePatElem$fFunctorPatElem$fTraversableErrorMsgPart$fFoldableErrorMsgPart$fFunctorErrorMsgPart$fIsStringErrorMsgPart$fTraversableErrorMsg$fFoldableErrorMsg$fFunctorErrorMsg$fSemigroupErrorMsg$fMonoidErrorMsg$fIsStringErrorMsg$fIsStringAttr$fTraversableParam$fFunctorParam$fFoldableParam$fSemigroupOpaqueTypes$fMonoidOpaqueTypes$fEqOpaqueTypes$fOrdOpaqueTypes$fShowOpaqueTypes$fEqOpaqueType$fOrdOpaqueType$fShowOpaqueType$fEqEntryPointType$fShowEntryPointType$fOrdEntryPointType $fEqValueType$fOrdValueType$fShowValueType$fEqSignedness$fOrdSignedness$fShowSignedness $fOrdParam $fShowParam $fEqParam $fOrdAttrs $fShowAttrs $fEqAttrs $fMonoidAttrs$fSemigroupAttrs $fOrdAttr $fShowAttr$fEqAttr $fEqErrorMsg $fOrdErrorMsg$fShowErrorMsg$fEqErrorMsgPart$fOrdErrorMsgPart$fShowErrorMsgPart $fOrdPatElem $fShowPatElem $fEqPatElem $fEqFlatSlice$fOrdFlatSlice$fShowFlatSlice$fEqFlatDimIndex$fOrdFlatDimIndex$fShowFlatDimIndex $fEqSlice $fOrdSlice $fShowSlice $fEqDimIndex $fOrdDimIndex$fShowDimIndex $fShowIdent$fShowTypeBase $fEqTypeBase $fOrdTypeBase $fShowSpace $fEqSpace $fOrdSpace $fShowSubExp $fEqSubExp $fOrdSubExp $fEqCerts $fOrdCerts $fShowCerts$fEqDiet $fOrdDiet $fShowDiet $fShowRank$fEqRank $fOrdRank$fEqExt$fOrdExt $fShowExt $fEqShapeBase$fOrdShapeBase$fShowShapeBase$fEqCommutativity$fOrdCommutativity$fShowCommutativity FutharkConfigfutharkVerbose futharkWarn futharkWerror futharkSafefutharkEntryPointsfutharkTypeCheck Verbosity NotVerboseVerbose VeryVerbose CompilerMode ToLibrary ToExecutableToServernewFutharkConfig $fEqVerbosity$fOrdVerbosity$fEqCompilerMode$fOrdCompilerMode$fShowCompilerModeIsValuevalueconstantintConst floatConst$fIsValueFloatValue$fIsValueIntValue$fIsValuePrimValue $fIsValueBool$fIsValueFloat$fIsValueDouble$fIsValueWord64$fIsValueWord32$fIsValueWord16$fIsValueWord8$fIsValueInt64$fIsValueInt32$fIsValueInt16 $fIsValueInt8FixExtfixExtmapExt DeclExtTyped declExtTypeOfExtTyped extTypeOf DeclTyped declTypeOfTypedtypeOf rankShaped arrayRank arrayShape setArrayShape isEmptyArray existential uniquenessunique staticShapes staticShapes1arrayOf arrayOfRow arrayOfShape setArrayDims setOuterSize setDimSize setOuterDim setOuterDimssetDim peelArray stripArray shapeSize arrayDims arrayExtDims arraySize arraysSizerowTypeprimTypeisAccelemType transposeType rearrangeType mapOnExtType mapOnTypediet subtypeOf subtypesOftoDeclfromDeclisExtisFreeextractShapeContext shapeContexthasStaticShapegeneraliseExtTypesexistentialiseExtTypesshapeExtMappingint8int16int32int64float32float64 $fTyped(,)$fTypedPatElem $fTypedParam $fTypedIdent$fTypedTypeBase$fTypedTypeBase0$fDeclTypedParam$fDeclTypedTypeBase $fFixExt() $fFixExtExt $fFixExtList$fFixExtShapeBase$fFixExtTypeBase$fDeclExtTypedTypeBase$fExtTypedTypeBase$fExtTypedTypeBase0 IsRetType primRetType applyRetType IsBodyType primBodyType expectedTypes$fIsBodyTypeTypeBase$fIsRetTypeTypeBaseOpRepTypesLetDecExpDecBodyDec FParamInfo LParamInfoRetType BranchTypeOpCNoOp$fEqNoOp $fOrdNoOp $fShowNoOpProg progTypes progConstsprogFuns EntryPoint EntryResultentryResultUniquenessentryResultType EntryParamentryParamNameentryParamUniquenessentryParamTypefunDefEntryPoint funDefAttrs funDefName funDefRetType funDefParams funDefBodyLParamFParam lambdaParamslambdaReturnType lambdaBody MatchSort MatchNormal MatchFallback MatchEquivMatchDec matchReturns matchSortLoopFormForLoop WhileLoopBasicOpApplyMatchLoopWithAccRetAlsparamAlsotherAlsCasecasePatcaseBody WithAccInputOpaqueArrayLitArrayValUpdate FlatIndex FlatUpdateConcatManifestIota ReplicateScratchReshape Rearrange UpdateAcc ReshapeKind ReshapeCoerceReshapeArbitraryOpaqueOp OpaqueNil OpaqueTraceBodybodyDecbodyStms bodyResult SubExpResresCerts resSubExpStmsStmLetstmPatstmAuxstmExpStmAux stmAuxCerts stmAuxAttrs stmAuxDecPatpatElemsoneStm stmsFromList stmsToListstmsHeadstmsLast subExpResvarRes subExpsResvarsRessubExpResVName$fTraversablePat $fFoldablePat $fFunctorPat $fMonoidPat$fSemigroupPat$fSemigroupStmAux$fTraversableCase$fFoldableCase $fFunctorCase$fSemigroupRetAls$fMonoidRetAls$fEqProg $fOrdProg $fShowProg$fEqEntryResult$fShowEntryResult$fOrdEntryResult$fEqEntryParam$fShowEntryParam$fOrdEntryParam $fEqMatchDec$fShowMatchDec $fOrdMatchDec $fEqMatchSort$fShowMatchSort$fOrdMatchSort $fEqLoopForm $fOrdLoopForm$fShowLoopForm $fEqRetAls $fOrdRetAls $fShowRetAls$fEqCase $fOrdCase $fShowCase $fEqBasicOp $fOrdBasicOp $fShowBasicOp$fEqReshapeKind$fOrdReshapeKind$fShowReshapeKind $fEqOpaqueOp $fOrdOpaqueOp$fShowOpaqueOp $fEqSubExpRes$fOrdSubExpRes$fShowSubExpRes $fOrdStmAux $fShowStmAux $fEqStmAux$fOrdPat $fShowPat$fEqPat $fOrdFunDef $fShowFunDef $fEqFunDef $fOrdLambda $fShowLambda $fEqLambda$fOrdExp $fShowExp$fEqExp$fEqBody $fShowBody $fOrdBody$fEqStm $fShowStm$fOrdStmMonadFreshNames getNameSource putNameSourcemodifyNameSourcenewNameFromStringnewVNamenewIdent newIdent'newParam$fMonadFreshNamesExceptT$fMonadFreshNamesMaybeT$fMonadFreshNamesWriterT$fMonadFreshNamesWriterT0$fMonadFreshNamesReaderT$fMonadFreshNamesRWST$fMonadFreshNamesRWST0$fMonadFreshNamesStateT$fMonadFreshNamesStateT0 shapeCoerce reshapeOuter reshapeInner reshapeIndexunflattenIndex flattenIndex sliceSizes PrettyRepppExpDec$fPrettyDimIndex$fPrettyOpaqueTypes$fPrettyOpaqueType$fPrettyEntryResult$fPrettyEntryParam$fPrettyEntryPointType$fPrettySignedness$fPrettyErrorMsg$fPrettyBasicOp$fPrettyFlatSlice$fPrettyFlatDimIndex $fPrettySlice $fPrettyParam$fPrettyPatElem $fPrettyPat $fPrettyAttrs $fPrettyAttr$fPrettySubExpRes $fPrettyCerts$fPrettySubExp $fPrettyIdent$fPrettyTypeBase$fPrettyTypeBase0$fPrettyTypeBase1 $fPrettySpace$fPrettyShapeBase $fPrettyExt $fPrettyRank$fPrettyShapeBase0$fPrettyCommutativity $fPrettyVName $fPrettyNoOp $fPrettyProg$fPrettyFunDef$fPrettyLambda $fPrettyExp $fPrettyCase $fPrettyStm $fPrettyBody $fPrettySeq ExtendedScope SameScopeScopedscopeOf LocalScope localScopeHasScope lookupType lookupInfoaskScope asksScopeScopeNameInfoLetName FParamName LParamName IndexName inScopeOfscopeOfLoopForm scopeOfPatscopeOfPatElemscopeOfLParamsscopeOfFParams castScope extendedScope$fTypedNameInfo$fHasScoperepRWST$fHasScoperepRWST0$fHasScoperepExceptT$fHasScoperepReaderT$fLocalScoperepRWST$fLocalScoperepRWST0$fLocalScoperepReaderT$fLocalScoperepExceptT$fScopedrepLambda$fScopedrep(,)$fScopedrepFunDef$fScopedrepStm$fScopedrepSeq$fScopedrepList$fHasScoperepExtendedScope$fFunctorExtendedScope$fApplicativeExtendedScope$fMonadExtendedScope$fMonadReaderMapExtendedScope$fShowNameInfoTraverseOpStmstraverseOpStmsOpStmsTraverserWalker walkOnSubExp walkOnBody walkOnVName walkOnRetTypewalkOnBranchType walkOnFParam walkOnLParamwalkOnOpMapper mapOnSubExp mapOnBody mapOnVName mapOnRetTypemapOnBranchType mapOnFParam mapOnLParammapOnOpidentityMappermapExpMmapExpidentityWalkerwalkExpMtraverseLambdaStms RephraseOp rephraseInOp RephraserrephraseExpDecrephraseLetBoundDecrephraseFParamDecrephraseLParamDecrephraseBodyDecrephraseRetTyperephraseBranchType rephraseOp rephraseProgrephraseFunDef rephraseExp rephraseStm rephrasePatrephrasePatElem rephraseBodyrephraseLambda$fRephraseOpNoOp paramType paramDeclType paramIdent patElemIdent patElemType setPatElemDec patIdentspatNamespatTypespatSizebasicPatFreeDec precomputedFreeInfreeIn'FVNames namesIntMap namesIntSetnameIn notNameIn namesFromList namesToListoneNamenamesIntersectionnamesIntersect namesSubtractmapNamesfvBindfvNamefvNamesfreeInStmsAndResfreeIn boundInBody boundByStm boundByStms boundByLambda $fPrettyNames $fMonoidNames$fSemigroupNames $fOrdNames $fSemigroupFV $fMonoidFV$fFreeInMatchDec$fFreeInStmAux $fFreeInAttrs $fFreeInCerts $fFreeInPat$fFreeInSubExpRes$fFreeInFlatSlice$fFreeInFlatDimIndex $fFreeInSlice$fFreeInDimIndex$fFreeInLoopForm$fFreeInPatElem $fFreeInParam$fFreeInTypeBase$fFreeInPrimType $fFreeInExt$fFreeInShapeBase $fFreeInSpace$fFreeInSubExp $fFreeInIdent $fFreeInVName $fFreeInMaybe $fFreeInBool $fFreeInNames $fFreeInCase $fFreeInSeq $fFreeInNoOp $fFreeInSet $fFreeInList$fFreeInEither $fFreeIn(,,,) $fFreeIn(,,) $fFreeIn(,) $fFreeInInt $fFreeIn() $fFreeInFV$fFreeDecNames$fFreeDecMaybe $fFreeDecList $fFreeDec(,) $fFreeDec() $fFreeInStm $fFreeInExp $fFreeInBody$fFreeInLambda$fFreeInFunDef $fEqNames $fShowNamesTypedOpopType subExpType subExpResTypemapType basicOpType expExtType $fTypedOpNoOpFloatExp fromRational' expFloatTypeIntExp expIntTypeNumExp fromInteger' fromBoolExpTPrimExpuntypedPrimExpLeafExpValueExpBinOpExpCmpOpExpUnOpExp ConvOpExpFunExpisInt8isInt16isInt32isInt64isBoolisF16isF32isF64primExpSizeAtLeastconstFoldPrimExp.&&..||..<..<=..==..>..>=..&..|..^..>>..<<.sExtzExt evalPrimExp primExpTypecoerceIntPrimExptruefalsefromBoolbNotsMax32sMin32sMax64sMin64sExt32sExt64zExt32zExt64fMin16fMin32fMin64fMax16fMax32fMax64sExtAs leafExpTypes~*~~/~~+~~-~~==~$fPrettyPrimExp$fFreeInPrimExp$fTraversablePrimExp$fFoldablePrimExp$fFunctorPrimExp$fPrettyTPrimExp$fFloatingTPrimExp$fFloatingTPrimExp0$fFloatingTPrimExp1$fFreeInTPrimExp$fTraversableTPrimExp$fFoldableTPrimExp$fFunctorTPrimExp $fNumTPrimExp$fNumExpTYPEDouble$fNumExpTYPEFloat$fNumExpTYPEHalf$fNumExpTYPEInt64$fNumExpTYPEInt32$fNumExpTYPEInt16$fNumExpTYPEInt8$fIntegralExpTPrimExp$fIntExpTYPEInt64$fIntExpTYPEInt32$fIntExpTYPEInt16$fIntExpTYPEInt8$fFractionalTPrimExp$fFloatExpTYPEDouble$fFloatExpTYPEFloat$fFloatExpTYPEHalf $fEqTPrimExp $fOrdTPrimExp$fShowTPrimExp $fEqPrimExp $fOrdPrimExp $fShowPrimExp Substitutable SubstitutesubstituteNames Substitutions$fSubstituteFV$fSubstituteTPrimExp$fSubstitutePrimExp$fSubstituteFlatSlice$fSubstituteFlatDimIndex$fSubstituteSlice$fSubstituteDimIndex$fSubstituteIdent$fSubstituteTypeBase$fSubstitutePrimType$fSubstituteNames$fSubstituteExt$fSubstituteShapeBase$fSubstituteNoOp$fSubstitute()$fSubstituteRank$fSubstituteCerts$fSubstitutePat$fSubstituteSubExpRes$fSubstituteParam$fSubstituteStmAux$fSubstituteAttrs$fSubstitutePatElem$fSubstituteSubExp$fSubstituteVName$fSubstituteBool$fSubstituteMaybe$fSubstitute(,,,)$fSubstitute(,,)$fSubstitute(,)$fSubstituteSeq$fSubstituteList$fSubstituteNameInfo$fSubstituteLambda$fSubstituteBody$fSubstituteStm$fSubstituteExp RenameableRenamerenameRenameM renameProg renameExp renameStm renameBody renameLambda renamePatrenameSomethingrenameStmsWithsubstituteRename renameBound renamingStms$fRenameDimIndex $fRenameNoOp $fRename() $fRenameExt$fRenameShapeBase $fRenameRank $fRenameNames$fRenameTypeBase$fRenamePrimType$fRenameSubExpRes$fRenameStmAux $fRenameAttrs $fRenameCerts$fRenamePatElem $fRenamePat $fRenameParam$fRenameSubExp $fRenameIdent $fRenameBool $fRenameMaybe $fRename(,,) $fRename(,) $fRenameList $fRenameVName$fRenameLambda $fRenameExp $fRenameStm $fRenameBody$fRenameFunDef$fFunctorRenameM$fApplicativeRenameM$fMonadRenameM$fMonadFreshNamesRenameM$fMonadReaderRenameEnvRenameMASTRepexpTypesFromPatIsOpsafeOpcheapOpopDependenciesASTConstraintsisBuiltInFunctionbuiltInFunctions asBasicOpsafeExp subExpVars subExpVarcommutativeLambdadefAuxstmCertscertifyexpExtTypesFromPatattrsForAssert lamIsBinOp $fIsOpNoOp AliasTable AliasedOp opAliases consumedInOp AliasesOf aliasesOfAliased bodyAliasesconsumedInBody subExpAliases expAliases consumedInStm consumedInExpconsumedByLambda patAliases lookupAliases$fAliasesOfPatElem$fAliasesOfNames$fAliasedOpNoOppassNamepassDescription passFunctionPassMrunPassMpassLongOptionparPass'intraproceduralTransformationWithConstsintraproceduralTransformation$fMonadFreshNamesPassM$fMonadLoggerPassM$fFunctorPassM$fApplicativePassM $fMonadPassM MonadBuilderRep mkExpDecMmkBodyM mkLetNamesMaddStmaddStms collectStms certifying BuildablemkExpPatmkExpDecmkBody mkLetNames attributingauxingletBindmkLetmkLet' letBindNames collectStms_bodyBind insertStms insertStmBuilderBuilderT BuilderOps mkExpDecBmkBodyB mkLetNamesB runBuilderT runBuilderT_ runBuilderT' runBuilderT'_ runBuilder runBuilder_runBodyBuilderrunLambdaBuilder$fMonadErroreBuilderT$fMonadWriterwBuilderT$fMonadStatesBuilderT$fMonadReaderrBuilderT$fMonadBuilderBuilderT$fLocalScoperepBuilderT$fHasScoperepBuilderT$fMonadFreshNamesBuilderT$fMonadTransBuilderT$fFunctorBuilderT$fMonadBuilderT$fApplicativeBuilderTToExptoExp letSubExpletExp letInPlace letTupExp letTupExp'eSubExpeParameMatch'eMatcheIfeIf'eBinOpeUnOpeCmpOpeConvOpeSignumeCopyeBodyeLambda eDimInBounds eOutOfBoundseIndexeLasteBlankasIntSasIntZ foldBinOpeAlleAny binOpLambda cmpOpLambdamkLambdasliceDim fullSlicesliceAt fullSliceNum isFullSlice resultBody resultBodyM insertStmsM buildBody buildBody_ mapResultinstantiateShapesinstantiateShapes'removeExistentialssimpleMkLetNamestoSubExp $fToExpVName $fToExpSubExpUsages UsageTablewithoutusedexpand isConsumed isInResultisUsedDirectlyisSizeusagesusage consumedUsage inResultUsage sizeUsage sizeUsages consumedUpresentUwithoutU usageInStm usageInPat$fMonoidUsages$fSemigroupUsages$fMonoidUsageTable$fSemigroupUsageTable$fEqUsageTable$fShowUsageTable $fEqUsages $fOrdUsages $fShowUsagesMetricsM OpMetrics opMetricsseeninside progMetrics bodyMetrics stmMetrics lambdaMetrics$fMonoidCountMetrics$fSemigroupCountMetrics$fOpMetricsNoOp$fOpMetricsMaybe$fMonadMetricsM$fApplicativeMetricsM$fFunctorMetricsM!$fMonadWriterCountMetricsMetricsM DependenciesdataDependenciesdepsOfdepsOf' depsOfArrays depsOfShapelambdaDependenciesreductionDependenciesfindNecessaryForReturned NumThreads BlockSize NumBlocksCountunCount SizeClass SizeThresholdSizeThreadBlockSizeGridSizeTile SizeRegTileSizeSharedMemory SizeBespoke SizeRegisters SizeCache KernelPath sizeDefault$fPrettySizeClass$fTraversableCount$fFoldableCount$fFunctorCount $fEqCount $fOrdCount $fShowCount $fNumCount$fIntegralExpCount $fFreeInCount $fPrettyCount$fSubstituteCount $fEqSizeClass$fOrdSizeClass$fShowSizeClass CanBeAliased addOpAliases AliasableRepAliasesAndConsumed BodyAliasing ConsumedInExp VarAliasesAliasDec unAliasesAliasesremoveScopeAliasesremoveProgAliasesremoveFunDefAliasesremoveExpAliasesremoveStmAliasesremoveBodyAliasesremoveLambdaAliasesremovePatAliases mkAliasedBody mkAliasedPatmkBodyAliasing mkStmsAliasesconsumedInStms trackAliases$fBuilderOpsAliases$fASTRepAliases$fBuildableAliases$fPrettyRepAliases$fAliasedAliases$fFreeDecAliasDec$fPrettyAliasDec$fFreeInAliasDec$fSubstituteAliasDec$fRenameAliasDec $fOrdAliasDec $fEqAliasDec$fMonoidAliasDec$fSemigroupAliasDec$fAliasesOf(,)$fRepTypesAliases$fCanBeAliasedNoOp$fShowAliasDec CanBeWise addOpWisdom Informing ExpWisdom VarWisdomvarWisdomAliasesWiseremoveScopeWisdomaddScopeWisdomremoveFunDefWisdomremoveStmWisdomremoveLambdaWisdomremoveBodyWisdomremoveExpWisdomremovePatWisdomaddWisdomToPat mkWiseBody mkWiseStm mkWiseExpDec informStms informBody informLambda informFunDef$fPrettyVarWisdom$fFreeInVarWisdom$fSubstituteVarWisdom$fRenameVarWisdom$fRenameExpWisdom$fSubstituteExpWisdom$fFreeDecExpWisdom$fFreeInExpWisdom$fFreeDecBodyWisdom$fFreeInBodyWisdom$fSubstituteBodyWisdom$fRenameBodyWisdom$fCanBeWiseNoOp$fBuildableWise $fAliasedWise$fPrettyRepWise $fASTRepWise$fRepTypesWise$fEqBodyWisdom$fOrdBodyWisdom$fShowBodyWisdom $fEqExpWisdom$fOrdExpWisdom$fShowExpWisdom $fEqVarWisdom$fOrdVarWisdom$fShowVarWisdom aliasAnalysis analyseFun analyseBody analyseStms analyseStm analyseExp analyseLambda Checkable checkExpDec checkBodyDeccheckFParamDeccheckLParamDeccheckLetBoundDec checkRetTypematchPat primFParammatchReturnTypematchBranchTypematchLoopResultcheckOpTypeM TypeError ErrorCaseUnexpectedTypeReturnTypeErrorDupDefinitionError DupParamError DupPatErrorInvalidPatErrorUnknownVariableErrorUnknownFunctionErrorParameterMismatch SlicingError BadAnnotation ReturnAliasedUniqueReturnAliased NotAnArrayPermutationErrorbadcontextconsume checkOpWith alternativebinding lookupVarrequirerequireI checkProg checkSubExp checkCerts checkStms checkBody checkSlicecheckExpcheckSOACArrayArgs checkType checkExtTypecheckStm matchExtPatmatchExtBranchTypeargType noArgAliasescheckArg checkLambdarequirePrimExp$fMonoidConsumption$fSemigroupConsumption$fHasScopeAliasesTypeM$fShowTypeError$fShowErrorCase $fMonadTypeM$fFunctorTypeM$fApplicativeTypeM$fMonadReaderEnvTypeM$fMonadStateTStateTypeM$fShowConsumption $fEqOccurence$fShowOccurence $fEqUsage $fOrdUsage $fShowUsagePipelinePipelineConfigpipelineVerbosepipelineValidateAction actionNameactionDescriptionactionProcedureFutharkM runFutharkM runPipelineonePass condPipelinepasses$fMonadLoggerFutharkM$fMonadFreshNamesFutharkM$fCategoryTYPEPipeline$fApplicativeFutharkM$fFunctorFutharkM$fMonadFutharkM!$fMonadErrorCompilerErrorFutharkM $fMonadStateFutharkStateFutharkM$fMonadReaderFutharkEnvFutharkM$fMonadIOFutharkM SizeHeuristic platformName deviceType heuristicSizeheuristicValue WhichSize LockstepWidthTileSize RegTileSize Threshold DeviceInfo DeviceType DeviceCPU DeviceGPUsizeHeuristicsTable$fPrettyDeviceInfoprimExpFromExpprimExpFromSubExpMprimExpFromSubExppe32le32pe64le64f32pef32lef64pef64lereplaceInPrimExpMreplaceInPrimExpsubstituteInPrimExp primExpSlice subExpSlice$fToExpTPrimExp$fToExpPrimExp TypeLookup VarLookupapplySimpleRulesBytesElementsExpArgMemArgTExpParamMap VolatilityVolatile NonvolatileCodeSkip:>>: DeclareMem DeclareScalar DeclareArrayAllocateCopyWrite SetScalarReadSetMem DebugPrint TracePrint ArrayContents ArrayValues ArrayZerosFunction FunctionT functionEntryfunctionOutput functionInput functionBodyentryPointNameentryPointResultsentryPointArgs ExternalValue OpaqueValueTransparentValue ValueDesc ArrayValue ScalarValue Constants constsDecl constsInit Functions unFunctions DefinitionsdefTypes defConstsdefFunsMemParam ScalarParamDimSizeMemSizelexicalMemoryUsage declsFirst calledFuncs callGraphelementsbytes withElemTypevar declaredIn$fFreeInValueDesc$fPrettyValueDesc$fFreeInExternalValue$fPrettyExternalValue$fFreeInEntryPoint$fPrettyEntryPoint$fPrettyArrayContents $fFreeInArg $fPrettyArg $fFreeInCode$fTraversableCode$fFoldableCode $fFunctorCode $fPrettyCode $fMonoidCode$fSemigroupCode$fTraversableFunctionT$fFoldableFunctionT$fFunctorFunctionT$fPrettyFunctionT$fFreeInFunctions$fTraversableFunctions$fFoldableFunctions$fFunctorFunctions$fPrettyFunctions$fMonoidFunctions$fSemigroupFunctions$fPrettyConstants$fSemigroupConstants$fMonoidConstants$fFunctorConstants$fPrettyDefinitions$fFunctorDefinitions$fShowDefinitions$fShowConstants$fShowFunctions$fShowFunctionT $fShowCode $fShowArg$fEqVolatility$fOrdVolatility$fShowVolatility$fShowArrayContents$fShowEntryPoint$fShowExternalValue $fEqValueDesc$fShowValueDesc SequentialProgram$fFreeInSequential$fPrettySequentialKernelHandlingTraverseKernels OpaqueKernels SchedulingDynamicStatic ParallelTask SchedulerInfo iterations schedulingAtomicOp AtomicAdd AtomicSub AtomicAndAtomicOr AtomicXor AtomicXchg AtomicCmpXchgMCCode MulticoreSegOpParLoop ISPCKernelForEach ForEachActive ExtractLane GetLoopBounds GetTaskId GetNumTasksAtomiclexicalMemoryUsageMC$fFreeInAtomicOp$fPrettyScheduling$fFreeInSchedulerInfo$fPrettySchedulerInfo$fFreeInMulticore$fFreeInParallelTask$fPrettyMulticore$fPrettyParallelTask$fShowAtomicOp AtomicFAdd AtomicSMax AtomicSMin AtomicUMax AtomicUMin AtomicWriteKernelOp GetBlockId GetLocalId GetLocalSizeGetLockstepWidthBarrierMemFence SharedAlloc ErrorSyncFence FenceLocal FenceGlobal KernelUse ScalarUse MemoryUseConstUseKernel kernelBody kernelUseskernelNumBlockskernelBlockSize kernelNamekernelFailureTolerantkernelCheckSharedMemoryBlockDimHostOp CallKernelGetSize CmpSizeLe GetSizeMaxKernelConstExp KernelConst SizeConst SizeMaxConst KernelCodeHostCode$fFreeInKernelConst$fPrettyKernelConst$fPrettyKernelUse$fFreeInKernelOp$fPrettyKernelOp$fPrettyKernel$fFreeInKernel$fFreeInHostOp$fPrettyHostOp $fShowHostOp $fShowKernel$fShowKernelOp $fShowFence $fEqFence $fOrdFence $fEqKernelUse$fOrdKernelUse$fShowKernelUse$fEqKernelConst$fOrdKernelConst$fShowKernelConst KernelTarget TargetOpenCL TargetCUDA TargetHIPOpenCL LaunchKernel KernelSafety SafetyNone SafetyCheap SafetyFull KernelArg ValueKArgMemKArg KernelNameCLCode FailureMsg failureErrorfailureBacktrace openClProgram openClPreludeopenClMacroDefsopenClKernelNamesopenClUsedTypes openClParamsopenClFailureshostDefinitionsnumFailureParams$fPrettyOpenCL$fEqKernelTarget $fShowOpenCL$fEqKernelSafety$fOrdKernelSafety$fShowKernelSafety $fShowMayFail$fShowKernelArgintTypeToCTypeprimTypeToCTypeprimStorageType primAPIType toStorage fromStorage tupleFieldfunNamedefaultMemBlockType arrayName isValidCName escapeName opaqueName scalarToPrimcproductcsumallTrueallEqual cScalarDefs storageSizestoreValueHeaderloadValueHeader$fToExpPrimValue$fToExpFloatValue$fToExpIntValue$fToIdentVName $fToIdentText $fToIdentName serverDefscliDefs Constructor CompilerM CompilerState compNameSrccompInit compUserState CompilerEnv envOperations envVarExp OperationsopsWriteScalar opsReadScalar opsAllocate opsCopies opsCompileropsEntryOutput opsEntryInput EntryInput EntryOutputDoCopy ReadScalar WriteScalar OpCompilerdefaultOperationscollectcollect'atInitstmemptyConstructor compileProg simpleCall compileName compileDim unpackDimcompilePrimTypecompilePrimToNpcompilePrimToExtNpcompilePrimValue compileVarcompilePrimExp compileExp compileCode$fMonadFreshNamesCompilerM$fFunctorCompilerM$fApplicativeCompilerM$fMonadCompilerM"$fMonadStateCompilerStateCompilerM!$fMonadReaderCompilerEnvCompilerM$fMonadWriterListCompilerM openClInit envCachedMem opsDeallocateopsCopy opsMemoryTypeopsErroropsCall opsFatMemory opsCritical CallCompiler CopyBarrier CopyNoBarrier Deallocate MemoryType PointerQuals ErrorCompiler HeaderSection ArrayDeclOpaqueTypeDecl OpaqueDecl EntryDeclMiscDeclInitDeclcompArrayTypescompEarlyDeclscompHeaderDecls compLibDecls compCtxFieldscompClearItemscompDeclaredMem compItems PublicnessPrivatePublicfreeAllocatedMemdeclAllocatedMemgenerateProgramStruct runCompilerM getUserStatemodifyUserState inNewFunctionitemitems fatMemorycacheMem publicDef publicDef_ headerDecllibDecl earlyDecl contextFieldcontextFieldDynonClearstmsdecl publicName memToCType rawMemCType fatMemType fatMemSet fatMemAlloc fatMemUnRefrawMem allocRawMem freeRawMemdeclMemresetMemsetMemunRefMemallocMemcopyMemoryDefaultSpace cachingMemory derefPointervolQualswriteScalarPointerWithQualsreadScalarPointerWithQualscriticalSection contextType configType$fEqCopyBarrier$fShowCopyBarrier$fEqHeaderSection$fOrdHeaderSection$fEqPublicness$fOrdPublicness$fShowPublicness opaqueToCTypevalueTypeToCTypegenerateAPITypes onEntryPointerrorMsgString linearCode compileArg compileDestcompileCopyWith compileCopy compileFuncompileVoidFun kernelsToHIP kernelsToCUDAkernelsToOpenCL $fEqOpsModeCPartscHeadercUtilscCLIcServercLib cJsonManifest asLibrary asExecutableasServer compileProg'generateBoilerplate JSEntryPointname parametersret extToStringemccExportNamesjavascriptWrapper runServerlibraryExports gpuOperations gpuOptionsgenerateGPUBoilerplateIndexOpindexOp entryDepth entryIsSize entryAccInputIndexed IndexedArray SymbolTable loopDepthbindingsavailableAtClosestLoopsimplifyMemory fromScopetoScopedeepenindexedAddCertsentryStm entryFParam entryLParamentryLetBoundDecelem lookupStm lookupExp lookupBasicOp lookupSubExp lookupLoopVarlookupLoopParamaliases availablesubExpAvailableindexindex' insertFParams insertLParaminsertLoopMerge insertLoopVar hideCertified noteAccTokens$fFreeInIndexed $fTypedEntry$fMonoidSymbolTable$fSemigroupSymbolTable $fIndexOpNoOp IndexResult SubExpResultsimplifyIndexingRuleBook BottomUpRuleBottomUpRuleOpBottomUpRuleLoopBottomUpRuleMatchBottomUpRuleBasicOpBottomUpRuleGenericBottomUp TopDownRule TopDownRuleOpTopDownRuleLoopTopDownRuleMatchTopDownRuleBasicOpTopDownRuleGenericTopDownSimplificationRule RuleGeneric RuleBasicOp RuleMatchRuleLoopRuleOpRuleSimplifyRuleMcannotSimplify liftMayberuleBooktopDownSimplifyStmbottomUpSimplifyStm$fMonadBuilderRuleM $fMonoidRules$fSemigroupRules$fMonoidRuleBook$fSemigroupRuleBook$fFunctorRuleM$fApplicativeRuleM $fMonadRuleM$fMonadFreshNamesRuleM$fHasScoperepRuleM$fLocalScoperepRuleM matchRulesfoldClosedFormloopClosedForm loopRules basicOpRules standardRulesremoveUnnecessaryCopy SimplifiablesimplifySimplifiableRep BlockPredSimpleM SimpleOps mkExpDecSmkBodySprotectHoistedOpSopUsageS simplifyOpS SimplifyOpEnvenvRulesenvHoistBlockers HoistBlockers blockHoistPar blockHoistSeqblockHoistBranch isAllocationnoExtraHoistBlockers neverHoistemptyEnvbindableSimpleOps runSimpleM asksEngineEnv askVtable localVtable enterLoop bindLParams hoistStms neverBlocksisFalseorIfisOp constructBodyblockIfhasFree isNotSafe isConsuming simplifyBody simplifyStmssimplifyStmsWithUsage blockMigratedisDeviceMigratedsimplifyLambdasimplifyLambdaNoHoisting simplifyFun$fMonadFreshNamesSimpleM$fSimplifiableCerts$fSimplifiableSlice$fSimplifiableDimIndex$fSimplifiableTypeBase$fSimplifiablePrimType$fSimplifiableSpace$fSimplifiableExt$fSimplifiableShapeBase$fSimplifiableVName$fSimplifiable()$fSimplifiableSubExpRes$fSimplifiableSubExp$fSimplifiableList$fSimplifiableMaybe$fSimplifiableInt$fSimplifiable(,,)$fSimplifiable(,)$fLocalScopeWiseSimpleM$fHasScopeWiseSimpleM$fApplicativeSimpleM$fFunctorSimpleM$fMonadSimpleM$fMonadReader(,)SimpleM$fMonadState(,,)SimpleMsimplifyPrimExpsimplifyExtPrimExp simplifyProgsimplifySomethingcopyPropagateInProgcopyPropagateInStmscopyPropagateInFunSeq$fTraverseOpStmsWise$fBuilderOpsWise$fPrettyRepSeq$fTraverseOpStmsSeq$fBuilderOpsSeq$fBuildableSeq$fCheckableSeq $fASTRepSeq $fRepTypesSeq SOACMappermapOnSOACSubExpmapOnSOACLambdamapOnSOACVNameReduceredComm redLambda redNeutralScan scanLambda scanNeutral ScremaForm scremaScans scremaReduces scremaLambdaHistOp histShapehistRaceFactorhistDest histNeutralhistOpSOACStreamScatterHistJVPVJPScrema ScatterSpec scanResults singleScan redResults singleReduce scremaTypemkIdentityLambdaisIdentityLambdanilFn scanomapSOAC redomapSOACscanSOAC reduceSOACmapSOACisScanomapSOAC isScanSOAC isRedomapSOAC isReduceSOAC isMapSOACsplitScatterResultsgroupScatterResults'groupScatterResultsidentitySOACMappermapSOACMtraverseSOACStmssoacType typeCheckSOACppScremappStream ppScatterppHist$fFreeInHistOp $fPrettyScan $fFreeInScan$fPrettyReduce$fFreeInReduce$fFreeInScremaForm $fPrettySOAC$fOpMetricsSOAC$fRephraseOpSOAC $fIndexOpSOAC $fIsOpSOAC$fCanBeAliasedSOAC$fAliasedOpSOAC $fTypedOpSOAC$fCanBeWiseSOAC $fRenameSOAC$fSubstituteSOAC $fFreeInSOAC$fEqSOAC $fOrdSOAC $fShowSOAC$fEqScremaForm$fOrdScremaForm$fShowScremaForm $fEqReduce $fOrdReduce $fShowReduce$fEqScan $fOrdScan $fShowScan $fEqHistOp $fOrdHistOp $fShowHistOpredomapToMapAndReducescanomapToMapAndScan dissectScremasequentialStreamWholeArraypartitionChunkedFoldParametersSOACSusesAD$fPrettyRepSOACS$fBuilderOpsSOACS$fBuildableSOACS$fCheckableSOACS $fASTRepSOACS$fRepTypesSOACS Transformer FirstOrderReptransformFunDeftransformConststransformStmRecursively transformSOACtransformLambdafirstOrderTransformiswimirwim rwimPossible InternaliseMInternaliseEnv envSubstsenvDoBoundsChecksenvSafeenvAttrs VarSubstsFunInforunInternaliseMsubstitutingVars lookupSubst addOpaques addFunDeflookupFunction lookupConst bindFunction bindConstantassert$fMonadBuilderInternaliseM$fLocalScopeSOACSInternaliseM$fFunctorInternaliseM$fApplicativeInternaliseM$fMonadInternaliseM'$fMonadReaderInternaliseEnvInternaliseM($fMonadStateInternaliseStateInternaliseM$fMonadFreshNamesInternaliseM$fHasScopeSOACSInternaliseM argShapesensureResultShapeensureResultExtShapeensureExtShape ensureShapeensureArgShapesHasSOACasSOACsoacOp simpleSOACS simplifySOACSsimplifyConsts simplifySOAC soacRulesliftIdentityMappingremoveReplicateMappingremoveUnusedSOACInputsimplifyKnownIterationSOACsimplifyMapIota $fHasSOACWise $fEqArrayOp $fOrdArrayOp $fShowArrayOp CallGraphisFunInCallGraphcallscalledByConsts allCalledBybuildCallGraph numOccurences$fPrettyFunCalls$fSemigroupFunCalls$fMonoidFunCalls$fPrettyCallGraph $fEqCallGraph$fOrdCallGraph$fShowCallGraph $fEqFunCalls $fOrdFunCalls$fShowFunCallsNotSOACInputViewLEmptyL:>ViewFEmptyF:<ArrayTransformsArrayTransform ReshapeOuter ReshapeInner noTransformsnullTransformsviewfviewl|><|transformFromExptransformToExpvarInput identInput isVarInput isVarishInput addTransformaddInitialTransformsapplyTransforms inputArrayinputTransforms inputType inputRowType inputRank transformRowstransposeInputinputs setInputslambda setLambdawidthtoSOACfromExp soacToStream$fPrettyArrayTransform$fSubstituteArrayTransform$fSubstituteArrayTransforms$fMonoidArrayTransforms$fSemigroupArrayTransforms $fPrettyInput$fSubstituteInput $fShowNotSOAC $fShowInput $fEqInput $fOrdInput$fEqArrayTransforms$fOrdArrayTransforms$fShowArrayTransforms$fShowArrayTransform$fEqArrayTransform$fOrdArrayTransform DepGraphAugDepGraphdgGraphdgProducerMapping dgAliasTable DepContextDepNodeNodeTStmNodeSoacNode TransNodeResNodeFreeNode MatchNodeDoNodeEdgeTAliasInfDepDepConsFakeResgetName isRealNodepprg applyAugs mapAcross nodeFromLNode depsFromEdge edgesBetween reachable mkDepGraphmkDepGraphForFun mergedContext contractEdgeisDepisInfisCons $fShowEdgeT $fShowNodeT$fEqClassification$fOrdClassification$fShowClassification $fEqNodeT $fEqEdgeT $fOrdEdgeTfuseMaps fuseRedomapMapNestNestingnestingParamNames nestingResultnestingReturnType nestingWidthparamsfromSOAC $fShowMapNest $fEqNesting $fOrdNesting $fShowNestingMode HorizontalVertical FusedSOACfsSOACfsOutputTransform fsOutNames attemptFusion$fShowFusedSOAC$fFunctorTryFusion$fApplicativeTryFusion$fAlternativeTryFusion$fMonadTryFusion$fMonadFailTryFusion$fMonadFreshNamesTryFusion$fHasScopeSOACSTryFusion$fLocalScopeSOACSTryFusion fuseSOACs$fMonadFreshNamesFusionM$fMonadFusionM$fApplicativeFusionM$fFunctorFusionM$fMonadStateFusionEnvFusionM$fHasScopeSOACSFusionM$fLocalScopeSOACSFusionMVjpOps vjpLambdavjpStmADMRState stateAdjs stateLoopTape stateSubstsstateNameSourceAdj AdjSparseAdjValAdjZeroSparse sparseShape sparseType sparseIdxValsInBounds CheckBounds AssumeBounds OutOfBoundszeroExponeExp adjFromVar adjFromParam unitAdjOfTypeadjsRepsrunADMadjValsetAdjinsAdjadjVNamecopyConsumedArrsInStmcopyConsumedArrsInBodyreturnSweepCodeaddSubstitution noAdjsFortabNest addLambda lookupAdj lookupAdjVal updateAdjupdateAdjSliceupdateSubExpAdjupdateAdjIndexisActivesubAD subSubsts setLoopTapelookupLoopTape substLoopTaperenameLoopTape$fSubstituteAdj$fMonadBuilderADM $fFunctorADM$fApplicativeADM $fMonadADM$fMonadStateRStateADM$fMonadFreshNamesADM$fHasScopeSOACSADM$fLocalScopeSOACSADM$fEqAdj$fOrdAdj $fShowAdj $fEqSparse $fOrdSparse $fShowSparse $fEqInBounds $fOrdInBounds$fShowInBounds vjpScatterdiffScan diffScanVec diffScanAdd $fShowSpecial$fShowSpecialCase diffReducediffMinMaxReduce diffVecReduce diffMulReducevjpMap stripmineStmsdiffLoop$fFunctorLoopInfo$fFoldableLoopInfo$fTraversableLoopInfo$fShowLoopInfodiffMinMaxHist diffMulHist diffAddHist diffVecHistdiffHistvjpSOACpdUnOppdBinOp pdBuiltinrevVJPfwdJVP$fTanBuilderParam$fTanBuilderPatElem$fTangentSubExpRes$fTangentSubExp$fTangentVName$fTangentTypeBase$fTanBuilder(,)applyADapplyADInnermost$fEqModeProdnegatedatoms sumOfProductsnegatesumToExp prodToExp simplifySofP simplifySofP' simplify0 simplify'addsub isMultipleOf maybeDivide lessThanishremoveLessThanscompareComplexity $fShowProd$fEqProd $fOrdProdInterval lowerBound numElementsstridedistributeOffset expandOffsetintervalOverlapprimBool intervalPairs selfOverlap justLeafExp$fFreeInInterval$fShowInterval $fEqIntervalLMADoffsetdimsLMADDimldStrideldShape PermutationIndicesslice flatSlicereshapecoerce substituteshapeiota mkExistentialpermutedisjoint disjoint2 disjoint3dynamicEqualsLMAD equivalentisDirectrange closeEnoughexistentializeexistentialized$fFreeInLMADDim$fTraversableLMAD$fFoldableLMAD $fFunctorLMAD $fFreeInLMAD $fRenameLMAD$fSubstituteLMAD $fPrettyLMAD $fShowLMAD$fEqLMAD $fOrdLMAD $fShowLMADDim $fEqLMADDim $fOrdLMADDim OpReturns opReturns FunReturns BodyReturns ExpReturns MemReturnReturnsInBlockReturnsNewBlockMemBindArrayInMemBoundMemInfoMemPrimMemMemMemArrayMemAccExtLMADMemOpAllocInner HasLetDecMem letDecMem BranchTypeMem RetTypeMem LParamMem FParamMem LetDecMemtraverseMemOpStms isStaticLMADexistentialiseLMADnoUniquenessReturnsbodyReturnsToExpReturnsmatchFunctionReturnTypematchLoopResultMemmatchBranchReturnType matchPatToExpnameInfoToMemInfo lookupMemInfo subExpMemInfolookupArraySummarylookupMemSpace checkMemInfobodyReturnsFromPat extReturns varReturns expReturns$fIndexOpMemOp$fCanBeWiseMemOp $fIsOpMemOp$fOpMetricsMemOp $fPrettyMemOp$fSubstituteMemOp $fRenameMemOp$fCanBeAliasedMemOp$fAliasedOpMemOp$fTypedOpMemOp $fFreeInMemOp$fRephraseOpMemOp$fPrettyMemInfo$fSimplifiableMemInfo$fRenameMemInfo$fSubstituteMemInfo$fFreeInMemInfo$fDeclTypedMemInfo$fTypedMemInfo$fTypedMemInfo0$fFixExtMemInfo$fExtTypedMemInfo$fExtTypedMemInfo0$fDeclExtTypedMemInfo$fSimplifiableMemBind$fFreeInMemBind$fPrettyMemBind$fSubstituteMemBind$fRenameMemBind $fOrdMemBind $fEqMemBind$fHasLetDecMem(,)$fHasLetDecMemMemInfo$fSimplifiableMemReturn$fFreeInMemReturn$fPrettyMemReturn$fFixExtMemReturn$fSubstituteMemReturn$fRenameMemReturn$fOrdMemReturn $fEqMemReturn$fIsBodyTypeMemInfo$fIsRetTypeMemInfo$fOpReturnsNoOp$fOpReturnsMemOp$fShowMemReturn $fShowMemBind $fEqMemInfo $fShowMemInfo $fOrdMemInfo $fEqMemOp $fOrdMemOp $fShowMemOpExpHintNoHintHint SizeSubst opIsConstAllocMAllocEnv allocSpace envConsts allocInOp envExpHints AllocableaskDefaultSpace allocForArrayexplicitAllocationsGeneric explicitAllocationsInStmsGeneric allocInStms mkLetNamesB' mkLetNamesB'' simplifiabledefaultExpHints$fSizeSubstMemOp$fSizeSubstNoOp$fMonadBuilderAllocM$fApplicativeAllocM$fFunctorAllocM $fMonadAllocM$fMonadFreshNamesAllocM$fHasScopetorepAllocM$fLocalScopetorepAllocM$fMonadReaderAllocEnvAllocM $fEqMemReq $fShowMemReqHasSegOp SegOpLevelasSegOpsegOp SegOpMappermapOnSegOpSubExpmapOnSegOpLambdamapOnSegOpBodymapOnSegOpVNamemapOnSegOpLevelSegMapSegScanSegHistSegSpacesegFlat unSegSpace KernelResultReturns WriteReturns TileReturnsRegTileReturnsResultManifestResultNoSimplifyResultMaySimplify ResultPrivate KernelBody kernelBodyDeckernelBodyStmskernelBodyResultSegBinOp segBinOpCommsegBinOpLambdasegBinOpNeutral segBinOpShape histOpShapehistTypesplitHistResultssegBinOpResultssegBinOpChunkskernelResultCertskernelResultSubExpaliasAnalyseKernelBodyconsumedInKernelBody segSpaceDimsscopeOfSegSpacesegLevelsegSpacesegBodytypeCheckSegOpidentitySegOpMapper mapSegOpMtraverseSegOpStms simplifySegOp segOpRules segOpReturns$fPrettySegBinOp$fSimplifiableKernelResult$fPrettyKernelResult$fRenameKernelResult$fSubstituteKernelResult$fFreeInKernelResult$fPrettyKernelBody$fRenameKernelBody$fSubstituteKernelBody$fFreeInKernelBody$fSimplifiableSegSpace$fPrettySegSpace $fIsOpSegOp$fIndexOpSegOp $fPrettySegOp$fOpMetricsSegOp$fRephraseOpSegOp$fAliasedOpSegOp$fTypedOpSegOp$fCanBeWiseSegOp$fCanBeAliasedSegOp $fFreeInSegOp $fRenameSegOp$fSubstituteSegOp $fEqSegOp $fOrdSegOp $fShowSegOp $fEqSegSpace $fOrdSegSpace$fShowSegSpace$fEqKernelResult$fShowKernelResult$fOrdKernelResult$fEqResultManifest$fShowResultManifest$fOrdResultManifest $fEqSegBinOp $fOrdSegBinOp$fShowSegBinOp$fEqKernelBody$fShowKernelBody$fOrdKernelBodySimplifyMemory simpleGenericsimplifyProgGenericsimplifyStmsGeneric memRuleBookSeqMem simpleSeqMem$fTraverseOpStmsSeqMem$fBuilderOpsSeqMem$fCheckableSeqMem$fPrettyRepSeqMem$fASTRepSeqMem$fRepTypesSeqMemexplicitAllocationsMCOpParOpOtherOptraverseMCOpStms typeCheckMCOp simplifyMCOp$fRephraseOpMCOp$fOpMetricsMCOp $fPrettyMCOp$fOpReturnsMCOp $fIndexOpMCOp$fCanBeWiseMCOp$fCanBeAliasedMCOp$fAliasedOpMCOp $fTypedOpMCOp $fIsOpMCOp $fFreeInMCOp $fRenameMCOp$fSubstituteMCOp$fEqMCOp $fOrdMCOp $fShowMCOpMCMem$fBuilderOpsMCMem$fCheckableMCMem$fPrettyRepMCMem $fASTRepMCMem$fRepTypesMCMemMC$fHasSegOpWise $fHasSegOpMC $fPrettyRepMC$fBuilderOpsMC $fBuildableMC $fCheckableMC $fASTRepMC $fRepTypesMCSizeOpGPUBody CalcNumBlocksSegLevel SegThreadSegBlockSegThreadInBlock KernelGrid gridNumBlocks gridBlockSizeSegVirt SegNoVirt SegNoVirtFull SegSeqDims segSeqDimssegVirttraverseHostOpStmstypeCheckHostOp$fPrettySegVirt$fFreeInKernelGrid$fSubstituteKernelGrid$fSimplifiableKernelGrid$fPrettyKernelGrid$fFreeInSegLevel$fRenameSegLevel$fSubstituteSegLevel$fSimplifiableSegLevel$fPrettySegLevel$fOpMetricsSizeOp$fPrettySizeOp$fFreeInSizeOp$fRenameSizeOp$fSubstituteSizeOp$fRephraseOpHostOp$fOpMetricsHostOp$fIndexOpHostOp$fOpReturnsHostOp$fCanBeWiseHostOp$fCanBeAliasedHostOp$fAliasedOpHostOp$fTypedOpHostOp $fIsOpHostOp$fRenameHostOp$fSubstituteHostOp $fEqHostOp $fOrdHostOp $fEqSizeOp $fOrdSizeOp $fShowSizeOp $fEqSegLevel $fOrdSegLevel$fShowSegLevel$fEqKernelGrid$fOrdKernelGrid$fShowKernelGrid $fEqSegVirt $fOrdSegVirt $fShowSegVirt$fEqSegSeqDims$fOrdSegSeqDims$fShowSegSeqDims KernelInputkernelInputNamekernelInputTypekernelInputArraykernelInputIndices MkSegLevelThreadRecommendation ManyThreadsNoRecommendationDistRep mkSegSpacesegRedsegScansegMapdummyDim nonSegRedsegHist mapKernelreadKernelInput$fShowKernelInput KernelNestNestingsnestingLetBound nestingLoop LoopNesting MapNestingloopNestingPatloopNestingAuxloopNestingWidthloopNestingParamsAndArrsTargetsTarget ppTargets singleTarget outerTarget innerTargetpushInnerTargetpopInnerTarget targetsScopescopeOfLoopNesting ppLoopNesting ppNestings singleNestingpushInnerNestingletBindInInnerNesting ppKernelNestinnermostKernelNestingpushKernelNestingpushInnerKernelNesting newKernelkernelNestLoopsscopeOfKernelNestboundInKernelNestboundInKernelNestskernelNestWidthsconstructKernel flatKernel tryDistributetryDistributeStm$fFreeInLoopNesting$fShowLoopNesting WithAccStmBranchSeqLoopinterchangeLoopsinterchangeBranchinterchangeWithAcc DistNestTDistAcc distTargetsdistStmsDistEnvdistNest distScopedistOnTopLevelStmsdistOnInnerMapdistOnSOACSStmsdistOnSOACSLambda distSegLevelMapLoop mapLoopStm addStmsToAcc addStmToAcc liftInner runDistNestT addPostStmspostStm inNestingbodyContainsParallelismlambdaContainsParallelismdistributeMapBodyStms distributedistributeSingleStm histKerneldetermineReduceOppermutationAndMissing distributeMap$fMonoidPostStms$fSemigroupPostStms$fMonoidDistRes$fSemigroupDistRes$fMonadLoggerDistNestT$fLocalScoperepDistNestT$fHasScoperepDistNestT$fMonadFreshNamesDistNestT$fFunctorDistNestT$fApplicativeDistNestT$fMonadDistNestT$fMonadReaderDistEnvDistNestT$fMonadWriterDistResDistNestTGPU $fHasSegOpGPU$fPrettyRepGPU$fBuilderOpsGPU$fBuildableGPU$fCheckableGPU $fASTRepGPU $fRepTypesGPUgetSize segThread injectSOACS soacsStmToGPUsoacsLambdaToGPU scopeForSOACs scopeForGPUextractMulticore$fMonadLoggerExtractM$fFunctorExtractM$fApplicativeExtractM$fMonadExtractM$fHasScopeMCExtractM$fLocalScopeMCExtractM$fMonadFreshNamesExtractMsegThreadCapped$fEqKernelSize$fOrdKernelSize$fShowKernelSizeintrablockParallelise$fMonoidIntraAcc$fSemigroupIntraAcc$fMonadLoggerBuilderTextractKernels$fMonadFreshNamesDistribM$fFunctorDistribM$fApplicativeDistribM$fMonadDistribM$fHasScopeGPUDistribM$fLocalScopeGPUDistribM$fMonadStateStateDistribM$fMonadLoggerDistribM VarianceTableTileKind TilePartialTileFullTileMupdateforLoop'forLoopsegMap1DsegMap2DsegMap3D segScatter2DisTileableRedomapvarianceInStms changeEnvsinkGPUsinkMCMigrationTableMigrationStatus MoveToDevice UsedOnHost StayOnHoststatusOf shouldMoveStm shouldMove usedOnHosthostOnlyFunDefs analyseConsts analyseFunDef$fSemigroupMigrationTable$fMonoidBodyStats$fSemigroupBodyStats$fEqMigrationStatus$fOrdMigrationStatus$fShowMigrationStatusreduceDeviceSyncs$fMonadFreshNamesReduceM$fFunctorReduceM$fApplicativeReduceM$fMonadReduceM$fMonadStateStateReduceM"$fMonadReaderMigrationTableReduceMmergeGPUBodies $fMonoidUsage$fSemigroupUsage $fMonoidGroup$fSemigroupGroup histAccsGPUoptimiseGenRed$fEqCostCSEInOp performCSEperformCSEOnFunDefperformCSEOnStms $fCSEInOpSOAC$fCSEInOpMemOp$fCSEInOpSegOp $fCSEInOpMCOp$fCSEInOpHostOp $fCSEInOpNoOpinlineAggressivelyinlineConservativelyremoveDeadFunctions$fEqUsed $fOrdUsed $fShowUsedmmBlkRegTiling doRegTiling3D tileLoops$fMonoidPrivStms$fSemigroupPrivStms simplifyGPUsimplifyKernelOp unstreamGPU unstreamMCGPUMem simpleGPUMem$fBuilderOpsGPUMem$fCheckableGPUMem$fPrettyRepGPUMem$fASTRepGPUMem$fRepTypesGPUMem simplifySeq simplifyMCsimplifyGPUMemsimplifySeqMem simplifyMCMemlowerAllocationsSeqMemlowerAllocationsGPUMemlowerAllocationsMCMemliftAllocationsSeqMemliftAllocationsGPUMemliftAllocationsMCMemallocInKernelBodyallocInBinOpLambda$fSizeSubstSegOp$fSizeSubstMCOpexplicitAllocationsInStms$fSizeSubstHostOpexpandAllocations$fMonadBuilderOffsetM$fApplicativeOffsetM$fFunctorOffsetM$fMonadOffsetM$fHasScopeGPUMemOffsetM$fLocalScopeGPUMemOffsetM$fMonadErrorListOffsetM$fMonadFreshNamesOffsetMentryPointMemGPUentryPointMemMCentryPointMemSeqdoubleBufferGPUdoubleBufferMC$fLocalScoperepDoubleBufferM$fHasScoperepDoubleBufferM$fFunctorDoubleBufferM$fApplicativeDoubleBufferM$fMonadDoubleBufferM$fMonadReaderEnvDoubleBufferM$fMonadFreshNamesDoubleBufferM HasMemBlockgetScopeMemInfoBotUpEnvscals activeCoals successCoalsinhibit InhibitTabCoalsTab ScalarTabAllocTab CoalsEntrydstmemdstindalsmemvartaboptdepsmemrefscerts Coalesced FreeVarSubsts ArrayMemBoundMemBlockmemNameixfun CoalescedKindCopyCoal InPlaceCoal ConcatCoalTransitiveCoalMapCoalMemRefsdstrefssrcwrts AccessSummaryUndeterminableSetLmadRefScopeTabaccessSubtractunionCoalsEntrygetArrMemAssocgetArrMemAssocFParamgetUniqueMemFParamcreatesNewArrOKmarkFailedCoalmarkSuccessCoalvnameToPrimExp$fPrettyAccessSummary$fFreeInAccessSummary$fMonoidAccessSummary$fSemigroupAccessSummary$fPrettyMemRefs$fMonoidMemRefs$fSemigroupMemRefs$fPrettyCoalescedKind$fPrettyArrayMemBound$fPrettyCoalesced$fPrettyCoalsEntry $fPrettyMap$fHasMemBlockAliases$fHasMemBlockAliases0$fHasMemBlockAliases1 TopDownHelper TopdownEnvallocscope inhibitedv_aliasm_alias nonNegatives scalarTable knownLessThan td_asserts isInScopeupdateTopdownEnvnonNegativesInPatupdateTopdownEnvLoopgetDirAliasedIxfngetDirAliasedIxfn'addInvAliasesVarTab areAnyAliased$fTopDownHelperNoOp$fTopDownHelperMCOp$fTopDownHelperHostOp$fTopDownHelperSegOpfreeVarSubstitutionstranslateAccessSummaryrecordMemRefUses noMemOverlapaggSummaryLoopTotalaggSummaryLoopPartialaggSummaryMapPartialaggSummaryMapTotal MemAliases analyzeSeqMem analyzeGPUMem$fPrettyMemAliases$fMonoidMemAliases$fSemigroupMemAliases$fShowMemAliases$fEqMemAliases LUTabProgLUTabFun lastUseSeqMem lastUseGPUMem lastUseMCMem$fLocalScopeAliasesLastUseM$fHasScopeAliasesLastUseM$fMonadLastUseM$fFunctorLastUseM$fApplicativeLastUseM"$fMonadReaderLastUseReaderLastUseM$fMonadStateMapLastUseM mkCoalsTab mkCoalsTabGPU mkCoalsTabMC$fMonadFreshNamesShortCircuitM$fFunctorShortCircuitM$fApplicativeShortCircuitM$fMonadShortCircuitM,$fMonadReaderShortCircuitReaderShortCircuitM$$fMonadStateVNameSourceShortCircuitMoptimiseSeqMemoptimiseGPUMem optimiseMCMemanalyseProgGPUColoring colorGraphoptimisePrimExpAnalysis opPrimExp PrimExpTable primExpTable stmToPrimExps$fPrimExpAnalysisMC$fPrimExpAnalysisGPUAnalyseVarType ConstTypeVariableThreadIDLoopVar VariableInfodepslevel parents_nest variableTypeContext assignmentsslicesparents currentLevel IndexTable DimAccess dependencies originalVar DependencylvlvarType ArrayNameBodyType SegOpName LoopBodyName CondBodyName IndexExprName SegmentedMap SegmentedRed SegmentedScan SegmentedHistvnameFromSegOp isInvariantanalysisPropagateByTransitivity isCounteranalyseDimAccessesanalyseFunction analyseIndex$fPrettySegOpName$fPrettyBodyType$fPrettyVarType$fPrettyDimAccess$fMonoidDimAccess$fSemigroupDimAccess$fSemigroupContext$fMonoidContext$fAnalyseSOACS$fAnalyseSeqMem $fAnalyseSeq$fAnalyseMCMem$fAnalyseGPUMem $fAnalyseMC $fAnalyseGPU $fShowContext $fEqContext $fEqDimAccess$fShowDimAccess$fEqDependency$fShowDependency$fShowVariableInfo$fEqVariableInfo $fShowVarType $fEqVarType$fShowBodyType $fOrdBodyType $fEqBodyType $fEqSegOpName$fOrdSegOpName$fShowSegOpNameLayout LayoutTablecommonPermutationEliminatorslayoutTableFromIndexTable$fLayoutTYPEGPU$fLayoutTYPEMC Transform transformStms $fTransformMC$fTransformGPUoptimiseArrayLayoutGPUoptimiseArrayLayoutMCstandardPipeline gpuPipeline seqPipelineseqmemPipelinegpumemPipeline mcPipeline mcmemPipeline constituent whitespacelexemekeyword pPrimValue pFloatTypepIntType pPrimTypepPrimExp parseSOACSparseSeq parseSeqMemparseGPU parseGPUMemparseMC parseMCMem parseTypeparseDeclExtType parseDeclType parseVName parseSubExpparseSubExpRes parseBodyGPU parseStmGPU parseBodyMC parseStmMCProgBaseprogDocprogDecsDecBaseValDecTypeDec ModTypeDecModDecOpenDecLocalDec ImportDec ModParamBaseModParam modParamName modParamType modParamAbsmodParamLocation ModBindBaseModBindmodName modParamsmodTypemodExpmodDoc modLocation ModExpBaseModVar ModParens ModImportModDecsModApply ModAscript ModLambda ImportNameModTypeBindBase ModTypeBind modTypeName modTypeExp modTypeDoc modTypeLoc TypeRefBaseTypeRefModTypeExpBase ModTypeVar ModTypeParens ModTypeSpecs ModTypeWith ModTypeArrowSpecBaseValSpec TypeAbbrSpecTypeSpecModSpec IncludeSpecspecNamespecTypeParams specTypeExpspecTypespecDoc specLocation TypeParamBase TypeParamDim TypeParamType LiftednessUnlifted SizeLiftedLifted TypeBindBaseTypeBind typeAliastypeLiftedness typeParamstypeExptypeElabtypeDoctypeBindLocation ValBindBaseValBindvalBindEntryPoint valBindNamevalBindRetDeclvalBindRetTypevalBindTypeParams valBindParams valBindBody valBindDoc valBindAttrsvalBindLocation entryParams entryReturn EntryType entryType entryAscribed DocCommentPatBaseTuplePat RecordPat PatParensWildcard PatAscriptionPatLit PatConstrPatAttr PatLitInt PatLitFloat PatLitPrim LoopFormBaseForInCaseBaseCasePat FieldBaseRecordFieldExplicitRecordFieldImplicitExpBaseLiteralIntLitFloatLit StringLitHoleParens QualParensTupLit RecordLitProjectNegateConstr RecordUpdate OpSection OpSectionLeftOpSectionRightProjectSection IndexSectionAscriptCoerceAppExpAppRes appResType appResExt AppExpBaseRangeLetPatLetFunLetWith SizeBindersizeNamesizeLocQualName qualQualsqualLeaf SliceBase DimIndexBase InclusivenessDownToExclusive ToInclusive UpToExclusiveBacktickBangEquPlusMinusTimesDivideModQuotRemShiftRShiftLBandBorEqualNotEqualLessLeqGreaterGeq PipeRightPipeLeft IdentBase identSrcLocTypeExpTEVarTEParensTETupleTERecordTEArrayTEUniqueTEApplyTEArrowTESumTEDim TypeArgExpTypeArgExpSizeTypeArgExpTypeSizeExp SizeExpAny ResRetType StructRetTypeResType ParamType StructTypeTypeArg TypeArgDim TypeArgTypeScalarScalarTypeBaseTypeVarRecordSumArrow RetTypeBaseretDimsretTypePNameNamedUnnamedSizeAttrInfoAttrAtomAtomNameAtomInt IsPrimValue primValue SignedValue UnsignedValueInfounInfoNoInfo sizeFromNamesizeFromInteger typeParamNamemkApply mkApplyUT$fTraversableNoInfo$fFoldableNoInfo$fFunctorNoInfo$fTraversableInfo$fFoldableInfo $fFunctorInfo$fIsPrimValueBool$fIsPrimValueDouble$fIsPrimValueFloat$fIsPrimValueWord64$fIsPrimValueWord32$fIsPrimValueWord16$fIsPrimValueWord8$fIsPrimValueInt64$fIsPrimValueInt32$fIsPrimValueInt16$fIsPrimValueInt8$fIsPrimValueInt $fMonoidShape$fSemigroupShape$fFunctorShape$fTraversableShape$fFoldableShape $fOrdPName $fEqPName$fLocatedSizeExp$fTraversableSizeExp$fFoldableSizeExp$fFunctorSizeExp $fMonoidDiet$fSemigroupDiet$fLocatedIdentBase$fOrdIdentBase $fEqIdentBase$fTraversableInclusiveness$fFoldableInclusiveness$fFunctorInclusiveness$fLocatedInclusiveness$fTraversableQualName$fFoldableQualName$fFunctorQualName $fOrdQualName $fEqQualName$fLocatedTypeExp$fBifoldableTypeExp$fBifunctorTypeExp$fTraversableTypeExp$fFoldableTypeExp$fFunctorTypeExp$fBitraversableTypeExp$fLocatedTypeArgExp$fBitraversableTypeArgExp$fBifoldableTypeArgExp$fBifunctorTypeArgExp$fTraversableTypeArgExp$fFoldableTypeArgExp$fFunctorTypeArgExp$fFoldableTypeArg$fFunctorTypeArg$fTraversableTypeArg$fBifoldableScalarTypeBase$fBifunctorScalarTypeBase$fTraversableScalarTypeBase$fFoldableScalarTypeBase$fFunctorScalarTypeBase$fBitraversableScalarTypeBase$fBifoldableRetTypeBase$fBifunctorRetTypeBase$fTraversableRetTypeBase$fFoldableRetTypeBase$fFunctorRetTypeBase$fBitraversableRetTypeBase$fLocatedSizeBinder$fLocatedDocComment$fLocatedTypeParamBase$fTraversableTypeParamBase$fFoldableTypeParamBase$fFunctorTypeParamBase$fTraversablePatBase$fFoldablePatBase$fFunctorPatBase$fLocatedPatBase$fLocatedCaseBase$fLocatedFieldBase$fLocatedExpBase$fLocatedAppExpBase$fLocatedTypeBindBase$fLocatedValBindBase$fLocatedTypeRefBase$fLocatedModTypeExpBase$fLocatedSpecBase$fLocatedModTypeBindBase$fLocatedModParamBase$fLocatedDecBase$fLocatedModBindBase$fLocatedModExpBase$fEqImportName$fOrdImportName$fShowImportName$fShowEntryType $fEqAppRes $fOrdAppRes $fShowAppRes$fEqTypeParamBase$fOrdTypeParamBase$fShowTypeParamBase$fEqLiftedness$fOrdLiftedness$fShowLiftedness$fShowDocComment $fEqPatLit $fOrdPatLit $fShowPatLit$fEqSizeBinder$fOrdSizeBinder$fShowSizeBinder$fEqScalarTypeBase$fOrdScalarTypeBase$fShowScalarTypeBase $fEqTypeArg $fOrdTypeArg $fShowTypeArg$fEqRetTypeBase$fOrdRetTypeBase$fShowRetTypeBase $fEqTypeExp $fOrdTypeExp $fShowTypeExp$fEqTypeArgExp$fOrdTypeArgExp$fShowTypeArgExp$fShowQualName$fEqInclusiveness$fOrdInclusiveness$fShowInclusiveness $fEnumBinOp$fBoundedBinOp $fEqSizeExp $fOrdSizeExp $fShowSizeExp $fShowPName $fEqShape $fOrdShape $fShowShape $fEqAttrInfo $fOrdAttrInfo$fShowAttrInfo $fEqAttrAtom $fOrdAttrAtom$fShowAttrAtom$fEqInfo $fOrdInfo $fShowInfo $fEqNoInfo $fOrdNoInfo $fShowNoInfo$fShowProgBase$fShowProgBase0 $fShowDecBase$fShowDecBase0$fShowModParamBase$fShowModParamBase0$fShowModBindBase$fShowModBindBase0$fShowModExpBase$fShowModExpBase0$fShowModTypeBindBase$fShowModTypeBindBase0$fShowTypeRefBase$fShowTypeRefBase0$fShowModTypeExpBase$fShowModTypeExpBase0$fShowSpecBase$fShowSpecBase0$fShowTypeBindBase$fShowTypeBindBase0$fShowValBindBase$fShowValBindBase0 $fOrdPatBase $fOrdPatBase0 $fEqPatBase $fEqPatBase0 $fShowPatBase$fShowPatBase0$fOrdLoopFormBase$fOrdLoopFormBase0$fEqLoopFormBase$fEqLoopFormBase0$fShowLoopFormBase$fShowLoopFormBase0 $fOrdCaseBase$fOrdCaseBase0 $fEqCaseBase $fEqCaseBase0$fShowCaseBase$fShowCaseBase0$fOrdFieldBase$fOrdFieldBase0 $fEqFieldBase$fEqFieldBase0$fShowFieldBase$fShowFieldBase0 $fOrdExpBase $fEqExpBase $fOrdExpBase0 $fEqExpBase0 $fShowExpBase$fShowExpBase0$fOrdAppExpBase$fOrdAppExpBase0$fEqAppExpBase$fEqAppExpBase0$fShowAppExpBase$fShowAppExpBase0$fOrdDimIndexBase$fOrdDimIndexBase0$fEqDimIndexBase$fEqDimIndexBase0$fShowDimIndexBase$fShowDimIndexBase0$fShowIdentBase$fShowIdentBase0 ASTMappableastMap ASTMappermapOnExp mapOnNamemapOnStructTypemapOnParamTypemapOnResRetTypebareExp$fASTMappable(,,)$fASTMappable(,)$fASTMappableNonEmpty$fASTMappableList$fASTMappableInfo$fASTMappableCaseBase$fASTMappableFieldBase$fASTMappablePatBase$fASTMappablePatBase0$fASTMappableIdentBase$fASTMappableRetTypeBase$fASTMappableTypeBase$fASTMappableTypeBase0$fASTMappableTypeBase1$fASTMappableAppRes$fASTMappableDimIndexBase$fASTMappableSizeExp$fASTMappableTypeArgExp$fASTMappableTypeExp$fASTMappableLoopFormBase$fASTMappableExpBase$fASTMappableAppExpBaseareTupleFields tupleFieldstupleFieldNames sortFields UncheckedCase UncheckedProg UncheckedSpec UncheckedDecUncheckedModBindUncheckedModTypeBindUncheckedTypeBindUncheckedValBind UncheckedPatUncheckedTypeParamUncheckedModTypeExpUncheckedModExp UncheckedExpUncheckedSliceUncheckedDimIndexUncheckedIdentUncheckedTypeExp UncheckedType ScalarType TypeParam StructTypeArgSpecDec ModTypeExpModExp IntrinsicIntrinsicMonoFunIntrinsicOverloadedFunIntrinsicPolyFun IntrinsicTypeIntrinsicEqualityDimPos PosImmediatePosParam PosReturndefaultEntryPointnoSizes traverseDims toStructuraltoStructtoParamtoRestoResRet resToParam paramToResarrayOfWithAliases tupleRecord isTupleRecord sortConstrs isTypeParam isSizeParamanySize matchDims setUniquenessfunType foldFunType unfoldFunTypevalBindTypeScheme valBindBoundtypeVars orderZeropatternOrderZero patternMap patternTypepatternStructType patternParamnamesToPrimTypes isAccType intrinsicVar intrinsics isBuiltin isBuiltinLocmaxIntrinsicTagqualNamequalify progImports decImportsprogModuleTypesidentifierReferenceleadingOperator progHolesstripExp similarExps $fEqDimPos $fOrdDimPos $fShowDimPosAnnotunAnnotIsName prettyNametoNameprettyNameString$fPrettyLiftedness$fPrettyPatLit$fPrettyTypeArg$fPrettyScalarTypeBase $fPrettyDiet$fPrettyRetTypeBase $fPrettyShape$fPrettyShape0$fPrettyShape1$fPrettyShape2$fPrettySizeExp$fPrettyTypeParamBase$fPrettyAttrInfo$fPrettyAttrAtom$fPrettySizeBinder$fPrettyIdentBase$fPrettyQualName$fPrettyTypeArgExp$fPrettyTypeExp $fIsNameName $fIsNameVName$fPrettyModBindBase$fPrettyModParamBase$fPrettyModTypeBindBase$fPrettyModTypeExpBase$fPrettySpecBase$fPrettyValBindBase$fPrettyTypeBindBase$fPrettyModExpBase$fPrettyDecBase$fPrettyProgBase$fPrettyPatBase$fPrettyLoopFormBase$fPrettyCaseBase$fPrettyFieldBase$fPrettyExpBase$fPrettyAppExpBase$fPrettyDimIndexBase $fAnnotInfo $fAnnotNoInfoTokenIDCOMMENTINDEXINGSYMBOL CONSTRUCTORNATLITINTLIT STRINGLITI8LITI16LITI32LITI64LITU8LITU16LITU32LITU64LITFLOATLITF16LITF32LITF64LITCHARLITCOLONCOLON_GT BACKSLASH APOSTROPHEAPOSTROPHE_THEN_HATAPOSTROPHE_THEN_TILDEBACKTICK HASH_LBRACKETDOTTWO_DOTS TWO_DOTS_LT TWO_DOTS_GT THREE_DOTSLPARRPARLBRACKETRBRACKETLCURLYRCURLYCOMMA UNDERSCORE RIGHT_ARROW QUESTION_MARKEQUASTERISKNEGATEBANGDOLLARLTHHATTILDEPIPEIFTHENELSEDEFLETLOOPINFORDOWITHASSERTTRUEFALSEWHILEINCLUDEIMPORTENTRYTYPEMODULEVALOPENLOCALMATCHCASEDOCEOFHOLEERRORmkQualIdsuffZerotryReadtokenCdecTokenbinTokenhexTokenromTokentokenSsymbol fromRomanreadHexRealLit $fShowToken $fEqToken $fOrdToken SyntaxErrorsyntaxErrorLocsyntaxErrorMsg ParserMonad ParserState commentLoc commentTextaddDoc addDocSpecaddAttr addAttrSpecmustBe mustBeEmpty arrayFromList arrayLitExpapplyExp patternExp binOpNamebinOp primNegatelexer parseError parseErrorAtemptyArrayError twoDotsRange backOneColparseWithCommentsparse$fLocatedComment $fEqComment $fOrdComment $fShowComment parseFutharkparseFutharkWithCommentsparseExp parseModExp parseDecOrExpfvVars freeWithout freeInExp freeInPat freeInType$fShowFV envVtable envTypeTableenvModTypeTable envModTable envNameMapNameMapBoundVboundValTParams boundValType TypeBindingTypeAbbrMTymtyAbsmtyMod FunModType funModTypeAbs funModTypeMod funModTypeMtyModEnvModFunTySet NamespaceTerm SignatureImports FileModulefileAbsfileEnvfileProg fileScopemkInitialImport mkImportFromincludeToFilePathincludeToString includeToText$fPrettyNamespace $fPrettyEnv $fPrettyMod $fPrettyMTy $fMonoidEnv$fSemigroupEnv $fShowEnv $fShowMTy $fShowMod$fShowFunModType $fShowBoundV$fEqTypeBinding$fShowTypeBinding $fEqNamespace$fOrdNamespace$fShowNamespace$fEnumNamespaceAtPosAtNameBoundTo BoundTerm BoundModuleBoundModuleType BoundTypeboundLocatPos $fEqAtPos $fShowAtPos$fEqDef $fShowDef $fEqBoundTo $fShowBoundTo ValuePrim ValueArrayValueFunValueSumValueAcc ValueShapeShapeDim ShapeLeaf ShapeRecordShapeSum typeShapestructTypeShape prettyValue valueShapeprettyEmptyArraytoArraytoArray' arrayLengthtoTuple fromTuple fromDataValue $fEqValue $fShowValueCtxctxEnv ctxImportsInterpreterErrorExtOp ExtOpTrace ExtOpBreak ExtOpError BreakReason BreakPointBreakNaN StackFrame stackFrameLoc stackFrameCtxprettyInterpreterErrortypeCheckerEnv initialCtx interpretExp interpretDecinterpretImportctxWithImportsinterpretFunction$fShowInterpreterError$fPrettyIndexing $fShowModule$fShowTermBinding$fFunctorExtOp$fLocatedStackFrame $fMonadEvalM$fApplicativeEvalM$fFunctorEvalM$fMonadFreeExtOpEvalM$fMonadReader(,)EvalM$fMonadStateMapEvalMTreeinternaliseParamTypesinternaliseLoopParamType inferAliasesinternaliseReturnTypeinternaliseEntryReturnTypeinternaliseCoerceTypeinternaliseLambdaReturnTypeinternaliseTypeinternaliseConstructorsinternaliseSumTypeRepinternaliseSumTypeinternalisedTypeSizeinternalisePrimTypeinternalisePrimValue$fFunctorInternaliseTypeM$fApplicativeInternaliseTypeM$fMonadInternaliseTypeM%$fMonadStateTypeStateInternaliseTypeM transformProg$fMonadFreshNamesRecordM$fFunctorRecordM$fApplicativeRecordM$fMonadRecordM$fMonadReaderEnvRecordM$fMonadFreshNamesLiftM$fFunctorLiftM$fApplicativeLiftM $fMonadLiftM$fMonadReaderEnvLiftM$fMonadStateLiftStateLiftMInternaliseLambdainternaliseFoldLambdainternalisePartitionLambda VisibleTypes visibleTypes entryPoint $fMonoidScope$fSemigroupScope$fApplicativeTransformM$fFunctorTransformM$fMonadTransformM$fMonadFreshNamesTransformM$fMonadReaderEnvTransformM$fMonadWriterDListTransformM $fShowScopeinternaliseAttrinternaliseAttrsbindingFParamsbindingLoopParamsbindingLambdaParams EvalBuiltinExpValueValOrVarVValVVarScriptValueTypeSTValueSTFun ScriptValueSValueSFunConst ServerVarFuncFuncFut FuncBuiltin ScriptServerwithScriptServer'withScriptServerparseExpFromTextscriptValueTypeserverVarsInValue valueToExp scriptBuiltinevalExp getExpValueevalExpToGround varsInExp freeValue $fPrettyFunc$fTraversableScriptValue$fFoldableScriptValue$fFunctorScriptValue$fPrettyScriptValueType$fShowValOrVar$fEqScriptValueType$fShowScriptValueType$fShowScriptValue $fShowFuncSuccess SuccessValuesSuccessGenerateValuesExpectedResultSucceedsRunTimeFailureGenValueGenPrimValuesInFile GenValues ScriptValues ScriptFileTestRunrunTagsrunInputrunExpectedResultrunIndexrunDescription WarningTestExpectedWarning StructureTestStructurePipeline GpuPipeline MCPipeline SOACSPipelineSeqMemPipelineGpuMemPipeline MCMemPipeline NoPipeline ExpectedErrorAnyError ThisError InputOutputs iosEntryPoint iosTestRuns TestActionCompileTimeFailureRunCases ProgramTesttestDescriptiontestTags testAction genValueTypetestSpecFromProgramtestSpecFromProgramOrDietestSpecsFromPathstestSpecsFromPathsOrDietestSpecFromFiletestSpecFromFileOrDie$fShowExpectedError$fShowWarningTest$fShowProgramTest$fShowTestAction$fShowInputOutputs $fShowTestRun $fShowSuccess$fShowExpectedResult $fShowValues$fShowGenValue$fShowStructureTest$fShowStructurePipeline FutharkExevaluesFromByteString getValues getValuesBS valuesAsVarstestRunReferenceOutputgetExpectedResult binaryNamecompileProgram readResultsensureReferenceOutputdetermineTuningdetermineCache checkResultfutharkServerCfg$fEqFutharkExe$fOrdFutharkExe$fShowFutharkExeCompileOptions compFuthark compBackend compOptions RunOptions runMinRuns runMinTime runTimeout runVerboserunConvergencePhaserunConvergenceMaxTimerunResultAction runProfile BenchResultbenchResultProgbenchResultResults DataResult runResults memoryMapstdErrreport RunResultrunMicrosecondsencodeBenchResultsdecodeBenchResultsbenchmarkDatasetprepareBenchmarkProgram$fFromJSONRunResult$fToJSONRunResult$fFromJSONResult$fToJSONResult$fFromJSONDataResults$fToJSONDataResults$fFromJSONBenchResults$fToJSONBenchResults$fEqBenchResult$fShowBenchResult$fEqDataResult$fShowDataResult $fShowResult $fEqRunResult$fShowRunResult unmatched $fPrettyMatch $fEqMatch $fOrdMatch $fShowMatch $fEqConstr $fOrdConstr $fShowConstrWarningsprettyWarnings anyWarnings singleWarningsingleWarning' listWarnings$fMonoidWarnings$fSemigroupWarningstoExp'MkTVmkTVtvTypeTVImpMVTableVarEntryArrayVar ScalarVarMemVarAccVar ScalarEntryentryScalarTypeMemEntry entryMemSpace ArrayEntry entryArrayLocentryArrayElemTypeMemLoc memLocName memLocShape memLocLMADopsExpCompiler opsOpCompileropsStmsCompileropsCopyCompileropsAllocCompilers AllocCompiler CopyCompiler ExpCompiler StmsCompiler sliceMemLocsubImpM_subImpMemitwarn emitFunction hasFunction compileBody compileBody'compileLoopBody compileStmsdefCompileStms caseMatch defCompileExp addLoopVardFParamsdLParamsdPrimVoldPrim_dPrimSdPrimSVdPrimdPrimV_dPrimVdPrimVEdScopedArrayeverythingVolatiletvSizetvExptvVarlocalDefaultSpace askFunctionnewVNameForFun nameForFunaskEnvlocalEnvaskAttrslocalOps getVTable localVTable lookupArray lookupMemorylookupArraySpace lookupAccfullyIndexArrayfullyIndexArray'copylmadCopycopyDWIM copyDWIMFix compileAlloctypeSizeinBoundssForsWhilesCommentsIfsWhensUnlesssOp sDeclareMemsAlloc_sAllocsArray sArrayInMemsAllocArrayPerm sAllocArray sStaticArraysWritesUpdate sLoopSpace sLoopNest<~~<--function genConstants dIndexSpace dIndexSpace'$fHasScopeSOACSImpM$fMonadFreshNamesImpM$fMkTVTYPEDouble$fMkTVTYPEFloat$fMkTVTYPEHalf$fMkTVTYPEInt64$fMkTVTYPEInt32$fMkTVTYPEInt16$fMkTVTYPEInt8$fMkTVTYPEBool $fFunctorImpM$fApplicativeImpM $fMonadImpM$fMonadStateImpStateImpM$fMonadReaderEnvImpM$fShowValueDestination$fShowVarEntry$fShowScalarEntry$fShowMemEntry$fShowArrayEntry $fEqMemLoc $fShowMemLoc AtomicUpdate AtomicPrim AtomicCAS AtomicLockingDoAtomicUpdateLocking lockingArraylockingIsUnlocked lockingToLocklockingToUnlocklockingMappingChunkLoopVectorization Vectorized MulticoreGenHostEnv hostAtomics hostLocksLocks locksArray locksCount AtomicBinOp segOpStringgetSpace getLoopBoundsgetIterationDomaingetReturnParamsrenameSegBinOpcompileThreadResult freeParamsdecideScheduling'decideSchedulingextractAllocationsgenerateChunkLoopgenerateUniformizeLoopextractVectorLaneinISPCsLoopNestVectorizedrenameHistOpLambdaatomicUpdateLocking DoSegBodycompileSegRed' compileSegMapcompileSegHist DefSpecifierRawMem cliOptions operationsclosureFreeStructField paramToCTypefunctionTimingfunctionIterationsaddTimingFields multicoreName multicoreDefgenerateParLoopFnprepareTaskStruct compileOp atomicOps ISPCState$fFunctorVariabilityM$fApplicativeVariabilityM$fMonadVariabilityM$fMonadStateMapVariabilityM$fMonadReaderNamesVariabilityM$fEqVariability$fOrdVariability$fShowVariability KernelAttrskAttrFailureTolerantkAttrCheckSharedMemorykAttrNumBlockskAttrBlockSizekAttrConstExpsKernelConstantskernelGlobalThreadIdVarkernelLocalThreadIdVarkernelBlockIdVarkernelNumBlocksCountkernelBlockSizeCountkernelNumThreadskernelWaveSizekernelLocalIdMapkernelChunkItersMap InKernelGen CallKernelGen KernelEnv kernelAtomicskernelConstants kernelLocks hostTargetCUDAHIPkernelGlobalThreadIdkernelLocalThreadId kernelBlockIdkeyWithEntryPoint allocLocal updateAcc genZeroes kernelLoop blockLoopblockCoverSpacefenceForArrays isPrimParamkernelConstToExp getChunkSize blockScan blockReduce writeAtomicvirtualiseBlocksdefKernelAttrslvlKernelAttrssKernel sKernelThreadthreadOperations sReplicatesIota $fEqPassage $fOrdPassage PrecomputedblockOperations sKernelBlockcompileBlockResultprecomputeConstantsprecomputedConstantscompileProgOpenCLcompileProgCUDAcompileProgHIPMonadTypeCheckerwarningsnewID newTypeNamebindVal typeError TypeState ImportTableNotesaNoteprettyTypeErrorprettyTypeErrorNoLoc withIndexLinkunappliedFunctorunknownVariable underscoreUserunTypeM askImportName atTopLevelenteringModule lookupMTy lookupImport bindSpaced bindSpaced1 bindIdentsusedName checkValName checkQualName checkName isKnownType lookupModqualifyTypeVars badOnLeft anySignedTypeanyUnsignedType anyIntType anyFloatType anyNumberType anyPrimTypeintrinsicsNameMaptopLevelNameMap mkTypeVarName checkAttr $fPrettyNote $fPrettyNotes$fMonadErrorTypeErrorTypeM$fMonadTypeCheckerTypeM$fMonadReaderContextTypeM$fMonadStateTypeStateTypeM$fSemigroupNotes $fMonoidNotes applySubstTypeSubsSubstExpSubstdetermineSizeWitnessesmustBeExplicitInBindingmustBeExplicitInType renameRetType checkTypeExptypeParamToArg substFromAbbr substTypesAny$fFunctorSubst $fPrettySubst$fSubstitutablePatBase$fSubstitutablePatBase0$fSubstitutableShape$fSubstitutableExpBase$fSubstitutableTypeBase$fSubstitutableTypeBase0$fSubstitutableTypeBase1$fSubstitutableRetTypeBase$fSubstitutableRetTypeBase0 $fShowSubst MonadUnifygetConstraintsputConstraintsmodifyConstraints newTypeVar newDimVar newRigidDimnewFlexibleDimcurLevel matchError unifyErrorRigidityRigidNonrigid RigidSourceRigidArgRigidRet RigidLoop RigidSlice RigidRange RigidCond RigidUnifyRigidOutOfScope Constraints Constraint NoConstraint Overloaded HasFieldsEquality HasConstrs ParamSize UnknownSizeLevelUsage BreadCrumbs noBreadCrumbshasNoBreadCrumbsmkUsagemkUsage'dimNotes normTypeFullynormTypeunify mustBeOneOf equalityType zeroOrderType arrayElemTypemustHaveConstr mustHaveFieldunifyMostCommon doUnification$fPrettyBreadCrumb$fPrettyBreadCrumbs$fLocatedUsage $fPrettyUsage$fLocatedConstraint$fMonadUnifyUnifyM $fMonadUnifyM$fFunctorUnifyM$fApplicativeUnifyM$fMonadState(,)UnifyM$fMonadErrorTypeErrorUnifyM $fEqRigidity $fOrdRigidity$fShowRigidity$fShowConstraint$fEqRigidSource$fOrdRigidSource$fShowRigidSource$fEqReplacedExp$fPrettyReplacedExp$fPrettyMonoSize$fMonadStateListMonoM$fMonadFreshNamesMonoM$fFunctorMonoM$fApplicativeMonoM $fMonadMonoM$fMonadReaderEnvMonoM$fMonadWriterSeqMonoM $fEqMonoSize$fShowMonoSize$fShowReplacedExp$fMonadFreshNamesOrderingM$fFunctorOrderingM$fApplicativeOrderingM$fMonadOrderingM$fMonadReaderListOrderingM$fMonadState(,)OrderingM$fShowFunction$fMonadFreshNamesDefM $fEqSizeSubst$fOrdSizeSubst$fShowSizeSubst $fFunctorDefM$fApplicativeDefM $fMonadDefM$fMonadReader(,)DefM$fMonadState(,)DefM $fShowBinding$fShowStaticValinternaliseProg TermTypeM TermTypeStatestateConstraints stateCounter stateWarnings SizeSource SourceSlice TermScope scopeVtablescopeTypeTable scopeModTableTermEnv termScope termChecking termLevel termChecker termOuterEnvtermImportNameChecking CheckingApplyCheckingReturnCheckingAscriptionCheckingLetGeneraliseCheckingParams CheckingPatCheckingLoopBodyCheckingLoopInitialCheckingRecordUpdateCheckingRequiredCheckingBranchesInferred NoneInferredAscribed ValBinding OverloadedF EqualityF unusedSizewithEnv constrain onFailureextSizeincLevelexpType expTypeFully newArrayTypeallDimsFreshInType updateTypesunifiescheckTypeExpNonrigid runTermTypeM$fFunctorInferred$fPrettyChecking$fSemigroupTermScope $fOrdFName $fEqFName$fMonadTypeCheckerTermTypeM$fMonadUnifyTermTypeM$fMonadErrorTypeErrorTermTypeM$fMonadTermTypeM$fFunctorTermTypeM$fApplicativeTermTypeM$fMonadReaderTermEnvTermTypeM"$fMonadStateTermTypeStateTermTypeM$fEqSizeSource$fOrdSizeSource$fShowSizeSource $fShowFName$fShowTermScope$fShowValBinding bindingSizes bindingIdent bindingPat bindingParams CheckedLoop UncheckedLoop checkLoopresolveTypeExp resolveExpresolveTypeParamsresolveValBindnewNamesForMTy refineEnv matchMTys applyFunctor checkValDef $fPrettySet $fPrettyAlias$fFunctorEntry$fFunctorCheckM$fApplicativeCheckM $fMonadCheckM$fMonadReaderCheckEnvCheckM$fMonadStateCheckStateCheckM $fEqEntry $fOrdEntry $fShowEntry $fEqAlias $fOrdAlias $fShowAlias checkOneExp checkSizeExp checkFunDef$fPrettyUnmatched$fFunctorUnmatched$fShowUnmatchedcheckDec checkModExp initialEnvenvWithImports LoadedProg lpNameSourceVFS ProgError ProgWarning lpImports lpWarnings lpFilePaths noLoadedProg extendProg reloadProg readLibraryreadUntypedLibrary$fLocatedProgError$fEqLoadedFile$fOrdLoadedFile$fShowLoadedFileState stateProgram staleData emptyStategetStaleContentgetStaleMappingupdateStaleContentupdateStaleMappinggetHoverInfoFromStatefindDefinitionRangecomputeMappingposToUri rangeFromLocpublishWarningDiagnosticspublishErrorDiagnostics maxDiagnosticdiagnosticSourcetryTakeStateFromIORef tryReCompilehandlersmain dumpErrorrunCompilerOnProgramrunPipelineOnProgramprettyProgErrorsreadProgramFilereadProgramFilesreadUntypedProgramreadProgramOrDiereadUntypedProgramOrDiehandleWarningsversion versionString FunOptDescrmainWithOptions commonOptions optionsErrorCompilerOption compilerMain $fOrdTestCase $fEqTestCase$fShowTestCase$fShowProgConfig $fEqTestMode$fShowTestMode$fEqTestResult$fShowTestResult$fMonadLoggerPkgM$fMonadPkgRegistryPkgM$fMonadFailPkgM $fMonadPkgM $fFunctorPkgM$fApplicativePkgM $fMonadIOPkgM$fMonadReaderPkgConfigPkgM mainImportsmainHash mainDatagetmainCheckSyntax mainThanks mainTokensOptions scriptBackend scriptFutharkscriptExtraOptionsscriptCompilerOptionsscriptSkipCompilation scriptOutput scriptVerbosescriptStopOnError scriptBinaryinitialOptionsscriptCommandLineOptions prepareServer$fPrettyDirective $fEqFailure $fOrdFailure $fShowFailure$fFunctorScriptM$fApplicativeScriptM$fMonadScriptM$fMonadErrorTextScriptM$fMonadFailScriptM$fMonadIOScriptM$fMonadStateStateScriptM $fShowBlock$fShowDirective$fShowAudioParams$fShowVideoParams$fShowImgParams$fUniformRangeHalf$fEqOutputFormat$fOrdOutputFormat$fShowOutputFormat $fShowSpeedUp$fEqSkipReason$fShowDatasetResult renderFiles$fFunctorFutharkiM$fApplicativeFutharkiM$fMonadFutharkiM"$fMonadStateFutharkiStateFutharkiM$fMonadIOFutharkiM$fMonadErrorStopReasonFutharkiM printActionprintAliasesActionprintLastUseGPUprintFusionGraphprintInterferenceGPUprintMemAliasGPUprintMemoryAccessAnalysiscallGraphAction metricsActionimpCodeGenActionkernelImpCodeGenActionmulticoreImpCodeGenActioncompileCActioncompileOpenCLActioncompileCUDAActioncompileHIPActioncompileMulticoreActioncompileMulticoreToISPCActioncompilePythonActioncompilePyOpenCLActioncompileCtoWASMActioncompileMulticoreToWASMAction$fPrettyUntypedPassState $fRepresentationUntypedPassState$fRepresentationUntypedActionGHC.Base RoutingResultDeadEnd CycleDetected SinkFoundDepthPending<>memptyrequiredInManifest GHC.MaybeNothingGHC.IOFilePath EncodedString UserString Traversable Data.Foldablemaximumminimummap Data.EitherpartitionEithers Data.MaybemapMaybeGHC.ListsplitAtGHC.Showshow+process-extras-0.7.4-I8q9vlHp7jZ1GH9EAC3w8bSystem.Process.ByteStringreadProcessWithExitCodeghc-prim GHC.TypesIOLeft zEncodeString concatMap Debug.TracetraceMGHC.RealIntegralNoLoc Relocatablereloc IsLocationfromPosfromLocunLocnoLoclocStartlocEndposFileposLineposColposCoffstartPoslinePos advancePos<-->srcspan displayPos displaySPos displayLoc displaySLocstaleToCurrentcurrentToStaleControl.Monad.IO.ClassMonadIOmemoiseGetManifestRoughBuildList doSolveDeps text-2.1.1-DGLNUHNxBL1gG68QYsqRRData.Text.InternalTextDocpretty prettyListSimpleDocStreamSCharSFailSEmptySTextSLineSAnnPushSAnnPop LayoutOptionslayoutPageWidth PageWidthAvailablePerLine Unbounded FusionDepthDeepShallowgrouplistPrettyprinter.Symbols.Asciicommacolonspacefillparens<+>aligncolumntupledlinedotequalssemisquotedquotelangleranglelbracerbracelbracketrbracketlparenrparensoftlineenclosesquotesdquotesanglesbracesbracketscatsep punctuatehangindentnestnestingannotatehcathsepvcatviaShow unsafeViaShowemptyDocline' softline'hardlineflatAlt encloseSep concatWithvsepfillSepfillCat pageWidth fillBreakpluralsurround unAnnotate reAnnotatealterAnnotations unAnnotateS reAnnotateSalterAnnotationsSfuseremoveTrailingWhitespacedefaultLayoutOptions layoutPretty layoutSmart layoutCompactslash backslashpipeI8ValueI16ValueI32ValueI64ValueU8ValueU16ValueU32ValueU64ValueF16ValueF32ValueF64ValueVector PutValue1 putValue1PutValueputValueGetValuegetValueI8I16I32I64U8U16U32U64F16F32F64 primTypeText primTypeBytes valueTypeTextvalueTypeTextNoDims valueType valueElemType valueElems TolerancecompareSeveralValuesFuthark.Data.Reader readValues GHC.ClassesOrdEq ghc-bignumGHC.Num.IntegerRational doFSignumdoSubdoUDivdoUDivUpdoSDivUpdoUModdoSQuotdoSRemdoSMindoUMindoSMaxdoUMaxdoShldoLShrdoAShrdoAnddoOrdoXorintToIntnegativeIshIntInt==MonoidmodifyArrayShapeTruetransformers-0.6.1.0Control.Monad.Trans.ReaderReaderGHC.ErrerrorData.Functor.IdentityIdentityMaybe rephraseParamEQLT loopExtTypeFunctorGHC.NumNumDoublelengthControl.Monad.Failfail zeroIshExp oneIshExpnegativeIshExprenamerSubstitutions censorStmsControl.Monad.Trans.State.Lazy inResultUsizeUmatches depsOfNames BodyWisdom expWisdomFree informStm informExp Consumption FunBindingShowboundobserveconsumeOnlyParams expandAliasescheckAnnotation argAliasesControl.CategoryCategory SimpleRulerepScratchToScratch SemigroupMayFailuintTypeToCTypevalidfindPrettyNameprintStm isValidPyNamerecordFieldPayloadsGHC.ReadkernelSyncPending translateGPU cleanSizes freeVarIndex fparamMerge letBoundIndex entryConsumed IndexArrayhideIf BottomUpRules TopDownRulesRuleshoistBranchInvariantremoveDeadBranchResult checkResultsemptyArrayToScratchProtectchangedprotectLoopHoistedprotectCaseHoistednotWorthHoistingsimplifyBodyNoHoistingsimplifyResult scanSizesredSizes asserting assertingOneremoveReplicateWriteremoveDeadReductionremoveDeadWriteCallId buildFGfuninputsToSubExpsClassification SOACInputOtherProducerMapping EdgeGenerator"fgl-5.8.2.0-Gf2aduOvW3CANI1vOANugSData.Graph.Inductive.GraphNodegenEdges emptyGraphscremaFusionOKmapWriteFusionOKfuseSOACwithKerrearrangeReturnTypesdoHorizontalFusionadjRepAdjVarFreeAccFreeArr FreeNonAccLoopInfo bindForLoop renameForLoop isWhileLoopcomputeWhileItersconvertWhileLoop nestifyLoop stripmine stripmineStmfwdLoop valPatAdjreverseIndicesrestorerevLoop preprocess prodToScale scaleToProd scaleConstsnonNegativeishFalselessThanOrEqualishflatSpanconservativeFlattengcddynamicEqualsLMADDim iotaStridedJust getExtMapsrepairExpressionControl.Monad.Reader.Class MonadReaderasklocalreaderReaderT runReaderTliftIOControl.Monad.Trans.Class MonadTranslift runReaderasks mapReaderT mapReader withReader withReaderT segOpTypeDistributionBodydistributionExpandTargetletBindInNestingboundInNestingkernelElementsPerThreadworthIntrablockworthSequentialisingIxFnEnv multiplicity stateGraphstateGraphedScalars stateSources stateSinksstateUpdateAccsstateCopyableMemory stateStatsCopyableMemoryMapBindingDelayedSinksSources BodyStats bodyHostOnlybodyHasGPUBody bodyReads bodyOperandsbodyHostOnlyParentsOperandsMeta metaForkDepth metaBodyDepth metaGraphId BodyDepthenvHostOnlyFuns HostOnlyFunsenvMeta HostUsage graphBody graphStmsgraphStmboundBy graphSimple graphRead graphAutoMove graphHostOnlygraphUpdateAcc graphApply graphMatch graphLoop graphWithAcc createNode addVertex addSourcerequiredOnHostconnectSubExpToSink routeSubgraph inSubGraphreuses tellHostOnly tellGPUBodytellRead tellOperandstellHostOnlyParentgetGraphgetGraphedScalarsgetCopyableMemoryoutermostCopyableArrayonlyGraphedScalarsonlyGraphedScalaronlyGraphedScalarSubExp modifyGraphmodifyGraphedScalarsmodifyCopyableMemory modifySourcesrecordCopyableMemoryincForkDepthForincBodyDepthFor graphIdForcaptureBodyStats isHostOnlyFungetMeta getBodyDepthRewriteMrewriteRenamesrewritePrologueReduceM stateMigratedstateGPUBodyOkoptimizeFunDef optimizeBody optimizeStms optimizeStmoptimizeWithAccInputoptimizeHostOp withSuffix initialState noGPUBodyarrayizePatElemmovedTo aliasedByrecordMigration migratedTo useScalarbind storedScalar storeScalar resolveName resolveSubExpresolveSubExpRes resolveResultmoveStm inGPUBody initialRStateaddReadsToSegBinOpaddReadsToHistOpaddReadsToLambdaaddReadsToBodyaddReadsToKernelBodyaddReadsHelper rewriteName rewriteBody rewriteStms rewriteStm rewritePatrewritePatElem rewriteStmAux rewriteExp rewriteParam renameResultrenameSubExpRes renameCerts renameSubExp renameType renameExtType usageBindingsusageDependenciesGroup groupStms groupUsageEquivalenceTable entryValue entryResult entryBlockIdx entryStoredReorderM stateBlocksBindings namesToSet transformBody reorderStm transformExptransformWithAccInput groupBindingsgroupDependencies modifyBlocksremoveEquivalentsrecordEquivalent moveGPUBody moveOtherrecordEquivalentsOf groupBlocks moveToGrpmoveTocollapse mergeKernels execRewrite equivalentsasArray referConstAccsmatchCodeAccumCodeisInvarToParDimcseInOpinlineInFunDefremoveDeadFunctionsF kkLoopBodymatchCodeStreamCodeisInvarTo1of2InnerDimsisInvarTo2of3InnerDimsTilingPrivStms InputTile InputArraypreludeToPostludepartitionPreluderemoveDeadGPUBodyResultlowerAllocationsInStmsliftAllocationsInStms RebaseMap ExtractionUseraddPatternContextaddParamsContextoffsetMemoryInExp doubleBufferappendCoalsInfo toPrimTypeInvAliasDirAliasgetDirAliasFromExpgetInvAliasFromExp walkAliasTab VarAliasTabgetUseSumFromStmaggSummaryMapPartialOne aggSummaryOne typedLeafExpAliasTab LastUseReaderonOp lastUseBodylastUseKernelBody lastUseExplastUsedInNamesaliasTransitiveClosureupdateAliasingLastUseM GenSSPoint SSPointInfo CoalesceablemkCoalsTabProgshortCircuitSeqMemshortCircuitSegOpshortCircuitGPUMem threadSliceshortCircuitSegOpHelpermakeSegMapCoalsmkCoalsTabStms mkCoalsTabStmfilterSafetyCond2and5mkCoalsHelper3PatternMatchgenSSPointInfoSegOpfindMemBodyResulttransferCoalsToBodyLastUsedInUsemakeEdge analyseGPUmemSizes memSpaces memElemSize Neighbors neighborsAllocsoptimiseKernel onKernelsbodyToPrimExpskernelToBodyPrimExps toPrimExpsegOpToPrimExps analyseOpextend oneContextvarInfoZeroDepscontextFromNamesanalyseStmsPrimitiveanalyseGPUBody analyseSubExp consolidatereduceDependenciespermutationFromDimAccess tableMapMaybe ReplacementsExpMaptransformSegGroupKernelBodytransformSegThreadKernelBody adPipeline pIntValue pFloatValue pBoolValuePRscanTokensTextgetTokenparserCommentsprog expression declaration modExpression futharkTypeHappyStk freeWithoutLprogDefs TermBindingTermPolyEvalEvalM localExtssignum'signum expandTypeevalTypefree-5.2-2nivSiUBqSiD14je3kGdbPControl.Monad.FreePureModModtransformNames flattenPat-futhark-server-1.2.2.1-IKtiBeRl5sZ4UnC3bJ1UKbFuthark.ServerServer withServertestSpecsFromPath getGenFile genFileSize callEntryconvergenceCriteria ConstrLit stateAccsenvEnv envFunctionArrayDestinationentryPointSize addArrays addFParams localAttrs copyArrayDWIM SegBinOpSlug slugResArrsgroupResultArrayssegHistOpChunks onOpAtomic sharedDefmakeStringLiteralcompileBuiltinFun handleError getMemTypeprepareMemStructcompileGetMemStructValscompileWritebackMemStructValscompileReadbackMemStructValsmayProduceErroraddDepsfindDepsdepsFixedPoint findVaryinganalyzeVariabilitygetVariabilitygetVariabilityQualsmakeAllMemoryGlobalsReplicateKernel sIotaKernel scanStage1 slugIntermsslugAccs blockResArrsSegRedIntermediateArrays maxNumOpsmakeIntermArraysPassagecomputeHistoUsageslugMaxLocalMemPasses SegOpSizes flattenArray applyLambdaapplyRenamedLambda segOpSizes getBinDir getLibDir getDynLibDir getDataDir getLibexecDirgetDataFileName getSysconfDir stateUsedcontextAtTopLevel BreadCrumb breadCrumbisRigid isNonRigidMonoSize ReplacedExpwithMono askIntros parametrizing replaceExparrowArg OrderingMControl.Monad.State.Class MonadStatenameExp letValExpinternaliseSizeExpisOverloadedFunctionisIntrinsicFunctionDefM bindingType StaticValLambdaSVSumSV DynamicFun restrictEnvTorunDefM liftValDeccombineTypeShapes defuncExp defuncExp' defuncSoacExpdefuncDimIndex defuncLet fullyApplied liftDynFun envFromPat buildEnvPat typeFromSVdynamicFunType matchPatSV updatePat svFromType defuncValBind defuncValsFNameinstantiateTypeSchemeinstantiateTypeParam getAreSamesomeDimsFreshInTypefreshDimsInType doNotShadowcheckForDuplicateNamesInTypecheckForDuplicateNames allNamesInEnv NameReason NameAppResenvLoc boundAliases setAliases addAliases observeVarcombineAliases returnTypeupdateParamDiet UnmatchedunifyBranchTypesboundInsideType localChecksfixOverloadedTypes sizeNamesPosverifyFunctionParams injectExtcloseOverTypeslpFiles CheckedFile cfNameSource cfWarningscfMod ReaderState lfModTimecontentsAndModTimeusableLoadedProg queryAtPos(lsp-types-2.1.0.0-29r8PqjF6VQFiJ1D2KpyK1Language.LSP.Protocol.Types.UriUri*Language.LSP.Protocol.Internal.Types.Rangepublish tryCompile transformVFS GHC.IORefIORefthrowOnProgErrorerrputSystem.Console.GetOptArgDescrNoArgReqArgOptArgOptDescrArgOrder RequireOrderPermute ReturnInOrder usageInfogetOptgetOpt'newCompilerConfigconfigExtraOptions TypeCheckCompile InternaliseCompiled Interpreted Structure excludeCasesPkgMinstallBuildListFilesColorsheaderokblueokgreenwarningfailingendc underlineSpeedUpspeedup memoryUsage significant ttyColors nonTtyColorsreadFileSafelytoDataResultsMaptoBenchResultsMapdecodeFileBenchResultsMapformatMissingProgformatMissingDataformatManyMissingProgformatManyMissingDatamissingResultscomputeMemoryUsage compareResultcompareDataResultscompareBenchResultsmemoryFormatter toMemoryText rightPadding printSpeedUpprintProgSpeedUpsprintComparisons tuningPathsepsilon DocumentedctxVisibleMTysNoLink headerDocfutharkiBreakingfutharkiSkipBreaksfutharkiLoadedBreaking breakingAtrepresentationfutharkPipelinefutharkPrintASTFutharkPipeline PrettyPrint Defunctorise FullNormalise Monomorphise LiftLambdasDefunctionalisegetFutharkPipelinereportingIOErrors