h&;ʔ2      !"#$%&'()*+,-./0123 4 5 6 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 [ \ ] ^ _`abcdefghijklmnopqrstuvwxyz{|}~ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""######################$$$$$$$$$$$$$$$$$$$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&&& & ' ' ' ' ' ' ' ' '                                                                                                                                                                                    ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ) ) ) ) ) ) ) * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , , , , , , , , , , , , , , , , , , , , , , , , , , , , , - - - - - - - - - - - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . / / / / / / / / / / / / 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 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 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 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 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3333333334444444444444444444444445555555555555555666666666666666666666666777777777777777777777777778888888888888888888888888888888888888888888888888888999::::::::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;<<<<<<<<<<<<<<<<<===>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>???????????????????????????????????????@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@AAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEFFFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHIIJJKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOPPPPPPPPPPPPPPPPPPPPPPPPPPQRSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVWXXXXXXYZZZ[[[[[[[[[[[[[[\]]]]]]]]]]]^^^^^^^^^^^^^__```````````````````````````````````````````````````aaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcddefgghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhiijjjjjkkkllllllllllllmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmnnnnooooooooopppppppqrrrssssssttttttttttttttttttttttuuuuuuuuuuuuuuuuuvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxyyyyyyyyyyyyyyyyyyzzzzzzzzzzzzzzz{{{{{{{{|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""################################################################################################################################$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))********************************************************************************************************************************++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,--------------------------------------------------------------------------------------------------------------------------------................................................................................................................................////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222 Safe-Inferred&"'*/025689:;>  Safe-Inferred&"'*/025689:;>v3futharkAST metrics are simply a collection from identifiable node names to the number of times that node appears.3434  Safe-Inferred'"'*/025689:;>7futhark&Whether an option accepts an argument.9futharkThe 2! 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.BfutharkGenerate 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. 789:;<=>?@AB ;<=>?@A789:B  Safe-Inferred&"'*/025689:;>9CDEFGCDEFG  Safe-Inferred("'*/025689:;>OHfuthark rtsc atomics.hIfuthark rtsc uniform.hJfuthark rtsccuda.hKfuthark rtsc free_list.hLfuthark rtschalf.hMfuthark rtsclock.hNfuthark rtscopencl.hOfuthark rtsc scalar_f16.hPfuthark rtscscalar.hQfuthark rtsc scheduler.hRfuthark rtscserver.hSfuthark rtsctiming.hTfuthark rtsctuning.hUfuthark rtscutil.hVfuthark rtscvalues.hWfuthark rtscerrors.hXfuthark rtsc ispc_util.hYfuthark rtsccache.hZfuthark rtsc context.h[futhark rtsccontext_prototypes.hHIJKLMNOPQRSTUVWXYZ[HZ[JKLMNOPQRSTUVWYIX  Safe-Inferred("'*/025689:;>e\futhark rts javascript server.js]futhark rts javascript values.js^futhark rts javascriptwrapperclasses.js\]^\]^ Safe-Inferred("'*/025689:;>_futhark rtspython memory.py`futhark rtspython opencl.pyafuthark rtspythonpanic.pybfuthark rtspython scalar.pycfuthark rtspython server.pydfuthark rtspython tuning.pyefuthark rtspython values.py_`abcde_`abcde Safe-Inferred&"'*/025689:;>+2futhark:The outcome of attempted to find a route through a vertex.2futhark-No sink could be reached through this vertex.2futharkA 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.2futhark?A sink was found. This is the id of the vertex connected to it.2futharkCreates a set of edges where no edge is reversed or exhausted.futharkLike  but for a single vertex.futharkInitial i* 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 i1 set recording the evaluations it has performed.futharkreduce g r vs et i returns h* if a sink can be reached via the vertex v with id i in g. Otherwise it returns g  (r x et v) where x is the 2 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 2.*fghijlkmnopqrstuvwxyz{|}~*~}wxyz{|stuvpqrmnojlkifgh Safe-Inferred&"'*/025689:;>LfutharkA 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.2futharkCheck if the manifest specifies a required package with the given package path.futhark6Remove a required package from the manifest. Returns 2 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 2 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./(/)*+,.-201/(/)*+,.-201 Safe-Inferred&"'*/025689:;>r'futhark Encoded form.futharkAs the user typed it.futharkLike nub$, but without the quadratic runtime.futharkLike nubBy$, but without the quadratic runtime.futharkLike , but monadic.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.futharkpairs l chunks the list into pairs of consecutive elements, ignoring any excess element. Example: !pairs [a,b,c,d] == [(a,b),(c,d)].futharkThe opposite of : !unpairs [(a,b),(c,d)] = [a,b,c,d].futharkLike 2%, 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 2 and 2.futharkReturn the list element at the given index, if the index is valid.futhark3Return the first element of the list, if it exists.futharkLike 2, but from the end.futharkLike 2, but produces three lists.futharkReturn the list element at the given index, if the index is valid, along with the elements before and after.futharkCompute a hash of a pretty that is stable across OS versions. Returns the hash as a pretty as well, ready for human consumption.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 2, 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]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&"'*/025689:;>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. Safe-Inferred&"'*/025689:;>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 2? type class that is more friendly to symbolic representations.futharkLike (, but rounds towards positive infinity.   Safe-Inferred&"'*/025689:;>~#2222222 2222222222"!#22$2222&%22'2 Safe-Inferred&"'*/025689:;># 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@efb4b942futharkThe 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.2futhark+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&"'*/025689:;>: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&"'*/025689:;>futharkMonads that support a stateful package registry. These are also required to be instances of 2 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.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.futhark1The directory inside the zipball containing the lib directory, in which the package files themselves are stored (Based on the package path).futharkThe commit ID can be used for verification ("freezing"), by storing what it was at the time this version was last selected.futhark8Timestamp for when the revision was made (rarely used).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.2futhark!Download URL via shelling out to curl.2futharkCreate memoisation around a  action to ensure that multiple inspections of the same revisions will not result in potentially expensive network round trips.futharkDownload the zip archive corresponding to a specific package version.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&"'*/025689:;>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.2futharkA 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.2futharkGiven 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&"'*/025689:;> 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 2, appropriately wrapped.futharkPrettyprint a value to a 2, appropriately wrapped.futhark Convert a 2 to text. Thsi ignores any annotations (i.e. it will be non-coloured output).futharkPrettyprint a value to a 2 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 2 s to another 2?, separated by a linebreak. If the list is empty, the second 21 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.futharkLike &, but a newline after every semicolon.futharkSeparate with commas.futharkSeparate with semicolons.futharkSeparate with linebreaks.futhark The document  p d encloses the document d in parenthesis if p is True, and otherwise yields just d.222222222222222222222222222222222222222222222222222222333333333333333333333323333333333333333333) Safe-Inferred("'*/025689:;>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.933 3333333333 3 333333333333333333333333333333333 Safe-Inferred&"'*/025689:;>l 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 2.futharkLike  , but with a 2. Safe-Inferred&"'*/025689:;>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&"'*/025689:;>`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&"'*/025689:;>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. 24s, being lists of characters, are very slow, while 2s are based on byte-arrays.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 2.futhark Convert a 2 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&"'*/025689:;> futharkA 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 3 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&"'*/025689:;> 3futharkBoolean negation.3futharkBitwise complement.3futharkNumerical negation.3futharkAbsolute/numerical value. #$&%3 Safe-Inferred&"'*/025689:;>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&"'*/025689:;>"futharkThe input type. Contains: current position previous charcurrent input stringbytes consumed so far    Safe-Inferred)"'*/025689:;>futharkPrelude embedded as 2 values, one for every file.! Safe-Inferred'"'*/025689:;>?ǜfuthark+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]Pfuthark/Names of opaque types and their representation.futhark%The representation of an opaque type.futharkNote that the field ordering here denote the actual representation - make sure it is preserved.futharkEvery entry point argument and return value has an annotation indicating how it maps to the original source program type.futharkAn opaque type of this name.futhark8A transparent type, which is scalar if the rank is zero.futharkAn actual non-opaque type that can be passed to and from Futhark programs, or serve as the contents of opaque types. Scalars are represented with zero rank.futharkSince the core language does not care for signedness, but the source language does, entry point input/output information has metadata for integer types (and arrays containing these) that indicate whether they are really unsigned integers. This doesn't matter for non-integer types.futharkEvery statement is associated with a set of attributes, which can have various effects throughout the compiler.futharkA single attribute.futharkA part of an error message.futharkA literal string.futharkA run-time value.futharkAn error message is a list of error parts, which are concatenated to form the final message.futharkAn element of a pattern - consisting of a name and an addditional parametric decoration. This decoration is what is expected to contain the type of the resulting variable.futharkThe name being bound.futharkPat element decoration.futharkA flat slice is a way of viewing a one-dimensional array as a multi-dimensional array, using a more compressed mechanism than reshaping and using . The initial d is an offset, and the list then specifies the shape of the resulting array.futharkA dimension in a .futhark A list of s, indicating how an array should be sliced. Whenever a function accepts a , that slice should be total, i.e, cover all dimensions of the array. Deviators should be indicated by taking a list of  es instead.futhark,How to index a single dimension of an array.futharkFix index in this dimension.futhark&DimSlice start_offset num_elems stride.futharkA function or lambda parameter.futharkAttributes of the parameter. When constructing a parameter, feel free to just pass 2.futharkName of the parameter.futharkFunction parameter decoration.futharkA subexpression is either a scalar constant or a variable. One important property is that evaluation of a subexpression is guaranteed to complete in constant time.futhark:A list of names used for certificates in some expressions.futharkAn identifier consists of its name and the type of the value bound to the identifier.futharkInformation about which parts of a value/type are consumed. For example, we might say that a function taking three arguments of types ([int], *[int], [int]) has diet [Observe, Consume, Observe].futharkConsumes this value.futharkOnly observes value in this position, does not consume. A result may alias this.futharkAs , but the result will not alias, because the parameter does not carry aliases.futharkAn > 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 3, shapes must match.futhark1Token, index space, element type, and uniqueness.futharkA fancier name for ()% - encodes no uniqueness information.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 3: 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.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.futharkd futharkThe compiler configuration. This only contains options related to core compiler functionality, such as reading the initial program and running passes. Options related to code generation are handled elsewhere.futhark Warn if True.futharkIf true, error on any warnings.futharkIf True, ignore unsafe.futharkffuthark$If a Haskell type is an instance of , it means that a value of that type can be converted to a Futhark . This is intended to cut down on boilerplate when writing compiler code - for example, you'll quickly grow tired of writing Constant (LogVal True) loc.futhark Create a   containing the given value.futhark1Utility definition for reasons of type ambiguity.futhark1Utility definition for reasons of type ambiguity.% Safe-Inferred&"'*/025689:;>y<futharkSomething with an existential context that can be (partially) fixed.futharkFix the given existentional variable to the indicated free value.futhark/Typeclass for things whose type can be changed.futhark"Typeclass for things that contain s.futhark"Typeclass for things that contain s.futhark"Typeclass for things that contain s.futhark"Typeclass for things that contain s.futhark%Remove shape information from a type.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.futhark:Return the shape of a type - for non-arrays, this is the 2.3futharkModify the shape of an array - for non-arrays, this does nothing.futharkSet the shape of an array. If the given type is not an array, return the type unchanged.futharkTrue if the given type has a dimension that is existentially sized.futhark Return the uniqueness of a type.futharkunique t is 3' if the type of the argument is unique.futharkConvert types with non-existential shapes to types with existential shapes. Only the representation is changed, so all the shapes will be .futharkAs , but on a single type.futhark arrayOf t s u 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+m6 dimensions. The uniqueness of the new array will be u, no matter the uniqueness of t. If the shape s has rank 0, then the t will be returned, although if it is an array, with the uniqueness changed to u.futharkConstruct an array whose rows are the given type, and the outer size is the given dimension. This is just a convenient wrapper around .futharkConstruct an array whose rows are the given type, and the outer size is the given -. This is just a convenient wrapper around .futharkSet the dimensions of an array. If the given type is not an array, return the type unchanged.futharkReplace the size of the outermost dimension of an array. If the given type is not an array, it is returned unchanged.futharkReplace the size of the given dimension of an array. If the given type is not an array, it is returned unchanged.futhark2Replace the outermost dimension of an array shape.futhark4Replace some outermost dimensions of an array shape.futhark2Replace the specified dimension of an array shape.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.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.futharkReturn the size of the given dimension. If the dimension does not exist, the zero constant is returned.futharkReturn the dimensions of a type - for non-arrays, this is the empty list.futharkReturn the existential dimensions of a type - for non-arrays, this is the empty list.futharkReturn the size of the given dimension. If the dimension does not exist, the zero constant is returned.futharkReturn the size of the given dimension in the first element of the given type list. If the dimension does not exist, or no types are given, the zero constant is returned.futhark0Return the immediate row-type of an array. For [[int]], this would be [int].futharkA type is a primitive type if it is not an array or memory block.futharkIs this an accumulator?futhark.Returns the bottommost type of an array. For [][]i32, this would be i325. If the given type is not an array, it is returned.futhark*Swap the two outer dimensions of the type.futharkRearrange the dimensions of the type. If the length of the permutation does not match the rank of the type, the permutation will be extended with identity.futharkTransform any s in the type.futharkTransform any s in the type.futharkdiet t< returns a description of how a function parameter of type t might consume its argument.futharkx `subtypeOf` y is true if x is a subtype of y (or equal to y ), meaning x is valid whenever y is.futharkxs `subtypesOf` ys is true if xs is the same size as ys, and each element in xs/ is a subtype of the corresponding element in ys..futhark2Add the given uniqueness information to the types.futhark,Remove uniqueness information from the type.futhark5If an existential, then return its existential index.futhark'If a known size, then return that size.futharkGiven the existential return type of a function, and the shapes of the values returned by the function, return the existential shape context. That is, those sizes that are existential in the return type.futharkThe 8 integers used for existential sizes in the given types.futharkIf all dimensions of the given 4 are statically known, change to the corresponding .futharkGiven two lists of (s of the same length, return a list of (s that is a subtype of the two operands.futharkGiven a list of s and a list of "forbidden" names, modify the dimensions of the s such that they are  where they were previously 0 with a variable in the set of forbidden names.futhark-Produce a mapping for the dimensions context.futhark  IntType Int8futhark  IntType Int16futhark  IntType Int32futhark  IntType Int64futhark FloatType Float32futhark FloatType Float64& Safe-Inferred("'*/025689:;>futharkA type representing the return type of a function. In practice, a list of these will be used. It should contain at least the information contained in an 5, but may have more, notably an existential context.futhark-Contruct a return type from a primitive type.futharkGiven a function return type, the parameters of the function, and the arguments for a concrete call, return the instantiated return type for the concrete call, if valid.futharkA type representing the return type of a body. It should contain at least the information contained in a list of 6s, but may have more, notably an existential context.futhark,Construct a body type from a primitive type.futharkGiven shape parameter names and types, produce the types of arguments accepted.' Safe-Inferred("'*/025689:;> futharkA collection of type families giving various common types for a representation, along with constraints specifying that the types they map to should satisfy some minimal requirements. futhark)Decoration for every let-pattern element. futhark Decoration for every expression. futharkDecoration for every body. futhark5Decoration for every (non-lambda) function parameter. futhark/Decoration for every lambda function parameter. futhark-The return type decoration of function calls. futhark'The return type decoration of branches. futharkExtensible operation.  Safe-Inferred*"'*/025689:;> futharkAn entire Futhark program. futharkThe opaque types used in entry points. This information is used to generate extra API functions for construction and deconstruction of values of these types. futharkTop-level constants that are computed at program startup, and which are in scope inside all functions. futharkThe functions comprising the program. All functions are also available in scope in the definitions of the constants, so be careful not to introduce circular dependencies (not currently checked). futharkInformation about the inputs and outputs (return value) of an entry point. futharkAn entry point result type. futharkAn entry point parameter, comprising its name and original type. futharkFunction Declarations futhark5Contains a value if this function is an entry point. futharkA lambda parameter. futharkA function and loop parameter. futhark%Anonymous function for use in a SOAC. futharkWhat kind of branch is this? This has no semantic meaning, but provides hints to simplifications. futharkAn ordinary branch. futharkA branch where the "true" case is what we are actually interested in, and the "false" case is only present as a fallback for when the true case cannot be safely evaluated. The compiler is permitted to optimise away the branch if the true case contains only safe statements. futharkBoth of these branches are semantically equivalent, and it is fine to eliminate one if it turns out to have problems (e.g. contain things we cannot generate code for). futharkData associated with a branch. futharkFor-loop or while-loop? futhark'The root Futhark expression type. The   constructor contains a rep-specific operation. Do-loops, branches and function calls are special. Everything else is a simple  . futhark#A simple (non-recursive) operation. futharkA match statement picks a branch by comparing the given subexpressions (called the  scrutinee) with the pattern in each of the cases. If none of the cases match, the /default body/ is picked. futhark'loop {a} = {v} (for i < n|while b) do b. futharkCreate accumulators backed by the given arrays (which are consumed) and pass them to the lambda, which must return the updated accumulators and possibly some extra values. The accumulators are turned back into arrays. The  is the write index space. The corresponding arrays must all have this shape outermost. This construct is not part of   because we need the rep parameter. futharkA non-default case in a   statement. The number of elements in the pattern must match the number of scrutinees. A 2 value indicates that we don't care about it (i.e. a wildcard). futharkThe input to a   construct. Comprises the index space of the accumulator, the underlying arrays, and possibly a combining function. futharkA primitive operation that returns something of known size and does not itself contain any bindings. futharkA variable or constant. futharkSemantically and operationally just identity, but is invisible/impenetrable to optimisations (hopefully). This partially a hack to avoid optimisation (so, to work around compiler limitations), but is also used to implement tracing and other operations that are semantically invisible, but have some sort of effect (brrr). futharkArray literals, e.g., [ [1+x, 3], [2, 1+4] ];. Second arg is the element type of the rows of the array. futharkUnary operation. futharkBinary operation. futhark+Comparison - result type is always boolean. futharkConversion "casting". futharkTurn a boolean into a certificate, halting the program with the given error message if the boolean is false. futhark5The certificates for bounds-checking are part of the  . futharkAn in-place update of the given array at the given position. Consumes the array. If , perform a run-time bounds check and ignore the write if out of bounds (like Scatter). futhark =concat(0, [1] :| [[2, 3, 4], [5, 6]], 6) = [1, 2, 3, 4, 5, 6]#Concatenates the non-empty list of " resulting in an array of length . The 3 argument is used to specify the dimension along which the arrays are concatenated. For instance: concat(1, [[1,2], [3, 4]] :| [[[5,6]], [[7, 8]]], 4) = [[1, 2, 5, 6], [3, 4, 7, 8]] futhark:Copy the given array. The result will not alias anything. futharkManifest an array with dimensions represented in the given order. The result will not alias anything. futhark$iota(n, x, s) = [x,x+s,..,x+(n-1)*s].The  indicates the type of the array returned and the offset/stride arguments, but not the length argument. futhark +replicate([3][2],1) = [[1,1], [1,1], [1,1]] futhark>Create 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. futharkRotate the dimensions of the input array. The list of subexpressions specify how much each dimension is rotated. The length of this list must be equal to the rank of the array. futharkUpdate an accumulator at the given index with the given value. Consumes the accumulator and produces a new one. futharkWhich kind of reshape is this? futharkAny kind of reshaping. futhark*New shape is dynamically same as original. 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 number of bindings, terminating in a result (essentially a tuple literal). 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'"'*/025689:;>V 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 2 for the name template.3futharkProduce 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&"'*/025689:;> 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'"'*/025689:;>Y futharkThe class of representations whose annotations can be prettyprinted.  + Safe-Inferred*"'*/025689:;> 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 3 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 3 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 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.  , Safe-Inferred&"'*/025689:;>) 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 3 monad. futharkA no-op traversal. futharkAs  $, but do not construct a result AST. futharkA helper for defining  .  - Safe-Inferred("'*/025689:;>t 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. . Safe-Inferred'"'*/025689:;> 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 30 instance is a dummy that treats everything as 3 if 3, and otherwise 3. 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. futharkM futharkAny operation must define an instance of this class, which describes the type of the operation (at the value level). futharkThe type of a subexpression. futharkType type of a   - not that this might refer to names bound in the body containing the result. futharkmapType f arrts* wraps each element in the return type of f in an array with size equal to the outermost dimension of the first element of arrts. futhark"The type of a primitive operation. futharkThe type of an expression. futhark/The number of values returned by an expression.3futhark8Given the parameters of a loop, produce the return type.&  0 Safe-Inferred&"'*/025689:;> futharkThe class of floating-point types that can be used for constructing  s. futhark-Construct a typed expression from a rational. futhark=The type of an expression, known to be a floating-point type. futhark>The 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 3, 4, and 4< instances perform automatic (but simple) constant folding.Note also that the 4 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 4. futharkThis expression is of type 4. futhark True if the   has at least this many nodes. This can be much more efficient than comparing with 4 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 4 on type errors. futhark!The type of values returned by a  4. This function returning does not imply that the   is type-correct.4futhark/Is the expression a constant zero of some sort?4futhark.Is the expression a constant one of some sort?4futhark3Is 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 4 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. 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. futharkSubtraction of untyped  !s, which must have the same type. futharkEquality of untyped  !s, which must have the same type.  3 2 4 4 4 4 4 7 7 6 6 41 Safe-Inferred'"'*/025689:;> 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.  2 Safe-Inferred'"'*/025689:;> 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).4futharkProduce 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.  3 Safe-Inferred("'*/025689:;> futharkRepresentation-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? futharkA handy shorthand for properties that we usually want to things we stuff into ASTs. futharkisBuiltInFunction k is 3 if k is an element of  . futhark0A map of all built-in functions and their types. futharkIf the expression is a  , return it, otherwise 2. 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.futhark0futharkThe 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".futhark3The op that results when we add aliases to this op.futharkRemove aliases from this op.futharkAdd aliases to this op.futharkPre-existing aliases for variables. Used to add transitive aliases.futharkThe class of operations that can produce aliasing and consumption information.futhark*Something that contains alias information.futhark"The alias of the argument element.futhark?The class of representations that contain aliasing information.futhark The aliases of the body results.futhark#The variables consumed in the body.futharkThe aliases of a subexpression.futharkThe aliases of an expression, one per non-context value returned.futhark)The variables consumed in this statement.futhark*The variables consumed in this expression.futhark&The variables consumed by this lambda.futhark  #$&% 5 Safe-Inferred("'*/025689:;> futharkA compiler pass transforming a   of a given rep to a   of another rep.futharkName of the pass. Keep this short and simple. It will be used to automatically generate a command-line option name via .futharkA slightly longer description, which will show up in the command-line help pretty.futhark"The monad in which passes execute.futhark Execute a  action, yielding logging information and either an error pretty or a result.futharkTake the name of the pass, turn spaces into dashes, and make all characters lowercase.futharkApply a  operation in parallel to multiple elements, joining together the name sources and logs, and propagating any error properly.futharkApply some operation to the top-level constants. Then applies an operation to all the function definitions, which are also given the transformed constants so they can be brought into scope. The function definition transformations are run in parallel (with '), since they cannot affect each other.futharkLike , but do not change the top-level constants, and simply pass along their  .  6 Safe-Inferred("'*/025689:;>@futharkA monad that supports the creation of bindings from expressions and bodies from bindings, with a specific rep. This is the main typeclass that a monad must implement in order for it to be useful for generating or modifying Futhark code. Most importantly maintains a current state of   (as well as a  ) that have been added with .Very important: the methods should not have any significant side effects! They may be called more often than you think, and the results thrown away. It is acceptable for them to create new bindings, however.futharkAdd a statement to the   under construction.futharkAdd multiple statements to the   under construction.futharkObtain the statements constructed during a monadic action, instead of adding them to the state.futharkAdd the provided certificates to any statements added during execution of the action.futharkThe class of representations that can be constructed solely from an expression, within some monad. Very important: the methods should not have any significant side effects! They may be called more often than you think, and the results thrown away. If used exclusively within a  instance, it is acceptable for them to create new bindings, however.4futhark8Apply a function to the statements added by this action.futharkAdd the given attributes to any statements added by this action.futharkAdd the certificates and attributes to any statements added by this action.futhark6Add a statement with the given pattern and expression.futhark Construct a   from identifiers for the context- and value part of the pattern, as well as the expression.futharkLike mkLet, but also take attributes and certificates from the given  .futharkAdd a statement with the given pattern element names and expression.futharkAs %, but throw away the ordinary result.futhark) futhark$The most commonly used binder monad.futhark;A monad transformer that tracks statements and provides a  instance, assuming that the underlying monad provides a name source. In almost all cases, this is what you will use for constructing statements (possibly as part of a larger monad stack). If you find yourself needing to implement  from scratch, then it is likely that you are making a mistake.futharkA  (and by extension, a ) is only an instance of  for representations that implement this type class, which contains methods for constructing statements.futharkRun a binder action given an initial scope, returning a value and the statements added () during the action.futharkLike !, but return only the statements.futharkLike 4, but get the initial scope from the current monad.futharkLike 4, but get the initial scope from the current monad.futharkRun a binder action, returning a value and the statements added () during the action. Assumes that the current monad provides initial scope and name source.futharkLike , but throw away the result and just return the added statements.futharkRun a binder that produces a  , and prefix that  < by the statements produced during execution of the action.futharkGiven lambda parameters, Run a builder action that produces the statements and returns the   of the lambda body.4 8 Safe-Inferred("'*/025689:;>2h1futharkInstances of this class can be converted to Futhark expressions within a .futharkletSubExp desc e binds the expression e1, which must produce a single value. Returns a  corresponding to the resulting value. For expressions that produce multiple values, see .futharkLike #, but returns a name rather than a .futharkLike  , but the  and  denote an array that is  d with the result of the expression. The name of the updated array is returned.futharkLike 0, but the expression may return multiple values.futharkLike , but returns  s instead of s.futharkTurn a subexpression into a monad expression. Does not actually lead to any code generation. This is supposed to be used alongside the other monadic expression functions, such as .futhark*Treat a parameter as a monadic expression.futharkAs  , but an   can be given.futhark Construct a   expression. The main convenience here is that the existential context of the return type is automatically deduced, and the necessary elements added to the branches.futhark Construct a   modelling an if-expression from a monadic condition and monadic branches. 4 might be convenient for constructing the branches.futharkAs  , but an   can be given.futhark Construct a  $ expression with the given operator.futhark Construct a  $ expression with the given operator.futhark Construct a  & expression with the given comparison.futhark Construct a  & expression with the given conversion.futhark Construct a  expression. Fails if the provided expression is not of integer type.futhark Construct a   expression.futharkConstruct a body from expressions. If multiple expressions are provided, their results will be concatenated in order and returned as the result.Beware: this will not produce correct code if the type of the body would be existential. That is, the type of the results being returned should be invariant to the body.futharkBind each lambda parameter to the result of an expression, then bind the body of the lambda. The expressions must produce only a single value each.futharkeInBoundsForDim w i produces  0 <= i < w.futhark.Are these indexes out-of-bounds for the array?futhark The array element at this index.futhark$The last element of the given array.futhark1Construct an unspecified value of the given type.futhark&Sign-extend to the given integer type.futhark&Zero-extend to the given integer type.futharkApply a binary operator to several subexpressions. A left-fold.futharkTrue if all operands are true.futharkTrue if any operand is true.futharkCreate a two-parameter lambda whose body applies the given binary operation to its arguments. It is assumed that both argument and result types are the same. (This assumption should be fixed at some point.)futharkAs  , but for s.futharkEasily construct a   within a  . See also .futhark)Slice a full dimension of the given size.futharkfullSlice t slice returns slice , but with ?s of entire dimensions appended to the full dimensionality of t. This function is used to turn incomplete indexing complete, as required by  .futhark sliceAt t n slice returns slice but with s of the outer n dimensions prepended, and as many appended as to make it a full slice. This is a generalisation of .futharkLike (, but the dimensions are simply numeric.futharkDoes the slice describe the full size of the array? The most obvious such slice is one that s the full span of every dimension, but also one that fixes all unit dimensions.futhark8Conveniently construct a body that contains no bindings.futharkConveniently construct a body that contains no bindings - but this time, monadically!futharkEvaluate the action, producing a body, then wrap it in all the bindings it created using .futhark#Evaluate an action that produces a   and an auxiliary value, then return the body constructed from the   and any statements added during the action, along the auxiliary value.futharkAs ", but there is no auxiliary value.futharkChange that result where evaluation of the body would stop. Also change type annotations at branches.futharkInstantiate all existential parts dimensions of the given type, using a monadic action to create the necessary s. You should call this function within some monad that allows you to collect the actions performed (say, 4).futharkLike 4, but obtains names from the provided list. If an 9 is out of bounds of this list, the function fails with 3.futharkRemove existentials by imposing sizes from another type where needed.futhark!Can be used as the definition of  for a & instance for simple representations.futharkA convenient composition of  and . 29 Safe-Inferred("'*/025689:;>4futharkA mapping from variable names to the indexing operation they should be replaced with.futhark!Essentially the components of an   expression.futharkPerform the substitution.: Safe-Inferred("'*/025689:;>? futharkA collection of functions that together allow us to rephrase some IR fragment, in some monad m . If we let m be the 4 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.4futharkRephrase a parameter.futharkRephrase a body.futharkRephrase a lambda.< Safe-Inferred&"'*/025689:;>BfutharkThis 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. 34 34= Safe-Inferred&"'*/025689:;>F,futharkA 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.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.> Safe-Inferred&"'*/025689:;>I futhark#Phantom type for number of threads.futhark/Phantom type for the group size of some kernel.futhark5Phantom type for the number of groups 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.futharkLikely not useful on its own, but querying the maximum can be handy.futharkA bespoke size with a default.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 2(, that means the backend gets to decide.? Safe-Inferred)"'*/025689:;>RpfutharkA 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 3) 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. This is basically just looking up the aliasing of each element of the result, and removing the names that are no longer in scope. 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.  #$&% @ Safe-Inferred)"'*/025689:;>^_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.4futhark$Simplifier information about a body.futhark+Simplifier information about an expression.4futhark%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.4futhark Construct a  statement.futhark Construct  statements.futhark Construct a  body.futhark Construct a  lambda.4futhark Construct a  expression.futhark Construct a  function definition.A Safe-Inferred("'*/025689:;>`_futhark,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 expression.futhark!Perform alias analysis on lambda.B Safe-Inferred+"'*/025689:;<>jfuthark6The 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.4futharkThe 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.4futharkThe 4 data structure is used to keep track of which variables have been consumed, as well as whether a violation has been detected.4futharkA tuple of a return type and a list of parameters, possibly named.futhark A type error.futhark6Information about an error during type checking. The 4? 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 .4futharkMark a name as bound. If the name has been bound previously in the program, report a type error.4futharkProclaim 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.4futharkPermit 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.4futharkGiven the immediate aliases, compute the full transitive alias set (including the immediate aliases).4futharkcheckAnnotation 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.4futharkRemove all aliases from the 4.==C Safe-Inferred&"'*/025689:;>n futharkA compiler pipeline is conceptually a function from programs to programs, where the actual representation may change. Pipelines can be composed using their 4 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 2.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.$D Safe-Inferred&"'*/025689:;>qfuthark8A 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.E Safe-Inferred&"'*/025689:;>wfutharkConvert 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.  F Safe-Inferred&"'*/025689:;>{b4futharkA 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.4futharkIf we are copying 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.G Safe-Inferred&"'*/025689:;>(futharkAn index function is a mapping from a multidimensional array index space (the domain) to a one-dimensional memory index space. Essentially, it explains where the element at position [i,j,p] of some array is stored inside the flat one-dimensional array that constitutes its memory. For example, we can use this to distinguish row-major and column-major representations.2An index function is represented as a sequence of s.futhark8ignoring permutations, is the index function contiguous?futharkLMAD's representation consists of a general offset and for each dimension a stride, number of elements (or shape), permutation, and monotonicity. 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 IxFun 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 denotes the set of points (simplified):!{ o + Sigma_{j=0}^{k} ((i_j+r_j) : n_j)*s_j, forall i_j such that 0<=i_jfinally, the underlying memory is contiguous (and monotonous).If any of these conditions do not hold, then the reshape operation will conservatively add a new LMAD to the list, leading to a representation that provides less opportunities for further analysis.futharkReshape an index function.futharkCoerce an index function to look like it has a new shape. Dynamically the shape must be the same.futhark=The number of dimensions in the domain of the input function.4futharkHandle the case where a rebase operation can stay within m + n - 1 LMADs, where m is the number of LMADs in the index function, and n is the number of LMADs in the new base. If both index function have only on LMAD, this means that we stay within the single-LMAD domain.We can often stay in that domain if the original ixfun is essentially a slice, e.g. `x[i, (k1,m,s1), (k2,n,s2)] = orig`.,XXX: TODO: handle repetitions in both lmads.2How to handle repeated dimensions in the original?(a) Shave them off of the last lmad of original (b) Compose the result from (a) with the first lmad of the new base (c) apply a repeat operation on the result of (b).However, I strongly suspect that for in-place update what we need is actually the INVERSE of the rebase function, i.e., given an index function new-base and another one orig, compute the index function ixfun0 such that:new-base == rebase ixfun0 ixfun, or equivalently: new-base == ixfun o ixfun0because then I can go bottom up and compose with ixfun0 all the index functions corresponding to the memory block associated with ixfun.futhark.Rebase an index function on top of a new base.futharkIf the memory support of the index function is contiguous and row-major (i.e., no transpositions, repetitions, rotates, etc.), then this should return the offset from which the memory-support of this index function starts.futharkSimilar restrictions to linearWithOffset except for transpositions, which are returned together with the offset.futhark2Is this a row-major array starting at offset zero?4futhark8Generalised iota with user-specified offset and rotates.4futhark(Check monotonicity of an index function.futhark/Turn all the leaves of the index function into s.futharkWhen comparing index functions as part of the type check in KernelsMem, we may run into problems caused by the simplifier. As index functions can be generalized over if-then-else expressions, the simplifier might hoist some of the code from inside the if-then-else (computing the offset of an array, for instance), but now the type checker cannot verify that the generalized index function is valid, because some of the existentials are computed somewhere else. To Work around this, we've had to relax the KernelsMem type-checker a bit, specifically, we've introduced this function to verify whether two index functions are "close enough" that we can assume that they match. We use this instead of `ixfun1 == ixfun2` and hope that it's good enough.futharkReturns true if two s are equivalent.Equivalence in this case is defined as having the same number of LMADs, with each pair of LMADs matching in permutation, offsets, strides and rotations.4futharkDynamically 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.4futharkOffsetfutharkShape))H Safe-Inferred("'*/025689:;>6futhark"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.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 3 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.futharkfutharkSet all uses of 3 in the given definitions to another memory space.futharkLike  , but for .J Safe-Inferred&"'*/025689:;>futharkTake well-typed arguments to the transpose function and produce the actual argument list.futharkWe need to know the name of the function we are generating, as this function is recursive.K Safe-Inferred&"'*/025689:;>futhark8Phantom type for identifying sequential imperative code.futharkAn imperative program. #$&% L Safe-Inferred&"'*/025689:;>futhark8The target platform when compiling imperative code to a futharkHost-level OpenCL operation.futharkInformation about bounds checks and how sensitive it is to errors. Ordered by least demanding to most.futharkDoes not need to know if we are in a failing state, and also cannot fail.futharkNeeds to be told if there's a global failure, and that's it, and cannot fail.futhark&Needs all parameters, may fail itself.4futharkWhether a kernel can potentially fail (because it contains bounds checks and such).futhark%An argument to be passed to a kernel.futhark5Pass the value of this scalar expression as argument.futharkPass this pointer as argument.futhark,Create this much local memory per workgroup.futharkThe name of a kernel.futharkA piece of code calling OpenCL.futharkSomething that can go wrong in a kernel. Part of the machinery for reporting error messages from within kernels.futhark"An program calling OpenCL kernels.futhark!Must be prepended to the program.futhark/So we can detect whether the device is capable.futharkRuntime-configurable constants.futhark!Assertion failure error messages.futharkHow many leading failure arguments we must pass when launching a kernel with these safety characteristics. #$&%  M Safe-Inferred&"'*/025689:;>ffutharkWhether + should look inside nested kernels or not.futharkWhether the Scheduler should schedule the tasks as Dynamic or it is restainted to Staticfuthark A task for a .futharkInformation about parallel work that is do be done. This is passed to the scheduler to help it make scheduling decisions.futhark*The number of total iterations for a task.futhark!The type scheduling for the task.futharkAtomic operations return the value stored before the update. This old value is stored in the first . The second & is the memory block to update. The  is the new value.futharkMulticore code.futharkA multicore operation.futhark6A kernel of ISPC code, or a scoped block in regular C.futhark3A foreach loop in ISPC, or a regular for loop in C.futhark:A foreach_active loop in ISPC, or a single execution in C.futharkExtract a value from a given lane and assign it to a variable. This is just a regular assignment in C.futharkRetrieve inclusive start and exclusive end indexes of the chunk we are supposed to be executing. Only valid immediately inside a  construct!futharkRetrieve the task ID that is currently executing. Only valid immediately inside a  construct!futharkRetrieve the number of subtasks to execute. Only valid immediately inside a  or  construct!futhark An imperative multicore program.futharkLike lexicalMemoryUsage), but traverses some inner multicore ops. #$&% "N Safe-Inferred&"'*/025689:;>futharkAtomic operations return the value stored before the update. This old value is stored in the first . The second & is the memory block to update. The  is the new value.futhark.An operation that occurs within a kernel body.futharkPerform a barrier and also check whether any threads have failed an assertion. Make sure all threads would reach all s if any of them do. A failing assertion will jump to the next following 8, so make sure it's not inside control flow or similar.futharkWhen we do a barrier or fence, is it at the local or global level? By the 3( instance, global is greater than local.futharkInformation about a host-level variable that is used inside this kernel. When generating the actual kernel code, this is used to deduce which parameters are needed.futhark2A generic kernel containing arbitrary kernel code.futhark,The host variables referenced by the kernel.futharkA short descriptive and _unique_ name - should be alphanumeric and without spaces.futharkIf true, this kernel does not need to check whether we are in a failing state, as it can cope. Intuitively, it means that the kernel does not depend on any non-scalar parameters to make control flow decisions. Replication, transpose, and copy kernels are examples of this.futharkIf true, multi-versioning branches will consider this kernel when considering the local memory requirements. Set this to false for kernels that do their own checking.futhark)An operation that runs on the host (CPU).futhark3An expression whose variables are kernel constants.futhark'A run-time constant related to kernels.futharkCode inside a kernel.futhark&Host-level code that can call kernels.futharkA program that calls kernels. #$&% 1O Safe-Inferred&"'*/025689:;>futharkThe types of the arguments accepted by a transposition function.futhark1Which form of transposition to generate code for.futhark6For small arrays that do not benefit from coalescing.futharkGenerate a transpose kernel. There is special support to handle input arrays with low width, low height, or both.Normally when transposing a [2][n] array we would use a FUT_BLOCK_DIM x FUT_BLOCK_DIM group to process a [2][FUT_BLOCK_DIM] slice of the input array. This would mean that many of the threads in a group would be inactive. We try to remedy this by using a special kernel that will process a larger part of the input, by using more complex indexing. In our example, we could use all threads in a group if we are processing (2/FUT_BLOCK_DIM)8 as large a slice of each rows per group. The variable mulx contains this factor for the kernel to handle input arrays with low height.*See issue #308 on GitHub for more details.These kernels are optimized to ensure all global reads and writes are coalesced, and to avoid bank conflicts in shared memory. Each thread group transposes a 2D tile of block_dim*2 by block_dim*2 elements. The size of a thread group is block_dim/2 by block_dim*2, meaning that each thread will process 4 elements in a 2D tile. The shared memory array containing the 2D tile consists of block_dim*2 by block_dim*2+1 elements. Padding each row with an additional element prevents bank conflicts from occuring when the tile is accessed column-wise.P Safe-Inferred'"'*/025689:;>3futhark2The C type corresponding to a signed integer type.4futhark5The C type corresponding to an unsigned integer type.futharkThe C type corresponding to a primitive type. Integers are assumed to be unsigned.futhark5The C storage type for arrays of this primitive type.futharkThe C API corresponding to a primitive type. Integers are assumed to have the specified sign.futharkConvert from scalar to storage representation for the given type.futharkConvert from storage to scalar representation for the given type.futhark tupleField i is the name of field number i in a tuple.futhark funName f is the name of the C function corresponding to the Futhark function f.futhark6The type of memory blocks in the default memory space.futhark'The name of exposed array type structs.futhark!The name of exposed opaque types.futharkThe  (and sign) correspond to a human-readable scalar type name (e.g. f64). Beware: partial!futharkReturn an expression multiplying together the given expressions. If an empty list is given, the expression 1 is returned.futharkReturn an expression summing the given expressions. If an empty list is given, the expression 0 is returned.futhark%Implementations of scalar operations.futharkstorageSize pt rank shape produces an expression giving size taken when storing this value in the binary value format. It is assumed that the shape is an array with rank dimensions.futharkProduce code for storing the header (everything besides the actual payload) for a value of this type.futharkProduce code for loading the header (everything besides the actual payload) for a value of this type.Q Safe-Inferred'"'*/025689:;>futhark(Generate Futhark server executable code.R Safe-Inferred'"'*/025689:;>4futhark5Return a statement printing the given external value.futhark,Generate Futhark standalone executable code.S Safe-Inferred&"'*/025689:;> futharkThe class generated by the code generator must have a constructor, although it can be vacuous.futhark0Unpack the array being passed to an entry point.futhark>Construct the Python array being returned from an entry point.futhark;Create a static array of values - initialised at load time.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.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 ctypes type corresponding to a , taking sign into account.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.77T Safe-Inferred'"'*/025689:;>futhark*Python code (as a string) that calls the initiatialize_opencl_object5 procedure. Should be put in the class constructor.U Safe-Inferred'"'*/025689:;>ufutharkMapping 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).futhark4futharkFigure out which of the members of an opaque type corresponds to which fields.W Safe-Inferred'"'*/025689:;>~X Safe-Inferred'"'*/025689:;>FfutharkTell me how to compile a v, and I'll Compile any  PrimExp v for you.Y Safe-Inferred'"'*/025689:;>Z Safe-Inferred'"'*/025689:;>4futhark:Has a potential failure occurred sine the last ErrorSync?futhark#Generate CUDA host and device code.futhark%Generate OpenCL host and device code.4futhark1Translate a kernels-program to an OpenCL-program.4futharkDue to simplifications after kernel extraction, some threshold parameters may contain KernelPaths that reference threshold parameters that no longer exist. We remove these here.[ Safe-Inferred'"'*/025689:;> futharkThe result of compilation to C is multiple parts, which can be put together in various ways. The obvious way is to concatenate all of them, which yields a CLI program. Another is to compile the library part by itself, and use the header file to call into it.futharkUtility definitions that must be visible to both CLI and library parts.futharkThe manifest, in JSON format.futharkA set of operations that fail for every operation involving non-default memory spaces. Uses plain pointers and malloc for memory management.futhark3Produce header, implementation, and manifest files.futhark*As executable with command-line interface.futharkAs server executable.futharkCompile imperative program to a C program. Always uses the function named "main" as entry point, so make sure it is defined.\ Safe-Inferred'"'*/025689:;> futhark#Generate the necessary boilerplate.] Safe-Inferred'"'*/025689:;> futharkJavascript code that can be appended to the generated module to run a Futhark server instance on startup.futhark+The names exported by the generated module.^ Safe-Inferred'"'*/025689:;>futharkCalled after most code has been generated to generate the bulk of the boilerplate.  _ Safe-Inferred'"'*/025689:;>futhark;Block items to put before and after a thing to be profiled.futharkCalled after most code has been generated to generate the bulk of the boilerplate.  ` Safe-Inferred("'*/025689:;>4futhark#Index a delayed array, if possible.4futharkIf a loop parameter, the initial value and the eventual result. The result need not be in scope in the symbol table.4futhark#Index a delayed array, if possible.4futharkTrue if consumed.futharkTrue if this name has been used as an array size, implying that it is non-negative.futharkFor names that are tokens of an accumulator, this is the corresponding combining function and neutral element.4futhark%Indexing a delayed array if possible.futhark'The result of indexing a delayed array.futharkA PrimExp based on the indexes (that is, without accessing any actual array).futharkThe indexing corresponds to another (perhaps more advantageous) array.futhark?Which names are available just before the most enclosing loop?futhark/We are in a situation where we should simplifyhoistun-existentialise memory as much as possible - typically, inside a kernel.futharkYou almost always want  instead of this one.futhark,If the given variable name is the name of a  0 parameter, then return the bound of that loop.futharkLook up the initial value and eventual result of a loop parameter. Note that the result almost certainly refers to something that is not part of the symbol table.futharkDo these two names alias each other? This is expected to be a commutative relationship, so the order of arguments does not matter.futhark!In symbol table and not consumed.futharkInsert entries corresponding to the parameters of a loop (not distinguishing contect and value part). Apart from the parameter itself, we also insert the initial value and the subexpression providing the final value. Note that the latter is likely not in scope in the symbol at this point. This is OK, and can still be used to help some loop optimisations detect invariant loop parameters.4futhark>Hide 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...a Safe-Inferred&"'*/025689:;>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.b Safe-Inferred)"'*/025689:;>"efuthark2A collection of both top-down and bottom-up rules.4futhark A collection of bottom-up rules.4futharkA 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.4futharkA 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.4futhark 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.""c Safe-Inferred("'*/025689:;>$4futharkMove 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.4futharkRemove 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.d Safe-Inferred&"'*/025689:;>&futhark+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.4futhark Lambda-bounde Safe-Inferred&"'*/025689:;>'.futhark#Standard loop simplification rules.f Safe-Inferred("'*/025689:;>(futhark"A set of simplification rules for  s. Includes rules from &Futhark.Optimise.Simplify.Rules.Simple.g Safe-Inferred("'*/025689:;>)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.h Safe-Inferred+"'*/025689:;>0futharkMake a hoisted Op safe. The SubExp is a boolean that is true when the value of the statement will actually be used.4futharkA 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.4futharkMark 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.4futharkWe are willing to hoist potentially unsafe statements out of loops, but they must be protected by adding a branch on top of them.4futharkWe 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.)4futharkStatements that are not worth hoisting out of loops, because they are unsafe, and added safety (by 4$) may inhibit further optimisation.futharkSimplify a single body.4futharkSimplify a single body.4futharkSimplify a single  .futharkBlock hoisting of  $ statements introduced by migration.futharkStatement is a scalar read from a single element array of rank one.4futhark Scrutinee.futharkPattern of previosu cases.futharkPattern of this case.5i Safe-Inferred&"'*/025689:;>3futhark 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.j Safe-Inferred("'*/025689:;>5futharkSimplify 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.k Safe-Inferred&"'*/025689:;>7)futhark*Run copy propagation on an entire program.futhark(Run copy propagation on some statements.futhark#Run copy propagation on a function.l Safe-Inferred("'*/025689:;>8futhark,The phantom type for the Seq representation.futharkSimplify a sequential program.  #$&% m Safe-Inferred)"'*/025689:;>U)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).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 outputsScatter 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. outputs specifies the result of the  lambda and which arrays to write to. Each element of the list consists of a  VName* specifying which array to scatter to, a  Shape, describing the shape of that array, and an  Int describing how many elements should be written to that array for each invocation of the  lambda. lambda& is a function that takes inputs from  inputs> and returns values according to the output-specification in  outputs-. It returns values in the following manner: >index_0, index_1, ..., index_n, value_0, value_1, ..., value_mFor each output in  outputs,  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.6For example, given the following output 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.futhark1How many reduction results are produced by these s?futhark5Combine multiple scan operators to a single operator.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?futharkReturn the "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 groupScatterResults  output specification results-Groups the index values and result values of  results according to the  output specification.This function is used for extracting and grouping the results of a scatter. In the SOAC 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 groupScatterResults'  output specification results-Groups the index values and result values of  results according to the output specification. This is the simpler version of groupScatterResults, which doesn't return any information about shapes or output arrays.See  for more information,futhark splitScatterResults  output specification resultsSplits the results array into indices and values according to the output specification.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.==n Safe-Inferred("'*/025689:;>ZVfutharkTurns 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.  o Safe-Inferred("'*/025689:;>]futhark%The rep for the basic representation.  #$&% p Safe-Inferred("'*/025689:;>ffutharkThe 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.q Safe-Inferred("'*/025689:;>gFfuthark$The first-order transformation pass.r Safe-Inferred("'*/025689:;>hfuthark1Interchange 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("'*/025689:;>kfutharkA 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!4futharkExecute the given action if / is true, otherwise just return an empty list.4futharkExecute the given action if / is true, otherwise just return an empty list.   s Safe-Inferred&"'*/025689:;>pfutharkReshape 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.t Safe-Inferred("'*/025689:;>s{4futharkNever 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.4futharkLike  , but for .futhark0Remove inputs that are not used inside the SOAC.4futharkSome 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.4futharkIf we are writing to an array that is never used, get rid of it.u Safe-Inferred&"'*/025689:;>w 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.4futharkA 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.4futharkbuildCallGraph ftable fg fname updates fg% with the contributions of function fname.v Safe-Inferred("'*/025689:;>,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.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.futhark{ 4futhark$A classification of a free variable.4futhark0Used as array input to a SOAC (meaning fusible).4futharkUsed in some other way.4futharkA mapping from variable name to the graph node that produces it.4futharkFor each node, what producer should the node depend on and what type is it.futharkA "graph augmentation" is a monadic action that modifies the graph.futharkA dependency graph. Edges go from *consumers* to *producers* (i.e. from usage to definition). That means the incoming edges of a node are the dependents of that node, and the outgoing edges are the dependencies of that node.futhark8A table mapping VNames to VNames that are aliased to it.futharkA tuple with four parts: inbound links to the node, the node itself, the  "label", and outbound links from the node. This type is used to modify the graph in .futhark A pair of a 4 and the node label.futhark0Information associated with a node in the graph.futharkNode corresponding to a result of the entire computation (i.e. the   of a body). Any node that is not transitively reachable from one of these can be considered dead.futharkNode corresponding to a free variable. Unclear whether we actually need these.futhark1Information associated with an edge in the graph.futhark#The name that this edge depends on.futharkDoes the node acutally represent something in the program? A "non-real" node represents things like fake nodes inserted to express ordering due to consumption.futharkPrettyprint dependency graph.futhark.Apply several graph augmentations in sequence.4futhark8Creates deps for the given nodes on the graph using the 4.futhark+Monadically modify every node of the graph.futharkGet the underlying fgl node.futhark/Get the variable name that this edge refers to.futhark,Find all the edges connecting the two nodes.futharkreachable dg from to is true if to is reachable from from.4futhark0Construct a graph with only nodes, but no edges.futhark+Make a dependency graph corresponding to a  .futhark4Make a dependency graph corresponding to a function.futharkMerges two contexts.futhark&Remove the given node, and insert the  into the graph, replacing any existing information about the node contained in the .futhark!Is there a possibility of fusion?futharkIs this an infusible edge?futhark Is this a  edge?''x Safe-Inferred&"'*/025689:;>/futhark!fuseMaps lam1 inp1 out1 lam2 inp2 fuses the function lam1 into lam26. Both functions must be mapping functions, although lam2* may have leading reduction parameters. inp1 and inp2/ are the array inputs to the SOACs containing lam1 and lam2 respectively. out1 are the identifiers to which the output of the SOAC containing lam1 is bound. It is nonsensical to call this function unless the intersection of out1 and inp2 is non-empty.If lam25 accepts more parameters than there are elements in inp2, it is assumed that the surplus (which are positioned at the beginning of the parameter list) are reduction (accumulator) parameters, that do not correspond to array elements, and they are thus not modified.The result is the fused function, and a list of the array inputs expected by the SOAC containing the fused function.futhark5The producer var names that still need to be returnedfutharkFunction of SOAC to be fused.futharkInput of SOAC to be fused.futharkOutput of SOAC to be fused. The first identifier is the name of the actual output, where the second output is an identifier that can be used to bind a single element of that output.futharkFunction to be fused with.futharkInput of SOAC to be fused with.futhark7The fused lambda and the inputs of the resulting SOAC.y Safe-Inferred("'*/025689:;>z Safe-Inferred("'*/025689:;>] futhark1A fused SOAC contains a bit of extra information.futharkThe actual SOAC.futhark4futharkFor each node, find what came before, attempt to fuse them horizontally. This means we only perform horizontal fusion for SOACs that use the same input in some way.futharkThe pass definition.| Safe-Inferred)"'*/025689:;>futharkThe memory return of a function, which must always indicate where returned arrays are located.futharkThe return of a body, which must always indicate where returned arrays are located.futharkThe memory return of an expression. An array is annotated with Maybe MemReturn, which can be interpreted as the expression either dictating exactly where the array is located when it is returned (if 48), or able to put it whereever the binding prefers (if 2).This is necessary to capture the difference between an expression that is just an array-typed variable, in which the array being "returned" is located where it already is, and a copy expression, whose entire purpose is to store an existing array in some arbitrary location. This is a consequence of the design decision never to have implicit memory copies.futharkA description of the memory properties of an array being returned by an operation.futharkThe array is located in a memory block that is already in scope.futhark8The operation returns a new (existential) memory block.futhark?Memory information for an array bound somewhere in the program.futhark7Located in this memory block with this index function.futharkA summary of the memory information for every let-bound identifier, function parameter, and return value. Parameterisered over uniqueness, dimension, and auxiliary array information.futharkA primitive value.futharkA memory block.futharkThe array is stored in the named memory block, and with the given index function. The index function maps indices in the array to element offset, not byte offsets! To translate to byte offsets, multiply the offset with the size of the array element type.futhark-An accumulator, which is not stored anywhere.futhark9An index function that may contain existential variables.futhark>The index function representation used for memory annotations.futharkAllocate a memory block.futharkThe class of pattern element decorators that contain memory information.futharkA helper for defining  .4futhark/Helper function for index function unification.0The first return value maps a VName (wrapped in ) to its Int (wrapped in ). In case of duplicates, it is mapped to the *first* Int that occurs.5The second return value maps each Int (wrapped in an ) to a   : with the Int at which its associated VName first occurs.futharkThe return information of an expression. This can be seen as the "return type with memory annotations" of the expression.  #$&% /} Safe-Inferred)"'*/025689:;>futhark2Monad for adding allocations to an entire program.futharkAggressively try to reuse memory in do-loops - should be True inside kernels, False outside.futharkWhen allocating memory, put it in this memory space. This is primarily used to ensure that group-wide statements store their results in local memory.futharkThe set of names that are known to be constants at kernel compile time.futhark.Allocate memory for a value of the given type.44444434444444444444444442444444445555555555555555555 555555355555 ~ Safe-Inferred)"'*/025689:;>l&futharkDoes this rep contain  s in its  s? A rep must be an instance of this class for the simplification rules to work.futharkLike  , but just for s.futharkA  is semantically a perfectly nested stack of maps, on top of some bottommost computation (scalar computation, reduction, scan, or histogram). The % encodes the original map structure.All s are parameterised by the representation of their body, as well as a *level*. The *level* is a representation-specific bit of information. For example, in GPU backends, it is used to indicate whether the < is expected to run at the thread-level or the group-level.futharkThe KernelSpace must always have at least two dimensions, implying that the result of a SegRed is always an array.futharkIndex space of a .futharkFlat physical index corresponding to the dimensions (at code generation used for a thread ID or similar).futharkA  does not return an ordinary  (. Instead, it returns a list of these.futharkEach "worker" in the kernel returns this. Whether this is a result-per-thread or a result-per-group depends on where the  occurs.futhark8Metadata about whether there is a subtle point to this . This is used to protect things like tiling, which might otherwise be removed by the simplifier because they're semantically redundant. This has no semantic effect and can be ignored at code generation.futharkDon't simplify this one!futharkGo nuts.futharkThe results produced are only used within the same physical thread later on, and can thus be kept in registers.futharkThe body of a .futharkAn operator for  and .futharkIn case this operator is semantically a vectorised operator (corresponding to a perfect map nest in the SOACS representation), these are the logical "dimensions". This is used to generate more efficient code.futharkAn operator for .futharkIn case this operator is semantically a vectorised operator (corresponding to a perfect map nest in the SOACS representation), these are the logical "dimensions". This is used to generate more efficient code.futhark&The type of a histogram produced by a /. This can be different from the type of the 5s in case we are dealing with a segmented histogram.futhark&Split reduction results returned by a 0 into those that correspond to indexes for the 's, and those that correspond to value.futhark1How many reduction results are produced by these s?futharkSplit some list into chunks equal to the number of values returned by each futharkGet the certs for this .futhark Get the root  corresponding values for a .futharkPerform alias analysis on a .futhark*The variables consumed in the kernel body.futhark(The sizes spanned by the indexes of the .futharkA  < containing all the identifiers brought into scope by this .futharkThe level of a .futharkThe space of a .futharkThe body of a .5futharkThe return type of a .futhark Type check a  , given a checker for its level.futhark!A mapper that simply returns the  verbatim.futharkApply a  to the given .futharkA helper for defining  .futharkSimplify the given .futhark%Simplification rules for simplifying s.futharkLike 5!, but for memory representations. Safe-Inferred("'*/025689:;>ʨfutharkSome constraints that must hold for the simplification rules to work.5futharkIf a branch is returning some existential memory, but the size of the array is not existential, and the index function of the array does not refer to any names in the pattern, then we can create a block of the proper size and always return there.5futharkIf we are copying something that is itself a copy, just copy the original one instead. Safe-Inferred("'*/025689:;>  #$&%  Safe-Inferred&"'*/025689:;>ѕ Safe-Inferred)"'*/025689:;>ӊfutharkAn operation for the multicore representation. Feel free to extend this on an ad hoc basis as needed. Parameterised with some other operation.futhark The first  (if it exists) contains nested parallelism, while the second one has a fully sequential body. They are semantically fully equivalent.futhark*Something else (in practice often a SOAC). Safe-Inferred("'*/025689:;>ԓ  #$&%  Safe-Inferred("'*/025689:;>۞  #$&% 8 Safe-Inferred)"'*/025689:;>|futhark=A host-level operation; parameterised by what else it can do.futharkA segmented operation.futhark9Code to run sequentially on the GPU, in a single thread.futhark)A simple size-level query or computation.futhark'Produce some runtime-configurable size.futharkThe maximum size of some class.futhark:Compare size (likely a threshold) with some integer value.futhark)CalcNumGroups w max_num_groups group_size calculates the number of GPU workgroups to use for an input of the given size. The Name is a size name. Note that w% is an i64 to avoid overflow issues.futharkAt which level the *body* of a  executes.futharkThe actual, physical grid dimensions used for the GPU kernel running this .futharkDo we need group-virtualisation when generating code for the segmented operation? In most cases, we do, but for some simple kernels, we compute the full number of groups in advance, and then virtualisation is an unnecessary (but generally very small) overhead. This only really matters for fairly trivial but very wide map kernels where each thread performs constant-time work on scalars.futharkNot only do we not need virtualisation, but we _guarantee_ that all physical threads participate in the work. This can save some checks in code generation.futharkThese dimensions (indexed from 0, outermost) of the corresponding  should not be parallelised, but instead iterated sequentially. For example, with a  of [0] and a  with dimensions [n][m]$, there will be an outer loop with n iterations, while the m dimension will be parallelised.Semantically, this has no effect, but it may allow reductions in memory usage or other low-level optimisations. Operationally, the guarantee is that for a SegSeqDims of e.g. [i,j,k], threads running at any given moment will always have the same indexes along the dimensions specified by [i,j,k].*At the moment, this is only supported for  intra-group parallelism in GPU code, as we have not yet found it useful anywhere else.futharkThe  of the .futharkA helper for defining  . Safe-Inferred("'*/025689:;>sfuthark 5futhark"Description of distribution to do.5futhark*Also related to avoiding identity mapping.futharkNote: first element is *outermost* nesting. This is different from the similar types elsewhere!futharkFirst pair element is the very innermost ("current") target. In the list, the outermost target comes first. Invariant: Every element of a pattern must be present as the result of the immediately enclosing target. This is ensured by & by removing unused pattern elements.5futharkFirst pair element is the very innermost ("current") nest. In the list, the outermost nest comes first.5futharkBoth parameters and let-bound.futhark&Retrieve the innermost kernel nesting.futharkAdd new outermost nesting, pushing the current outermost to the list, also taking care to swap patterns if necessary.futharkAdd new innermost nesting, pushing the current outermost to the list. It is important that the  has the right order (non-permuted compared to what is expected by the outer nests).futharkFlatten a kernel nesting to: The index space.:The kernel inputs - note that some of these may be unused.)) Safe-Inferred("'*/025689:;>futhark;An encoding of a WithAcc with alongside its result pattern.futhark:An encoding of a branch with alongside its result pattern.futharkAn encoding of a sequential do-loop with no existential context, alongside its result pattern.futharkGiven a (parallel) map nesting and an inner sequential loop, move the maps inside the sequential loop. The result is several statements - one of these will be the loop, which will then contain statements with map expressions.futharkGiven a (parallel) map nesting and an inner branch, move the maps inside the branch. The result is the resulting branch expression, which will then contain statements with map expressions.futharkGiven a (parallel) map nesting and an inner withacc, move the maps inside the branch. The result is the resulting withacc expression, which will then contain statements with map expressions.   Safe-Inferred)"'*/025689:;>#!! Safe-Inferred("'*/025689:;>Qfuthark5The phantom data type for the kernels representation.  #$&% 7 Safe-Inferred("'*/025689:;>5futharkMap from variable names to defining expression. We use this to hackily determine whether something is transposed or otherwise funky in memory (and we'd prefer it not to be). If we cannot find it in the map, we just assume it's all good. HACK and FIXME, I suppose. We really should do this at the memory level.futharkThe pass definition. Safe-Inferred("'*/025689:;>J Safe-Inferred("'*/025689:;>Ifuthark4Transform a program using SOACs to a program in the 2 representation, using some amount of flattening. Safe-Inferred("'*/025689:;>m5futharkInt645futharkInt32futharkLike , but cap the thread count to the input size. This is more efficient for small kernels, e.g. summing a small array. Safe-Inferred("'*/025689:;>futharkConvert the statements inside a map nest to kernel statements, attempting to parallelise any remaining (top-level) parallel statements. Anything that is not a map, scan or reduction will simply be sequentialised. This includes sequential loops that contain maps, scans or reduction. In the future, we could probably do something more clever. Make sure that the amount of parallelism to be exploited does not exceed the group size. Further, as a hack we also consider the size of all intermediate arrays as "parallelism to be exploited" to avoid exploding local memory.We distinguish between "minimum group size" and "maximum exploitable parallelism". Safe-Inferred)"'*/025689:;> futharkTransform a program using SOACs to a program using explicit kernels, using the kernel extraction transformation.5futharkIntra-group parallelism is worthwhile if the lambda contains more than one instance of non-map nested parallelism, or any nested parallelism inside a loop.5futharkA lambda is worth sequentialising if it contains enough nested parallelism of an interesting kind. Safe-Inferred&"'*/025689:;> 5futharkMap from array variable names to their corresponding index functions. The info is not guaranteed to be exact, e.g., we assume ifs and loops return arrays layed out in normalized (row-major) form in memory. We only record aliasing statements, such as transposition, slice, etc.futharkThe variance table keeps a mapping from a variable name (something produced by a  ) to the kernel thread indices that name depends on. If a variable is not present in this table, that means it is bound outside the kernel (and so can be considered invariant to all dimensions).futhark*Are we working with full or partial tiles? Safe-Inferred("'*/025689:;>"5futharkGiven a statement, compute how often each of its free variables are used. Not accurate: what we care about are only 1, and greater than 1.futharkSinking in GPU kernels.futharkSinking for multicore. Safe-Inferred&"'*/025689:;>4y5futharkThe graph being built.5futhark)All known scalars that have been graphed.5futharkAll variables that directly bind scalars read from device memory.5futharkGraphed scalars that are used as operands by statements that cannot be migrated. A read cannot be delayed beyond these, so if the statements that bind these variables are moved to device, the variables must be read from device memory.5futhark Observed  % host statements to be graphed later.5futharkA map of encountered arrays that are backed by copyable memory. Trivial instances such as single element arrays are excluded.5futhark1Information about the current body being graphed.5futharkArray variables backed by memory segments that may be copied, mapped to the outermost known body depths that declares arrays backed by a superset of those segments.5futhark.The vertex handle for a variable and its type.5futhark9A captured statement for which graphing has been delayed.5futhark All terminal vertices of routes.5futharkAll vertices connected from a source, partitioned into those that have been attempted routed and those which have not.5futharkStatistics on the statements within a body and their dependencies.5futhark4Whether the body contained any host-only statements.5futhark/Whether the body contained any GPUBody kernels.5futhark%Whether the body performed any reads.5futharkAll scalar variables represented in the graph that have been used as return values of the body or as operands within it, including those that are defined within the body itself. Variables with vertices connected to sinks may be excluded.5futharkDepth of parent bodies with variables that are required on host. Since the variables are required on host, the parent statements of these bodies cannot be moved to device as a whole. They are host-only.5futhark)Ids for all variables used as an operand.5futhark?Metadata on the environment that a variable is declared within.5futharkHow many if statement branch bodies the variable binding is nested within. If a route passes through the edge u->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.5futhark.How many bodies the variable is nested within.5futharkAn 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.5futharkIncrement the fork depth for variables graphed by this action.5futhark>Increment the body depth for variables graphed by this action.5futhark9Change the graph id for variables graphed by this action.5futhark0Capture body stats produced by the given action.5futhark5Can applications of this function be moved to device?5futharkGet the 5# corresponding to the current body.5futhark;Get the body depth of the current body (its nesting level).   Safe-Inferred&"'*/025689:;>P:5futharkThe state used by a 5 monad.5futharkMaps variables in the original program to names to be used by rewrites.5futharkStatements to be added as a prologue before rewritten statements.6futharkThe state used by a 6 monad.6futharkA source to generate new s from.6futharkA 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.6futhark2Whether non-migration optimizations may introduce " kernels at the current location.6futharkThe 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.6futharkOptimize a function definition. Its type signature will remain unchanged.6futharkOptimize a body. Scalar results may be replaced with single-element arrays.6futhark"Optimize a sequence of statements.6futharkOptimize 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.6futharkRewrite a for-in loop such that relevant source array reads can be delayed.6futhark#Optimize an accumulator input. The  is the accumulator token.6futharkOptimize a host operation.   statements are added to kernel code that depends on migrated scalars.6futhark"Append the given string to a name.6futhark'An initial state to use when running a 6 monad.6futharkPerform non-migration optimizations without introducing any GPUBody kernels.6futhark Create a 5 that binds the array of a migrated variable binding.6futharkx 6 arr registers that the value of x has been migrated to arr[0].6futharkx 6 arr registers that the value of x! also is available on device as arr[0].6futharkrecordMigration host x arr# records the migration of variable x to arr[0]. If host5 then the original binding can still be used on host.6futharkpe 6 (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.6futharkuseScalar 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.6futharkCreate an expression that reads the first element of a 1-dimensional array.6futhark;A shorthand for binding a single variable to an expression.6futharkReturns the array alias of se if it is a variable that has been migrated to device. Otherwise returns Nothing.6futharkstoreScalar 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.6futharkMap 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.6futharkLike 6 but for a %. Constants are mapped to themselves.6futharkLike 6 but for a  .6futharkApply 6 to a list of results.6futharkMigrate a statement to device, ensuring all its bound variables used on host will remain available with the same names.6futharkCreate a GPUBody kernel that executes a single statement and stores its results in single element arrays.6futhark'An initial state to use when running a 5 monad.6futharkRewrite 1 dependencies to scalars that have been migrated.6futharkRewrite 1 dependencies to scalars that have been migrated.6futharkRewrite generic lambda dependencies to scalars that have been migrated.6futharkRewrite generic body dependencies to scalars that have been migrated.6futharkRewrite kernel body dependencies to scalars that have been migrated.6futharkRewrite migrated scalar dependencies within anything. The returned statements must be added to the scope of the rewritten construct.6futhark?Create a fresh name, registering which name it is a rewrite of.6futharkRewrite 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.6futharkRewrite 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.6futharkRewrite 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 6.6futharkRewrite 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.6futharkRewrite 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.6futharkFix any   certificate references that are broken as a result of migration or rewriting.6futharkRewrite 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.6futharkRewrite 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.6futhark2Return the name to use for a rewritten dependency.6futhark#Update the variable names within a  ) to account for migration and rewriting.6futhark#Update the variable names within a  ) to account for migration and rewriting.6futharkUpdate the variable names of certificates to account for migration and rewriting.6futhark"Update any variable name within a ) to account for migration and rewriting.6futharkUpdate the variable names within a type to account for migration and rewriting.6futharkUpdate the variable names within an existential type to account for migration and rewriting. Safe-Inferred&"'*/025689:;>g,06futhark2The 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.6futhark,Usage statistics for some set of statements.6futhark'The variables that the statements bind.6futharkThe variables that the statements depend upon, i.e. the free variables of each statement and the root aliases of every array that they observe.6futharkA group is a subsequence of statements, usually either only GPUBody statements or only non-GPUBody statements. The 61 statistics of those statements are also stored.6futharkThe statements of the group.6futhark8The usage statistics of the statements within the group.6futharkAn entry in an 6.6futhark3A value returned from within a GPUBody kernel. In let res = gpu { x } this is x.6futharkThe type of the 6.6futhark9The name of the variable that binds the return value for 6. In let res = gpu { x } this is res.6futharkThe index of the group that 6 is bound in.6futharkIf 6 then the entry key is a variable that binds the same value as the 6. Otherwise it binds an array with an outer dimension of one whose row equals that value.6futharkA map from variable tags to !s returned from within GPUBodies.6futharkThe state used by a 6 monad.6futharkAll statements that already have been processed from the sequence, divided into alternating groups of non-GPUBody and GPUBody statements. Groups at even indices only contain non-GPUBody statements. Groups at odd indices only contain GPUBody statements.6futharkThe monad used to reorder statements within a sequence such that its GPUBody statements can be merged into as few possible kernels.6futhark A set of  tags that denote the root aliases of all arrays that some statement consumes.6futhark A set of  tags that denote all variables that some group of statements binds.6futhark 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.6futhark%All free variables of a construct as 6.6futharkConvert   to an integer set of name tags.6futhark1Optimize a lambda and determine its dependencies.6futhark/Optimize a body and determine its dependencies.6futharkOptimize a sequence of statements and determine their dependencies.6futharkOptimizes 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.6futharkgfutharkName of result.futharkType of result.   Safe-Inferred)"'*/025689:;>ifuthark>Apply the in-place lowering optimisation to the given program.futhark>Apply the in-place lowering optimisation to the given program.futhark>Apply the in-place lowering optimisation to the given program.6futhark>Apply the in-place lowering optimisation to the given program. Safe-Inferred("'*/025689:;>jw6futhark5A mapping from accumulator variables to their source.futharkThe pass for GPU kernels. Safe-Inferred("'*/025689:;>l futharkThe pass definition.6futharkTries to identify the following pattern: code followed by some UpdateAcc-statement followed by more code.6futhark4Checks that there exist a parallel dimension (among kids"), to which all the indices (acc_inds) are invariant to. It returns the innermost such parallel dimension, as a tuple of the pardim gid () and its index (3) in the parallel space.   Safe-Inferred'"'*/025689:;>p futharkThe operations that permit CSE.6futhark*Perform CSE within any nested expressions. futhark+Perform CSE on every function in a program.If the boolean argument is false, the pass will not perform CSE on expressions producing arrays. This should be disabled when the rep has memory information, since at that point arrays have identity beyond their value. futhark!Perform CSE on a single function.If the boolean argument is false, the pass will not perform CSE on expressions producing arrays. This should be disabled when the rep has memory information, since at that point arrays have identity beyond their value. futharkPerform CSE on some statements.If the boolean argument is false, the pass will not perform CSE on expressions producing arrays. This should be disabled when the rep has memory information, since at that point arrays have identity beyond their value.   Safe-Inferred&"'*/025689:;>s6futhark"inlineInFunDef constf fdmap caller inlines in calleer the functions in fdmap that are called as constf/. At this point the preconditions are that if fdmap8 is not empty, and, more importantly, the functions in fdmap" do not call any other functions.6futharkRemove functions not ultimately called from an entry point or a constant. futhark=Inline all functions and remove the resulting dead functions. futhark>Inline 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("'*/025689:;>{u6futhark2Main helper function for Register-and-Block Tiling6futharkTries to identify the following pattern: code followed by some Screma followed by more code.6futharkChecks 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.6futharkChecks 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)"'*/025689:;>6futharkInformation 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.6futharkStatements 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.6futhark&A tile (or an original untiled array).6futharkWe 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.6futharkMove 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.6futharkPartition 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).   Safe-Inferred("'*/025689:;>*6futhark-Remove the unused return values of a GPUBody.    Safe-Inferred("'*/025689:;> futharkThe pass for GPU kernels. futharkThe pass for multicore.   Safe-Inferred("'*/025689:;>\  #$&%    Safe-Inferred&"'*/025689:;>   Safe-Inferred("'*/025689:;>?   Safe-Inferred("'*/025689:;> futharkThe pass from  to .   Safe-Inferred("'*/025689:;> futharkThe pass from  to  . futhark Convert some  stms to  .   Safe-Inferred("'*/025689:;>6futhark:A map from memory block names to new index function bases.6futharkA description of allocations that have been extracted, and how much memory (and which space) is needed.6futharkIdentifying the spot where an allocation occurs in terms of its level and unique thread ID. futhark%The memory expansion pass definition.   Safe-Inferred("'*/025689:;>v futhark The pass for GPU representation. futharkThe pass for MC representation. futhark The pass for Seq representation.   Safe-Inferred("'*/025689:;>+6futharkThe booleans indicate whether we should also play with the initial merge values.6futharkFirst name is the memory block to copy to, second is the name of the array copy. futharkThe pass for GPU kernels. futharkThe pass for multicore6futhark%The double buffering pass definition.   Safe-Inferred("'*/025689:;>   Safe-Inferred("'*/025689:;> futhark  is the set of = that were used somewhere in a statement, body or otherwise. futhark  is a mapping from a . to the statement identifying it's last use.   is the inverse of  . futhark  tells which names were last used in a given statement. Statements are uniquely identified by the 9 of the first value parameter in the statement pattern.   is the set of names last used.6futharkAnalyses a program to return a last-use map, mapping each simple statement in the program to the values that were last used within that statement, and the set of all  that were used inside.   Safe-Inferred("'*/025689:;> futhark"An interference graph. An element (x, y)< in the set means that there is an undirected edge between x and y!, and therefore the lifetimes of x and y overlap and they "interfere" with each other. We assume that pairs are always normalized, such that x < y, before inserting. This should prevent any duplicates. We also don't allow any pairs where x == y.6futhark The set of  that are no longer in use.7futhark The set of  currently in use.7futhark1Insert an edge between two values into the graph.7futharkPerform interference analysis on the given statements. The result is a triple of the names currently in use, names that hit their last use somewhere within, and the resulting graph.7futharkReturn a mapping from memory blocks to their element sizes in the given statements.7futharkReturn a mapping from memory blocks to the space they are allocated in.7futharkReturns a mapping from memory block to element size. The input is the  of a variable (supposedly an array), and the result is a mapping from the memory block of that array to element size of the array.   Safe-Inferred&"'*/025689:;>#7futhark3A map of values to the set "neighbors" in the graph futhark9A map of values to their color, identified by an integer.7futhark%Computes the neighbor map of a graph. futhark+Graph coloring that takes into account the space of values. Two values can only share the same color if they live in the same space. The result is map from each color to a space and a map from each value in the input graph to it's new color.   Safe-Inferred("'*/025689:;>27futhark8A mapping from allocation names to their size and space.7futharkThis is the actual optimiser. Given an interference graph and a SegOp, replace allocations and references to memory blocks inside with a (hopefully) reduced number of allocations.7futharkHelper function that modifies kernels found inside some statements. futhark+Perform the reuse-allocations optimization.   Safe-Inferred("'*/025689:;> futharkThe adjoint of a variable. futharkA symbolic representation of an array that is all zeroes, except at certain indexes. futharkThe shape of the array. futharkElement type of the array. futharkLocations and values of nonzero values. Indexes may be negative, in which case the value is ignored (unless   is used). futharkWhether   should check bounds or assume they are correct. The latter results in simpler code. futharkIf a SubExp is provided, it references a boolean that is true when in-bounds. futharkDynamically these will always fail, so don't bother generating code for the update. This is only needed to ensure a consistent representation of sparse Jacobians.7futharkThe values representing an adjoint in symbolic form. This is used for when we wish to return an Adj from a Body or similar without forcing manifestation. Also returns a function for reassembling the Adj from a new representation (the list must have the same length). futharkConveniently convert a list of Adjs to their representation, as well as produce a function for converting back.!futharkCreate copies of all arrays consumed in the given statement, and return statements which include copies of the consumed arrays.See Note [Consumption].!futhark;Construct a lambda for adding two values of the given type.!futharkIs this primal variable active in the AD sense? FIXME: this is (obviously) much too conservative.!futharksetLoopTape v vs establishes vs: as the name of the array where values of loop parameter v# from the forward pass are stored.!futhark$Look-up the name of the array where v is stored.!futharksubstLoopTape v v' substitutes the key v for v'. That is, if v |-> 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.7 !!!!!!!!!!!!!!!!!!!!!!!!!7 ! !!!!!!!!! !!!!!!!!!! ! !!!! Safe-Inferred("'*/025689:;>!! Safe-Inferred&"'*/025689:;>_!! Safe-Inferred("'*/025689:;>!!!! Safe-Inferred("'*/025689:;>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).!! Safe-Inferred("'*/025689:;>#!! Safe-Inferred("'*/025689:;>J7futharkA 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 Transforms a   into a  ' with an empty list of loop variables.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.7futharkReverses a loop by substituting the loop index as well as reversing the arrays that loop variables are bound to.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&"'*/025689:;>W!futhark 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 2 if no such derivative is known.!!!!!! Safe-Inferred("'*/025689:;>'7futharkPreprocess statements before differentiating. For now, it's just stripmining.!! Safe-Inferred)"'*/025689:;>!! Safe-Inferred("'*/025689:;>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&"'*/025689:;>!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.7futharkThis is the pipeline that applies the AD transformation and subsequent interesting optimisations.!futharkThe pipeline used by the CUDA 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&"'*/025689:;> !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.7futharkParse an integer value.7futharkParse a floating-point value.7futharkParse 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&"'*/025689:;>!futharkParse a   given a leaf parser.  !!!! Safe-Inferred&"'*/025689:;>7futharkThis 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("'*/025689:;>|!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."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."futhark1Documentation strings, including source location."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."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.#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.#futharkThe  Maybe VName is a possible existential size that is instantiated by this argument. May have duplicates across the program, but they will all produce the same value (the expressions will be identical).#futharkSize coercion: e :> t.#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). Binary Ops for Numbers#futhark |>#futhark<| Misc#futharkAn identifier consists of its name and the type of the value bound to the identifier.#futhark;Information about which parts of a value/type are consumed.#futhark$Consumes these fields in the record.#futhark(Consume these parts of the constructors.#futhark?A function that consumes its argument(s) like this. The final # should always be #, as there is no way for a function to consume its return value.#futharkConsumes this value.#futhark8Only observes value in this position, does not consume.#futhark8A type argument expression passed to a type constructor.#futharkAn unstructured 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.#futharkA size expression for use in a #.#futharkThe size of the dimension is this name, which must be in scope.#futharkThe size is a constant.#futharkNo dimension declaration.#futharkThe return type version of #.#futharkThe return type version of #.#futhark6A value type contains full, manifest size information.#futharkA "structural" type with shape annotations and no aliasing information, used for declarations.#futharkA type with aliasing information and shape annotations, used for describing the type patterns and expressions.#futharkAliasing for a type, which is a set of the variables that are aliased.#futharkA variable that is aliased. Can be still in-scope, or have gone out of scope and be free. In the latter case, it behaves more like an equivalence class. See uniqueness-error18.fut for an example of why this is necessary.#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 3 and 35 instances always compare values of this type equal.#futharkThe size of an array type is a list of its dimension sizes. If 23, that dimension is of a (statically) unknown size.#futhark#The elaborated size of a dimension.#futharkThe size of the dimension is this name, which must be in scope. In a return type, this will give rise to an assertion.#futharkThe size is a constant.#futharkNo known size. If Nothing, then this is a name distinct from any other. The type checker should _never_ produce these - they are a (hopefully temporary) thing introduced by defunctorisation and monomorphisation.#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.The number of dimensions contained in a shape.$futharkstripDims n shape strips the outer n dimensions from shape , returning 23 if this would result in zero or fewer dimensions.$futharkThe name of a type parameter. #$&%!!!!!!!!!!!!!!!!!!!!!!""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""#""""""""""""""""###############################################################################################################################$$$$$$$$$$$$$$$$$$$$$$$$$$$#######$$###############################################$$$$$$$####$$##########################################################"""""""""#""""""""""""""""##"""""""""""""""""""""""""""""""""""""""""""""""""""""""""!!!!""""!!!!!!""""""""""""""""""""""""""""""""""""""""""$!!!!!!!!!!!!$$$$$######### Safe-Inferred&"'*/025689:;>%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&"'*/025689:;>&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&"'*/025689:;>&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.&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.&futhark'An expression with no type annotations.&futhark:A type with no aliasing information but shape annotations.&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 2- 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 2.&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 3' if the type of the argument is unique.&futharkReturn the set of all variables mentioned in the aliasing of a type.&futharkdiet t< returns a description of how a function parameter of type t might consume its argument.&futharkConvert any type to one that has rank information, no alias information, and no embedded names.&futhark(Remove aliasing information from a type.&futhark,Replace no aliasing with an empty alias set.&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+m6 dimensions. The uniqueness of the new array will be u, no matter the uniqueness of t.&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 "?&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.&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.&futharkt `setAliases` als returns t , but with als/ substituted for any already present aliasing.&futharkt `addAliases` f returns t5, but with any already present aliasing replaced by f applied to that aliasing.&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.&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).&futharkThe type of a function with the given parameters and return type.&futhark#The type names mentioned in a type.&futhark orderZero t is 3 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 38 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.&futhark8A mapping from names bound in a map to their identifier.&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.&futharkA map of all built-ins.&futhark*Is this file 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.$$&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&$$&&&&&&&&&&&&&&& Safe-Inferred'"'*/025689:;>?&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).'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("'*/025689:;>'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("'*/025689:;>7futharkGiven a starting position, produce tokens from the given text (or a lexer error). Returns the final position.''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''77 Safe-Inferred&"'*/025689:;>v(futharkA syntax error.(futhark&Move the end position back one column. ''(((((((((((((((((((((((((((((( (((((((((((((((((((((((((((((('' Safe-Inferred)"'*/025689:;>]((((((((((7777779 79  Safe-Inferred&"'*/025689:;>"(futhark/Parse an entire Futhark program from the given 2 , using the 2' as the source name for error messages.(futhark+Parse an Futhark expression from the given 2 , using the 2' as the source name for error messages.(futhark1Parse a Futhark module expression from the given 2 , using the 2' as the source name for error messages.(futhark%Parse an Futhark type from the given 2 , using the 2' as the source name for error messages.7futharkParse an Futhark expression incrementally from monadic actions, using the 2' as the source name for error messages.(futharkParse either an expression or a declaration incrementally; favouring declarations in case of ambiguity. ((((((((( ((((((((( Safe-Inferred&"'*/025689:;>%0(futhark.A set of names where we also track their type.(futhark:Set subtraction. Do not consider those variables as free.7futharkA (* with these names, considered to be sizes.(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&"'*/025689:;>)(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. #$&%!!!!!!!!!!!!!!!!!!!""""!!!""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""##""""""""""""""""#""""""""#############################################################################################################################$$$$$$$$$$$$$$$$$$$$$$&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&((((((((((((((((((((((((((((((((((((((((((((((( Safe-Inferred&"'*/025689:;>5(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.(futharkCanonical reference to a Futhark code file. Does not include the .fut extension. This is most often a path relative to the current working directory of the compiler.(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&"'*/025689:;>8k)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?7futhark*All bindings of everything in the program.)futharkInformation about what's at the given source position. Returns 2 if there is nothing there, including if the source position is invalid. "!))))))))) )))))))))"! Safe-Inferred&"'*/025689:;>;u)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&"'*/025689:;>A)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 (3).)futhark'The actual type- and value environment.7futharkA mapping from type parameters to the shapes of the value to which they were initially bound.7futharkA TermValue with a 2! type annotation is an intrinsic.7futhark.A polymorphic value that must be instantiated.7futhark*The monad in which evaluation takes place.)futhark(What is the reason for this break point?)futhark&An explicit breakpoint in the program.)futharkA)futhark,Prettyprint the error for human consumption.7futhark7, but with 0 as 1.7futharkExpand type based on information that was not available at type-checking time (the structure of abstract types).)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&"'*/025689:;>C)futharkAs )>, but returns components of a top-level tuple type piecemeal.)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&"'*/025689:;>D)futharkPerform the transformation.)) Safe-Inferred&"'*/025689:;>EC)futhark%A function for internalising lambdas.)))))) Safe-Inferred&"'*/025689:;>F)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&"'*/025689:;>HD7futhark5A pairing of a lexical closure and a module function.7futharkA non-parametric module.7futharkA substitution from names in the original program to names in the generated/residual program.7futhark(A general-purpose substitution of names.)futharkPerform defunctorisation.)) Safe-Inferred&"'*/025689:;>[ 7futharkDefunctionalization 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.7futharkEnvironment mapping variable names to their associated static value.7futharkThe type is Just if this is a polymorphic binding that must be instantiated.7futharkA static value stores additional information about the result of defunctionalization of an expression, aside from the residual expression.7futharkThe constructor that is actually present, plus the others that are not.7futharkThe 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.)7futharkAn expression or an extended "; (with size parameters, which AST lambdas do not support).7futharkReturns the defunctionalization environment restricted to the given set of variable names and types.7futharkRun a computation in the defunctionalization monad. Returns the result of the computation, a new name source, and a list of lifted function declations.7futharkLooks up the associated static value for a given name in the environment.7futharkDefunctionalization of an expression. Returns the residual expression and the associated static value in the defunctionalization monad.7futharkSame as 7%, except it ignores the static value.7futharkDefunctionalize the function argument to a SOAC by eta-expanding if necessary and then defunctionalizing the body of the introduced lambda.7futhark8Defunctionalize an indexing of a single array dimension.7futharkDefunctionalize a let-bound function, while preserving parameters that have order 0 types (i.e., non-functional).7futharkDefunctionalize an application expression at a given depth of application. Calls to dynamic (first-order) functions are preserved at much as possible, but a new lifted function is created if a dynamic function is only partially applied.7futhark Check if a 7 and a given application depth corresponds to a fully applied dynamic function.7futharkConverts a dynamic function 7 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.7futharkConverts a pattern to an environment that binds the individual names of the pattern to their corresponding types wrapped in a 7 static value.7futharkCreate a new top-level value declaration with the given function name, return type, list of parameters, and body expression.7futharkGiven 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.7futharkGiven a closure environment pattern and the type of a term, construct the type of that term, where uniqueness is set to  for those arrays that are bound in the environment or pattern (except if they are unique there). This ensures that a lifted function can create unique arrays as long as they do not alias any of its parameters. XXX: it is not clear that this is a sufficient property, unfortunately.7futharkCompute the corresponding type for the *representation* of a given static value (not the original possibly higher-order value).7futharkConstruct the type for a fully-applied dynamic function from its static value and the original types of its arguments.7futharkMatch 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.7futharkGiven a pattern and the static value for the defunctionalized argument, update the pattern to reflect the changes in the types.7futharkConvert a record (or tuple) type to a record static value. This is used for "unwrapping" tuples and records that are nested in 7 static values.7futharkDefunctionalize 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 7.7futhark1Defunctionalize a list of top-level declarations.*futharkTransform a list of top-level value bindings. May produce new lifted function definitions, which are placed in front of the resulting list of declarations.** Safe-Inferred("'*/025689:;>[7futhark2Flatten a pattern. Returns a list of identifiers.************ Safe-Inferred*"'*/025689:;>^Y*futharkConvert a program in source Futhark to a program in the Futhark core language.7futharkOnly returns those pattern names that are not used in the pattern itself (the "non-existential" part, you could say).7futharkPromote to dimension type as appropriate for the original type. Also return original type.7futhark&Overloaded operators are treated here.7futharkHandle intrinsic functions. These are only allowed to be called in the prelude, and their internalisation may involve inspecting the AST.** Safe-Inferred&"'*/025689:;>hK7futharkSymbol 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 7, but keeps a bit more state to make FutharkScript more convenient.*futharkRun an action with a * produced by an existing 7&, without shutting it down at the end.*futharkStart a server, execute an action, then shut down the server. Similar to 7.*futharkq*futhark/The result expected from a succesful execution.*futharkThese values are expected.*futharkCompute expected values from executing a known-good reference implementation.*futhark)How a test case is expected to terminate.*futhark;Execution suceeds, with or without expected result values.*futhark Execution fails with this error.*futhark&How to generate a single random value.*futharkGenerate a value of the given rank and primitive type. Scalars are considered 0-ary arrays.*futhark'A fixed non-randomised primitive value.*futharkSeveral values - either literally, or by reference to a file, or to be generated on demand. All paths are relative to test program.*futhark6A condition for execution, input, and expected result.*futharkA warning test requires that a warning matching the regular expression is produced. The program must also compile succesfully.*futharkA structure test specifies a compilation pipeline, as well as metrics for the program coming out the other end.*futhark!How a program can be transformed.*futhark'The error expected for a negative test.*futhark/Input and output pairs for some entry point(s).*futharkHow to test a program.*futharkDescription of a test to be carried out on a Futhark program. The Futhark program is stored separately.*futhark?A prettyprinted representation of type of value produced by a *.*futhark;Read the test specification from the given Futhark program.*futharkLike *!, but exits the process on error.7futharkRead test specifications from the given path, which can be a file or directory containing .fut files and further directories.+futharkRead test specifications from the given paths, which can be a files or directories containing .fut files and further directories.+futharkLike +", but kills the process on errors.+futharkRead a test specification from a file. Expects only a single block, and no comment prefixes.+futharkLike +", but kills the process on errors.6**************************************************++++6**++++************************************************ Safe-Inferred&"'*/025689:;>+futharkThe futhark executable we are using. This is merely a wrapper around the underlying file path, because we will be using a lot of different file paths here, and it is easy to mix them up.+futhark7Try to parse a several values from a byte string. The 2' parameter is used for error messages.+futhark6Get the actual core Futhark values corresponding to a * specification. The first 2 is the path of the futhark executable, and the second is the directory which file paths are read relative to.+futhark.Extract a prettyString representation of some *. In the IO monad because this might involve reading from a file. There is no guarantee that the resulting byte string yields a readable value.+futharkMake the provided * available as server-side variables. This may involve arbitrary server-side computation. Error detection... dubious.7futharkThere is a risk of race conditions when multiple programs have identical *. In such cases, multiple threads in 'futhark test' might attempt to create the same file (or read from it, while something else is constructing it). This leads to a mess. To avoid this, we create a temporary file, and only when it is complete do we move it into place. It would be better if we could use file locking, but that does not work on some file systems. The approach here seems robust enough for now, but certainly it could be made even better. The race condition that remains should mostly result in duplicate work, not crashes or data corruption.7futharkCompute the expected size of the file. We use this to check whether an existing file is broken/truncated.+futharkWhen/if generating a reference output file for this run, what should it be called? Includes the "data/" folder.+futhark;Get the values corresponding to an expected result, if any.+futhark&The name we use for compiled programs.+futhark4compileProgram extra_options futhark backend program compiles program with the command  futhark backend extra-options..., and returns stdout and stderr of the compiler. Throws an IO exception containing stderr if compilation fails.+futhark8runProgram futhark runner extra_options prog entry input runs the Futhark program prog (which must have the .fut suffix), executing the entry entry point and providing input on stdin. The program must have been compiled in advance with +. If runner is non-null, then it is used as "interpreter" for the compiled program (e.g. python( when using the Python backends). The  extra_options are passed to the program.+futhark/Read the given variables from a running server.+futharkEnsure that any reference output files exist, or create them (by compiling the program with the reference compiler and running it on the input) if necessary.+futharkDetermine the --tuning options to pass to the program. The first argument is the extension of the tuning file, or 2 if none should be used.+futharkDetermine the  --cache-file options to pass to the program. The first argument is the extension of the cache file, or 2 if none should be used.+futharkCheck that the result is as expected, and write files and throw an error if not.+futharkCreate a Futhark server configuration suitable for use when testing/benchmarking Futhark programs. **************************************************++++++++++++++++++++++++++++++++++++++  Safe-Inferred&"'*/025689:;>}+futharkHow to compile a benchmark.+futharkHow to run a benchmark.+futhark.Applies both to initial and convergence phase.+futhark#If true, run the convergence phase.+futhark0Stop convergence once this much time has passed.+futharkInvoked for every runtime measured during the run. Can be used to provide a progress bar.+futhark8The results for all datasets for some benchmark program.+futharkThe results for a single named dataset is either an error message, or runtime measurements, the number of bytes used, and the stderr that was produced.+futharkThe measurements resulting from various successful runs of a benchmark (same dataset).+futhark&The runtime of a single succesful run.+futhark1Transform benchmark results to a JSON bytestring.+futhark0Decode benchmark results from a JSON bytestring.7futhark A list of (autocorrelation,rse) pairs. When the autocorrelation is above the first element and the RSE is above the second element, we want more runs.+futhark3Run the benchmark program on the indicated dataset.+futhark'Compile and produce reference datasets.++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Safe-Inferred&"'*/025689:;>+futhark0A representation of the essentials of a pattern.7futharkTreated as 0-ary.+futharkFind the unmatched cases.++++ Safe-Inferred&"'*/025689:;>+futhark,The warnings produced by the compiler. The 41 instance produces a human-readable description.+futhark*True if there are any warnings in the set.+futhark'A single warning at the given location.+futharkA single warning at the given location, but also with a stack trace (sort of) to the location.+futhark4Exports Warnings into a list of (location, problem).++++++++++++ Safe-Inferred+"'*/025689:;>:+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 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.7futharkMaps 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.7futharkUser-extensible environment.7futhark.Name of the function we are compiling, if any.7futharkThe set of attributes that are active on the enclosing statements (including the one we are currently compiling).7futharkThe + is 4# if a copy if required. If it is 2, 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.,futharkExecute a code generation action, wrapping the generated code within a  with the given description.,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.7futharkHow 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.7futhark+Note: a hack to be used only for functions.7futharkLike ,, but does not create new declarations. Note: a hack to be used only for functions.,futhark Another hack.,futharkThe return type is polymorphic, so there is no guarantee it actually matches the /, but at least we have to use it consistently.,futharkCreate a typed variable from a name and a dynamic type. Note that there is no guarantee that the dynamic type corresponds to the inferred static type, but the latter will at least have to be used consistently.,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.7futhark,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!,futharkIn the case of a histogram-like accumulator, also sets the index parameters.,futhark-Is this copy really a mapping with transpose?7futharkUse , if possible, otherwise ,.7futharkCopy 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.,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.,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("'*/025689:;>,futhark Compile a ' program to sequential imperative code.+,,+ Safe-Inferred&"'*/025689:;>,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&"'*/025689:;>R,futharkCompile the program to Python.,, Safe-Inferred&"'*/025689:;>,futhark$Compile the program to sequential C. , , Safe-Inferred&"'*/025689:;>,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 ?-futhark7Arrays for storing group results shared between threads-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&"'*/025689:;>-- Safe-Inferred&"'*/025689:;>7futhark&A SegBinOp with auxiliary information.7futharkThe 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.------ Safe-Inferred&"'*/025689:;>-- Safe-Inferred&"'*/025689:;>7futharkSplit some list into chunks equal to the number of values returned by each 7futharkAtomic 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("'*/025689:;>d-futharkCompile the program.+--+ Safe-Inferred'"'*/025689:;>-futhark9Compile the program to ImpCode with multicore operations.-futharkGenerate the multicore context definitions. This is exported because the WASM backend needs it.-futhark'Multicore-related command line options.-futhark)Operations for generating multicore code. --------------------- --------------------- Safe-Inferred&"'*/025689:;>c-futharkCompile 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.-- Safe-Inferred'"'*/025689:;>-futhark,Transient state tracked by the ISPC backend.-futharkCompile the program to C and ISPC code using multicore operations.-futhark;Compiler operations specific to the ISPC multicore backend.7futhark#Expose a struct to both ISPC and C.7futhark=Copy memory where one of the operands is using an AoS layout.7futharkISPC has no string literals, so this makes one in C and exposes it via an external function, returning the name.7futharkSet memory in ISPC7futharkUnref memory in ISPC7futharkAllocate memory in ISPC7futharkFree memory in ISPC7futharkGiven 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.7futhark(Handle logging an error message in ISPC.8futharkGiven 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.8futharkCompile 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.8futharkPrepare a struct with memory allocted in the scope and populate its fields with values8futhark6Get memory from the memory struct into local variables8futharkWrite back potentially changed memory addresses and sizes to the memory struct8futharkRead back potentially changed memory addresses and sizes to the memory struct into local variables8futharkCan 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.8futharkLike GenericC.cachingMemory, but adapted for ISPC codegen.8futhark-Extend the set of dependencies with a new one8futhark+Find all the dependencies in a body of code8futhark>Take a list of dependencies and iterate them to a fixed point.8futharkFind roots of variance. These are memory blocks declared in the current scope as well as loop indices of foreach loops.8futharkAnalyze variability in a body of code and run an action with info about that variability in the compiler state.8futhark!Get the variability of a variable8futhark,Get the variability qualifiers of a variable------ Safe-Inferred)"'*/025689:;>ӳ#-futhark:Various extra configuration of the kernel being generated.-futharkCan this kernel execute correctly even if previous kernels failed?-futharkDoes whatever launch this kernel check for local memory capacity itself?-futharkNumber of groups.-futhark Group size.-futharkIs there an atomic  corresponding to this ?-futharkThe mechanism that will be used for performing the atomic update. Approximates how efficient it will be. Ordered from most to least efficient.-futhark Supported directly by primitive.-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.-futharkA mapping from dimensions of nested SegOps to already computed local thread IDs. Only valid in non-virtualised case.-futharkMapping from dimensions of nested SegOps to how many iterations the virtualisation loop needs.-futhark7Information about the locks available for accumulators.-futharkWhich 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..futharkAssign 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 ...futharkAssign iterations of a for-loop to threads in the workgroup. The passed-in function is invoked with the (symbolic) iteration. For multidimensional loops, use ...futharkIterate collectively though a multidimensional space, such that all threads in the group participate. The passed-in function is invoked with a (symbolic) point in the index space..futharkIf we are touching these arrays, which kind of fence do we need?.futhark>Do an atomic update corresponding to a binary operator lambda.8futharkChange every memory block to be in the global address space, except those who are in the local 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)..futharkFor many kernels, we may not have enough physical groups to cover the logical iteration space. Some groups 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..futharkThe default kernel attributes..futharkCompute kernel attributes from ; including synthesising group-size and thread count if no grid is provided.8futhark"Perform a Replicate with a kernel..futhark"Perform a Replicate with a kernel.8futharkPerform an Iota with a kernel..futharkPerform an Iota with a kernel..futharkPerform a Rotate with a kernel.,--------------------------------------------------------.....................----------------.--------------------......------...-..........,-.------------ Safe-Inferred("'*/025689:;>8futhark7Produce partially scanned intervals; one per workgroup..futharkCompile < instance to host-level code with calls to various kernels... Safe-Inferred("'*/025689:;>ֿ.futharkCompile  instance to host-level code with calls to a single-pass kernel... Safe-Inferred&"'*/025689:;>ׂ.futharkCompile < instance to host-level code with calls to various kernels... Safe-Inferred("'*/025689:;>ݵ 8futhark&A SegBinOp with auxiliary information.8futharkThe arrays used for computing the intra-group reduction (either local or global memory).8futhark1Places to store accumulator in stage 1 reduction..futharkCode generation for the body of the SegRed, taking a continuation for saving the results of the body. The results should be represented as a pairing of a ) along with a list of indexes into that  for reading the result.8futharkThe maximum number of operators we support in a single SegRed. This limit arises out of the static allocation of counters..futharkCompile < instance to host-level code with calls to various kernels..futharkLike .), but where the body is a monadic action.8futharkPrepare intermediate arrays for the reduction. Prim-typed arguments go in local memory (so we need to do the allocation of those arrays inside the kernel), while array-typed arguments go in global memory. Allocations for the former have already been performed. This policy is baked into how the allocations are done in ExplicitAllocations.8futhark!Arrays for storing group results.The group-result arrays have an extra dimension because they are also used for keeping vectorised accumulators for first-stage reduction, if necessary. If necessary, this dimension has size group_size, and otherwise 1. When actually storing group results, the first index is set to 0....... Safe-Inferred("'*/025689:;>8futharkSome kernel bodies are not safe (or efficient) to execute multiple times.8futharkFigure out how much memory is needed per histogram, both segmented and unsegmented, and compute some other auxiliary information.8futharkThe maximum number of passes we are willing to accept for this kind of atomic update..futhark=Generate code for a segmented histogram called from the host... Safe-Inferred("'*/025689:;>.futhark>Various useful precomputed information for group-level SegOps.8futhark3The sizes of nested iteration spaces in the kernel.8futharkflattenArray 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.)8futharkapplyLambda 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 ,.8futharkAs 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.)8futhark*Find the sizes of nested parallelism in a  body..futhark4Precompute various constants and useful information..futhark*Make use of various precomputed constants............... Safe-Inferred("'*/025689:;>t.futharkCompile  instance code... Safe-Inferred("'*/025689:;>.futhark Compile a   program to low-level parallel code, with either CUDA or OpenCL characteristics..futhark Compile a   program to low-level parallel code, with either CUDA or OpenCL characteristics.+....+ Safe-Inferred&"'*/025689:;>v.futhark3Compile the program to ImpCode with OpenCL kernels.+..+ Safe-Inferred&"'*/025689:;>$.futhark3Compile the program to Python with calls to OpenCL... Safe-Inferred'"'*/025689:;>.futhark.Compile the program to C with calls to OpenCL. . . Safe-Inferred&"'*/025689:;>.futhark1Compile the program to ImpCode with CUDA kernels.+..+ Safe-Inferred'"'*/025689:;>F.futhark,Compile the program to C with calls to CUDA. . . Safe-Inferred'"'*/025689:;>88888888 Safe-Inferred&"'*/025689:;>%.futharkMonads that support type checking. The reason we have this internal interface is because we use distinct monads for checking expressions and declarations..futhark$The type checker runs in this monad.8futharkCurrently type-checking at the top level? If false, we are inside a module..futhark!A mapping from import strings to (s. This is used to resolve import declarations..futhark0Information about an error during type checking..futhark9A collection of extra information regarding a type error..futharkA single note..futharkPrettyprint type error..futharkPrettyprint type error, without location information. This can be used for cases where the location is printed in some other way..futharkAttach a reference to documentation explaining the error in more detail..futharkAn unexpected functor appeared!.futhark#An unknown variable was referenced..futharkAn unknown type was referenced..futhark,A name prefixed with an underscore was used..futharkRun a . computation..futharkRetrieve the current (..futhark$The name of the current file/import..futharkAre we type-checking at the top level, or are we inside a nested module?.futhark4We are now going to type-check the body of a module..futharkLook up a module type..futharkLook up an import..futhark Evaluate a .! computation within an extended (not replaced) environment..futharkElaborate the given name in the given namespace at the given location, producing the corresponding unique ..futharkMap source-level names do fresh unique internal names, and evaluate a type checker context with the mapping active.8futhark'Extract from a type a first-order type..futharkTry to prepend qualifiers to the type names such that they represent how to access the type in some scope..futharkTurn a 2 . into an actual error..futharkAll signed integer types..futharkAll unsigned integer types..futharkAll integer types..futharkAll floating-point types..futharkAll number types..futharkAll primitive types..futharkThe (( corresponding to the intrinsics module..futhark8The names that are available in the initial environment..futharkConstruct 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)..futharkType-check an attribute.(((((((((((((((((((((((((((((++++++......................................................................................(((((((((((((.((((((((((((......((((... Safe-Inferred&"'*/025689:;>\.futharkClass of types which allow for substitution of types with no annotations for type variable names..futhark!Substitutions to apply in a type..futharkA type substitution may be a substitution or a yet-unknown substitution (but which is certainly an overloaded primitive type!). The latter is used to remove aliases from types that are yet-unknown but that we know cannot carry aliases (see issue #682)..futharkDetermine 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..futharkFigure 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..futharkFigure 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..futharkThe two types are assumed to be structurally equal, but not necessarily regarding sizes. Adds aliases from the latter to the former.8futharkunifyTypes uf t1 t2 attempts to unify t1 and t2". If unification cannot happen, 2> is returned, otherwise a type that combines the aliasing of t1 and t2* is returned. Uniqueness is unified with uf. Assumes sizes already match, and always picks the size of the leftmost type..futharkx `subtypeOf` y is true if x is a subtype of y (or equal to y ), meaning x is valid whenever y: is. Ignores sizes. Mostly used for checking uniqueness..futharkx . y is true if x is not less unique than y..futharkEnsure that the dimensions of the RetType are unique by generating new names for them. This is to avoid name capture..futhark#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..futhark6Check for duplication of names inside a binding group.8futharkCheck whether the type contains arrow types that define the same parameter. These might also exist further down, but that's not really a problem - we mostly do this checking to help the user, since it is likely an error, but it's easy to assign a semantics to it (normal name shadowing)..futharkcheckTypeParams ps m checks the type parameters ps!, then invokes the continuation m with the checked parameters, while extending the monadic name map with ps..futhark<)/futharkMonads that which to perform unification must implement this type class./futharkThe ridigity of a size variable. All rigid sizes are tagged with information about how they were generated./futharkThe source of a rigid size./futharkRetrieve notes describing the purpose or origin of the given #. The location is used as the *current* location, for the purpose of reporting relative locations./futhark3Replace all type variables with their substitution.8futhark:Replace any top-level type variable with its substitution./futhark:Replace any top-level type variable with its substitution./futhark/Instantiate existential context in return type.8futharkIs the given type variable the name of an abstract type or type parameter, which we cannot substitute?8futhark:If the given type variable is nonrigid, what is its level?/futharkUnifies two types./futharkexpect super sub checks that sub is a subtype of super./futhark?Assert that this type must be one of the given primitive types./futhark,Assert that this type must support equality./futhark)Assert that this type must be zero-order./futhark8Assert that this type must be valid as an array element./futharkIn mustHaveConstr usage c t fs , the type t must have a constructor named c that takes arguments of types ts./futharkAssert that some type must have a field with this name and type./futharkLike unification, but creates new size variables where mismatches occur. Returns the new dimensions thus created./futharkPerform 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.9/////////////////////////////////////////////////////////9///////////////////////////////////////////////////////// Safe-Inferred&"'*/025689:;>8futharkThe integer encodes an equivalence class, so we can keep track of sizes that are statically identical./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("'*/025689:;>l/futharkConvert a program in source Futhark to a program in the Futhark core language.// Safe-Inferred&"'*/025689:;>$/futharkThe 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./futharkMapping function arguments encountered to the sizes they ended up generating (when they could not be substituted directly). This happens for function arguments that are not constants or names./futharkA description of where an artificial compiler-generated intermediate name came from./futhark-Name is the result of a function application./futharkWhat 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.8futharkWrap a function name to give it a vacuous Eq instance for SizeSource./futhark=Type checking happens with access to this environment. The / will be extended during type-checking as bindings come into scope.0futhark4Aliases in parameters indicate the lexical closure.0futharkHow something was bound.0futharkIn the current function0futhark2In an enclosing function, but not the current one.0futharkAt global scope.0futharkThe consumption set is a Maybe so we can distinguish whether a consumption took place, but the variable went out of scope since, or no consumption at all took place.8futharkA null occurence is one that we can remove without affecting anything.8futharkA seminull occurence is one that does not contain references to any variables in scope. The big difference is that a seminull occurence may denote a consumption, as long as the array that was consumed is now out of scope.8futharkInstantiate 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.8futharkCreate a new type name and insert it (unconstrained) in the substitution map.0futharkGet the type of an expression, with top level type variables substituted. Never call &; directly (except in a few carefully inspected locations)!0futharkGet the type of an expression, with all type variables substituted. Slower than 0', but sometimes necessary. Never call &; directly (except in a few carefully inspected locations)!0futhark(p0futharkNames that may not be shadowed.0futhark5The set of in-scope variables that are being aliased.0futharkBind these identifiers locally while running the provided action. Checks that the identifiers are used properly within the scope (e.g. consumption).0futhark$Bind a single term-level identifier.0futharkBind let+-bound sizes. This is usually followed by 0 immediately afterwards.0futharkCheck and bind a let -pattern.0futhark)Check and bind type and value parameters.0futhark2Allow consumption, even if the type is not unique.00000000000000 Safe-Inferred&"'*/025689:;>*0futhark"A loop that has been type-checked.0futharkAn un-checked loop.8futhark;Replace specified sizes with distinct fresh size variables.8futharkReplace the specified sizes with fresh size variables of the specified ridigity. Returns the new fresh size variables.8futhark/Mark bindings of names in "consumed" as Unique.0futhark Type-check a loop expression, passing in a function for type-checking subexpressions.000000 Safe-Inferred&"'*/025689:;>3 8futharkAn unmatched pattern. Used in in the generation of unmatched pattern warnings by the type checker.8futharkDetermine if the two types are identical, ignoring uniqueness. Mismatched dimensions are turned into fresh rigid type variables. Causes a .; if they fail to match, and otherwise returns one of them.8futhark7Extract all those names that are bound inside the type.8futhark,returnType appres ret_type arg_diet arg_type gives result of applying an argument the given types to a function with the given return type, consuming the argument with the given diet.0futharkType-check a single expression in isolation. This expression may turn out to be polymorphic, in which case the list of type parameters will be non-empty.8futharkTraverse the expression, emitting warnings and errors for various problems:Unmatched cases.If any of the literals overflow their inferred types. Note: currently unable to detect float underflow (such as 1e-400 -> 0)0futharkType-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.8futharkThis is "fixing" as in "setting them", not "correcting them". We only make very conservative fixing.8futharkExtract all the shape names that occur in positive position (roughly, left side of an arrow) in a given type.8futharkVerify 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.8futharkMove 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 8futharkFind 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.0000 Safe-Inferred&"'*/025689:;>68futhark"All names defined anywhere in the (.0futharkCreate unique renames for the module type. This is used for e.g. generative functor application.0futhark,Refine the given type name in the given env.0futharkReturn new renamed/abstracted env, as well as a mapping from names in the signature to names in the new env. This is used for functor application. The first env is the module env, and the second the env it must match.0futhark)Apply a parametric module to an argument.00000000 Safe-Inferred&"'*/025689:;>;0futharkType 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.0futharkType 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 0.0futharkType 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 0.0futharkType 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 0.0futharkAn initial environment for the type checker, containing intrinsics and such.0futharkProduce 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 0, but this is more precise. +.....000000 0000.....+00 Safe-Inferred'"'*/025689:;>E0futharkA loaded, type-checked program. This can be used to extract information about the program, but also to speed up subsequent reloads.8futharkThe ? is the name source just *before* the module was type checked.0futharkFinal name source.8futharkA type-checked file.8futhark3The name generation state after checking this file.8futhark6The warnings that were issued from checking this file.8futharkThe type-checked file.8futharkIf mapped to Nothing, treat it as present. This is used when reloading programs.0futharkA 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.0futharkNote that the location may be 2. This essentially only happens when the problem is that a root file cannot be found.0futhark>Not actually an error, but we want them reported with errors.8futhark)Modification time of the underlying file.8futharkRead the content and modification time of a file. Check if the file exits in VFS before interact with file system directly.0futharkThe ( of a 0/, as expected by e.g. type checking functions.0futharkAll warnings of a 0.1futhark>The absolute paths of the files that are part of this program.1futharkA "loaded program" containing no actual files. Use this as a starting point for 18futharkFind 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.1futhark2Extend a loaded program with (possibly new) files.1futharkLoad some new files, reusing as much of the previously loaded program as possible. This does not *extend* the currently loaded program the way 1? does it, so it is always correct (if less efficient) to pass 1.1futhark'Read and type-check some Futhark files.1futharkRead (and parse) all source files (including the builtin prelude) corresponding to a set of root files.1futharkExtra functions that should be marked as entry points; only applies to the immediate files, not any imports imported.futharkThe files to read.((((((++0000000011111111((((((++000001001110 Safe-Inferred&"'*/025689:;>I1futhark!The state of the language server.1futharkThe loaded program.1futharkThe stale data, stored to provide PositionMapping when requested. All files that have been opened have an entry.1futharkInitial state.1futharkGet the contents of a stale (last successfully complied) file's contents.1futhark#Get the PositionMapping for a file.1futharkUpdate 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.1futharkUpdate the state with another pair of file_path and PositionMapping. 111111111 111111111 Safe-Inferred&"'*/025689:;>K1futharkRetrieve hover info for the definition referenced at the given file at the given line and column number (the two 3s).1futharkFind the location of the definition referenced at the given file at the given line and column number (the two 3s).8futhark-Query the AST for information at certain Pos.1futhark*Entry point for computing PositionMapping.1futharkConvert a Futhark " to an LSP 8.1futharkCreate an LSP 8 from a Futhark #.1futharkCreate an LSP 8 from a Futhark $.111111111111 Safe-Inferred&"'*/025689:;>M8futhark6Publish diagnostics from a Uri to Diagnostics mapping.1futhark'Send warning diagnostics to the client.1futhark%Send error diagnostics to the client.1futhark,The maximum number of diagnostics to report.1futharkThe source of the diagnostics. (That is, the Futhark compiler, but apparently the client must be told such things...)11111111 Safe-Inferred&"'*/025689:;>O1futharkQ1futhark Given an 8 tracking the state, produce a set of handlers. When we want to add more features to the language server, this is the thing to change.11 Safe-Inferred&"'*/025689:;>Q1futharkRun  futhark lsp11 Safe-Inferred("'*/025689:;>V 1futhark'Print a compiler error to stdout. The  controls to which degree auxiliary information (e.g. the failing program) is also printed.1futharkRead a program from the given 2, run the given , and finish up with the given .1futharkRead a program from the given 2, run the given , and return it.1futharkPrettyprint program errors as suitable for showing on a text console.8futhark"Throw an exception formatted with  pprProgErrors if there's an error.1futharkRead and type-check a Futhark program, comprising a single file, including all imports.1futharkRead and type-check a Futhark library, comprising multiple files, including all imports.1futharkRead and parse (but do not type-check) a Futhark program, including all imports.1futhark-Not verbose, and terminates process on error.1futhark-Not verbose, and terminates process on error.1futharkRun an operation that produces warnings, and handle them appropriately, yielding the non-warning return value. "Proper handling" means e.g. to print them to the screen, as directed by the compiler configuration.1((((((++000000001111111111111111 1111111111 Safe-Inferred("'*/025689:;>XS1futharkThe version of Futhark that we are using. This is equivalent to the version defined in the .cabal file.1futhark/The version of Futhark that we are using, as a 2.1111 Safe-Inferred&"'*/025689:;>Z1futharkA command line option that either purely updates a configuration, or performs an IO action (and stops).1futharkGenerate a main action that parses the given command line options (while always adding 1).8futhark*Short-hand for 'liftIO . hPutStrLn stderr'1futharkCommon definitions for -v and -h', given the list of all other options.1futharkTerminate the program with this error message (but don't report it as an ICE, as happens with 3).888888888888811111111 Safe-Inferred&"'*/025689:;>]1futhark2An option that modifies the configuration of type cfg.1futhark,Run a parameterised Futhark compiler, where cfg6 is a user-given configuration type. Call this from main.8futhark"The configuration of the compiler.1futharkInitial configuration.futhark&Options that affect the configuration.futhark,The short action name (e.g. "compile to C").futharkThe longer action description.futharkThe pipeline to use.futhark1The action to take on the result of the pipeline.futhark Program namefutharkCommand line arguments.((((((++0000000011111111111111111111 Safe-Inferred'"'*/025689:;>` 8futhark/Extra options passed to the programs being run.8futharkOnly type check.8futharkOnly compile (do not run).8futharkTest compiled code.8futharkTest interpreted code.8futhark>Exclude those test cases that have tags we do not wish to run.1futharkRun  futhark test.11 Safe-Inferred&"'*/025689:;>`1futharkRun  futhark run.11 Safe-Inferred&"'*/025689:;>a*1futharkRun  futhark query.11 Safe-Inferred&"'*/025689:;>e8futhark$The monad in which futhark-pkg runs.8futhark5Install 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.1futharkRun  futhark pkg.11 Safe-Inferred&"'*/025689:;>f1futhark futhark imports1futhark  futhark hash1futhark futhark dataget1futhark futhark check-syntax1futhark futhark thanks1futhark futhark tokens111111111111 Safe-Inferred&"'*/025689:;>h8futharkImage dir relative to program.8futharkThe collection of file paths (all inside the image directory) produced during directive execution.1futharkRun futhark literate.11 Safe-Inferred&"'*/025689:;>h1futharkRun  futhark defs.11 Safe-Inferred("'*/025689:;>ic8futharkClosed interval, as in  System.Random.1futharkRun futhark dataset.11 Safe-Inferred&"'*/025689:;>i1futharkRun futhark datacmp11 Safe-Inferred&"'*/025689:;>j1futharkRun  futhark check.11 Safe-Inferred&"'*/025689:;>k1futharkRun  futhark bench.11 Safe-Inferred&"'*/025689:;>l8futharkDepth-first list of thresholds to tune in order, and a corresponding assignment of ancestor thresholds to ensure that they are used.8futharkThe performance difference in percentage that triggers a non-monotonicity warning. This is to account for slight variantions in run-time.1futharkRun futhark autotune11 Safe-Inferred&"'*/025689:;>pe8futharkWe keep a mapping of the names we have actually documented, so we can generate an index.8futharkLocal module types that show up in the interface. These should be documented, but clearly marked local.8futharkA set of names that we should not generate links to, because they are uninteresting. These are for example type parameters.1futhark%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.8futharkThe header documentation (which need not be present) can contain an abstract and further sections.11 Safe-Inferred)"'*/025689:;>p1futharkRun  futhark doc.11 Safe-Inferred'"'*/025689:;>r8futhark)Are we currently stopped at a breakpoint?8futhark$Skip breakpoints at these locations.8futharkThe currently loaded file.8futharkRepresentation of breaking at a breakpoint, to allow for navigating through the stack frames and such.8futhark>Index of the current breakpoint (with 0 being the outermost).1futharkRun  futhark repl.11 Safe-Inferred&"'*/025689:;>w1futharkPrint the result to stdout.1futhark.Print the result to stdout, alias annotations.1futhark%Print last use information to stdout.1futharkPrint fusion graph to stdout.1futhark)Print interference information to stdout.1futhark(Print memory alias information to stdout1futharkPrint call graph to stdout.1futhark.Print metrics about AST node counts to stdout.1futharkConvert the program to sequential ImpCode and print it to stdout.1futhark:Convert the program to GPU ImpCode and print it to stdout.1futharkConvert the program to CPU multicore ImpCode and print it to stdout.1futharkThe  futhark c action.1futharkThe futhark opencl action.1futharkThe  futhark cuda action.2futharkThe futhark multicore action.2futharkThe  futhark ispc action.2futharkThe futhark python action.2futharkThe futhark pyopencl action.2futharkThe  futhark wasm action.2futharkThe futhark wasm-multicore action.1111111111111122222211111111111121122222 Safe-Inferred&"'*/025689:;>xW2futharkRun  futhark c22 Safe-Inferred&"'*/025689:;>x2futharkRun  futhark py22 Safe-Inferred&"'*/025689:;>ys2futharkRun futhark pyopencl.22 Safe-Inferred&"'*/025689:;>z2futharkRun futhark opencl22 Safe-Inferred&"'*/025689:;>z2futharkRun  futhark c22 Safe-Inferred&"'*/025689:;>{2futharkRun futhark multicore.22 Safe-Inferred&"'*/025689:;>{2futharkRun futhark multicore.22 Safe-Inferred&"'*/025689:;> 8futharkA human-readable description of the representation expected or contained, usable for error messages.8futharkNothing is distinct from a empty pipeline - it means we don't even run the internaliser.8futharkIf true, prints programs as raw ASTs instead of their prettyprinted form.8futhark3What to do with the program after it has been read.9futharkJust print it.9futhark(Run the type checker; print type errors.9futharkRun this pipeline.9futhark,Partially evaluate away the module language.9futharkDefunctorise and monomorphise.9futhark,Defunctorise, monomorphise, and lambda-lift.9futhark=Defunctorise, monomorphise, lambda-lift, and defunctionalise.9futharkGet a Futhark pipeline from the configuration - an empty one if none exists.2futharkEntry point. Non-interactive, except when reading interpreter input from standard input.22 Safe-Inferred&"'*/025689:;>L2futharkRun  futhark cuda.22 Safe-Inferred&"'*/025689:;>2futharkRun  futhark c22 Safe-Inferred&"'*/025689:;>9futharkCatch all IO exceptions and print a better error message if they happen.2futharkThe futhark executable.229                                             !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " # # # # # # # # # # # # # # # # # # # # # # $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % & & & & & & & & ' ' ' ' ' ' ' ' '                                                                                                                                                                       ( ( ( ( (( ( ( ( ( ( ( ( ( ( ( ( ( ( ) ) ) ) ) ) ) * * * * * * * * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , , , , , , , , , , , , , , , , , , , , , , , , , , , , , - - - - - - - - - - - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .........////////////00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111122222222222222222222222222222222222222222222222333333333333333333334444444444444444444444445555555555555555666666666666666666666666777777777777777777777777778888888888888888888888888888888888888888888888888888999::::::::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;<<<<<<<<<<<<<<<<<===>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>???????????????????????????????????????@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@AAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEFFFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHH HHHHHHHHHHH HHHHHHHHHHH H HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH H IIJJKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOPPPPPPPPPPPPPPPPPPPPPPPPPPQRSSSSSSSSSSSSSSSSSSSSSSSSSSS SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSTUUUUUUUUUUUUUUUUUUUUU UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVWXXXXXXYZZZ[[[[[[[[[[[[[[\]]]]]]]]]]]^^^^^^^^^^^^^__````````````````````````````` ``````````````````````aaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcddefgghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhiijjjjjkkkllllllllllllmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmnnnnooooooooopppppppqrrr ssssssttttttttttttttttttttttuuuuuuuuuuuuuuuuuvvvvvvvvvvvvvvvvvv v vvv vvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxyyyyyyyyy yyyyyyyyyzzzzzzzzzzzzzzz{{{{{{{{|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"""""""""""""""""""""""""""""  ""    """""""""""""""""""""""""""""""""""" """ """"""""""""" """" " """"""""""""""""""""""""""""""""""""""""""""""############################ #################################################################   #################################### ##$$$$$$$$$$$$$$$$$$   $$$$$$$$$$$$   $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%   %%%   %%%%%%%%%% %%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&!&&&&&&&&&&&&&&&&&&''''''''''''''''''''''''''''''''''  '''''  ' ''' ''!'!!"" "'''''''''''''''''''"'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''(((((((((%(($$###((((((((((((((((((((((((((''(((((((((((((((((((((((((((((((((((((((((((('((((((((((((((((((( ((((((((((((((#" ((((((('(((((((((( (()))))) )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) ))))************************************************************************************************************************************+++++++++++++++++++++#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++,,,,,,,+,,,*,,,,, ,,,,,,,,,,,,,,*,,,,,*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#,,,,,,,,,,,,,,,--------------------------(''%--------------------------------------------------'------------- --------------- ----------------------------......................................................................................................................................./////////..////..././/..//////////////////////////........///...////////////////////////////////////////////////////////////////////////////////////////////////////////0/0/0/0/0/0/0/000000000000000000000000000000000000000000000000000000000000000000000000000(00000000000000000000000000000000000/00"/0000/0!0!0!0!0!0!0!0!1!1!1!1!1!1!1!1!1!1!1!1!1/01/1%1//1//1(,1111111//1//1/1/1111////1/111010101216111.:1:1:1/1;1@1@1@1@1BB1B111B1B-B1B1B1B1B11F1F1G1G1G1G1G1G1G1G1G1G1/1L1P1R1V1Z1Z1Z1`1`1`1`1`1`1b1b1b1bc1c1d1h1h1h1h1h1h1h111t*t1t1t1u1u1v1w1w1w1w1w1111w1w1z1z1z1z1{1/1|111/2/2/2/2/2/2/222221222/222222222/2/2/2/2/2/212121212121212121212121212122/2/22222/2/2/2/2/2/2/212212211211211211222112112112112~222222222+22222222222222222222222222222222.222222222222222222222222223333333333333333333333 333.3 33333333333333333333333333333333333333333333333333,3333333"333//3.33133333333333333333333333333333333333333333444444444444444444444444444444444444444444444444444444444444444444144'4442444444444444444444444444444444*4444444444444444444444444444445555555555555555545555+55555555.555555555555555555555555555555555555555555555555555"5555555555555555555555555555555555555555555"555555555555555555566666futhark-0.22.3-inplaceLanguage.Futhark.Core Futhark.TestFuthark.Internalise.MonadFuthark.Pkg.TypesFuthark.IR.SyntaxFuthark.Util.PrettyLanguage.Futhark.QueryLanguage.Futhark.Parser.MonadFuthark.Analysis.Metrics.Type)Futhark.CodeGen.Backends.GenericC.Options(Futhark.CodeGen.Backends.GenericC.PrettyFuthark.CodeGen.RTS.CFuthark.CodeGen.RTS.JavaScriptFuthark.CodeGen.RTS.Python7Futhark.Optimise.ReduceDeviceSyncs.MigrationTable.Graph 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.Prop.PatternsFuthark.IR.Prop.NamesFuthark.IR.Prop.TypeOfFuthark.Analysis.PrimExpFuthark.Transform.SubstituteFuthark.Transform.RenameFuthark.IR.PropFuthark.IR.Prop.Aliases Futhark.PassFuthark.Builder.ClassFuthark.BuilderFuthark.Construct2Futhark.Optimise.InPlaceLowering.SubstituteIndicesFuthark.Analysis.UsageTableFuthark.Analysis.RephraseFuthark.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.IR.Mem.IxFunFuthark.CodeGen.ImpCodeFuthark.CodeGen.SetDefaultSpace Futhark.CodeGen.ImpGen.Transpose"Futhark.CodeGen.ImpCode.SequentialFuthark.CodeGen.ImpCode.OpenCL!Futhark.CodeGen.ImpCode.MulticoreFuthark.CodeGen.ImpCode.GPU$Futhark.CodeGen.ImpGen.GPU.Transpose"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.GenericWASM,Futhark.CodeGen.Backends.COpenCL.Boilerplate*Futhark.CodeGen.Backends.CCUDA.BoilerplateFuthark.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.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.GPUFuthark.Pass.KernelBabysitting!Futhark.Pass.ExtractKernels.ToGPUFuthark.Pass.ExtractMulticore(Futhark.Pass.ExtractKernels.StreamKernel&Futhark.Pass.ExtractKernels.IntragroupFuthark.Pass.ExtractKernels!Futhark.Optimise.TileLoops.SharedFuthark.Optimise.Sink1Futhark.Optimise.ReduceDeviceSyncs.MigrationTable"Futhark.Optimise.ReduceDeviceSyncsFuthark.Optimise.MergeGPUBodies-Futhark.Optimise.InPlaceLowering.LowerIntoStm Futhark.Optimise.InPlaceLoweringFuthark.Optimise.HistAccsFuthark.Optimise.GenRedOptFuthark.Optimise.CSE Futhark.Optimise.InliningDeadFunFuthark.Optimise.BlkRegTilingFuthark.Optimise.TileLoopsFuthark.IR.GPU.SimplifyFuthark.Optimise.UnstreamFuthark.IR.GPUMemFuthark.Pass.Simplify&Futhark.Pass.ExplicitAllocations.SegOp#Futhark.Pass.ExplicitAllocations.MC$Futhark.Pass.ExplicitAllocations.GPUFuthark.Pass.ExpandAllocationsFuthark.Optimise.EntryPointMemFuthark.Optimise.DoubleBufferFuthark.Analysis.MemAliasFuthark.Analysis.LastUseFuthark.Analysis.Interference2Futhark.Optimise.MemoryBlockMerging.GreedyColoring#Futhark.Optimise.MemoryBlockMergingFuthark.AD.Rev.MonadFuthark.AD.Rev.ScatterFuthark.AD.Rev.ScanFuthark.AD.Rev.ReduceFuthark.AD.Rev.MapFuthark.AD.Rev.SOACFuthark.AD.Rev.LoopFuthark.AD.DerivativesFuthark.AD.RevFuthark.AD.FwdFuthark.Pass.ADFuthark.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.FutharkLanguage.Futhark.Semantic#Language.Futhark.Interpreter.ValuesLanguage.Futhark.InterpreterFuthark.Internalise.TypesValuesFuthark.Internalise.LiftLambdasFuthark.Internalise.LambdasFuthark.Internalise.Entry Futhark.Internalise.Defunctorise#Futhark.Internalise.DefunctionaliseFuthark.Internalise.BindingsFuthark.Internalise.ExpsFuthark.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.Group!Futhark.CodeGen.ImpGen.GPU.SegMapFuthark.CodeGen.ImpGen.GPUFuthark.CodeGen.ImpGen.OpenCL!Futhark.CodeGen.Backends.PyOpenCL Futhark.CodeGen.Backends.COpenCLFuthark.CodeGen.ImpGen.CUDAFuthark.CodeGen.Backends.CCUDA"Language.Futhark.TypeChecker.Monad"Language.Futhark.TypeChecker.Types"Language.Futhark.TypeChecker.Unify Futhark.Internalise.MonomorphiseFuthark.Internalise(Language.Futhark.TypeChecker.Terms.Monad&Language.Futhark.TypeChecker.Terms.Pat)Language.Futhark.TypeChecker.Terms.DoLoop"Language.Futhark.TypeChecker.Terms$Language.Futhark.TypeChecker.ModulesLanguage.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.PkgFuthark.CLI.MiscFuthark.CLI.LiterateFuthark.CLI.DefsFuthark.CLI.DatasetFuthark.CLI.DatacmpFuthark.CLI.CheckFuthark.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.DevFuthark.CLI.CUDA Futhark.CLI.CFuthark.CLI.MainFutharkData.Traversable mapAccumLFuthark.Util.Loc Futhark.IRLanguage.Futhark.Parser.LexerLanguage.Futhark.Parser.Parser Paths_futharkbaseGHC.IntInt8Int16Int32Int64GHC.WordWord8Word16Word32Word64futhark-data-1.1.0.0-6cef1baa327f974d06e65b310f3e13726cda90f7ede5dfd6d9fc5642b8124a82Futhark.Data.Compare compareValuesMismatch Futhark.Data valueTextValuehalf-0.3.1-bcd657bd33fc52b75e0909548e3e5832edc068fe1677aebf6f3849592f33caf2Numeric.Half.InternalHalf mtl-2.2.2Control.Monad.Error.Class throwErrorsrcloc-0.6.0.1-8c9ffffaf4275cce435b14a45f08583cc954686515c4b1cf4e7c3dccbfd759e2Data.LoclocOfmegaparsec-9.2.1-1bf13b0f103ce0b799143081d345b077d35e2fb1ea80a91c1eea7612f5f549e3Text.Megaparsec.ErrorerrorBundlePrettyprettyprinter-1.7.1-867e9bd7419852f508f63149d050ead3103bd14260e6aa927eb9fef7eab98b8bPrettyprinter.InternalPrettyprettyprinter-ansi-terminal-1.1.3-ec8228a686394a17d1d1fa34a2717e608d99da2495bdd062cc1cf0becee34c09&Prettyprinter.Render.Terminal.Internalbold bgColorDull colorDullbgColorcolorWhiteCyanMagentaBlueYellowGreenRedBlackColor AnsiStylesrclocOfPosLocSrcLoc locOfListLocatedLversions-5.0.3-8498d1a709fd8caf9685005bee48558881753bc3f616ea63778466aac8b58cb9 Data.Versions prettySemVer_svMeta _svPreRel_svPatch_svMinor_svMajorSemVerStrDigitsVUnit AstMetrics$fReadAstMetrics$fShowAstMetricsOptionArgument NoArgumentRequiredArgumentOptionalArgumentOptionoptionLongNameoptionShortNameoptionArgumentoptionDescription optionActiongenerateOptionParserexpTextdefinitionsTexttypeTextidText funcsTextatomicsHuniformHcudaH freeListHhalfHlockHopenclH scalarF16HscalarH schedulerHserverHtimingHtuningHutilHvaluesHerrorsH ispcUtilHcacheHcontextHcontextPrototypesHserverJsvaluesJswrapperclassesJsmemoryPyopenclPypanicPyscalarPyserverPytuningPyvaluesPyResultProduced 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$fShowPkgRevDeps EncodedString UserStringnubOrdnubByOrd mapAccumLMchunkchunkspairsunpairsmaxinumdropAttakeLastdropLast mapEithermaybeNth maybeHead splitFromEndsplitAt3focusNthhashTextunixEnvironmentisEnvVarAtLeast startupTime fancyTerminalhFancyTerminalrunProgramWithExitCodedirectoryContentstoPOSIX fromPOSIXtrimpmapIOinteractWithFileSafely convFloat zEncodeString atMostChars invertMap cartesian traverseFoldfixPointrearrangeShaperearrangeInverserearrangeReachrearrangeComposeisPermutationOftransposeIndexisMapTranspose roundFloat ceilFloat floorFloat roundDouble ceilDouble floorDouble nextafterf nextafterlgammalgammaftgammatgammafhypothypotferferfferfcerfcfcbrtcbrtfWrapped wrappedValue IntegralExpquotremdivmodsgnpowdivUp$fIntegralExpWrapped $fNumWrapped $fEqWrapped $fOrdWrapped $fShowWrapped StaleFile staleContent staleMappingPositionMappingmappingFromDiff toStalePos toCurrentLoc$fShowStaleFile$fShowPositionMapping MonadLoggerlogMsgaddLogToLogtoLogLogtoText $fMonoidLog$fSemigroupLog $fToLogText $fToLog[]$fMonadLoggerRWST$fMonadLoggerRWST0$fMonadLoggerWriterTMonadPkgRegistrygetPkgRegistryputPkgRegistrymodifyPkgRegistry PkgRegistryPkgInfo pkgVersionspkgLookupCommit PkgRevInfopkgRevZipballUrlpkgRevZipballDir pkgRevCommitpkgRevGetManifest pkgRevTime GetManifest getManifestdownloadZipball lookupPkgRevpkgInfo lookupPackagelookupPackageRevlookupNewestRev$fEqGetManifest$fShowGetManifest$fMonoidPkgRegistry$fSemigroupPkgRegistry$fEqPkgRevInfo$fShowPkgRevInfo PkgRevDepInfo solveDeps solveDepsPure$fFunctorPkgOp$fShowRoughBuildListhPutDoc hPutDocLnputDocputDocLndocTextForHandle prettyString prettyTextdocTextprettyTextOneLineppTuple' ppTupleLines' prettyTupleprettyTupleLinesapplyoneLinetextwrapannot nestedBlockshorten commastack semistackcommasepsemisepstackparensIf $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 Uniqueness NonuniqueUnique nameToStringnameFromString nameToText nameFromTextlocStr locStrRellocText locTextRelprettyStacktracebaseTagbaseName baseStringquote$fPrettyUniqueness$fMonoidUniqueness$fSemigroupUniqueness $fPrettyName $fOrdVName $fEqVName $fShowVName $fShowName$fEqName $fOrdName$fIsStringName$fSemigroupName$fEqUniqueness$fOrdUniqueness$fShowUniqueness VNameSourcenewNameblankNameSource newNameSource$fMonoidVNameSource$fSemigroupVNameSource$fLiftBoxedRepVNameSource$fEqVNameSource$fOrdVNameSourcePyProg PyClassDefClassPyFunDefDefPyExceptCatchPyStmtIfTryWhileForWithAssignAssignOpAssertRaiseExpReturnPassImportFunDefClassDefEscapePyArg ArgKeywordArgPyIdxIdxRangeIdxExpPyExpIntegerBoolFloatStringRawStringLiteralVarBinOpUnOpCondIndexCallCastTupleListFieldDictLambdaNone $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 LexerErrorAlex AlexInputByte alexGetByterunAlex alexGetInput alexSetInput alexErroralexGetStartCode alexGetPos$fShowLexerError $fMonadAlex$fApplicativeAlex $fFunctorAlexpreludeConvOpZExtSExtFPConvFPToUIFPToSIUIToFPSIToFPIToBBToIFToBBToFCmpOpCmpEqCmpUltCmpUleCmpSltCmpSleFCmpLtFCmpLeCmpLltCmpLleAddFAddSubFSubMulFMulUDivUDivUpSDivSDivUpFDivFModUModSModSQuotSRemSMinUMinFMinSMaxUMaxFMaxShlLShrAShrAndOrXorPowFPowLogAndLogOrSafetyUnsafeSafeOverflow OverflowWrap OverflowUndefNot ComplementAbsFAbsSSignumUSignumFSignum PrimValueIntValue FloatValue BoolValue UnitValue Float16Value Float32Value Float64Value Int8Value Int16Value Int32Value Int64ValuePrimTypeIntType FloatTypeUnitFloat16Float32Float64 allIntTypes allFloatTypes allPrimTypesintValue intValueType valueIntegral floatValuefloatValueType primValueTypeblankPrimValueallUnOps allBinOps allCmpOps allConvOpsdoUnOp doComplementdoAbsdoFAbs doSSignum doUSignumdoBinOpdoAdddoMuldoSDivdoSModdoPowdoConvOp flipConvOpdoZExtdoSExtdoFPConvdoFPToUIdoFPToSIdoUIToFPdoSIToFPdoCmpOpdoCmpEqdoCmpUltdoCmpUledoCmpSltdoCmpSledoFCmpLtdoFCmpLe intToWord64 intToInt64 binOpType cmpOpTypeunOpType convOpTypeprimFunszeroIshoneIsh negativeIsh zeroIshInt oneIshInt primBitSize primByteSize intByteSize floatByteSizecommutativeBinOpassociativeBinOp 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 OpaqueRecordEntryPointType TypeOpaqueTypeTransparent ValueType SignednessUnsignedSignedAttrsunAttrsAttrAttrNameAttrIntAttrComp ErrorMsgPart ErrorStringErrorValErrorMsgPatElem patElemName patElemDec FlatSlice FlatDimIndexSliceunSliceDimIndexDimFixDimSliceParam paramAttrs paramNameparamDecSubExpConstantCertsunCertsIdent identName identTypeDietConsumeObserve ObservePrim DeclExtTypeDeclTypeExtTypeTypeTypeBasePrimAccArrayMem NoUniquenessSpaceIdSpace DefaultSpace ScalarSpace ArrayShape shapeRank subShapeOfRankExtShapeExtSizeExtFreeShape ShapeBase shapeDims CommutativityNoncommutative Commutative stripDimsdimFix sliceIndices sliceDims unitSlicefixSlice sliceSlice flatSliceDimsflatSliceStrideserrorMsgArgTypesoneAttrinAttrs withoutAttrsmapAttrs$fMonoidCommutativity$fSemigroupCommutativity$fMonoidShapeBase$fSemigroupShapeBase$fTraversableShapeBase$fFoldableShapeBase$fFunctorShapeBase$fTraversableExt $fFoldableExt $fFunctorExt $fMonoidRank$fSemigroupRank$fArrayShapeRank$fMonoidNoUniqueness$fSemigroupNoUniqueness $fMonoidCerts$fSemigroupCerts$fArrayShapeShapeBase$fArrayShapeShapeBase0$fBifoldableTypeBase$fBifunctorTypeBase$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$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$fEqNoUniqueness$fOrdNoUniqueness$fShowNoUniqueness $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 $fIsValueInt8FixExtfixExtSetTypesetType DeclExtTyped declExtTypeOfExtTyped extTypeOf DeclTyped declTypeOfTypedtypeOf rankShaped arrayRank arrayShape setArrayShape 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$fSetTypePatElem $fSetType(,)$fSetTypeTypeBase $fFixExt() $fFixExtExt $fFixExt[]$fFixExtShapeBase$fFixExtTypeBase$fDeclExtTypedTypeBase$fExtTypedTypeBase IsRetType primRetType applyRetType IsBodyType primBodyType expectedTypes$fIsBodyTypeTypeBase$fIsRetTypeTypeBaseRepTypesLetDecExpDecBodyDec FParamInfo LParamInfoRetType BranchTypeOpProg progTypes progConstsprogFuns EntryPoint EntryResultentryResultUniquenessentryResultType EntryParamentryParamNameentryParamUniquenessentryParamTypefunDefEntryPoint funDefAttrs funDefName funDefRetType funDefParams funDefBodyLParamFParam lambdaParams lambdaBodylambdaReturnType MatchSort MatchNormal MatchFallback MatchEquivMatchDec matchReturns matchSortLoopFormForLoop WhileLoopBasicOpApplyMatchDoLoopWithAccCasecasePatcaseBody WithAccInputOpaqueArrayLitUpdate FlatIndex FlatUpdateConcatCopyManifestIota ReplicateScratchReshape RearrangeRotate UpdateAcc ReshapeKind ReshapeCoerceReshapeArbitraryOpaqueOp OpaqueNil OpaqueTraceBodybodyDecbodyStms bodyResult SubExpResresCerts resSubExpStmsStmLetstmPatstmAuxstmExpStmAux stmAuxCerts stmAuxAttrs stmAuxDecPatpatElemsoneStm stmsFromList stmsToListstmsHeadstmsLast subExpResvarRes subExpsResvarsRessubExpResVName$fTraversablePat $fFoldablePat $fFunctorPat $fMonoidPat$fSemigroupPat$fSemigroupStmAux$fTraversableCase$fFoldableCase $fFunctorCase$fEqProg $fOrdProg $fShowProg$fEqEntryResult$fShowEntryResult$fOrdEntryResult$fEqEntryParam$fShowEntryParam$fOrdEntryParam $fEqMatchDec$fShowMatchDec $fOrdMatchDec $fEqMatchSort$fShowMatchSort$fOrdMatchSort$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 $fOrdLoopForm$fShowLoopForm $fEqLoopForm$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$fPrettyNoUniqueness$fPrettyCommutativity $fPrettyVName $fPrettyProg$fPrettyFunDef$fPrettyLambda $fPrettyExp $fPrettyCase $fPrettyStm $fPrettyBody $fPrettySeq ExtendedScope SameScopeScopedscopeOf LocalScope localScopeHasScope lookupType lookupInfoaskScope asksScopeScopeNameInfoLetName FParamName LParamName IndexName inScopeOf scopeOfPatscopeOfPatElemscopeOfLParamsscopeOfFParams castScope extendedScope$fTypedNameInfo$fHasScopekrepRWST$fHasScopekrepRWST0$fHasScopekrepExceptT$fHasScopekrepReaderT$fLocalScopekrepRWST$fLocalScopekrepRWST0$fLocalScopekrepReaderT$fLocalScopekrepExceptT$fScopedkrepLambda$fScopedkrepLoopForm$fScopedkrep(,)$fScopedkrepFunDef$fScopedkrepStm$fScopedkrepSeq$fScopedkrep[]$fHasScopekrepExtendedScope$fFunctorExtendedScope$fApplicativeExtendedScope$fMonadExtendedScope$fMonadReaderMapExtendedScope$fShowNameInfoTraverseOpStmstraverseOpStmsOpStmsTraverserWalker walkOnSubExp walkOnBody walkOnVName walkOnRetTypewalkOnBranchType walkOnFParam walkOnLParamwalkOnOpMapper mapOnSubExp mapOnBody mapOnVName mapOnRetTypemapOnBranchType mapOnFParam mapOnLParammapOnOpidentityMappermapExpMmapExpidentityWalkerwalkExpMtraverseLambdaStms 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 $fFreeInSet $fFreeIn[] $fFreeIn(,,,) $fFreeIn(,,) $fFreeIn(,) $fFreeInInt $fFreeIn() $fFreeInFV$fFreeDecNames$fFreeDecMaybe $fFreeDec[] $fFreeDec(,) $fFreeDec() $fFreeInStm $fFreeInExp $fFreeInBody$fFreeInLambda$fFreeInFunDef $fEqNames $fShowNamesTypedOpopType subExpType subExpResTypemapType basicOpType expExtTypeexpExtTypeSize$fHasScopekrepFeelBad$fApplicativeFeelBad$fFunctorFeelBad $fTypedOp()FloatExp 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$fSubstitute()$fSubstituteRank$fSubstituteCerts$fSubstitutePat$fSubstituteSubExpRes$fSubstituteParam$fSubstituteStmAux$fSubstituteAttrs$fSubstitutePatElem$fSubstituteSubExp$fSubstituteVName$fSubstituteBool$fSubstituteMaybe$fSubstitute(,,,)$fSubstitute(,,)$fSubstitute(,)$fSubstituteSeq$fSubstitute[]$fSubstituteNameInfo$fSubstituteLambda$fSubstituteBody$fSubstituteStm$fSubstituteExp RenameableRenamerenameRenameM renameProg renameExp renameStm renameBody renameLambda renamePatrenameSomethingsubstituteRename renameBound renamingStms$fRenameDimIndex $fRename() $fRenameExt$fRenameShapeBase $fRenameRank $fRenameNames$fRenameTypeBase$fRenamePrimType$fRenameSubExpRes$fRenameStmAux $fRenameAttrs $fRenameCerts$fRenamePatElem $fRenamePat $fRenameParam$fRenameSubExp $fRenameIdent $fRenameBool $fRenameMaybe $fRename(,,) $fRename(,) $fRename[] $fRenameVName$fRenameLambda $fRenameExp $fRenameStm $fRenameBody$fRenameFunDef$fFunctorRenameM$fApplicativeRenameM$fMonadRenameM$fMonadFreshNamesRenameM$fMonadReaderRenameEnvRenameMASTRepexpTypesFromPatIsOpsafeOpcheapOpASTConstraintsisBuiltInFunctionbuiltInFunctions asBasicOpsafeExp subExpVars subExpVarcommutativeLambdadefAuxstmCertscertifyexpExtTypesFromPatattrsForAssert lamIsBinOp$fIsOp() CanBeAliased OpWithAliasesremoveOpAliases addOpAliases AliasTable AliasedOp opAliases consumedInOp AliasesOf aliasesOfAliased bodyAliasesconsumedInBody subExpAliases expAliases consumedInStm consumedInExpconsumedByLambda patAliases lookupAliases$fAliasesOfPatElem$fAliasesOfNames $fAliasedOp()$fCanBeAliased()passNamepassDescription 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$fLocalScopekrepBuilderT$fHasScopekrepBuilderT$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 $fToExpSubExpIndexSubstitutionsIndexSubstitutionsubstituteIndicesUsages UsageTablewithoutusedexpand isConsumed isInResultisUsedDirectlyisSizeusagesusage consumedUsage inResultUsage sizeUsage sizeUsages consumedUpresentUwithoutU usageInStm usageInPat$fMonoidUsages$fSemigroupUsages$fMonoidUsageTable$fSemigroupUsageTable$fEqUsageTable$fShowUsageTable $fEqUsages $fOrdUsages $fShowUsages RephraserrephraseExpDecrephraseLetBoundDecrephraseFParamDecrephraseLParamDecrephraseBodyDecrephraseRetTyperephraseBranchType rephraseOp rephraseProgrephraseFunDef rephraseExp rephraseStm rephrasePatrephrasePatElem rephraseBodyrephraseLambdaMetricsM OpMetrics opMetricsseeninside progMetrics bodyMetrics stmMetrics lambdaMetrics$fMonoidCountMetrics$fSemigroupCountMetrics $fOpMetrics()$fOpMetricsMaybe$fMonadMetricsM$fApplicativeMetricsM$fFunctorMetricsM!$fMonadWriterCountMetricsMetricsM DependenciesdataDependenciesfindNecessaryForReturned NumThreads GroupSize NumGroupsCountunCount SizeClass SizeThreshold SizeGroup SizeNumGroupsSizeTile SizeRegTileSizeLocalMemory SizeBespoke KernelPath sizeDefault$fPrettySizeClass$fTraversableCount$fFoldableCount$fFunctorCount $fEqCount $fOrdCount $fShowCount $fNumCount$fIntegralExpCount $fFreeInCount $fPrettyCount$fSubstituteCount $fEqSizeClass$fOrdSizeClass$fShowSizeClassAliasesAndConsumed BodyAliasing ConsumedInExp VarAliasesAliasDec unAliasesAliasesremoveScopeAliasesremoveProgAliasesremoveFunDefAliasesremoveExpAliasesremoveStmAliasesremoveBodyAliasesremoveLambdaAliasesremovePatAliases mkAliasedBody mkAliasedPatmkBodyAliasing mkStmsAliasesconsumedInStms trackAliases$fBuilderOpsAliases$fASTRepTYPEAliases$fBuildableTYPEAliases$fPrettyRepTYPEAliases$fAliasedTYPEAliases$fFreeDecAliasDec$fPrettyAliasDec$fFreeInAliasDec$fSubstituteAliasDec$fRenameAliasDec $fOrdAliasDec $fEqAliasDec$fMonoidAliasDec$fSemigroupAliasDec$fAliasesOf(,)$fRepTypesTYPEAliases$fShowAliasDec CanBeWise OpWithWisdomremoveOpWisdom addOpWisdom Informing ExpWisdom VarWisdomvarWisdomAliasesWiseremoveScopeWisdomaddScopeWisdomremoveFunDefWisdomremoveStmWisdomremoveLambdaWisdomremoveBodyWisdomremoveExpWisdomremovePatWisdomaddWisdomToPat mkWiseBody mkWiseStm mkWiseExpDec informStms informBody informLambda informFunDef$fPrettyVarWisdom$fFreeInVarWisdom$fSubstituteVarWisdom$fRenameVarWisdom$fRenameExpWisdom$fSubstituteExpWisdom$fFreeDecExpWisdom$fFreeInExpWisdom$fFreeDecBodyWisdom$fFreeInBodyWisdom$fSubstituteBodyWisdom$fRenameBodyWisdom $fCanBeWise()$fBuildableTYPEWise$fAliasedTYPEWise$fPrettyRepTYPEWise$fASTRepTYPEWise$fRepTypesTYPEWise$fEqBodyWisdom$fOrdBodyWisdom$fShowBodyWisdom $fEqExpWisdom$fOrdExpWisdom$fShowExpWisdom $fEqVarWisdom$fOrdVarWisdom$fShowVarWisdom aliasAnalysis analyseFun analyseBody analyseStms analyseExp analyseLambda Checkable checkExpDec checkBodyDeccheckFParamDeccheckLParamDeccheckLetBoundDec checkRetTypematchPat primFParammatchReturnTypematchBranchTypematchLoopResult CheckableOpcheckOpTypeM TypeError ErrorCaseUnexpectedTypeReturnTypeErrorDupDefinitionError DupParamError DupPatErrorInvalidPatErrorUnknownVariableErrorUnknownFunctionErrorParameterMismatch SlicingError BadAnnotation ReturnAliasedUniqueReturnAliased NotAnArrayPermutationErrorbadcontextconsume checkOpWith alternativebinding lookupVarrequirerequireI checkProg checkSubExp checkCerts checkStms checkBodycheckExpcheckSOACArrayArgs checkType checkExtTypecheckStm matchExtPatmatchExtBranchTypeargType noArgAliasescheckArg checkLambdarequirePrimExp$fMonoidConsumption$fSemigroupConsumption$fHasScopeTYPEAliasesTypeM$fShowTypeError$fShowErrorCase $fMonadTypeM$fFunctorTypeM$fApplicativeTypeM$fMonadReaderEnvTypeM$fMonadStateTStateTypeM$fShowConsumption $fEqOccurence$fShowOccurence $fEqUsage $fOrdUsage $fShowUsagePipelinePipelineConfigpipelineVerbosepipelineValidateAction actionNameactionDescriptionactionProcedureFutharkM runFutharkM runPipelineonePass condPipelinepasses$fMonadLoggerFutharkM$fMonadFreshNamesFutharkM$fCategorykPipeline$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 VarLookupapplySimpleRulesIxFun ixfunLMADs contiguousLMAD lmadOffsetlmadDimsLMADDimldStrideldShapeldPermldMon MonotonicityIncDecUnknownsubstituteInIxFunisDirectshapeindex iotaOffsetiota mkExistentialpermuteslice flatSlicereshapecoercerankrebaselinearWithOffsetrearrangeWithOffsetisLinearexistentialize closeEnough equivalentdynamicEqualsLMAD$fPrettyMonotonicity$fTraversableLMAD$fFoldableLMAD $fFunctorLMAD $fFreeInLMAD $fRenameLMAD$fSubstituteLMAD $fPrettyLMAD$fTraversableIxFun$fFoldableIxFun$fFunctorIxFun $fFreeInIxFun $fRenameIxFun$fSubstituteIxFun $fPrettyIxFun $fShowIxFun $fEqIxFun $fShowLMAD$fEqLMAD $fShowLMADDim $fEqLMADDim$fShowMonotonicity$fEqMonotonicityBytesElementsExpArgMemArgTExp VolatilityVolatile NonvolatileCodeSkip:>>: DeclareMem DeclareScalar DeclareArrayAllocateWrite SetScalarReadSetMem DebugPrint TracePrint ArrayContents ArrayValues ArrayZerosFunction FunctionT functionEntryfunctionOutput functionInput functionBodyentryPointNameentryPointResultsentryPointArgs ExternalValue OpaqueValueTransparentValue ValueDesc ArrayValue ScalarValue Constants constsDecl constsInit Functions DefinitionsdefTypes defConstsdefFunsMemParam ScalarParamDimSizeMemSizelexicalMemoryUsage calledFuncselementsbytes 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$fFunctorConstants$fPrettyDefinitions$fFunctorDefinitions$fShowDefinitions$fShowConstants$fShowFunctions$fShowFunctionT $fShowCode $fShowArg$fEqVolatility$fOrdVolatility$fShowVolatility$fShowArrayContents$fShowEntryPoint$fShowExternalValue $fEqValueDesc$fShowValueDescsetDefaultSpacesetDefaultCodeSpace transposeArgsmapTransposeFunction SequentialProgram$fFreeInSequential$fPrettySequential KernelTarget TargetOpenCL TargetCUDAOpenCL LaunchKernelGetSize CmpSizeLe GetSizeMax KernelSafety SafetyNone SafetyCheap SafetyFull KernelArg ValueKArgMemKArgSharedMemoryKArg KernelNameCLCode FailureMsg failureErrorfailureBacktrace openClProgram openClPreludeopenClKernelNamesopenClUsedTypes openClSizesopenClFailureshostDefinitionsnumFailureParams$fPrettyOpenCL$fEqKernelTarget $fShowOpenCL$fEqKernelSafety$fOrdKernelSafety$fShowKernelSafety $fShowMayFail$fShowKernelArgKernelHandlingTraverseKernels 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 AtomicUMinKernelOp GetGroupId GetLocalId GetLocalSizeGetLockstepWidthBarrierMemFence LocalAlloc ErrorSyncFence FenceLocal FenceGlobal KernelUse ScalarUse MemoryUseConstUseKernel kernelBody kernelUseskernelNumGroupskernelGroupSize kernelNamekernelFailureTolerantkernelCheckLocalMemoryHostOp CallKernelKernelConstExp KernelConst SizeConst KernelCodeHostCode$fPrettyKernelConst$fPrettyKernelUse$fFreeInKernelOp$fPrettyKernelOp$fPrettyKernel$fFreeInKernel$fFreeInHostOp$fPrettyHostOp $fShowHostOp $fShowKernel$fShowKernelOp $fShowFence $fEqFence $fOrdFence $fEqKernelUse$fOrdKernelUse$fShowKernelUse$fEqKernelConst$fOrdKernelConst$fShowKernelConst TransposeArgs TransposeTypeTransposeNormalTransposeLowWidthTransposeLowHeightTransposeSmallmapTransposeKernel$fEqTransposeType$fOrdTransposeType$fShowTransposeTypeintTypeToCTypeprimTypeToCTypeprimStorageType primAPIType toStorage fromStorage tupleFieldfunNamedefaultMemBlockType arrayName opaqueName scalarToPrimcproductcsum cScalarDefs storageSizestoreValueHeaderloadValueHeader$fToExpPrimValue$fToExpFloatValue$fToExpIntValue$fToIdentVName $fToIdentText $fToIdentName serverDefscliDefs Constructor CompilerM CompilerState compNameSrccompInit compUserState CompilerEnv envOperations envVarExp OperationsopsWriteScalar opsReadScalar opsAllocateopsCopyopsStaticArray opsCompileropsEntryOutput opsEntryInput EntryInput EntryOutput StaticArray ReadScalar WriteScalar OpCompilerdefaultOperationscollectcollect'atInitstmemptyConstructor compileProg simpleCall compileName compileDim unpackDimcopyMemoryDefaultSpacecompilePrimTypecompilePrimTypeExtcompilePrimToNpcompilePrimToExtNpcompilePrimValue compileVarcompilePrimExp compileExp compileCode$fMonadFreshNamesCompilerM$fFunctorCompilerM$fApplicativeCompilerM$fMonadCompilerM"$fMonadStateCompilerStateCompilerM!$fMonadReaderCompilerEnvCompilerM$fMonadWriter[]CompilerM openClInit envCachedMem opsDeallocate opsMemoryTypeopsErroropsCall opsFatMemory opsCritical CallCompiler CopyBarrier CopyNoBarrier Deallocate MemoryType PointerQuals ErrorCompiler HeaderSection ArrayDeclOpaqueTypeDecl OpaqueDecl EntryDeclMiscDeclInitDeclcompArrayTypescompEarlyDeclscompHeaderDecls compLibDecls compCtxFieldscompProfileItemscompClearItemscompDeclaredMem compItems PublicnessPrivatePublicfreeAllocatedMemdeclAllocatedMemcontextContentscontextFinalInits runCompilerM getUserStatemodifyUserState inNewFunctionitemitems fatMemorycacheMem publicDef publicDef_ headerDecllibDecl earlyDecl contextFieldcontextFieldDyn profileReportonClearstmsdecl publicName memToCType rawMemCType fatMemType fatMemSet fatMemAlloc fatMemUnRefrawMem allocRawMem freeRawMemdeclMemresetMemsetMemunRefMemallocMem cachingMemory derefPointervolQualswriteScalarPointerWithQualsreadScalarPointerWithQualscriticalSection contextType configType$fEqCopyBarrier$fShowCopyBarrier$fEqHeaderSection$fOrdHeaderSection$fEqPublicness$fOrdPublicness$fShowPublicness opaqueToCTypevalueTypeToCTypegenerateAPITypes onEntryPointerrorMsgStringcompileExpToName linearCode compileFun kernelsToCUDAkernelsToOpenCL $fEqOpsModeCPartscHeadercUtilscCLIcServercLib cJsonManifest asLibrary asExecutableasServer compileProg'generateBoilerplate JSEntryPointname parametersret extToStringemccExportNamesjavascriptWrapper runServerlibraryExports failureSwitch copyDevToDev copyDevToHost copyHostToDevcopyScalarToDevcopyScalarFromDevprofilingEvent kernelRuntime kernelRunscostCentreReportsizeLoggingCode commonOptionsprofilingEnclosureIndexOpindexOp entryDepth entryIsSize entryAccInputIndexed IndexedArray SymbolTable loopDepthbindingsavailableAtClosestLoopsimplifyMemory fromScopetoScopedeepenindexedAddCertsentryStm entryFParam entryLParamentryLetBoundDecelem lookupStm lookupExp lookupBasicOp lookupSubExp lookupLoopVarlookupLoopParamaliases availableindex' insertFParams insertLParaminsertLoopMerge insertLoopVar hideCertified noteAccTokens$fFreeInIndexed $fTypedEntry$fMonoidSymbolTable$fSemigroupSymbolTable $fIndexOp() IndexResult SubExpResultsimplifyIndexingRuleBook BottomUpRuleBottomUpRuleOpBottomUpRuleDoLoopBottomUpRuleMatchBottomUpRuleBasicOpBottomUpRuleGenericBottomUp TopDownRule TopDownRuleOpTopDownRuleDoLoopTopDownRuleMatchTopDownRuleBasicOpTopDownRuleGenericTopDownSimplificationRule RuleGeneric RuleBasicOp RuleMatch RuleDoLoopRuleOpRuleSimplifyRuleMcannotSimplify liftMayberuleBooktopDownSimplifyStmbottomUpSimplifyStm$fMonadBuilderRuleM $fMonoidRules$fSemigroupRules$fMonoidRuleBook$fSemigroupRuleBook$fFunctorRuleM$fApplicativeRuleM $fMonadRuleM$fMonadFreshNamesRuleM$fHasScopekrepRuleM$fLocalScopekrepRuleM matchRulesfoldClosedFormloopClosedForm loopRules basicOpRules standardRulesremoveUnnecessaryCopy SimplifiablesimplifySimplifiableRep BlockPredSimpleM SimpleOps mkExpDecSmkBodySprotectHoistedOpSopUsageSsimplifyPatFromExpS 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$fSimplifiable[]$fSimplifiableMaybe$fSimplifiableInt$fSimplifiable(,,)$fSimplifiable(,)$fLocalScopeTYPEWiseSimpleM$fHasScopeTYPEWiseSimpleM$fApplicativeSimpleM$fFunctorSimpleM$fMonadSimpleM$fMonadReader(,)SimpleM$fMonadState(,,)SimpleMsimplifyPrimExpsimplifyExtPrimExp simplifyProgsimplifySomethingcopyPropagateInProgcopyPropagateInStmscopyPropagateInFunSeq$fTraverseOpStmsTYPEWise$fBuilderOpsWise$fPrettyRepTYPESeq$fTraverseOpStmsTYPESeq$fBuilderOpsSeq$fBuildableTYPESeq$fCheckableTYPESeq$fCheckableOpTYPESeq$fASTRepTYPESeq$fRepTypesTYPESeq SOACMappermapOnSOACSubExpmapOnSOACLambdamapOnSOACVNameReduceredComm redLambda redNeutralScan scanLambda scanNeutral ScremaFormHistOp histShapehistRaceFactorhistDest histNeutralhistOpSOACStreamScatterHistJVPVJPScrema scanResults singleScan redResults singleReduce scremaTypemkIdentityLambdaisIdentityLambdanilFn scanomapSOAC redomapSOACscanSOAC reduceSOACmapSOACisScanomapSOAC isScanSOAC isRedomapSOAC isReduceSOAC isMapSOAC scremaLambdagroupScatterResultsgroupScatterResults'splitScatterResultsidentitySOACMappermapSOACMtraverseSOACStmssoacType typeCheckSOACppScremappStream ppScatterppHist$fFreeInHistOp $fPrettyScan $fFreeInScan$fPrettyReduce$fFreeInReduce$fFreeInScremaForm $fPrettySOAC$fOpMetricsSOAC $fIndexOpSOAC $fIsOpSOAC$fAliasedOpSOAC $fTypedOpSOAC$fCanBeWiseSOAC$fCanBeAliasedSOAC $fRenameSOAC$fSubstituteSOAC $fFreeInSOAC$fEqSOAC $fOrdSOAC $fShowSOAC$fEqScremaForm$fOrdScremaForm$fShowScremaForm $fEqReduce $fOrdReduce $fShowReduce$fEqScan $fOrdScan $fShowScan $fEqHistOp $fOrdHistOp $fShowHistOpredomapToMapAndReduce dissectScremasequentialStreamWholeArraypartitionChunkedFoldParametersSOACSusesAD$fPrettyRepTYPESOACS$fBuilderOpsSOACS$fBuildableTYPESOACS$fCheckableTYPESOACS$fCheckableOpTYPESOACS$fASTRepTYPESOACS$fRepTypesTYPESOACS Transformer FirstOrderReptransformFunDeftransformConststransformStmRecursively transformSOACtransformLambdafirstOrderTransformiswimirwim rwimPossible InternaliseMInternaliseEnv envSubstsenvDoBoundsChecksenvSafeenvAttrs VarSubstsFunInforunInternaliseMsubstitutingVars lookupSubst addOpaques addFunDeflookupFunction'lookupFunction lookupConst bindFunction bindConstantassert$fMonadBuilderInternaliseM!$fLocalScopeTYPESOACSInternaliseM$fFunctorInternaliseM$fApplicativeInternaliseM$fMonadInternaliseM'$fMonadReaderInternaliseEnvInternaliseM($fMonadStateInternaliseStateInternaliseM$fMonadFreshNamesInternaliseM$fHasScopeTYPESOACSInternaliseM argShapesensureResultShapeensureResultExtShapeensureExtShape ensureShapeensureArgShapesHasSOACasSOACsoacOp simpleSOACS simplifySOACSsimplifyConsts simplifySOAC soacRulesliftIdentityMappingremoveReplicateMappingremoveUnusedSOACInputsimplifyKnownIterationSOACsimplifyMapIota$fHasSOACTYPEWise $fEqArrayOp $fOrdArrayOp $fShowArrayOp CallGraphisFunInCallGraphcallscalledByConsts allCalledBybuildCallGraph numOccurences$fPrettyFunCalls$fSemigroupFunCalls$fMonoidFunCalls$fPrettyCallGraph $fEqCallGraph$fOrdCallGraph$fShowCallGraph $fEqFunCalls $fOrdFunCalls$fShowFunCallsNotSOACInputViewLEmptyL:>ViewFEmptyF:<ArrayTransformsArrayTransform ReshapeOuter ReshapeInner noTransformsnullTransformsviewfviewl|><|transformFromExpvarInput identInput isVarInput isVarishInput addTransformaddInitialTransformsapplyTransforms inputArrayinputTransforms inputType inputRowType inputRank transformRowstransposeInputinputs setInputslambda setLambdawidthtoSOACfromExp soacToStream$fSubstituteArrayTransform$fSubstituteArrayTransforms$fMonoidArrayTransforms$fSemigroupArrayTransforms $fPrettyInput$fSubstituteInput $fShowNotSOAC $fShowInput $fEqInput $fOrdInput$fEqArrayTransforms$fOrdArrayTransforms$fShowArrayTransforms$fShowArrayTransform$fEqArrayTransform$fOrdArrayTransform DepGraphAugDepGraphdgGraphdgProducerMapping dgAliasTable DepContextDepNodeNodeTStmNodeSoacNodeResNodeFreeNode FinalNode 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 $fShowNesting FusedSOACfsSOACfsOutputTransform fsOutNames attemptFusion$fShowFusedSOAC$fFunctorTryFusion$fApplicativeTryFusion$fAlternativeTryFusion$fMonadTryFusion$fMonadFailTryFusion$fMonadFreshNamesTryFusion$fHasScopeTYPESOACSTryFusion$fLocalScopeTYPESOACSTryFusion fuseSOACs$fMonadFreshNamesFusionM$fMonadFusionM$fApplicativeFusionM$fFunctorFusionM$fMonadStateFusionEnvFusionM$fHasScopeTYPESOACSFusionM$fLocalScopeTYPESOACSFusionM OpReturns opReturns FunReturns BodyReturns ExpReturns MemReturnReturnsInBlockReturnsNewBlockMemBindArrayInMemBoundMemInfoMemPrimMemMemMemArrayMemAccExtIxFunMemOpAllocInner HasLetDecMem letDecMem BranchTypeMem RetTypeMem LParamMem FParamMem LetDecMemtraverseMemOpStms isStaticIxFunexistentialiseIxFunnoUniquenessReturnsbodyReturnsToExpReturnsmatchFunctionReturnTypematchLoopResultMemmatchBranchReturnType matchPatToExp lookupMemInfo subExpMemInfolookupArraySummarylookupMemSpace checkMemInfobodyReturnsFromPat extReturns varReturns expReturns$fIndexOpMemOp$fCanBeWiseMemOp $fIsOpMemOp$fOpMetricsMemOp $fPrettyMemOp$fSubstituteMemOp $fRenameMemOp$fCanBeAliasedMemOp$fAliasedOpMemOp$fTypedOpMemOp $fFreeInMemOp$fPrettyMemInfo$fSimplifiableMemInfo$fRenameMemInfo$fSubstituteMemInfo$fFreeInMemInfo$fDeclTypedMemInfo$fTypedMemInfo$fTypedMemInfo0$fFixExtMemInfo$fExtTypedMemInfo$fDeclExtTypedMemInfo$fSimplifiableMemBind$fFreeInMemBind$fPrettyMemBind$fSubstituteMemBind$fRenameMemBind $fOrdMemBind $fEqMemBind$fHasLetDecMem(,)$fHasLetDecMemMemInfo$fSimplifiableMemReturn$fFreeInMemReturn$fPrettyMemReturn$fFixExtMemReturn$fSubstituteMemReturn$fRenameMemReturn$fOrdMemReturn $fEqMemReturn$fIsBodyTypeMemInfo$fIsRetTypeMemInfo $fOpReturns()$fOpReturnsMemOp$fShowMemReturn $fShowMemBind $fEqMemInfo $fShowMemInfo $fOrdMemInfo $fEqMemOp $fOrdMemOp $fShowMemOpExpHintNoHintHint SizeSubst opIsConstAllocMAllocEnvaggressiveReuse allocSpace envConsts allocInOp envExpHints AllocablearraySizeInBytesExp allocForArrayexplicitAllocationsGeneric explicitAllocationsInStmsGeneric allocInStms mkLetNamesB' mkLetNamesB'' simplifiabledefaultExpHints$fSizeSubstMemOp $fSizeSubst()$fMonadBuilderAllocM$fApplicativeAllocM$fFunctorAllocM $fMonadAllocM$fMonadFreshNamesAllocM$fHasScopektorepAllocM$fLocalScopektorepAllocM$fMonadReaderAllocEnvAllocM $fEqMemReq $fShowMemReqHasSegOp SegOpLevelasSegOpsegOp SegOpMappermapOnSegOpSubExpmapOnSegOpLambdamapOnSegOpBodymapOnSegOpVNamemapOnSegOpLevelSegMapSegRedSegScanSegHistSegSpacesegFlat 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$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 simpleGenericsimplifyProgGenericsimplifyStmsGenericSeqMem simpleSeqMem$fTraverseOpStmsTYPESeqMem$fBuilderOpsSeqMem$fCheckableTYPESeqMem$fCheckableOpTYPESeqMem$fPrettyRepTYPESeqMem$fASTRepTYPESeqMem$fRepTypesTYPESeqMemexplicitAllocationsMCOpParOpOtherOptraverseMCOpStms typeCheckMCOp simplifyMCOp$fOpMetricsMCOp $fPrettyMCOp $fIndexOpMCOp$fCanBeWiseMCOp$fCanBeAliasedMCOp$fAliasedOpMCOp $fTypedOpMCOp $fIsOpMCOp $fFreeInMCOp $fRenameMCOp$fSubstituteMCOp$fEqMCOp $fOrdMCOp $fShowMCOpMCMem$fBuilderOpsMCMem$fCheckableTYPEMCMem$fCheckableOpTYPEMCMem$fPrettyRepTYPEMCMem$fOpReturnsMCOp$fOpReturnsMCOp0$fASTRepTYPEMCMem$fRepTypesTYPEMCMemMC$fHasSegOpTYPEWise$fHasSegOpTYPEMC$fPrettyRepTYPEMC$fBuilderOpsMC$fBuildableTYPEMC$fCheckableTYPEMC$fCheckableOpTYPEMC$fASTRepTYPEMC$fRepTypesTYPEMCSizeOpGPUBody CalcNumGroupsSegLevel SegThreadSegGroupSegThreadInGroup KernelGrid gridNumGroups gridGroupSizeSegVirt SegNoVirt SegNoVirtFull SegSeqDims segSeqDimssegVirttraverseHostOpStmstypeCheckHostOp$fPrettySegVirt$fFreeInKernelGrid$fSubstituteKernelGrid$fSimplifiableKernelGrid$fPrettyKernelGrid$fFreeInSegLevel$fRenameSegLevel$fSubstituteSegLevel$fSimplifiableSegLevel$fPrettySegLevel$fOpMetricsSizeOp$fPrettySizeOp$fFreeInSizeOp$fAliasedOpSizeOp$fTypedOpSizeOp $fIsOpSizeOp$fRenameSizeOp$fSubstituteSizeOp$fOpMetricsHostOp$fIndexOpHostOp$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$fLocalScopekrepDistNestT$fHasScopekrepDistNestT$fMonadFreshNamesDistNestT$fFunctorDistNestT$fApplicativeDistNestT$fMonadDistNestT$fMonadReaderDistEnvDistNestT$fMonadWriterDistResDistNestTGPU$fHasSegOpTYPEGPU$fPrettyRepTYPEGPU$fBuilderOpsGPU$fBuildableTYPEGPU$fCheckableTYPEGPU$fCheckableOpTYPEGPU$fASTRepTYPEGPU$fRepTypesTYPEGPUbabysitKernelsgetSize segThread injectSOACS soacsStmToGPUsoacsLambdaToGPU scopeForSOACs scopeForGPUextractMulticore$fMonadLoggerExtractM$fFunctorExtractM$fApplicativeExtractM$fMonadExtractM$fHasScopeTYPEMCExtractM$fLocalScopeTYPEMCExtractM$fMonadFreshNamesExtractMsegThreadCapped$fEqKernelSize$fOrdKernelSize$fShowKernelSizeintraGroupParallelise$fMonoidIntraAcc$fSemigroupIntraAcc$fMonadLoggerBuilderTextractKernels$fMonadFreshNamesDistribM$fFunctorDistribM$fApplicativeDistribM$fMonadDistribM$fHasScopeTYPEGPUDistribM$fLocalScopeTYPEGPUDistribM$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 LowerUpdate DesiredUpdate updateName updateType updateCerts updateSource updateIndices updateValue lowerUpdatelowerUpdateGPU$fFunctorDesiredUpdate$fShowLoopResultSummary$fShowDesiredUpdateinPlaceLoweringGPUinPlaceLoweringSeqinPlaceLoweringMC$fMonoidBottomUp$fSemigroupBottomUp $fHasScopeTYPEAliasesForwardingM$fMonadFreshNamesForwardingM$fMonadForwardingM$fApplicativeForwardingM$fFunctorForwardingM$fMonadReaderTopDownForwardingM $fMonadWriterBottomUpForwardingM"$fMonadStateVNameSourceForwardingM histAccsGPUoptimiseGenRed$fEqCostCSEInOp performCSEperformCSEOnFunDefperformCSEOnStms $fCSEInOpSOAC$fCSEInOpMemOp$fCSEInOpSegOp $fCSEInOpMCOp$fCSEInOpHostOp $fCSEInOp()inlineAggressivelyinlineConservativelyremoveDeadFunctionsmmBlkRegTiling doRegTiling3D tileLoops$fMonoidPrivStms$fSemigroupPrivStms simplifyGPUsimplifyKernelOp unstreamGPU unstreamMCGPUMem simpleGPUMem$fBuilderOpsGPUMem$fCheckableTYPEGPUMem$fCheckableOpTYPEGPUMem$fPrettyRepTYPEGPUMem$fOpReturnsHostOp$fOpReturnsHostOp0$fASTRepTYPEGPUMem$fRepTypesTYPEGPUMem simplifySeq simplifyMCsimplifyGPUMemsimplifySeqMem simplifyMCMemallocInKernelBodyallocInBinOpLambda$fSizeSubstSegOp$fSizeSubstMCOpexplicitAllocationsInStms$fSizeSubstHostOpexpandAllocations$fApplicativeOffsetM$fFunctorOffsetM$fMonadOffsetM$fHasScopeTYPEGPUMemOffsetM$fLocalScopeTYPEGPUMemOffsetM$fMonadError[]OffsetMentryPointMemGPUentryPointMemMCentryPointMemSeqdoubleBufferGPUdoubleBufferMC$fLocalScopekrepDoubleBufferM$fHasScopekrepDoubleBufferM$fShowDoubleBuffer$fFunctorDoubleBufferM$fApplicativeDoubleBufferM$fMonadDoubleBufferM$fMonadReaderEnvDoubleBufferM$fMonadFreshNamesDoubleBufferM MemAliases analyzeSeqMem analyzeGPUMem$fPrettyMemAliases$fMonoidMemAliases$fSemigroupMemAliases$fShowMemAliases$fEqMemAliasesUsedLastUse LastUseMap analyseGPUMem analyseSeqMemanalyseProgGPUColoring colorGraphoptimiseVjpOps 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$fHasScopeTYPESOACSADM$fLocalScopeTYPESOACSADM$fEqAdj$fOrdAdj $fShowAdj $fEqSparse $fOrdSparse $fShowSparse $fEqInBounds $fOrdInBounds$fShowInBounds vjpScatterdiffScan diffReducediffMinMaxReducevjpMapvjpSOAC stripmineStmsdiffLoop$fFunctorLoopInfo$fFoldableLoopInfo$fTraversableLoopInfo$fShowLoopInfopdUnOppdBinOp pdBuiltinrevVJPfwdJVP$fTanBuilderParam$fTanBuilderPat$fTanBuilderPatElem$fTanBuilder[]$fTangentSubExpRes$fTangentSubExp$fTangentVName $fTangent[]$fTangentTypeBase$fTanBuilder(,)applyADapplyADInnermost$fEqModestandardPipelinekernelsPipelinesequentialPipelinesequentialCpuPipeline gpuPipeline mcPipelinemulticorePipeline constituent whitespacelexemekeyword pPrimValue pFloatTypepIntType pPrimTypepPrimExp parseSOACSparseSeq parseSeqMemparseGPU parseGPUMemparseMC parseMCMemProgBaseprogDocprogDecsDecBaseValDecTypeDecSigDecModDecOpenDecLocalDec ImportDec ModParamBaseModParam modParamName modParamType modParamAbsmodParamLocation ModBindBaseModBindmodName modParams modSignaturemodExpmodDoc modLocation ModExpBaseModVar ModParens ModImportModDecsModApply ModAscript ModLambda SigBindBaseSigBindsigNamesigExpsigDocsigLoc TypeRefBaseTypeRef SigExpBaseSigVar SigParensSigSpecsSigWithSigArrowSpecBaseValSpec 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 IndexSectionAscriptAppExpAppRes appResType appResExt AppExpBaseCoerceRangeLetPatLetFunLetWith SizeBindersizeNamesizeLocQualName qualQualsqualLeaf SliceBase DimIndexBase InclusivenessDownToExclusive ToInclusive UpToExclusiveBacktickPlusMinusTimesDivideModQuotRemShiftRShiftLBandBorEqualNotEqualLessLeqGreaterGeq PipeRightPipeLeft IdentBase identSrcLoc RecordDietSumDietFuncDiet TypeArgExp TypeArgExpDimTypeArgExpTypeTypeExpTEVarTETupleTERecordTEArrayTEUniqueTEApplyTEArrowTESumTEDimSizeExp SizeExpNamed SizeExpConst SizeExpAny PatRetType StructRetType StructTypePatTypeAliasing AliasBound AliasFreealiasVarTypeArg TypeArgDim TypeArgTypeScalarScalarTypeBaseTypeVarRecordSumArrow RetTypeBaseretDimsretTypePNameNamedUnnamedSize NamedSize ConstSizeAnySizeAttrInfoAttrAtomAtomNameAtomInt IsPrimValue primValue SignedValue UnsignedValueInfounInfoNoInfo typeParamName$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$fTraversableInclusiveness$fFoldableInclusiveness$fFunctorInclusiveness$fLocatedInclusiveness$fTraversableQualName$fFoldableQualName$fFunctorQualName $fOrdQualName$fOrdQualName0 $fEqQualName $fEqQualName0$fLocatedTypeArgExp$fLocatedTypeExp$fFoldableTypeArg$fFunctorTypeArg$fTraversableTypeArg$fBifoldableScalarTypeBase$fBifunctorScalarTypeBase$fBitraversableScalarTypeBase$fBifoldableRetTypeBase$fBifunctorRetTypeBase$fBitraversableRetTypeBase$fLocatedIdentBase$fOrdIdentBase $fEqIdentBase$fLocatedSizeBinder$fLocatedPatBase$fLocatedDocComment$fLocatedTypeParamBase$fTraversableTypeParamBase$fFoldableTypeParamBase$fFunctorTypeParamBase$fLocatedTypeBindBase$fLocatedCaseBase$fLocatedFieldBase$fLocatedExpBase$fLocatedAppExpBase$fLocatedValBindBase$fLocatedTypeRefBase$fLocatedSigExpBase$fLocatedSpecBase$fLocatedSigBindBase$fLocatedModParamBase$fLocatedDecBase$fLocatedModBindBase$fLocatedModExpBase$fEqTypeParamBase$fOrdTypeParamBase$fShowTypeParamBase$fEqLiftedness$fOrdLiftedness$fShowLiftedness$fShowEntryType$fShowDocComment $fEqPatLit $fOrdPatLit $fShowPatLit $fEqAppRes $fOrdAppRes $fShowAppRes$fEqSizeBinder$fOrdSizeBinder$fShowSizeBinder$fEqSize $fOrdSize $fShowSize$fEqScalarTypeBase$fOrdScalarTypeBase$fShowScalarTypeBase $fEqTypeArg $fOrdTypeArg $fShowTypeArg$fEqRetTypeBase$fOrdRetTypeBase$fShowRetTypeBase $fShowTypeExp$fShowTypeArgExp $fShowSizeExp$fShowQualName$fEqInclusiveness$fOrdInclusiveness$fShowInclusiveness $fEnumBinOp$fBoundedBinOp $fEqAlias $fOrdAlias $fShowAlias $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$fShowSigBindBase$fShowSigBindBase0$fShowTypeRefBase$fShowTypeRefBase0$fShowSigExpBase$fShowSigExpBase0$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$fOrdTypeArgExp$fOrdTypeArgExp0$fEqTypeArgExp$fEqTypeArgExp0 $fOrdTypeExp $fOrdTypeExp0 $fEqTypeExp $fEqTypeExp0 $fOrdSizeExp $fOrdSizeExp0 $fEqSizeExp $fEqSizeExp0 ASTMappableastMap ASTMappermapOnExp mapOnNamemapOnStructType mapOnPatTypemapOnStructRetTypemapOnPatRetTypebareExp$fASTMappable(,,)$fASTMappable(,)$fASTMappableNonEmpty$fASTMappable[]$fASTMappableInfo$fASTMappableCaseBase$fASTMappableFieldBase$fASTMappablePatBase$fASTMappableSizeBinder$fASTMappableIdentBase$fASTMappableRetTypeBase$fASTMappableRetTypeBase0$fASTMappableTypeBase$fASTMappableTypeBase0$fASTMappableAppRes$fASTMappableSet$fASTMappableAlias$fASTMappableDimIndexBase$fASTMappableTypeParamBase$fASTMappableSize$fASTMappableSizeExp$fASTMappableTypeArgExp$fASTMappableTypeExp$fASTMappableLoopFormBase$fASTMappableExpBase$fASTMappableAppExpBase$fASTMappableQualNameareTupleFields tupleFieldstupleFieldNames sortFields UncheckedCase UncheckedProg UncheckedSpec UncheckedDecUncheckedValBind UncheckedPatUncheckedTypeParamUncheckedSigExpUncheckedModExp UncheckedExpUncheckedSliceUncheckedDimIndexUncheckedIdentUncheckedTypeExp UncheckedType IntrinsicIntrinsicMonoFunIntrinsicOverloadedFunIntrinsicPolyFun IntrinsicTypeIntrinsicEqualityDimPos PosImmediatePosParam PosReturndefaultEntryPointnoSizes traverseDims toStructuraltoStruct fromStruct tupleRecord isTupleRecord sortConstrs isTypeParam isSizeParamcombineTypeShapes matchDims setUniqueness setAliases addAliases foldFunType unfoldFunTypevalBindTypeScheme valBindBoundfunTypetypeVars orderZeropatternOrderZero patternMap patternTypepatternStructType patternParamnamesToPrimTypes intrinsics isBuiltin isBuiltinLocmaxIntrinsicTagqualNamequalify progImports decImportsprogModuleTypesidentifierReferenceleadingOperator progHoles $fEqDimPos $fOrdDimPos $fShowDimPosAnnotunAnnotIsName prettyNametoName$fPrettyLiftedness$fPrettyPatLit$fPrettyTypeArg$fPrettyScalarTypeBase$fPrettyRetTypeBase $fPrettyShape$fPrettyShape0$fPrettyShape1$fPrettyShape2$fPrettyTypeParamBase$fPrettyAttrInfo$fPrettyAttrAtom$fPrettySizeBinder$fPrettyIdentBase$fPrettyQualName$fPrettyTypeArgExp$fPrettyTypeExp$fPrettySizeExp $fPrettySize $fIsNameName $fIsNameVName$fPrettyModBindBase$fPrettyModParamBase$fPrettySigBindBase$fPrettySigExpBase$fPrettySpecBase$fPrettyValBindBase$fPrettyTypeBindBase$fPrettyModExpBase$fPrettyDecBase$fPrettyProgBase$fPrettyPatBase$fPrettyLoopFormBase$fPrettyCaseBase$fPrettyFieldBase$fPrettyExpBase$fPrettyAppExpBase$fPrettyDimIndexBase $fAnnotInfo $fAnnotNoInfoLexemeTokenIDCOMMENTINDEXING QUALINDEXING QUALPARENSYMBOL CONSTRUCTOR PROJ_INTFIELDINTLIT STRINGLITI8LITI16LITI32LITI64LITU8LITU16LITU32LITU64LITFLOATLITF16LITF32LITF64LITCHARLITCOLONCOLON_GT BACKSLASH APOSTROPHEAPOSTROPHE_THEN_HATAPOSTROPHE_THEN_TILDEBACKTICK HASH_LBRACKETDOTTWO_DOTS TWO_DOTS_LT TWO_DOTS_GT THREE_DOTSLPARRPARRPAR_THEN_LBRACKETLBRACKETRBRACKETLCURLYRCURLYCOMMA UNDERSCORE RIGHT_ARROW QUESTION_MARKEQUASTERISKNEGATEBANGDOLLARLTHHATTILDEPIPEIFTHENELSEDEFLETLOOPINFORDOWITHASSERTTRUEFALSEWHILEINCLUDEIMPORTENTRYTYPEMODULEVALOPENLOCALMATCHCASEDOCEOFHOLEindexingmkQualIdsuffZerotryRead readIntegraltokenCtokenStokenM tokenPosMsymbol fromRomanreadHexRealLit $fShowToken $fEqToken $fOrdToken SyntaxErrorsyntaxErrorLocsyntaxErrorMsg ReadLineMonadGetLine ParserMonad ParserStateaddDoc addDocSpecaddAttr addAttrSpecmustBe mustBeEmpty getLinesFromM arrayFromListapplyExp patternExp binOpNamebinOp primNegatelexer parseError parseErrorAtemptyArrayError twoDotsRange backOneCol parseInMonadparse$fApplicativeReadLineMonad$fFunctorReadLineMonad$fMonadReadLineMonad parseFutharkparseExp parseModExp parseTypeparseDecOrExpIncrMunFV freeWithout freeInExp freeInPat freeInType$fShowFV ScalarType TypeParam StructTypeArgSpecSigExpModExp envVtable envTypeTable envSigTable envModTable envNameMapNameMapBoundV TypeBindingTypeAbbrMTymtyAbsmtyModFunSig funSigAbs funSigMod funSigMtyModEnvModFunTySet NamespaceTerm SignatureImports FileModulefileAbsfileEnvfileProg ImportNamemkInitialImport mkImportFromincludeToFilePathincludeToString includeToText$fLocatedImportName$fPrettyNamespace $fPrettyEnv $fPrettyMod $fPrettyMTy $fMonoidEnv$fSemigroupEnv $fShowEnv $fShowMTy $fShowMod $fShowFunSig $fShowBoundV$fEqTypeBinding$fShowTypeBinding $fEqNamespace$fOrdNamespace$fShowNamespace$fEnumNamespace$fEqImportName$fOrdImportName$fShowImportNameAtPosAtNameBoundTo BoundTerm BoundModuleBoundModuleType BoundTypeboundLocatPos $fEqAtPos $fShowAtPos$fEqDef $fShowDef $fEqBoundTo $fShowBoundTo ValuePrim ValueArrayValueFunValueSumValueAcc ValueShapeShapeDim ShapeLeaf ShapeRecordShapeSum typeShapestructTypeShape prettyValue valueShape isEmptyArrayprettyEmptyArraytoArraytoArray' arrayLengthtoTuple fromTuple fromDataValue $fEqValue $fShowValueCtxctxEnv ctxImportsInterpreterErrorExtOp ExtOpTrace ExtOpBreak ExtOpError BreakReason BreakPointBreakNaN StackFrame stackFrameLoc stackFrameCtxprettyInterpreterErrortypeCheckerEnv initialCtx interpretExp interpretDecinterpretImportctxWithImportsinterpretFunction$fShowInterpreterError$fPrettyIndexing$fFunctorExtOp$fLocatedStackFrame $fMonadEvalM$fApplicativeEvalM$fFunctorEvalM$fMonadFreeExtOpEvalM$fMonadReader(,)EvalM$fMonadStateMapEvalMinternaliseParamTypesinternaliseLoopParamTypeinternaliseReturnTypeinternaliseLambdaReturnTypeinternaliseEntryReturnTypeinternaliseTypeinternaliseSumTypeinternalisedTypeSizeinternalisePrimTypeinternalisePrimValue$fFunctorInternaliseTypeM$fApplicativeInternaliseTypeM$fMonadInternaliseTypeM%$fMonadStateTypeStateInternaliseTypeM transformProg$fMonadFreshNamesLiftM$fFunctorLiftM$fApplicativeLiftM $fMonadLiftM$fMonadReaderEnvLiftM$fMonadStateLiftStateLiftMInternaliseLambdainternaliseFoldLambdainternalisePartitionLambda VisibleTypes visibleTypes entryPoint $fMonoidScope$fSemigroupScope$fApplicativeTransformM$fFunctorTransformM$fMonadTransformM$fMonadFreshNamesTransformM$fMonadReaderEnvTransformM$fMonadWriterDListTransformM $fShowScope$fMonadFreshNamesDefM $fEqSizeSubst$fOrdSizeSubst$fShowSizeSubst $fFunctorDefM$fApplicativeDefM $fMonadDefM$fMonadReader(,)DefM$fMonadState(,)DefM $fShowBinding$fShowStaticVal $fShowExtExpinternaliseAttrinternaliseAttrsbindingFParamsbindingLoopParamsbindingLambdaParams$fShowFunction EvalBuiltinExpValueValOrVarVValVVarScriptValueTypeSTValueSTFun ScriptValueSValueSFunConst ServerVarFuncFuncFut FuncBuiltin ScriptServerwithScriptServer'withScriptServerparseExpFromTextscriptValueTypeserverVarsInValue valueToExpevalExp getExpValueevalExpToGround varsInExp freeValue $fPrettyFunc$fTraversableScriptValue$fFoldableScriptValue$fFunctorScriptValue$fPrettyScriptValueType$fShowValOrVar$fEqScriptValueType$fShowScriptValueType$fShowScriptValue $fShowFuncSuccess SuccessValuesSuccessGenerateValuesExpectedResultSucceedsRunTimeFailureGenValueGenPrimValuesInFile GenValues ScriptValues ScriptFileTestRunrunTagsrunInputrunExpectedResultrunIndexrunDescription WarningTestExpectedWarning StructureTestStructurePipeline GpuPipeline SOACSPipelineSeqMemPipelineGpuMemPipeline 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 runProgram readResultsensureReferenceOutputdetermineTuningdetermineCache checkResultfutharkServerCfg$fEqFutharkExe$fOrdFutharkExe$fShowFutharkExeCompileOptions compFuthark compBackend compOptions RunOptions runMinRuns runMinTime runTimeout runVerboserunConvergencePhaserunConvergenceMaxTimerunResultAction BenchResult DataResult runResults memoryMapstdErr 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'TVImpMVTableVarEntryArrayVar ScalarVarMemVarAccVar ScalarEntryentryScalarTypeMemEntry entryMemSpace ArrayEntry entryArrayLocentryArrayElemTypeMemLoc memLocName memLocShape memLocIxFunopsExpCompiler opsOpCompileropsStmsCompileropsCopyCompileropsAllocCompilers AllocCompiler CopyCompiler ExpCompiler StmsCompiler sliceMemLocsubImpM_subImpMcommentemitwarn emitFunction hasFunction compileBody compileBody'compileLoopBody compileStmsdefCompileStms caseMatch defCompileExp addLoopVardFParamsdLParamsdPrimVoldPrim_dPrimdPrimV_dPrimVdPrimVEdScopedArrayeverythingVolatilemkTVtvSizetvExptvVarlocalDefaultSpace askFunctionnewVNameForFun nameForFunaskEnvlocalEnvaskAttrslocalOps getVTable localVTable lookupArray lookupMemory lookupAccfullyIndexArrayfullyIndexArray'copyisMapTransposeCopycopyElementWisecopyDWIM copyDWIMFix compileAlloctypeSizeinBounds rotateIndexsForsWhilesCommentsIfsWhensUnlesssOp sDeclareMemsAlloc_sAllocsArray sArrayInMemsAllocArrayPerm sAllocArray sStaticArraysWritesUpdate sLoopSpace sLoopNestsCopy<~~<--function dIndexSpace dIndexSpace'$fHasScopeTYPESOACSImpM$fMonadFreshNamesImpM $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 segOpStringtoParamgetSpace getLoopBoundsgetIterationDomaingetReturnParamsrenameSegBinOpcompileThreadResult freeParamsgroupResultArraysdecideScheduling'decideSchedulingextractAllocationsgenerateChunkLoopgenerateUniformizeLoopextractVectorLaneinISPCsLoopNestVectorizedrenameHistOpLambdaatomicUpdateLockingcompileSegScan DoSegBody compileSegRedcompileSegRed' compileSegMapcompileSegHist DefSpecifierMemBlockRawMemgenerateContext cliOptions operationsclosureFreeStructField paramToCTypemultiCoreReportfunctionTimingfunctionIterationsaddTimingFields multicoreName multicoreDefgenerateParLoopFnprepareTaskStruct compileOp atomicOps ISPCState$fFunctorVariabilityM$fApplicativeVariabilityM$fMonadVariabilityM$fMonadStateMapVariabilityM$fMonadReaderNamesVariabilityM$fEqVariability$fOrdVariability$fShowVariability KernelAttrskAttrFailureTolerantkAttrCheckLocalMemorykAttrNumGroupskAttrGroupSizeKernelConstantskernelGlobalThreadIdkernelLocalThreadId kernelGroupIdkernelGlobalThreadIdVarkernelLocalThreadIdVarkernelGroupIdVarkernelNumGroupsCountkernelGroupSizeCountkernelNumThreadskernelWaveSizekernelLocalIdMapkernelChunkItersMap InKernelGen CallKernelGen KernelEnv kernelAtomicskernelConstants kernelLocks hostTargetCUDAkeyWithEntryPoint allocLocal kernelAlloc updateAcc kernelLoop groupLoopgroupCoverSpacefenceForArrays groupScan groupReducevirtualiseGroupsdefKernelAttrslvlKernelAttrssKernel sKernelThreadthreadOperations sReplicatesIota sCopyKernel sRotateKernel $fEqPassage $fOrdPassage PrecomputedgroupOperations sKernelGroupcompileGroupResultprecomputeConstantsprecomputedConstantscompileProgOpenCLcompileProgCUDAMonadTypeCheckernewID newTypeName bindNameMapbindVal checkQualName lookupModcheckNamedSize typeError ImportTableNotesaNoteprettyTypeErrorprettyTypeErrorNoLoc withIndexLinkunappliedFunctorunknownVariable unknownType underscoreUserunTypeM askImportName atTopLevelenteringModule lookupMTy lookupImport checkName bindSpacedqualifyTypeVars badOnLeft anySignedTypeanyUnsignedType anyIntType anyFloatType anyNumberType anyPrimTypeintrinsicsNameMaptopLevelNameMap mkTypeVarName checkAttr $fPrettyNote $fPrettyNotes$fMonadErrorTypeErrorTypeM$fMonadTypeCheckerTypeM$fMonadReaderContextTypeM$fMonadStateTypeStateTypeM$fSemigroupNotes $fMonoidNotes applySubstTypeSubsSubst PrimSubstdetermineSizeWitnessesmustBeExplicitInBindingmustBeExplicitInTypeaddAliasesFromType subuniqueOf renameRetType checkTypeExpcheckForDuplicateNamescheckTypeParamstypeParamToArg substFromAbbr substTypesAny$fFunctorSubst $fPrettySubst$fSubstitutablePatBase$fSubstitutableShape$fSubstitutableSize$fSubstitutableTypeBase$fSubstitutableTypeBase0$fSubstitutableRetTypeBase$fSubstitutableRetTypeBase0 $fShowSubst MonadUnifygetConstraintsputConstraintsmodifyConstraints newTypeVar newDimVarcurLevel matchError unifyErrorRigidityRigidNonrigid RigidSourceRigidArgRigidRet RigidLoop RigidSlice RigidRange RigidBound RigidCond RigidUnifyRigidOutOfScope RigidCoerce Constraints Constraint NoConstraint ParamType Overloaded HasFieldsEquality HasConstrs ParamSizeUnknowableSizeLevelUsage BreadCrumbs noBreadCrumbshasNoBreadCrumbsmkUsagemkUsage'dimNotes normTypeFully normPatTypeinstantiateEmptyArrayDimsunifyexpect 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$fPrettyMonoSize $fEqMonoSize$fFunctorMonoM$fApplicativeMonoM $fMonadMonoM$fMonadReaderEnvMonoM$fMonadWriterSeqMonoM$fMonadFreshNamesMonoM$fShowMonoSizeinternaliseProg TermTypeM TermTypeStatestateConstraints stateCounter stateDimTable stateNames stateOccs NameReason NameAppRes SizeSource SourceBound SourceSlice TermScope scopeVtablescopeTypeTable scopeModTable scopeNameMapTermEnv termScope termChecking termLevelChecking CheckingApplyCheckingReturnCheckingAscriptionCheckingLetGeneraliseCheckingParams CheckingPatCheckingLoopBodyCheckingLoopInitialCheckingRecordUpdateCheckingRequiredCheckingBranches InferredType NoneInferredAscribed ValBinding OverloadedF EqualityF WasConsumedLocalityLocalNonlocalGlobal Occurrences Occurrenceobservedconsumedlocation observation consumptioncheckOccurrences allConsumed allOccurringanyConsumptionseqOccurrencesuseAfterConsumebadLetWithValue returnAliaseduniqueReturnAliased unusedSizewithEnv liftTypeM constrain onFailureextSizeincLevelexpType expTypeFully newArrayTypeallDimsFreshInType updateTypesunifiescheckTypeExpNonrigidcheckTypeExpRigidmaybeDimFromExp dimFromExp sizeFromArg noSizeEscapetapOccurrencescollectOccurrences sequentiallyoccurobserveonlySelfAliasingnoUniqueremoveSeminullOccurrencescheckIfConsumable consuming runTermTypeM$fLocatedOccurrence$fPrettyChecking$fSemigroupTermScope $fOrdFName $fEqFName$fMonadTypeCheckerTermTypeM$fMonadUnifyTermTypeM$fMonadTermTypeM$fFunctorTermTypeM$fApplicativeTermTypeM$fMonadReaderTermEnvTermTypeM"$fMonadStateTermTypeStateTermTypeM$fMonadErrorTypeErrorTermTypeM$fEqSizeSource$fOrdSizeSource$fShowSizeSource $fShowFName$fShowTermScope$fShowValBinding$fShowLocality $fEqLocality $fOrdLocality$fEqOccurrence$fShowOccurrence doNotShadow boundAliases bindingIdent bindingSizes bindingPat bindingParams CheckedLoop UncheckedLoop checkDoLoop checkOneExp checkFunDef$fPrettyUnmatched$fFunctorUnmatched$fShowUnmatchednewNamesForMTy refineEnv matchMTys applyFunctorcheckDec checkModExp initialEnvenvWithImports LoadedProg lpNameSourceVFS ProgError ProgWarning lpImports lpWarnings lpFilePaths noLoadedProg extendProg reloadProg readLibraryreadUntypedLibrary$fLocatedProgError$fEqLoadedFile$fOrdLoadedFile$fShowLoadedFileState stateProgram staleData emptyStategetStaleContentgetStaleMappingupdateStaleContentupdateStaleMappinggetHoverInfoFromStatefindDefinitionRangecomputeMappingposToUri rangeFromLocrangeFromSrcLocpublishWarningDiagnosticspublishErrorDiagnostics maxDiagnosticdiagnosticSourcetryTakeStateFromIORef tryReCompilehandlersmain dumpErrorrunCompilerOnProgramrunPipelineOnProgramprettyProgErrorsreadProgramFilereadProgramFilesreadUntypedProgramreadProgramOrDiereadUntypedProgramOrDiehandleWarningsversion versionString FunOptDescrmainWithOptions optionsErrorCompilerOption compilerMain $fOrdTestCase $fEqTestCase$fShowTestCase$fShowProgConfig $fEqTestMode$fShowTestMode$fEqTestResult$fShowTestResult$fMonadLoggerPkgM$fMonadPkgRegistryPkgM$fMonadFailPkgM $fMonadPkgM $fFunctorPkgM$fApplicativePkgM $fMonadIOPkgM$fMonadReaderPkgConfigPkgM mainImportsmainHash mainDatagetmainCheckSyntax mainThanks mainTokens$fPrettyDirective $fEqFailure $fOrdFailure $fShowFailure$fFunctorScriptM$fApplicativeScriptM$fMonadScriptM$fMonadErrorTextScriptM$fMonadFailScriptM$fMonadIOScriptM$fMonadStateStateScriptM $fShowBlock$fShowDirective$fShowVideoParams$fShowImgParams$fUniformRangeHalf$fEqOutputFormat$fOrdOutputFormat$fShowOutputFormat$fEqSkipReason$fShowDatasetResult renderFiles$fFunctorFutharkiM$fApplicativeFutharkiM$fMonadFutharkiM"$fMonadStateFutharkiStateFutharkiM$fMonadIOFutharkiM$fMonadErrorStopReasonFutharkiM printActionprintAliasesActionprintLastUseGPUprintFusionGraphprintInterferenceGPUprintMemAliasGPUcallGraphAction metricsActionimpCodeGenActionkernelImpCodeGenActionmulticoreImpCodeGenActioncompileCActioncompileOpenCLActioncompileCUDAActioncompileMulticoreActioncompileMulticoreToISPCActioncompilePythonActioncompilePyOpenCLActioncompileCtoWASMActioncompileMulticoreToWASMAction$fPrettyUntypedPassState $fRepresentationUntypedPassState$fRepresentationUntypedActionGHC.Base RoutingResultDeadEnd CycleDetected SinkFoundDepthPending<>memptyrequiredInManifest GHC.MaybeNothingGHC.IOFilePath Data.Foldablemaximummap Data.EitherpartitionEithersGHC.ListsplitAtprocess-extras-0.7.4-256fce0328acef08c595833b851ea0c503d602f1bf36c2db8c8d22c578e0be8aSystem.Process.ByteStringreadProcessWithExitCodeghc-prim GHC.TypesIOLeftGHC.RealIntegral displaySLoc displayLoc displaySPos displayPosunLocnoLocsrcspan<-->locEndlocStart advancePoslinePosstartPosposCoffposColposLineposFileNoLoc IsLocationfromPosfromLoc RelocatablerelocstaleToCurrentcurrentToStaleControl.Monad.IO.ClassMonadIOcurlmemoiseGetManifestRoughBuildList doSolveDeps text-1.2.5.0Data.Text.InternalTextDocPrettyprinter.Symbols.Asciipipeequals backslashslashdotspacecommacolonsemirbracelbracerbracketlbracketranglelanglerparenlparendquotesquotebracesbracketsanglesparensdquotessquotes layoutCompact layoutSmart layoutPrettydefaultLayoutOptionsremoveTrailingWhitespacefusealterAnnotationsS reAnnotateS unAnnotateSalterAnnotations reAnnotate unAnnotateannotatesurroundencloseplural fillBreakfill pageWidthnestingcolumn punctuatecatfillCatvcathcatsepfillSepvsephsep concatWith<+>tupledlist encloseSepindenthangalignflatAltgrouphardline softline'softlineline'linenestemptyDoc unsafeViaShowviaShowpretty prettyList FusionDepthDeepShallowSimpleDocStreamSAnnPopSAnnPushSLineSTextSCharSFailSEmpty PageWidthAvailablePerLine Unbounded LayoutOptionslayoutPageWidthFuthark.Data.Reader readValuescompareSeveralValues Tolerance valueElems valueElemType valueTypevalueTypeTextNoDims valueTypeText primTypeBytes primTypeTextVectorF64ValueF32ValueF16ValueU64ValueU32ValueU16ValueU8ValueI64ValueI32ValueI8ValueI16ValueF64F32F16U64U32U16U8I64I32I16I8GetValuegetValuePutValueputValue PutValue1 putValue1 GHC.ClassesOrdEq ghc-bignumGHC.Num.IntegerRational doFSignumdoSubdoUDivdoUDivUpdoSDivUpdoUModdoSQuotdoSRemdoSMindoUMindoSMaxdoUMaxdoShldoLShrdoAShrdoAnddoOrdoXorintToIntnegativeIshInt==MonoidmodifyArrayShapeTrueInttransformers-0.5.6.2Control.Monad.Trans.ReaderReaderGHC.ErrerrorData.Functor.IdentityIdentityEQLT loopExtTypeFunctor TraversableGHC.NumNumDoublelengthControl.Monad.Failfail zeroIshExp oneIshExpnegativeIshExprenamerSubstitutions censorStmsControl.Monad.Trans.State.Lazy inResultUsizeUmatchesMaybe rephraseParam BodyWisdom expWisdomFree informStm informExp Consumption FunBindingGHC.ShowShowboundconsumeOnlyParams expandAliasescheckAnnotation argAliasesControl.CategoryCategory SimpleRulecopyScratchToScratchsubstituteInLMADhasContiguousPerm lmadShape lmadShapeBase sliceOneLMADreshapeOneLMAD rebaseNice makeRotIotaixfunMonotonicitydynamicEqualsLMADDim SemigroupMayFailuintTypeToCTypeprintStmrecordFieldPayloadskernelSyncPending translateGPU cleanSizes freeVarIndex fparamMerge letBoundIndex entryConsumed IndexArrayhideIf BottomUpRules TopDownRulesRuleshoistBranchInvariantremoveDeadBranchResult checkResultsProtectchangedprotectLoopHoistedprotectCaseHoistednotWorthHoistingsimplifyBodyNoHoistingsimplifyResult asserting assertingOneremoveReplicateWriteremoveDeadReductionremoveDeadWriteCallId buildFGfuninputsToSubExpsClassification SOACInputOtherProducerMapping EdgeGeneratorfgl-5.7.0.3-8889c38b694f3e9824a20847da12910b4dc9e06723c9fb70d18e082d3a277637Data.Graph.Inductive.GraphNodegenEdges emptyGraphscremaFusionOKmapWriteFusionOKfuseSOACwithKerrearrangeReturnTypeshorizontalFusionOnNodeJust getExtMaps Control.MonadguardjoinMonad>>=return>>fmap<$Control.Monad.FixMonadFixmfix MonadFailsequencemapMliftMControl.Monad.Reader.Class MonadReaderaskreaderlocalforM_mapM_ MonadPlusmzeromplusliftIO zipWithM_zipWithMunless replicateM_ replicateMmfilter mapAndUnzipMforeverfoldM_foldMfilterM>=><=<<$!>forM sequence_msum Data.Functionfix Data.FunctorvoidwhenliftM5liftM4liftM3liftM2ap=<<Control.Monad.Trans.Class MonadTranslift mapReaderTReaderT runReaderTasks mapReader runReader withReader withReaderT segOpTypeunExistentialiseMemorycopyCopyToCopyDistributionBodydistributionExpandTargetletBindInNestingboundInNestingExpMapkernelElementsPerThreadworthIntraGroupworthSequentialisingIxFnEnv 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 optimizeStm rewriteForInoptimizeWithAccInputoptimizeHostOp 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 entryGroupIdx entryStoredFalseReorderM stateGroupsBindingsdepsOf namesToSet transformBody transformStms reorderStm transformExptransformWithAccInput groupBindingsgroupDependencies modifyGroupsremoveEquivalentsrecordEquivalent moveGPUBody moveOtherrecordEquivalentsOf groupBlocks moveToGrpmoveTocollapse mergeKernels execRewrite equivalentsasArray referConstinPlaceLoweringAccsmatchCodeAccumCodeisInvarToParDimcseInOpinlineInFunDefremoveDeadFunctionsF kkLoopBodymatchCodeStreamCodeisInvarTo1of2InnerDimsisInvarTo2of3InnerDimsTilingPrivStms InputTile InputArraypreludeToPostludepartitionPreluderemoveDeadGPUBodyResult RebaseMap ExtractionUser DoubleBuffer BufferCopy doubleBuffer analyseProgLastUsedInUsemakeEdge analyseGPUmemSizes memSpaces memElemSize Neighbors neighborsAllocsoptimiseKernel onKernelsadjRepAdjVarFreeAccFreeArr FreeNonAccLoopInfo bindForLoop renameForLoop isWhileLoopremoveLoopVarscomputeWhileItersconvertWhileLoop nestifyLoop stripmine stripmineStmfwdLoop valPatAdjreverseIndicesrestorerevLoop preprocessMode adPipeline pIntValue pFloatValue pBoolValuePRscanTokensText scanTokensprog futharkType expression modExpression declarationHappyStk parseExpIncrMsizesprogDefs envShapes TermBindingTermPolyEvalMsignum'signumevalTypeModModtransformNamesDefM StaticValSumSV DynamicFunExtExp restrictEnvTorunDefM defuncExp defuncExp' defuncSoacExpdefuncDimIndex defuncLet defuncApply fullyApplied liftDynFun envFromPat liftValDec buildEnvPat buildRetType typeFromSVdynamicFunType matchPatSV updatePat svFromType defuncValBind defuncVals flattenPat letValExpinternaliseSizeExpisOverloadedFunctionisIntrinsicFunctionfuthark-server-1.2.1.0-1347f509573e0d5697847957e0d4ed785697223cb8f732c5004b93036e1e6b64Futhark.ServerServer withServertestSpecsFromPath getGenFile genFileSizeconvergenceCriteria ConstrLit stateAccsenvEnv envFunctionArrayDestinationentryPointSize addArrays addFParams localAttrs defaultCopy copyArrayDWIM SegBinOpSlug slugResArrssegHistOpChunks onOpAtomic sharedDef copyMemoryAOSmakeStringLiteralcompileBuiltinFun handleError getMemTypeprepareMemStructcompileGetMemStructValscompileWritebackMemStructValscompileReadbackMemStructValsmayProduceErroraddDepsfindDepsdepsFixedPoint findVaryinganalyzeVariabilitygetVariabilitygetVariabilityQualsmakeAllMemoryGlobalsReplicateKernel sIotaKernel scanStage1slugArrsslugAccs maxNumOpsintermediateArraysPassagecomputeHistoUsageslugMaxLocalMemPasses SegOpSizes flattenArray applyLambdaapplyRenamedLambda segOpSizesgetDataFileName getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDircontextAtTopLevelgetType unifyTypesUcheckForDuplicateNamesInType BreadCrumb breadCrumbnormTypeisRigid isNonRigid MonoKnownFNamenullOccurrenceseminullOccurrenceinstantiateTypeSchemeinstantiateTypeParamsomeDimsFreshInTypefreshDimsInType uniquePat UnmatchedunifyBranchTypesboundInsideType returnType localChecksfixOverloadedTypes sizeNamesPosverifyFunctionParams injectExtcloseOverTypes allNamesInEnvlpFiles CheckedFile cfNameSource cfWarningscfMod ReaderState lfModTimecontentsAndModTimeusableLoadedProg queryAtPoslsp-types-1.5.0.0-4983633466c5830803ed3c513c21f147377b3c31539b194d20a8da5bc15d5925Language.LSP.Types.UriUriLanguage.LSP.Types.Locationpublish tryCompile transformVFS GHC.IORefIORefthrowOnProgErrorerrputSystem.Console.GetOptOptDescrArgOrder ReturnInOrderPermute RequireOrderArgDescrReqArgNoArgOptArg usageInfogetOpt'getOptnewCompilerConfigconfigExtraOptions TypeCheckCompileCompiled Interpreted excludeCasesPkgMinstallBuildList envRelImgDirFiles tuningPathsepsilon DocumentedctxVisibleMTysNoLink headerDocfutharkiBreakingfutharkiSkipBreaksfutharkiLoadedBreaking breakingAtrepresentationfutharkPipelinefutharkPrintASTFutharkPipeline PrettyPrint Defunctorise Monomorphise LiftLambdasDefunctionalisegetFutharkPipelinereportingIOErrors