! j f7      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                   ! " # $ % & ' ( ) * + ,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"""""""""""##################### # # # $ $$$$$$$$$$$$$$$$$$$ $!$"$#$$$%$&$'$($)$*$+$,$-$.$/$0$1$2$3%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&[&\&]&^&_'`'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'{(|(}(~((()))))))))))))))))))********************+++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-------------........................................ / / / / ///////////////0000 0!0"0#1$1%1&1'1(1)1*1+1,1-1.1/101112131425262728292:2;2<2=2>2?2@2A2B2C2D2E2F2G2H2I2J2K2L3M3N3O3P3Q3R3S3T3U3V3W3X3Y3Z3[3\3]3^3_3`3a3b3c3d3e3f3g3h3i3j4k4l4m4n4o4p4q4r4s4t4u4v4w4x4y4z4{4|4}4~4444444444444444444445555556666666666666666666666666666666666666666666666666666677777777777777777777777777777777777777777777777777888888888 8 8 8 8 8888888888888888888 8!8"8#8$8%8&8'8(8)8*8+8,8-8.8/808182838485868788898:8;8<8=8>8?8@8A8B8C8D8E8F8G8H8I8J8K8L8M8N8O8P8Q8R8S8T8U8V9W9X9Y9Z9[9\9]9^9_9`9a9b9c9d9e9f9g9h9i9j9k9l9m9n9o9p9q9r9s9t9u9v9w:x:y:z:{:|:}:~::;;;;;;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<=================================>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>?????? ? ? ? ? ??????????????????? ?!?"?#?$?%?&?'?(?)?*?+?,?-?.?/?0?1?2?3?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@TAUAVAWBXBYBZB[B\B]B^B_B`BaBbBcBdBeBfBgBhBiBjCkClCmCnCoCpCqCrDsDtDuEvEwExEyEzE{E|E}E~EEFFGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIII I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I !I "I #I $I %I &I 'I (I )I *I +I ,I -I .I /I 0I 1I 2I 3I 4I 5I 6I 7I 8I 9I :I ;I <I =I >I ?I @I AI BI CI DI EI FI GI HI II JI KI LI MI NI OI PI QI RI SI TI UI VI WI XI YI ZI [I \J ]J ^J _J `J aJ bJ cJ dJ eJ fJ gJ hJ iJ jK kK lL mM nM oM pM qM rM sN tN uN vN wN xN yN zN {N |N }N ~N N N N N N N N N N N N N O O O O O P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P Q Q Q Q Q Q R S T T T T T T T T T T T T T T U U U U U U U U U U U V W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W X X Y Y Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z !Z "Z #Z $Z %Z &Z 'Z (Z )Z *Z +Z ,Z -Z .Z /Z 0Z 1Z 2Z 3Z 4Z 5Z 6Z 7Z 8Z 9Z :Z ;Z <Z =Z >Z ?Z @Z AZ BZ CZ DZ EZ FZ GZ HZ IZ JZ KZ LZ MZ NZ OZ PZ QZ RZ SZ TZ UZ VZ W[ X[ Y\ Z\ [\ \\ ]\ ^\ _\ `\ a\ b\ c\ d\ e\ f\ g\ h\ i\ j\ k\ l\ m\ n\ o\ p\ q\ r\ s\ t\ u\ v\ w\ x\ y\ z\ {\ |\ }\ ~\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ !_ "_ #_ $` %` &` '` (` )a *a +a ,a -a .b /b 0b 1b 2b 3b 4b 5b 6b 7c 8c 9c :c ;c <c =d >d ?d @d Ad Bd Cd De Ee Fe Ge He Ie Je Ke Lf Mf Nf Of Pf Qf Rf Sf Tf Uf Vf Wg Xg Yg Zg [g \g ]h ^h _h `h ah bh ch dh eh fi gi hi ii ji ki li mi ni oi pi qi ri sj tj uj vj wj xj yj zj {j |j }j ~k k k k k l l l l l m n n n n n n n n n o o o o o o o o p p p p p p p p q q q q q q q q r r r r r r r r s t t t t t u u u u u u u u u v v v v v v v v v v v v v v w x y y z z z z z z z z z { { { { { { { | | | | | } ~ ~ ~ ~ ~                                              ! " # $ % & ' ( ) * + , - . / 0 1 2 3 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 [ \ ] ^ _ ` 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 { | } ~                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 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 [ \ ] ^ _ ` 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 { | } ~        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456Nonexfuthark&Whether an option accepts an argument.|futharkrSpecification if a single command line option. The option must have a long name, and may also have a short name.AIn the action, the option argument (if any) is stored as in the char*-typed variable optarg.futharkGenerate 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. xyz{|}~ |}~xyz{NoneNone None'8futhark1Which form of transposition to generate code for.futhark6For small arrays that do not benefit from coalescing.futhark8A heuristic for setting the default value for something.futhark&A size that can be assigned a default.futhark_The value supplies by a heuristic can be a constant, or inferred from some device information.futhark9The type of OpenCL device that this heuristic applies to.futharkAll of our heuristics.futhark*mapTranspose name elem_type transpose_type- Generate a transpose kernel with requested name for elements of type  elem_typem. There are special support to handle input arrays with low width or low height, which can be indicated by transpose_type.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 mulxM contains this factor for the kernel to handle input arrays with low height.*See issue #308 on GitHub for more details. Safe>1nfutharkAn 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.futharkaAn error that happened due to something the user did, such as provide incorrect code or options.futharkjAn internal compiler error. The second text 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.NoneYfutharkcA 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.futharktAn 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).futharkBA 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).futhark{Versions of the form (0,0,0)-timestamp+hash are treated specially, as a reference to the commit identified uniquely with hashF (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.futharkJPossibly given a package path, construct an otherwise-empty manifest file.futharkAPrettyprint a package manifest such that it can be written to a  futhark.pkg file.futhark3The required packages listed in a package manifest.futharkWWhere in the corresponding repository archive we can expect to find the package files.futharkoAdd new required package to the package manifest. If the package was already present, return the old version.7futharkPCheck if the manifest specifies a required package with the given package path.futhark6Remove a required package from the manifest. Returns 8X if the package was not found in the manifest, and otherwise the new manifest and the  that was present.futharkGPrettyprint a build list; one package per line and newline-terminated./kmtsrqponwuv/mtsrqponwuvk NonevfutharkLike 9, 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 aL, or the resulting list may contain too few chunks, or not all elements of a.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 : and ;.futharkBReturn the list element at the given index, if the index is valid.futhark3Return the first element of the list, if it exists.futharkLike <, but from the end.futharkLike <, but produces three lists.futharkLike <, but produces four lists.futharkmReturn the list element at the given index, if the index is valid, along with the elements before and after.futhark7The Unix environment when the Futhark compiler started.futharkLike =n, but also wraps exceptions when the indicated binary cannot be launched, or some other exception is thrown.futhark7Every non-directory file contained in a directory tree.futhark9Round a single-precision floating point number correctly.futhark9Round a double-precision floating point number correctly.futhark<Turn a POSIX filepath into a filepath for the native system.futharkSome bad operating systems do not use forward slash as directory separator - this is where we convert Futhark includes (which always use forward slash) to native paths.futharkXRemove leading and trailing whitespace from a string. Not an efficient implementation! NonefutharkdCalculate the given permutation of the list. It is an error if the permutation goes out of bounds.futhark Produce the inverse permutation.futhark[Return the first dimension not affected by the permutation. For example, the permutation [1,0,2] would return 2.futharkQCompose 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.GIf the input is not a valid permutation, then the result is undefined.    Safe futharksThis wrapper allows you to use a type that is an instance of the true class whenever the simile class is required.futharkLike , but rounds up.       Safe=>?-futhark*Typeclass for monads that support logging.futharkAdd one log entry. futharkAppend an entire log.!futhark@Typeclass for things that can be turned into a single-entry log.$futharktTransform a log into text. Every log entry becomes its own line (or possibly more, in case of multi-line entries). !"#$#$!" None& ,futhark^Monads that support a stateful package registry. These are also required to be instances of >F because most package registry operations involve network operations.0futharkEA 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.1futharkLInformation about a package. The name of the package is stored separately.4futharkILook up information about a specific commit, or HEAD in case of Nothing.5futhark[Information about a version of a single package. The version number is stored separately.8futhark1The directory inside the zipball containing the lib\ directory, in which the package files themselves are stored (Based on the package path).9futhark~The 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.?futharkCreate memoisation around a < action to ensure that multiple inspections of the same revisions will not result in potentially expensive network round trips.@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..Bfuthark:Look up information about a specific version of a package.Cfuthark%Find the newest version of a package.,-./0123456789:;<=>?@ABC1234?@56789:;<=>0,-./ABCNone>JfutharkZA mapping of package revisions to the dependencies of that package. Can be considered a 0t without the option of obtaining more information from the Internet. Probably useful only for testing the solver.@futharkA 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.Afuthark Construct a  from a @L. This involves pruning all packages that cannot be reached from the root.BfutharkGiven a list of immediate dependency minimum version constraints, find dependency versions that fit, including transitive dependencies.KfutharkxRun the solver, producing both a package registry containing a cache of the lookups performed, as well as a build list.LfutharkYPerform package resolution with only pre-known information. This is useful for testing.JKLKLJNoneʤ Ofuthark.Prettyprint a value, wrapped to 80 characters.PfutharkPrettyprint a value to a C, wrapped to 80 characters.Qfuthark2Prettyprint a value without any width restriction.Rfuthark Re-export of D.Sfuthark,Prettyprint a list enclosed in curly braces.Tfuthark The document T ds separates ds1 with commas and encloses them with parentheses.UfutharkCMake sure that the given document is printed on just a single line.VfutharkStack and prepend a list of b s to another b?, separated by a linebreak. If the list is empty, the second b1 will be returned without a preceding linebreak.WfutharkKSurround the given document with enclosers and add linebreaks and indents.qEFGHI  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abjihgfedcOPQRSTUVWl  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abjihgfedcORSPQTUVWNoneSX_FӆXfuthark+Conversion operators try to generalise the from t0 x to t1 instructions from LLVM.YfutharklZero-extend the former integer type to the latter. If the new type is smaller, the result is a truncation.ZfutharklSign-extend the former integer type to the latter. If the new type is smaller, the result is a truncation.[futharkyConvert value of the former floating-point type to the latter. If the new type is smaller, the result is a truncation.\futharkXConvert a floating-point value to the nearest unsigned integer (rounding towards zero).]futharkVConvert 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.`futharkSConvert an integer to a boolean value. Zero becomes false; anything else is true.afutharkIConvert a boolean to an integer. True is converted to 1 and False to 0.bfutharkComparison operators are like ls, but they return As. The somewhat ugly constructor names are straight out of LLVM.cfutharkAll types equality.dfutharkUnsigned less than.efutharkUnsigned less than or equal.ffutharkSigned less than.gfutharkSigned less than or equal.hfutharkFloating-point less than.ifuthark"Floating-point less than or equal.jfutharkBoolean less than.kfutharkBoolean less than or equal.lfutharkBinary operators. These correspond closely to the binary operators in LLVM. Most are parametrised by their expected input and output types.mfutharkInteger addition.nfutharkFloating-point addition.ofutharkInteger subtraction.pfutharkFloating-point subtraction.qfutharkInteger multiplication.rfutharkFloating-point multiplication.sfutharkeUnsigned integer division. Rounds towards negativity infinity. Note: this is different from LLVM.tfutharkcSigned integer division. Rounds towards negativity infinity. Note: this is different from LLVM.ufutharkFloating-point division.vfuthark,Unsigned integer modulus; the countepart to s.wfuthark*Signed integer modulus; the countepart to t.xfutharkHSigned integer division. Rounds towards zero. This corresponds to the sdiv instruction in LLVM.yfutharkHSigned integer division. Rounds towards zero. This corresponds to the srem instruction in LLVM.zfuthark,Returns the smallest of two signed integers.{futhark.Returns the smallest of two unsigned integers.|futhark3Returns the smallest of two floating-point numbers.}futhark,Returns the greatest of two signed integers.~futhark.Returns the greatest of two unsigned integers.futhark3Returns the greatest of two floating-point numbers.futhark Left-shift.futhark#Logical right-shift, zero-extended.futhark&Arithmetic right-shift, sign-extended.futhark Bitwise and.futhark Bitwise or.futharkBitwise exclusive-or.futharkInteger exponentiation.futharkFloating-point exponentiation.futhark#Boolean and - not short-circuiting.futhark"Boolean or - not short-circuiting.futharkVarious unary operators. It is a bit ad-hoc what is a unary operator and what is a built-in function. Perhaps these should all go away eventually.futharkE.g., ! True == False.futharkE.g.,  ~(~1) = 1.futhark abs(-2) = 2.futharkfabs(-2.0) = 2.0.futharkSigned sign function:  ssignum(-2) = -1.futharkUnsigned sign function:  usignum(2) = 1.futharkNon-array values.futharkThe only value of type cert.futharkA floating-point value.futharkAn integer value.futharkLow-level primitive types.futharkA floating point type.futharkAn integer type, ordered by size. Note that signedness is not a property of the type, but a property of the operations performed on values of these types.futharkA list of all integer types.futhark#A list of all floating-point types.futharkA list of all primitive types.futhark Create an  from a type and an J.futhark Convert an  to any K type.futhark Create a  from a type and a L.futharkThe type of a basic value.futharkA "blank" value of the given primitive type - this is zero, or whatever is close to it. Don't depend on this value, but use it for e.g. creating arrays to be populated by do-loops.futhark,A list of all unary operators for all types.futhark-A list of all binary operators for all types.futhark1A list of all comparison operators for all types.futhark1A list of all conversion operators for all types.futharkE.g.,  ~(~1) = 1.futhark abs(-2) = 2.futharkabs(-2.0) = 2.0.futhark ssignum(-2) = -1.futhark usignum(-2) = -1.futharkInteger addition.MfutharkInteger subtraction.futharkInteger multiplication.NfutharkeUnsigned integer division. Rounds towards negativity infinity. Note: this is different from LLVM.futharkcSigned integer division. Rounds towards negativity infinity. Note: this is different from LLVM.Ofuthark,Unsigned integer modulus; the countepart to s.futhark*Signed integer modulus; the countepart to t.PfutharkHSigned integer division. Rounds towards zero. This corresponds to the sdiv instruction in LLVM.QfutharkHSigned integer division. Rounds towards zero. This corresponds to the srem instruction in LLVM.RfutharkMinimum of two signed integers.Sfuthark!Minimum of two unsigned integers.TfutharkMaximum of two signed integers.Ufuthark!Maximum of two unsigned integers.Vfuthark Left-shift.Wfuthark#Logical right-shift, zero-extended.Xfuthark&Arithmetic right-shift, sign-extended.Yfuthark Bitwise and.Zfuthark Bitwise or.[futharkBitwise exclusive-or.futharkSigned integer exponentatation.futharkZero-extend the given integer value to the size of the given type. If the type is smaller than the given value, the result is a truncation.futharkSign-extend the given integer value to the size of the given type. If the type is smaller than the given value, the result is a truncation.futhark5Convert the former floating-point type to the latter.futharkXConvert a floating-point value to the nearest unsigned integer (rounding towards zero).futharkVConvert 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.futhark3Compare any two primtive values for exact 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.futhark Translate an  to . This is guaranteed to fit.futhark Translate an  to . This is guaranteed to fit.\futhark.Careful - there is no guarantee this will fit.futhark%The result type of a binary operator.futhark+The operand types of a comparison operator.futhark0The operand and result type of a unary operator.futhark4The input and output types of a conversion operator.futhark}A mapping from names of primitive functions to their parameter types, their result type, and a function for evaluating them.futhark Is the given value kind of zero?futharkIs the given value kind of one?futhark$Is the given value kind of negative?]futhark(Is the given integer value kind of zero?^futhark,Is the given integer value kind of negative?futhark7The size of a value of a given primitive type in bites.futharkAThe size of a value of a given primitive type in eight-bit bytes._futhark?The size of a value of a given integer type in eight-bit bytes.`futharkFThe size of a value of a given floating-point type in eight-bit bytes.futhark1True if the given binary operator is commutative.futhark;True if signed. Only makes a difference for integer types.XYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~lmoqtwxynprsuvz{|}~XYZ[\]^_`abcdefghijkSafePOfutharkdA table entry. Consists of the content as well a list of SGR commands to color/stylelize the entry.futhark.Makes a table entry with the default SGR mode.futharkBuilds 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.NoneMc[futharkbA name tagged with some integer. Only the integer is used in comparisons, no matter the type of vn.futharkMThe abstract (not really) type representing names in the Futhark compiler. a4s, being lists of characters, are very slow, while Cs are based on byte-arrays.futhark2Whether some operator is commutative or not. The b: instance returns the least commutative of its arguments.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."futhark3The name of the default program entry point (main).#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 C.&futhark Convert a C to the corresponding name.'futhark/A human-readable location string, of the form filename:lineno:columnno.(futhark Return the tag contained in the .)futhark!Return the name contained in the .*futharkReturn the base  converted to a string.O! "#$%&'()*! '#$%&()*O"None=>?9-BfutharkA part of an error message.CfutharkA literal string.DfutharkA run-time integer value.Efuthark]An error message is a list of error parts, which are concatenated to form the final message.GfutharkA set of names.Hfuthark]An element of a pattern - consisting of an name (essentially a pair of the name andtype), a Bindage, and an addditional parametric attribute. This attribute is what is expected to contain the type of the resulting variable.JfutharkThe name being bound.KfutharkPattern element attribute.Lfuthark A list of NLs, indicating how an array should be sliced. Whenever a function accepts a L{, that slice should be total, i.e, cover all dimensions of the array. Deviators should be indicated by taking a list of M es instead.Mfuthark,How to index a single dimension of an array.NfutharkFix index in this dimension.Ofuthark&DimSlice start_offset num_elems stride.Pfuthark#A type alias for namespace control.QfutharkA function parameter.SfutharkName of the parameter.TfutharkFunction parameter attribute.UfutharkA 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.Xfuthark:A list of names used for certificates in some expressions.[futharkVAn 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.afuthark8Only observes value in this position, does not consume.bfutharkAn d> with uniqueness information, used for function return types.cfuthark[A type with shape and uniqueness information, used declaring return- and parameters types.dfutharkA type with existentially quantified shapes - used as part of function (and function-like) return types. Generally only makes sense when used in a list.efutharkJA type with shape information, used for describing the type of variables.ffuthark`An Futhark type is either an array or an element type. When comparing types for equality with c, shapes must match.jfuthark<A fancier name for '()' - encodes no uniqueness information.lfuthark:A string representing a specific non-default memory space.mfuthark!The memory space of a block. If nL, this is the "default" space, whatever that is. The exact meaning of the SpaceID 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 (n) and GPU space.pfuthark>A class encompassing types containing array shape information.qfuthark0Return the rank of an array with the given size.rfutharkstripDims n shape strips the outer n dimensions from shape.sfuthark5Check whether one shape if a subset of another shape.tfuthark[The size of an array type as merely the number of dimensions, with no further information.vfutharkLike |q but some of its elements may be bound in a local environment instead. These are denoted with integral indices.wfutharkThe size of this dimension.xfuthark"Something that may be existential.{futhark{The size of an array as a list of subexpressions. If a variable, that variable must be in scope where this array is used.|futharkeThe size of an array type as a list of its dimension sizes, with the type of sizes being parametric.futharkIf the argument is a N, return its component.futharkIf the slice is all Ns, return the components.futhark3The dimensions of the array produced by this slice.futharkA slice with a stride of one.futharkFix the O?s of a slice. The number of indexes must equal the length of  for the slice.OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefhgijklmonpqrstuvwxzy{|}~J! jk|}~{xzywvtupqrsmonlfhgiedcb_`aEFBCD[\]^XYZUWVQRSTPMNOLHIJKGNone6futhark$If a Haskell type is an instance of D, 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 V U containing the given value.futhark1Utility definition for reasons of type ambiguity.futhark1Utility definition for reasons of type ambiguity.None=>? 3futharkESomething with an existential context that can be (partially) fixed.futharkBFix the given existentional variable to the indicated free value.futhark/Typeclass for things whose type can be changed.futhark"Typeclass for things that contain bs.futhark"Typeclass for things that contain ds.futhark"Typeclass for things that contain cs.futhark"Typeclass for things that contain es.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 d.futharkAModify the shape of an array - for non-arrays, this does nothing.futharkZSet the shape of an array. If the given type is not an array, return the type unchanged.futharkCTrue if the given type has a dimension that is existentially sized.futhark Return the uniqueness of a type.futharkunique t is e' if the type of the argument is unique.futhark'Set the uniqueness attribute of a type.futharkConvert types with non-existential shapes to types with non-existential shapes. Only the representation is changed, so all the shapes will be z.futharkAs , but on a single type.futhark arrayOf t s uC constructs an array type. The convenience compared to using the h 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 tP 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 .futharkSConstruct an array whose rows are the given type, and the outer size is the given |-. This is just a convenient wrapper around .futhark_Set the dimensions of an array. If the given type is not an array, return the type unchanged.futharkkSet the existential dimensions of an array. If the given type is not an array, return the type unchanged.futharkwReplace the size of the outermost dimension of an array. If the given type is not an array, it is returned unchanged.futharksReplace 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.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 nZ outermost layers of the array. Essentially, it is the type of indexing an array of type t with n indexes.futharkiReturn the size of the given dimension. If the dimension does not exist, the zero constant is returned.futharkJReturn the dimensions of a type - for non-arrays, this is the empty list.futharkVReturn the existential dimensions of a type - for non-arrays, this is the empty list.futharkiReturn 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].futharkAA type is a primitive type if it is not an array or memory block.futhark.Returns the bottommost type of an array. For [[int]], this would be int5. 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. 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..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.futhark@The set of identifiers used for the shape context in the given ds.futhark.The size of the set that would be returned by .futharkIf all dimensions of the given RetType9 are statically known, return the corresponding list of e.futharkGiven two lists of d(s of the same length, return a list of ds that is a subtype (as per  isSubtypeOf) of the two operands.futharkGiven a list of dAs and a list of "forbidden" names, modify the dimensions of the ds such that they are x where they were previously z0 with a variable in the set of forbidden names.futhark In the call shapeMapping ts1 ts2 , the lists ts1 and ts must be of equal length and their corresponding elements have the same types modulo exact dimensions (but matching array rank is important). The result is a mapping from named dimensions of ts1$ to the corresponding dimension in ts2.This function is useful when ts10 are the value parameters of some function and ts2Q are the value arguments, and we need to figure out which shape context to pass.futharkLike  shapeMapping%, but works with explicit dimensions.futharkLike 4, but produces a mapping for the dimensions context.A     A     None=?HV1futharkA 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 d5, but may have more, notably an existential context.2futhark-Contruct a return type from a primitive type.3futharkGiven 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.4futharksA type representing the return type of a body. It should contain at least the information contained in a list of d6s, but may have more, notably an existential context.5futhark,Construct a body type from a primitive type.8futhark`Given shape parameter names and value parameter types, produce the types of arguments accepted.1234567845612378None>HV<futhark)Annotation for every let-pattern element.=futhark Annotation for every expression.>futharkAnnotation for every body.?futhark5Annotation for every (non-lambda) function parameter.@futhark/Annotation for every lambda function parameter.Afuthark-The return type annotation of function calls.Bfuthark'The return type annotation of branches.CfutharkExtensible operation.12345678;CA<=>?@B ;CA<=>?@BNone1=>?HVr":Dfuthark!Type alias for namespace reasons.EfutharkAn entire Futhark program.Hfuthark!Type alias for namespace reasons.IfutharkzEvery entry point argument and return value has an annotation indicating how it maps to the original source program type.Jfuthark6Is an unsigned integer or array of unsigned integers.KfutharkyA black box type comprising this many core values. The string is a human-readable description with no other semantics.LfutharkMaps directly.MfutharkInformation about the parameters and return value of an entry point. The first element is for parameters, the second for return value.NfutharkFunction DeclarationsPfuthark5Contains a value if this function is an entry point.Wfuthark#Type alias for namespacing reasons.Xfuthark%Anonymous function for use in a SOAC.]futhark#A type alias for namespace control._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.afutharkData associated with a branch.efutharkFor-loop or while-loop?hfutharkWhether something is safe or unsafe (mostly function calls, and in the context of whether operations are dynamically checked). When we inline an i: function, we remove all safety checks in its body. The f instance picks i as being less than j.kfuthark'The root Futhark expression type. The k constructor contains a lore-specific operation. Do-loops, branches and function calls are special. Everything else is a simple q.lfuthark#A simple (non-recursive) operation.ofuthark'loop {a} = {v} (for i < n|while b) do bA. The merge parameters are divided into context and value part.qfutharkeA primitive operation that returns something of known size and does not itself contain any bindings.rfutharkA variable or constant.sfutharkSemantically and operationally just identity, but is invisible/impenetrable to optimisations (hopefully). This is just a hack to avoid optimisation (so, to work around compiler limitations).tfutharkArray literals, e.g., [ [1+x, 3], [2, 1+4] ]N. Second arg is the element type of the rows of the array. Scalar operationsufutharkUnary operation.vfutharkBinary operation.wfuthark+Comparison - result type is always boolean.xfutharkConversion "casting".yfutharkmTurn a boolean into a certificate, halting the program with the given error message if the boolean is false.zfuthark5The certificates for bounds-checking are part of the .{futharkQAn in-place update of the given array at the given position. Consumes the array.|futharkconcat!0([1],[2, 3, 4]) = [1, 2, 3, 4]@.}futhark:Copy the given array. The result will not alias anything.~futharkgManifest 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 h 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]]futharkxRepeat each dimension of the input array some number of times, given by the corresponding shape. For an array of rank k, the list must contain k shapes. A shape may be empty (in which case the dimension is not repeated, but it is still present). The last shape indicates the amount of extra innermost dimensions. All other extra dimensions are added *before* the original dimension.futhark>Create array of given type and shape, with undefined elements.futhark71st 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.futharkFirst variable is the flag array, second is the element arrays. If no arrays are given, the returned offsets are zero, and no arrays are returned.futhark A list of -s, indicating the new dimensions of an array.futharkThe new dimension in a -like operation. This allows us to disambiguate "real" reshapes, that change the actual shape of the array, from type coercions that are just present to make the types work out.futharkHThe new dimension is guaranteed to be numerically equal to the old one.futharkGThe new dimension is not necessarily numerically equal to the old one.futhark!Type alias for namespace reasons.futhark`A 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.futharkA sequence of statements.futharkA local variable binding.futhark3Auxilliary Information associated with a statement.futhark#A type alias for namespace control.futhark?A pattern is conceptually just a list of names and their types.futhark-existential context (sizes and memory blocks)futhark "real" valuesfuthark#A type alias for namespace control._OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefhgijklmonpqrstuvwxzy{|}~12345678;CA<=>?@BDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghjiknpmloqszuv}rwxty{|~! jktupqrsmonfhgi_`a[\]^UWVHIJKqszuv}rwxty{|~lmoqtwxynprsuvz{|}~bcdefghijkXYZ[\]^_`aknpmlo]efgabcd^_`hjiXYZ[\WQRSTVUNOPQRSTHMIJKLEFGDNonefutharkThe new dimension.futhark6The new dimensions resulting from a reshape operation.futhark Construct a " where all dimension changes are s.1The new shape resulting from a reshape operation.futhark Construct a pair suitable for a .futhark%Modify the shape of an array type as  would dofuthark 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.futharkcIf the shape change is nothing but shape coercions, return the new dimensions. Otherwise, return 8.futharkfuseReshape s1 s2 creates a new 2 that is semantically the same as first applying s1 and then s2-. This may take advantage of properties of  versus  to preserve information.futharkfuseReshapes s ss creates a fused / that is logically the same as first applying s and then the changes in ss from left to right.futharkNGiven concrete information about the shape of the source array, convert some s into s.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+1i 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.None>HVfutharkThe e of a parameter.futharkThe c of a parameter.futharkAn [ corresponding to a parameter.futharkAn [$ corresponding to a pattern element.futharkThe type of a name bound by a .futharkSet the lore of a .futharkAAll pattern elements in the pattern - context first, then values.futharkReturn a list of the [s bound by the .futharkReturn a list of the context [s bound by the .futharkReturn a list of the value [s bound by the .futharkReturn a list of the s bound by the .futharkReturn a list of the #s bound by the context part of the .futharkReturn a list of the !s bound by the value part of the .futharkReturn a list of the typess bound by the .futharkReturn a list of the Types!s bound by the value part of the .futharkReturn a list of the ExtTypes"s bound by the value part of the I, with existentials where the sizes are part of the context part of the .futhark(Return the number of names bound by the .futharkCreate a pattern using e as the attribute.None=>?futhark:The class of lores whose annotations can be prettyprinted.futhark=Class for values that may have some prettyprinted annotation.OSSONone"futharkeThe class of some kind of configurable size. Each class may impose constraints on the valid values.'futharkwAn indication of which comparisons have been performed to get to this point, as well as the result of each comparison."#$%&'"#$%&'None,1=>?@ACHMVv ,futhark4A monad transformer that carries around an extended 7. Its 3( method will first look in the extended 7, and then use the 3 method of the underlying monad..futharkiThe 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 X*, is is the parameters (including index).0futhark,The class of monads that not only provide a 71, but also the ability to locally extend it. A g containing a 7- is the prototypical example of such a monad.1futharkRun a computation with an extended type environment. Note that this is intended to *add* to the current type environment, it does not replace it.2futharkThe class of applicative functors (or more common in practice: monads) that permit the lookup of variable types. A default method for 3L exists, which is sufficient (if not always maximally efficient, and using h to fail) when 5 is defined.3futharkUReturn the type of the given variable, or fail if it is not in the type environment.4futharkUReturn the info of the given variable, or fail if it is not in the type environment.5futharkBReturn the type environment contained in the applicative functor.6futharkEReturn the result of applying some function to the type environment.7futharkIA scope is a mapping from variable names to information about that name.8futhark!How some name in scope was bound.BfutharkJIf two scopes are really the same, then you can convert one to the other.Dfuthark3Run a computation in the extended type environment.,-./0123465789:;<=>?@ABCD2346589:;<017./=@A>?-BC,DNonek [futharkExpress a monad expression on a syntax node. Each element of this structure expresses the action to be performed on a given child.ffutharkExpress a monad mapping operation on a syntax node. Each element of this structure expresses the operation to be performed on a given child.ifutharkLMost bodies are enclosed in a scope, which is passed along for convenience.qfuthark/A mapper that simply returns the tree verbatim.rfutharkMap across the bindings of a .sfutharkXMap a monadic action across the immediate children of an expression. Importantly, the mapOnExp action is not invoked for the expression itself, and the mapping does not descend recursively into subexpressions. The mapping is done left-to-right.vfutharkLike v , but in the i monad.xfutharkA no-op traversal.yfutharkAs  walkBodyM, but for expressions.zfutharkAs z, but runs in the i monad.. [\]^_`abcdefghijklmnopqrstuvwxyz fghijklmnopqrsvwut[\]^_`abcdexyzNone=>? {futharkEither return precomputed free names stored in the attribute, or the freshly computed names. Relies on lazy evaluation to avoid the work.}futharkZA class indicating that we can obtain free variable information from values of this type.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.futharkAReturn the set of variable names that are free in the given body.futharkHReturn the set of variable names that are free in the given expression.futharkEReturn the set of variable names that are free in the given binding.futharksReturn the set of variable names that are free in the given lambda, including shape annotations in the parameters.futhark1The names bound by the bindings immediately in a .futharkThe names bound by a binding.futhark The names bound by the bindings.futhark<The names of the lambda parameters plus the index parameter.G{|}~}~G{|None =>?@AHVE futharkuAny operation must define an instance of this class, which describes the type of the operation (at the value level).futharkThe type of a subexpression.futharkmapType f arrts* wraps each element in the return type of fR 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.futhark|The type of a body. Watch out: this only works for the degenerate case where the body does not already return its context.futharkoGiven the return type of a function and the subexpressions returned by that function, return the size context.futharkfA loop returns not only its value merge parameters, but may also have an existential context. Thus, )loopResult ctxmergeparams valmergeparams returns those paramters in ctxmergeparams' that constitute the returned context.futhark:Given the context and value merge parameters of a Futhark loop, produce the return type.,12345678,-./0123465789:;<=>?@ABCD  NonefutharkNA primitive expression parametrised over the representation of free variables.futhark Evaluate a  in the given monad. Invokes j on type errors.futhark!The type of values returned by a 4. This function returning does not imply that the  is type-correct.kfuthark/Is the expression a constant zero of some sort?lfuthark.Is the expression a constant one of some sort?mfuthark#Is the expression a constant value?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 n instance.XYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !None,=>?bfuthark:Lores in which all annotations support name substitution.futhark^A 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.futharkIThe substitutions to be made are given by a mapping from names to names."None: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 fO 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.futharkProduce a fresh *, using the given base name as a template.futharkProduce a fresh *, using the given base name as a template.#None=?/" futharkoA monad that stores a name source. The following is a good instance for a monad in which the only state is a  NameSource vn: Y instance MonadFreshNames vn MyMonad where getNameSource = get putNameSource = put futharkNRun 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 a for the name template.futharkProduce a fresh ID*, using the given base name as a template.futharkAs , but takes a a for the name template.futharkProduce a fresh *, using the given base name as a template.futharkProduce a fresh N, using the given name as a template, but possibly appending something more..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 several [As, using the given name as a template, based on a list of types.futharkProduce a fresh Q%, using the given name as a template.futharkProduce a fresh Q, using the given Q1 as a template, but possibly modifying the name.$None,=>?U6 futhark.Lores in which all annotations are renameable. futharkMembers of class   can be uniquely renamed.futharkwRename 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.futhark Rename bound variables such that each is unique. The semantics of the function 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.futharkNProduce an equivalent pattern but with each pattern element given a new name.ofutharkLProduce 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.pfuthark"Return a fresh, unique name. The VName is prepended to the name.futhark;Create a bunch of new names and bind them for substitution.futharkmRename some statements, then execute an action with the name substitutions induced by the statements active.    %None,=>?HVp3futharkNLore-specific attributes; also means the lore supports some basic facilities.4futharkpGiven a pattern, construct the type of a body that would match it. An implementation for many lores would be E.5futharkA type class for operations.6futharkLike <, but for arbitrary ops.7futhark,Should we try to hoist this out of branches?8futharkisBuiltInFunction k is e if k is an element of 9.9futhark0A map of all built-in functions and their types.:futhark;Find the function of the given name in the Futhark program.;futharkIf the expression is a q, return that q , otherwise 8.<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 W* subexpressions. May contain duplicates.>futharkIf the q is a W return the variable name.?futhark>Return the variable dimension sizes. May contain duplicates.@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.AfutharkHow 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).BfutharkA  with empty X.Cfuthark-The certificates associated with a statement.Dfuthark Add certificates to a statement.EfutharkAConstruct the type of an expression that would match the pattern.  G     12345678,-./0123465789:;<=>?@ABCD{|}~3456789:;<=>?@ABCDE89:;<=>?@ABCDE56734&None=>?HVuNfuthark*Something that contains alias information.Ofuthark"The alias of the argument element.GHIJKLMNOPQRSTUVWXYZSTUVZPQRNOWXYKLMGHIJNonev9  OSXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefhgijklmonpqrstuvwxzy{|}~     12345678;CA<=>?@BDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghjiknpmloqszuv}rwxty{|~,-./0123465789:;<=>?@ABCD[\]^_`abcdefghijklmnopqrstuvwxyz{|}~3456789:;<=>?@ABCDE'Nonelmffuthark5Expand the usage table based on aliasing information.jfutharkfHas the given name been used directly (i.e. could we rename it or remove it without anyone noticing?)qfutharkVCheck whether the bits that are set in the first argument are also set in the second.rfutharkx - y, but for Usages._`abcdefghijklmnop`abcdgefhijklmno_p(None>m{|}~}~{|)None&',futhark8Convert a binding from one lore to another, if possible.*None>M  +None>VfutharkA mapping from a variable name v,, to those variables on which the value of vP is dependent. The intuition is that we could remove all other variables, and vS would still be computable. This also includes names bound in loops or by lambdas.futhark1Compute the data dependencies for an entire body.,None>futharkSA function that checks whether a variable name corresponds to a scalar expression.futhark0Representation of a scalar expression, which is:1(i) an algebraic expression, e.g., min(a+b, a*b),&(ii) a relational expression: a+b < 5,/(iii) a logical expression: e1 and (not (a+b>5)futharkRelational operators.futhark)Number of nodes in the scalar expression.futhark-Non-recursively convert a subexpression to a D. The (scalar) type of the subexpression must be given in advance.futharkIf you have a scalar expression that has been created with incomplete symbol table information, you can use this function to grow its  leaves.sfutharkl"Smart constructor" that checks whether we are subtracting zero, and if so just returns the first argument.XYZ[\]^_`abcdefghijklmoqnprsuvz{|}~ƣXYZ[\]^_`abcdefghijklmoqnprsuvz{|}~-None=?_CtfutharkOenvironment recording the position and a list of variable-to-range bindings.ufuthark[The number of simplifications to do before bailing out, to avoid spending too much time.futharkRanges are inclusive.futharkPrettyprint a c. Do not rely on the format of this string. Does not include the loop nesting depth information.vfuthark1Binds an array name to the set of used-array varsfuthark+Applies Simplification at Expression level:futharkzGiven a symbol i and a scalar expression e, it decomposes e = a*i + b and returns (a,b) if possible, otherwise Nothing.futhark:Extracts sufficient conditions for a LTH0 relation to hold.None ,=>?HV futharkLSomething that contains range information for several things, most notably  or .futharkThe ranges of the argument.futhark*Something that contains range information.futhark"The range of the argument element.futharkThe lore has embedded range information. Note that it may not be up to date, unless whatever maintains the syntax tree is careful.futhark*The range as a pair of scalar expressions.futhark&Upper and lower bound, both inclusive.futhark&A possibly undefined bound on a value.futharkA known bound on a value.futharkHas the same bounds as this variable. VERY IMPORTANT: this variable may be an array, so it cannot be immediately translated to a ScalExp.futhark+Bounded by the minimum of these two bounds.futhark+Bounded by the maximum of these two bounds.futhark"Bounded by this scalar expression.futharklConvert the bound to a scalar expression if possible. This is possible for all bounds that do not contain s.futhark Construct a ` from two possibly known bounds. The resulting bound will be unknown unless both of the given s are known. This may seem counterintuitive, but it actually makes sense when you consider the task of combining the lower bounds for two different flows of execution (like an if expression). If we only have knowledge about one of the branches, this means that we have no useful information about the combined lower bound, as the other branch may take any value.futharkLike , but constructs a .futhark:A range in which both upper and lower bounds are 'Nothing.wfuthark!The range of a scalar expression.futhark,Ranges of the value parts of the expression./None =>?HVX futhark&The lore for the basic representation.^  OSXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefhgijklmonpqrstuvwxzy{|}~     12345678;CA<=>?@BDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghjiknpmloqszuv}rwxty{|~,-./0123465789:;<=>?@ABCD[\]^_`abcdefghijklmnopqrstuvwxyz{|}~3456789:;<=>?@ABCDE           0None>futharkkPerform variable range analysis on the given program, returning a program with embedded range annotations. !"" !1None>Mݷ#futharkA compiler pass transforming a E of a given lore to a E of another lore.%futhark{Name of the pass. Keep this short and simple. It will be used to automatically generate a command-line option name via ,.&futharkQA slightly longer description, which will show up in the command-line help text.(futhark"The monad in which passes execute.)futhark Execute a (L action, yielding logging information and either an error text or a result.*futharkTurn an x computation into a ( . If the x is y, the result is a .+futharkTurn an x monadic computation into a ( . If the x is y, the result is an exception.,futharkWTake the name of the pass, turn spaces into dashes, and make all characters lowercase. #$%&'()*+,- ()*+#$%&',-2None>HV,4futharkA monad that supports the creation of bindings from expressions and bodies from bindings, with a specific lore. This is the main typeclass that a monad must implement in order for it to be useful for generating or modifying Futhark code.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.=futharkThe class of lores 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 4F instance, it is acceptable for them to create new bindings, however.Jfuthark1Add several bindings at the outermost level of a .Kfuthark1Add a single binding at the outermost level of a .,456789:;<=>?@ABCDEFGHIJK=>?@AE456789:;<BJKCDFGHI3None ,=>?@AHMViWfutharkLike V@, but throw away the result and just return the added bindings.XfutharkAs V , but uses 98 to add the returned bindings to the surrounding monad.=456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\MUNOPQRSTLVWXYZ[\4None=>?HVkfuthark'The aliases of what is returned by the %, and what is consumed inside of it.lfuthark&Everything consumed in the expression.mfuthark&The aliases of the let-bound variable.nfutharkA wrapper around G) to get around the fact that we need an f instance, which G does not have.qfuthark&The lore for the basic representation.~futharkIEverything consumed in the given bindings and result (even transitively).d  OSXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefhgijklmonpqrstuvwxzy{|}~     12345678;CA<=>?@BDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghjiknpmloqszuv}rwxty{|~,-./0123465789:;<=>?@ABCD[\]^_`abcdefghijklmnopqrstuvwxyz{|}~3456789:;<=>?@ABCDEGHIJKLMNOPQRSTUVWXYZjklmnopqrstuvwxyz{|}~qnopmlkz{|}stuvwxyrj~5None>futhark,Perform alias analysis on a Futhark program.6None=>?HVzfutharkWisdom about a body.futharkWisdom about an expression.futhark%The wisdom of the let-bound variable.7None=>?HV'futharkJInstances of this class can be converted to Futhark expressions within a 4.futharkAs  , but an ^ can be given.futharkNote: unsigned division.futhark Construct an z3 expressions that slices an array with unit stride.futhark Construct an zO expressions that splits an array in different parts along the outer dimension.futharkdWrite to an index of the array, if within bounds. Otherwise, nothing. Produces the updated array.futhark&Sign-extend to the given integer type.futhark&Zero-extend to the given integer type.futhark@Apply a binary operator to several subexpressions. A left-fold.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 qs.futharkfullSlice t slice returns slice , but with O?s of entire dimensions appended to the full dimensionality of tP. This function is used to turn incomplete indexing complete, as required by z.futharkLike (, but the dimensions are simply numeric.futhark^Does the slice describe the full size of the array? The most obvious such slice is one that OQs the full span of every dimension, but also one that fixes all unit dimensions.futhark8Conveniently construct a body that contains no bindings.futharkVConveniently construct a body that contains no bindings - but this time, monadically!futharkZEvaluate the action, producing a body, then wrap it in all the bindings it created using 9.futharkgChange that result where evaluation of the body would stop. Also change type annotations at branches.futharkpInstantiate all existential parts dimensions of the given type, using a monadic action to create the necessary qls. You should call this function within some monad that allows you to collect the actions performed (say, {).futhark!Can be used as the definition of A for a =& instance for simple representations.m456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\08None =>?@AHMVXKfuthark,The class of lores that can be type-checked. futhark$The type checker runs in this monad.|futharkThe 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.}futharkThe } data structure is used to keep track of which variables have been consumed, as well as whether a violation has been detected.~futharkCA tuple of a return type and a list of parameters, possibly named.futhark A type error.futhark6Information about an error during type checking. The ? instance for this type produces a human-readable description.%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 $.futharkbMark a name as bound. If the name has been bound previously in the program, report a type error.futharkjProclaim that we have made read-only use of the given variable. No-op unless the variable is array-typed.'futhark4Proclaim that we have written to the given variable.)futharkPermit 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.futharkfGiven the immediate aliases, compute the full transitive alias set (including the immediate aliases).futharkcheckAnnotation 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.@futharkRemove all aliases from the .E      !"#$%&'()*+,-./0123456789:;<=>?@ABCDE/ !" $%&    +,#(2-.D374;9:<=>?@AB8C1065')*9None>MOKafutharkkIf Verbose, print log messages to standard error. If VeryVerbose, also print logs from individual passes.#VWXYZ[\]^_`abcdefghijVWXYZ[\]^_`eabcdfijgh:None>SCfutharkReshape 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. wxyz{|}~ wxyz{|}~;NoneZfuthark Convert a F to a Futhark expression. The provided function converts the leaves.futharkConvert an expression to a P. The provided function is used to convert expressions that are not trivially Es. This includes constants and variable names, which are passed as qs.futharkConvert qs of a given type.futhark-Applying a transformation to the leaves in a .futhark3Substituting names in a PrimExp with other PrimExpsXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~<Nonefuthark LMAD algebra is closed under composition w.r.t. operators such as permute, repeat, index and slice. However, other operations, such as reshape, cannot be always 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 tupled with the shape of the original array, and with contiguous info, i.e., if we instantiate all the points of the current index function, do we get a contiguous memory interval?futharkLMAD's representation consists of a permutation, a general offset, and, for each dimension a stride, rotate factor, number of elements, permutation, and ` fullness' and unit-stride info for each dimension. 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.futhark~TODO: should only be: Inc | Dec | Unknown because together with the contiguosness this is enough informationfuthark.monotonously increasing, decreasing or unknwonfuthark.Substituting a name with a PrimExp in an Lmad.futhark8Substituting a name with a PrimExp in an index function.futhark!whether this is a row-major arrayfuthark7whether an index function has contiguous memory supportfutharkShape of an LmadfutharkShape of an index functionfuthark3Computing the flat memory index for a complete set inds2 of array indices and a certain element size  elem_size.futhark6Helper for index: computing the flat index of an Lmad.futharkiotafutharkpermute dimensionsfutharkrepeating dimensionsfutharkRotating an index function:futharkSlicing an index function.futhark^Reshaping an index function. There are four conditions that all must hold for the result of a reshape operation to remain into the one-Lmad domain: (1) the permutation of the underlying Lmad must leave unchanged the Lmad dimensions that were *not* reshape coercions. (2) the repetition of dimensions of the underlying Lmad must refer only to the coerced-dimensions of the reshape operation. (3) similarly, the rotated dimensions must refer only to dimensions that are coerced by the reshape operation. (4) finally, the underlying memory is contiguous (and monotonous)If any of this conditions does 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.Actually there are some special cases that need to be treated, for example if everything is a coercion, then it should succeed no matter what.futharkpCorrectness assumption: the shape of the new base is equal to the base of the index function (to be rebased).futharkAresults in the index function corresponding to indexing with i on the outermost dimension.futhark\results in the index function corresponding to making the outermost dimension strided by s.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 R except for transpositions, which are returned together with the offset.futhark9Given an input lmad, this function computes a repetition r and a new lmad res>, such that `repeat r res` is identical to the input lmad`.=Nonexfuthark8Substituting a name with a PrimExp in an index function.>None,>HV futhark#Index a delayed array, if possible.futhark#Index a delayed array, if possible.futhark%Indexing a delayed array if possible.futhark?Which names are available just before the most enclosing loop?futharkTry to convert a symbol table for one representation into a symbol table for another. The two symbol tables will have the same keys, but some entries may be diferent (i.e. some expression entries will have been turned into free variable entries).futharkmUpdating the ranges of all symbols whenever we enter a branch is presently too expensive, and disabled here.futhark]Refines the ranges in the symbol table with ranges extracted from branch conditions. cond# is the condition of the if-branch.--?None ,=>?HV futharkLike f, but just for s. futharkThe essential parts of a 4 factored out (everything except the input arrays).futhark7A combination of scan, reduction, and map. The first q. is the size of the input arrays. The first 'Lambda'/'SubExp' pair is for scan and its neutral elements. The second is for the reduction. The final lambda is for the map part, and finally comes the input arrays.futhark_Construct 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.*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..futhark2Get Stream's accumulators as a sub-expression list/      !"#$%&'()*+,-./01/     -/., !"#$%'&()01*+@None>HVDMfutharkTurns 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.Only handles a  with an empty NfutharkLike M , but for Scanomap.OfutharkTurn a Screma into simpler Scremas that are all simple scans, reduces, and maps. 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.XYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\LMNOPQRSLMNOPQSRANone>HVTUVVUTBNone=?HVJcfuthark&The lore for the basic representation.i  OSXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefhgijklmonpqrstuvwxzy{|}~     12345678;C<=>?@BEFGIJKLMNOPQRSTXYZ[\^_`abcdefghjiklnpmoszuv}rwxty{|~,-./0123465789:;<=>?@ABCD[\]^_`abcdefghijklmnopqrstuvwxyz{|}~3456789:;<=>?@ABCDE      !"#$%&'()*+,-./01WXYZ[\]^_`abcicb_^]a`\[ZYXWOXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFGHJKLMNOPQRSTUWVXYZ[\]^_`abcdefhgijklmonpqrstuvwxzy{|}~12345678;C<=>?@BEGIJKLMNPQRSTXZ[\^_`abcdefghjiknpmoszuv}rwxty{|~XYHIEFklNOQRCNone,>HV.jfuthark]The constraints that a monad must uphold in order to be used for first-order transformation.mfutharkFirst transform any nested _ or \ elements, then apply n if the expression is a SOAC.nfutharkTransform 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 lore.ofuthark+Recursively first-order-transform a lambda.pfuthark_Turn a Haskell-style mapAccumL into a sequential do-loop. This is the guts of transforming a Redomap.jklmnopqkjmonlpqDNone>HVrfuthark1Interchange Scan With Inner Map. Tries to turn a  scan(map) into a @map(scan)sfuthark3Interchange Reduce With Inner Map. Tries to turn a  reduce(map) into a @map(reduce)rstrstENoneMuvwuvwNone =?@AHMVfutharkYA mapping from external variable names to the corresponding internalised subexpressions.futharkuExtra parameters to pass when calling this function. This corresponds to the closure of a locally defined function.futhark;Add a function definition to the program being constructed.futharkExecute the given action if / is true, otherwise just return an empty list.futharkExecute the given action if / is true, otherwise just return an empty list.+lXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\LMNOPQRSlFNone'futharkThe call graph is just a mapping from a function name, i.e., the caller, to a list of the names of functions called by the function. The order of this list is not significant.futharkbuildCallGraph progw build the program's Call Graph. The representation is a hashtable that maps function names to a list of callee names.futharkbuildCallGraph ftable cg fname updates Call Graph cg% with the contributions of function fname=, and recursively, with the contributions of the callees of fname.GNone>cfuthark"doInlineInCaller caller inlcallees inlines in calleer the functions in  inlcallees.. At this point the preconditions are that if  inlcallees8 is not empty, and, more importantly, the functions in  inlcallees do not call any other functions. Further extensions that transform a tail-recursive function to a do or while loop, should do the transformation first and then do the inlining.futharkA composition of inlineAggressively and =, to avoid the cost of type-checking the intermediate stage.futharkremoveDeadFunctions progU removes the functions that are unreachable from the main function from the program.HNone ,1=>?@AHV)futhark!SplitSpace o w i elems_per_thread.Computes how to divide array elements to threads in a kernel. Returns the number of elements in the chunk that the current thread should take.w5 is the length of the outer dimension in the array. i: is the current thread index. Each thread takes at most elems_per_thread elements. If the order o is , thread with index i should receive elements Zi*elems_per_tread, i*elems_per_thread + 1, ..., i*elems_per_thread + (elems_per_thread-1). If the order o is  stride$, the thread will receive elements =i, i+stride, i+2*stride, ..., i+(elems_per_thread-1)*stride.futharkCombine cspace ts aspace bodyX will combine values from threads to a single (multidimensional) array. If we define (is, ws) = unzip cspace, then ws0 is defined the same accross all threads. The cspace defines the shape of the resulting array, and the identifiers used to identify each individual element. Only threads for which all ((i,w) -> i < w) aspace( is true will provide a value (of type ts), which is generated by body.NThe result of a combine is always stored in local memory (OpenCL terminology)9The same thread may be assigned to multiple elements of , if the size of the  exceeds the group size.futharkGroupReduce w lam input (with (nes, arrs) = unzip input+), will perform a reduction of the arrays arrs+ using the associative reduction operator lam and the neutral elements nes. The arrays arrs must all have outer dimension w0, which must not be larger than the group size.qCurrently a GroupReduce consumes the input arrays, as it uses them for scratch space to store temporary resultsKAll threads in a group must participate in a GroupReduce (due to barriers)The length of the arrays wb can be smaller than the number of elements in a group (neutral element will be filled in), but w* can never be larger than the group size.futharkSame restrictions as with .futharkGroupGenReduce  length  destarrays  op  bucket  values locksarraysfutharkxHACK: Semantically identity, but inserts a barrier afterwards. This reflects a weakness in our kernel representation.futharkqA combine can be fully or partially in-place. The initial arrays here work like the ones from the Scatter SOAC.futhark"How an array is split into chunks.INone,1=>?@AHVX;pfutharkLike [, but just for  s.futharkLike f, but just for  s. futharkThe body of a  . futharkIndices computed for each thread (or group) inside the kernel. This is an arbitrary-dimensional space that is generated from the flat GPU thread space. futhark>first three bound in the kernel, the rest are params to kernel futhark'Produce some runtime-configurable size. futharkThe maximum size of some class. futhark8Compare size (likely a threshold) with some Int32 value. futharkSome information about what goes into a kernel, and where it came from. Has no semantic meaning; only used for debugging generated code. futhark5A mapping from a description to some PrimType value. !futhark(Global thread IDs and their upper bound. #futhark!A mapper that simply returns the   verbatim. $futharkMap a monadic action across the immediate children of a Kernel. The mapping does not descend recursively into subexpressions and is done left-to-right. %futharkA no-op traversal. &futharkAs  $, but ignoring the results.?'                           ! " # $ % & ' ( ) *?      (               !  '       "' ) * # $ % &JNone=?HV=  OSXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefhgijklmonpqrstuvwxzy{|}~     12345678;CA<=>?@BDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghjiknpmloqszuv}rwxty{|~"#$%&',-./0123465789:;<=>?@ABCD[\]^_`abcdefghijklmnopqrstuvwxyz{|}~3456789:;<=>?@ABCDE                           ! " # $ % & ' ( ) * \ ] ] \KNone>HVMfuthark=Map 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. j k j kLNoneM l lMNone,>HVNj m n o p q r n m o p r qNNone>HVVTfutharkInt32futharkInt32futharkInt64futharkInt64futharkInt32 |futhark<Requires a fold lambda that includes accumulator parameters. }futharkGiven a chunked fold lambda that takes its initial accumulator value as parameters, bind those parameters to the neutral element instead. futharkThe s returned are the names of variables bound to the carry-out of the last thread. You can ignore them if you don't need them. futharkSegment indexes and sizes. s t u v w x y z { | } ~   ~ {  s t u v w x } | y zONone>HVt futharkregularSegmentedRedomap will generate code for a segmented redomap using two different strategies, and dynamically deciding which one to use based on the number of segments and segment size. We use the (static)  group_size< to decide which of the following two strategies to choose:Large: uses one or more groups to process a single segment. If multiple groups are used per segment, the intermediate reduction results must be recursively reduced, until there is only a single value per segment. Each thread can1 read multiple elements, which will greatly increase performance; however, if the reduction is non-commutative the input array will be transposed (by the KernelBabysitter) to enable memory coalesced accesses. Currently we will always make each thread read as many elements as it can, but this could be unfavorable because of the transpose: in the case where each thread can only read 2 elements, the cost of the transpose might not be worth the performance gained by letting each thread read multiple elements. This could be investigated more in depth in the future (TODO)Small: is used to let each group process *multiple* segments within a group. We will only use this approach when we can process at least two segments within a single group. In those cases, we would normally allocate a whole group per segment with the large strategy, but at most 50% of the threads in the group would have any element to read, which becomes highly inefficient.futharkDManually calculate the values for the ispace identifiers, when the  ; won't do. ispace is the dimensions of the overlaying maps.If the input is #i [(a_vn, a), (b_vn, b), (c_vn, c)] then i] should hit all the values [0,a*b*c). We can calculate the indexes for the other dimensions: 5 c_vn = i % c b_vn = (i/c) % b a_vn = ((i/c)/b) % a  PNone =>?@AHPV_ futhark"Description of distribution to do.futhark*Also related to avoiding identity mapping. futharkaNote: 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.futharkiFirst pair element is the very innermost ("current") nest. In the list, the outermost nest comes first.futharkBoth parameters and let-bound. futharkvAdd new outermost nesting, pushing the current outermost to the list, also taking care to swap patterns if necessary. futharkaAdd new innermost nesting, pushing the current outermost to the list. It is important that the  U has the right order (non-permuted compared to what is expected by the outer nests). futharkqRemove these arrays from the outermost nesting, and all uses of corresponding parameters from innermost nesting. futharkFlatten a kernel nesting to: Ancillary prologue bindings.wThe total number of threads, equal to the product of all nesting widths, and equal to the product of the index space.The index space.9The kernel inputs - not that some of these may be unused.The per-thread return type.' ' QNone>HV futhark_An 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.  RNone>HVB  SNone>HV7futharkRThe 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).  TNone>HVa futharkName of result. futharkType of result. UNone ,=>?@AHMVm futhark>Apply the in-place lowering optimisation to the given program.  VNone>HVa futharkEConvert 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.SWe distinguish between "minimum group size" and "maximum exploitable parallelism".  WNone>HMVN futhark2A collection of both top-down and bottom-up rules.futhark A collection of bottom-up rules.futharkA collection of top-down rules. futharkzContext for a rule applied during bottom-up traversal of the program. Takes a symbol table and usage table as arguments. futharkhContext for a rule applied during top-down traversal of the program. Takes a symbol table as argument.futharkNA collection of rules grouped by which forms of statements they may apply to. futhark`A simplification rule takes some argument and a statement, and tries to simplify the statement. futhark6The monad in which simplification rules are evaluated.futhark Execute a   action. If succesful, returns the result and a list of new bindings. Even if the action fail, there may still be a monadic effect - particularly, the name source may have been modified. futhark1Construct a rule book from a collection of rules. futharksimplifyStm lookup bnd) performs simplification of the binding bnd. 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 bnd) performs simplification of the binding bnd. 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.  XNone>futhark?A function that, given a variable name, returns its definition. 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 bodysC determines whether the do-loop can be expressed in a closed form.futhark Lambda-bound  YNone>HPSVXfutharkKA 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. 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.futharkMove out results of a conditional expression whose computation is either invariant to the branches (only done for results in the context), or the same in both branches.futhark`If we are copying a scratch array (possibly indirectly), just turn it into a scratch by itself.futharkRemove 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.  ZNone ,=>?@AHMV futhark+Blocker for hoisting out of parallel loops. futhark-Blocker for hoisting out of sequential loops. !futhark%Blocker for hoisting out of branches. "futhark(gets the sizes of arrays from a binding. ,futharkZMark that we have changed something and it would be a good idea to re-run the simplifier.futharkWe are willing to hoist potentially unsafe statements out of branches, but they most 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.)futharkWe are willing to hoist potentially unsafe statements out of loops, but they most be protected by adding a branch on top of them.futharkdStatements that are not worth hoisting out of loops, because they are unsafe, and added safety (by %) may inhibit further optimisation.. ;futharkSimplify a single . The [Diet]I only covers the value elements, because the context cannot be consumed.futharkSimplify a single . The [Diet]I only covers the value elements, because the context cannot be consumed.futharkBranch condition.futhark1Which side of the branch are we protecting here?L                   ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A5  ' (        &    %    ! " # 2 $  4 9 5 3 6 : ) , * +   < A > ? @ = . / 0 - ;  8 7 1[None> Wfuthark Simplify a $, including copy propagation. If a  refers to a name that is a V, the node turns into a . XfutharkLike  W, but where leaves may be xs. W X W X\None ,=>?@AHVJ Yfuthark_The memory return of a function, which must always indicate where returned arrays are located. ZfutharkTThe return of a body, which must always indicate where returned arrays are located. [futharkAThe 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 8), or able to put it whereever the binding prefers (if 8).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. \futharkSA description of the memory properties of an array being returned by an operation. ]futharkAThe array is located in a memory block that is already in scope. ^futharkTThe operation returns a new (existential) block, with an existential or known size. _futhark?Memory information for an array bound somewhere in the program. `futhark7Located in this memory block with this index function. bfutharkA summary of the memory information for every let-bound identifier, function parameter, and return value. Parameterisered over uniqueness, dimension, and auxiliary array information. cfutharkA primitive value. dfutharkA memory block. efutharkThe 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, notl byte offsets! To translate to byte offsets, multiply the offset with the size of the array element type. ffuthark9An index function that may contain existential variables. gfuthark>The index function representation used for memory annotations. ifuthark`Allocate a memory block. This really should not be an expression, but what are you gonna do... mfuthark.A lore containing explicit memory information.futhark/Helper function for index function unification.0The first return value maps a VName (wrapped in z) to its Int (wrapped in xH). In case of duplicates, it is mapped to the *first* Int that occurs.5The second return value maps each Int (wrapped in an x) to a  x: with the Int at which its associated VName first occurs. wfuthark{The return information of an expression. This can be seen as the "return type with memory annotations" of the expression. yfutharkZIs an array of the given shape stored fully flat row-major with the given index function?  OSXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefhgijklmonpqrstuvwxzy{|}~     12345678;CA<=>?@BDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghjiknpmloqszuv}rwxty{|~',-./0123465789:;<=>?@ABCD[\]^_`abcdefghijklmnopqrstuvwxyz{|}~3456789:;<=>?@ABCDE                           ! " # $ % & ' ( ) * Y Z [ \ ] ^ _ ` 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" m l h i j b c d e a _ ` \ ] ^ g f n [ Z Y p q k w v x r s u t y z o]None ,=>?@AHMPV+futhark1Monad for adding allocations to a single pattern.futhark2Monad for adding allocations to an entire program.futhark]Aggressively try to reuse memory in do-loops - should be True inside kernels, False outside.futharkA mapping from chunk names to their maximum size. XXX FIXME HACK: This is part of a hack to add loop-invariant allocations to reduce kernels, because memory expansion does not use range analysis yet (it should).futharkTThe subexpression giving the number of elements we should allocate space for. See  comment.  ^None/G futharkthe memory block name futhark"the index function into the memory futharkthe memory block name futhark"the index function into the memory futharkthe shape of the original array futharkMemory block names. futharkMemory block VName.  _None>HVX0u                                              `None,>HMV2 $futharkAFind all variable-memory block mappings in a function definition. $ $aNone,>HMV4U )futhark3Find all variable aliases in a function definition. ) )bNone,>HMV5 .futhark-maps memory blocks to its size and space/type . / 0 / 0 .cNone,>HMV6+ 7 7dNone,>HMV6 = =eNone ,=>?@AHMV_8 Dfuthark.Transform a function to use new memory blocks. D DfNone,>HMPVL futharkNmaps a memory block to the memory blocks that have been merged into it so farfuthark@maps a variable name to other semantically equal variable namesfutharkIThe result of the core analysis: maps an array name to its memory block.futharkChanges in variable uses where allocation sizes are maxed from its elements. Keyed by statement memory name (alloc stmt). Maps an alloc stmt to the sizes that need to be taken max for.futhark`Maps an alloc stmt to (size0, ((array0, size_var0, ixfun0), (array1, size_var1, ixfun1))).Needed for array creations in kernel bodies that can only reuse memory if index functions are changed, and the allocation size is maxed.size_var0 is *not* the size of the entire allocation of the key memory, but *part of* the allocation size. This part will be replaced by the maximum of the two sizes.futhark"From the module Liveness.FirstUsesfuthark&From the module Liveness.Interferencesfuthark)maps a memory block to its size and spacefutharkFrom the module VariableMemoryfutharkFrom the module ActualVariablesfutharkFrom the module ExistentialsfutharkFrom the module PrimExpsfutharkYmaps a memory name to the size variables available at that memory block allocation point L LgNone,>HMV_M Wfuthark1Find all memory aliases in a function definition. W WhNone,>HMVO ]futhark?Find all last uses of *memory blocks* in a function definition. ] ]iNone,>HMV_P ffuthark=Find all memory block interferences in a function definition. f fjNone,>HMVRfuthark!First uses found in outer bodies. sfuthark@Find all first uses of *memory blocks* in a function definition. s t s tkNone,>HMVSy ~ ~lNoneU\ futharkCall  findHoisteesM for every body, and then hoist every one of the found hoistees (variables).  mNoneU  nNone,>HMVV  oNone,>HMVV  pNone,>HMVV  qNone ,>EHMVXX futhark7Describes the nth pattern and the statement expression.  rNone,>HMVa futhark?Keep the entire function definition around for lookup purposes.futharkFrom the module VariableMemory.futharkFrom the module MemoryAliases.futhark From the module VariableAliases.futharkFrom the module FirstUses.futharkFrom the module LastUses.futhark From the module ActualVariables.futharkFrom the module Existentials.futharkFrom the module PrimExps.futhark=Statement-name-to-expression mappins for the entire function.futharkSafety condition 2.futharkSafety condition 5.futharkKeep a snapshot (used in  for Concat).  sNonea  tNone,>HMV_bu  uNone,>HMVb  vNone>HVcQ wNonec  xNoned-  yNonef futharkCApply the coalescing part of the memory block merging optimisation. futhark>Apply the reuse part of the memory block merging optimisation.  zNone ,=>?@AHMVXkfutharkQThe booleans indicate whether we should also play with the initial merge values.futharkQFirst name is the memory block to copy to, second is the name of the array copy.futhark-Bunch up all the constraints for less typing.  {None=>?@Am futharkThe operations that permit CSE.futhark*Perform CSE within any nested expressions. futhark,Perform CSE on every functioon in a program.  |None,>v futharkSimplify the given program. Even if the output differs from the output, meaningful simplification may not have taken place - the order of bindings may simply have been rearranged. futhark.Run a simplification operation to convergence. futharkSimplify the given function. Even if the output differs from the output, meaningful simplification may not have taken place - the order of bindings may simply have been rearranged. Runs in a loop until convergence. futharkSimplify just a single X. futharkSimplify a list of s.           $ &          & $   }None,>w futharkRun copy propagation.  ~None =>?@AHV]futhark]Getting the roots of what to hoist, for now only variable names that represent shapes/sizes.futharkmRemove all arguments to the map that are simply replicates. These can be turned into free variables instead.futharkLike  , but for .futhark0Remove inputs that are not used inside the SOAC.futharkSome 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.futhark@If we are writing to an array that is never used, get rid of it.  None =>?@AHMVX_ futharkqTransform a program using SOACs to a program using explicit kernels, using the kernel extraction transformation.futhark(Returns the sizes of nested parallelism.futhark\A lambda is worth sequentialising if it contains nested parallelism of an interesting kind.futharkIntra-group parallelism is worthwhile if the lambda contains non-map nested parallelism, or any nested parallelism inside a loop.  None ,=>?@AHV!        None ,=>?@AHV_'futharkmGetting the roots of what to hoist, for now only variable names that represent array and memory-block sizes.futharkIf a branch is returning some existential memory, but the size of the array is existential, then we can create a block of the proper size and always return there.futharkWIf we are copying something that is itself a copy, just copy the original one instead.futharkHIf the destination of a copy is the same as the source, just remove it.    None>u        None>HVfuthark:A map from memory block names to new index function bases.futharkExtract allocations from Thread statements with .  None futharkThe assertion-resolver pass.  None=?HV- 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. futhark&One 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 viewF and viewL, and grow it by using  2 and  3. 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. 'futharkVA 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? /futhark>A transformation list containing just a single transformation. 0futhark7Decompose the input-end of the transformation sequence. 1futhark8Decompose the output-end of the transformation sequence. 2futhark6Add a transform to the end of the transformation list. 3futhark<Add a transform at the beginning of the transformation list. 4futharkGiven an expression, determine whether the expression represents an input transformation of an array variable. If so, return the variable and the transformation. Only  ( and  )# are possible to express this way. 5futhark<Create a plain array variable input with no transformations. 6futharkECreate a plain array variable input with no transformations, from an [. 7futharkWIf the given input is a plain variable input, with no transforms, return the variable. 8futharkcIf the given input is a plain variable input, with no non-vacuous transforms, return the variable. 9futhark;Add a transformation to the end of the transformation list. :futharkCAdd several transformations to the end of the transformation list. ;futharkEAdd several transformations to the start of the transformation list.futhark5Convert SOAC inputs to the corresponding expressions. <futhark#Return the array name of the input. =futharkReturn the type of an input. >futhark:Return the row type of an input. Just a convenient alias. ?futharkNReturn the array rank (dimensionality) of an input. Just a convenient alias. @futhark4Apply the transformations to every row of the input. AfutharkAdd to the input a  ( transform that performs an (k,n)[ transposition. The new transform will be at the end of the current transformation list. Bfuthark"Returns the inputs used in a SOAC. CfutharkSet the inputs to a SOAC. Dfuthark The lambda used in a given SOAC. Efuthark Set the lambda used in the SOAC. FfutharkThe return type of a SOAC. GfutharkuThe "width" of a SOAC is the expected outer size of its array inputs _after_ input-transforms have been carried out. Hfuthark/Convert a SOAC to the corresponding expression. Ifuthark'Convert a SOAC to a Futhark-level SOAC. JfutharkEither convert an expression to the normalised SOAC representation, or a reason why the expression does not have the valid form. KfutharkqTo-Stream translation of SOACs. Returns the Stream SOAC and the extra-accumulator body-result ident if any.7           " ! # % $ & ' ( ) , * + - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K7       B C D E F G   J H I   5 6 7 8 9 : ; < ? = > @ A & - / . 2 3 0 # % $ 1 " ! ' ( ) , * + 4 KNone _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. out1A are the identifiers to which the output of the SOAC containing lam1P 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.uThe 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. _ ` a _ ` aNone>HPVS b c d e f g h i j k l m n o d e f g h i b c j k l m n oNone>HV~ vfuthark/the SOAC expression, e.g., mapT( f(a,b), x, y ) wfutharkVariables used in in-place updates in the kernel itself, as well as on the path to the kernel from the current position. This is used to avoid fusion that would violate in-place restrictions. xfuthark-whether at least a fusion has been performed. yfutharkThe set of variables that were consumed by the SOACs contributing to this kernel. Note that, by the type rules, the final SOAC may actually consume _more_ than its original contributors, which implies the need for } expressions. zfuthark!The names in scope at the kernel.futharkMCheck that the consumer uses at least one output of the producer unmodified.futharkHCheck that the consumer uses all the outputs of the producer unmodified.futhark6The brain of this module: Fusing a SOAC with a Kernel.futharkdIf a Stream is passed as argument then it converts it to a Sequential Stream; Otherwise it FAILS!futhark!Actually also rearranges indices. t u w z v x y { | } ~   t u w z v x y { | }  ~None %>@AHMV'futhark)Whether we have fused something anywhere.futharkIAssociates an array to the name of the SOAC kernel that has produced it.futharkAssociates an array to the names of the SOAC kernels that uses it. These sets include only the SOAC input arrays used as full variables, i.e., no `a[i]'.futhark1the (names of) arrays that are not fusible, i.e., 9they are either used other than input to SOAC kernels, ortare used as input to at least two different kernels that are not located on disjoint control-flow branches, or*are used in the lambda expression of SOACsfutharkThe map recording the usesfutharkA type used for (hopefully) uniquely referring a producer SOAC. The uniquely identifying value is the name of the first array returned from the SOAC.futhark0Mapping from variable name to its entire family.futhark1Binds an array name to the set of used-array varsfuthark4Binds an array name to the set of soac-produced varsfuthark!Updates the environment: (i) the soacs (map) by binding each pattern element identifier to all pattern elements (identifiers) and (ii) the variables in scope (map) by inserting each (pattern-array) name. Finally, if the binding is an in-place update, then the inplaceK field of each (result) kernel is updated with the new in-place updates.futhark+Binds the fusion result to the environment.futharkThe fusion transformation runs in this monad. The mutable state refers to the fresh-names engine. The reader hides the vtable that associates ... to ... (fill in, please). The x" monad is used for error handling.futharkhextend the set of names to include all the names produced via SOACs (by querring the vtable's soac)futhark*Attempts to fuse between SOACs. Input: rem_bnds6 are the bindings remaining in the current body after  orig_soac.  lam_used_nms the infusible names res; the fusion result (before processing the current soac)  orig_soac and out_idds- the current SOAC and its binding pattern consumedu is the set of names consumed by the SOAC. Output: a new Fusion Result (after processing the current SOAC binding)futharkAPerform simplification and fusion inside the lambda(s) of a SOAC.futharkbGet a new fusion result, i.e., for when entering a new scope, e.g., a new lambda or a new loop.futharkThe expression arguments are supposed to be array-type exps. Returns a tuple, in which the arrays that are vars are in the first element of the tuple, and the one which are indexed or transposes (or otherwise transformed) should be in the second.LE.g., for expression `mapT(f, a, b[i])', the result should be `([a],[b])'  None>'h  None=?MPIG futhark"Phantom type for a count of bytes. futhark%Phantom type for a count of elements. futharkA wrapper around * that maintains a unit as a phantom type. futharkA function call argument. futhark"The volatility of a memory access. futhark5Create a read-only array containing the given values. futhark+Memory space must match the corresponding  . futharkfIndicate that some memory block will never again be referenced via the indicated variable. However, it may still be accessed through aliases. It is only safe to actually deallocate the memory block if this is the last reference. There is no guarantee that all memory blocks will be freed with this statement. Backends are free to ignore it entirely. futharkqDestination, offset in destination, destination space, source, offset in source, offset space, number of bytes. futharkMust be in same space. futharkxHas the same semantics as the contained code, but the comment should show up in generated code for ease of inspection. futharkPrint the given value (of the given type) to the screen, somehow annotated with the given string as a description. This has no semantic meaning, but is used entirely for debugging. Code generators are free to ignore this statement. futhark!Type alias for namespace control. futharkA imperative function, containing the body as well as its low-level inputs and outputs, as well as its high-level arguments and results. The latter are only used if the function is an entry point. futhark^ An externally visible value. This can be an opaque value (covering several physical internal values), or a single value that can be used externally. futharkDThe string is a human-readable description with no other semantics. futhark0A description of an externally meaningful value. futharkAn array with memory block, memory block size, memory space, element type, signedness of element type (if applicable), and shape. futhark-A scalar value with signedness if applicable. futhark%A collection of imperative functions. futharkOConvert a count of elements into a count of bytes, given the per-element size. OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFlmon Z monl  EFBCD NoneP@ futharkSet all uses of n0 in the given functions to another memory space.  None ,=>?@AHMV_m !futharkThe  5 is # if a copy if required. If it is 8P, then a copy/assignment of a memory block somewhere takes care of this array. "futharkEWhen compiling an expression, this is a description of where the result should end up. The integer is a reference to the construct that gave rise to this destination (for patterns, this will be the tag of the first name in the pattern). This can be used to make the generated code easier to relate to the original code. &futhark;Every non-scalar variable must be associated with an entry. 5futhark6When an array is declared, this is where it is stored. AfutharkHow to compile an ]. BfutharkHow to compile a . CfutharkHow to compile an k. DfutharkDAn operations set for which the expression compiler always returns  CompileExp.futhark$If the given value destination if a  ), return the variable name. Otherwise, 8. GfutharkGExecute a code generation action, returning the code that was emitted. HfutharkHExecute a code generation action, wrapping the generated code within a   with the given description. Ifuthark$Emit some generated imperative code.futharkLike  Q', but does not create new declarations. ZfutharkRemove the array targets.futharkUse an   if possible, otherwise  n.futharkGCopy from here to there; both destination and source may be indexeded. ofutharkLike  p, but the target is a   instead of a variable name. pfutharkCopy 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. qfutharkcompileAlloc dest size space allocates n bytes of memory in space, writing the result to dest, which must be a single  , @futhark%Number of row elements of the source.[        ! " # $ % & ( ' ) * + , - . / 0 1 2 3 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 [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r[ J C A @ B : ; < = > ? D " # $ %    ! 5 6 7 8 9 - . / 0 * + ,     F E I G H & ( ' ) 1 2 3 4 a b c d ] ^ \ _ q [ R Q S V W T U X Y K M L N O P j k l h i ` r e f g Z m p o nNonesT futhark8Phantom type for identifying sequential imperative code. futharkA piece of imperative code. futharkAn imperative function. futharkAn imperative program. OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFlmon  OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFlmon NoneHV|  None^ futharkHost-level OpenCL operation. 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. futhark"A function calling OpenCL 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 The block size when transposing.$OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFlmon"#$%&'  OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFlmon None>v futhark/In-kernel name and per-workgroup size in bytes. futhark%The local memory used by this kernel. futhark,The host variables referenced by the kernel. futharkUnique name for the kernel. futharkFA short descriptive name - should be alphanumeric and without spaces. futhark2A generic kernel containing arbitrary kernel code. futhark<Stm position - also serves as a unique name for the kernel. futhark(Used to name the kernel for readability. futhark*Do not actually execute threads past this. 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.KOXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFlmon"#$%&' F OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~! "#$%&'()*BCDEFlmon None ,>HVX_futhark9Chunk sizez and their maximum size. Hint for unrolling.futhark4Recognise kernels (maps), give everything else back.futhark\We have no bulk copy operation (e.g. memmove) inside kernels, so turn any copy into a loop.futharkOnly some constant expressions quality as *static* expressions, which we can use for static memory allocation. This is a bit of a hack, as it is primarly motivated by what you can put as the size when declaring an array in C.futhark Change 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).  None>0  None futhark2The C type corresponding to a signed integer type.futhark5The C type corresponding to an unsigned integer type. futhark)The C type corresponding to a float type. futharkTThe C type corresponding to a primitive type. Integers are assumed to be unsigned. futhark`The C type corresponding to a primitive type. Integers are assumed to have the specified sign.futharkvTrue if both types map to the same runtime representation. This is the case if they are identical modulo uniqueness.futhark tupleField i is the name of field number i in a tuple.futharktupleFieldExp e i& is the expression for accesing field i of tuple e. If e4 is an lvalue, so will the resulting expression be.futhark funName fF is the name of the C function corresponding to the Futhark function f.futhark6The type of memory blocks in the default memory space.      None=?MP futharkThe result of compilation to C is four 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.futharkHUtility definitions that must be visible to both CLI and library parts.futhark<If true, use reference counting. Otherwise, bare pointers.futhark&Copy from one memory block to another.futhark;Create a static array of values - initialised at load time.futhark[De-allocate the given memory block with the given tag, which is in the given memory space. futharkAllocate a memory block of the given size and with the given tag in the given memory space, saving a reference in the given variable name.!futhark^Read a scalar from the given memory block with the given index and in the given memory space."futhark]Write a scalar to the given memory block with the given index and in the given memory space.#futhark5The type of a memory block in the given memory space.$futharkXThe address space qualifiers for a pointer of the given type with the given annotation.%futharkNA substitute expression compiler, tried before the main compilation function.&futharkIn which part of the header file we put the declaration. This is to ensure that the header file remains structured and readable..futharkqA set of operations that fail for every operation involving non-default memory spaces. Uses plain pointers and malloc for memory management.7futharkConstruct a publicly visible definition using the specified name as the template. The first returned definition is put in the header file, and the second is the implementation. Returns the public name.8futharkAs 7, but ignores the public name.Afuthark*Public names must have a consitent prefix.Bfuthark7The generated code must define a struct with this name.futhark5Return a statement printing the given external value.Efuthark(Produce header and implementation files.Ffuthark*As executable with command-line interface.Gfuthark~Compile imperative program to a C program. Always uses the function named "main" as entry point, so make sure it is defined.OfutharkTell me how to compile a v, and I'll Compile any  PrimExp v for you.futharklReturn an expression multiplying together the given expressions. If an empty list is given, the expression 1 is returned.H     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQHG   EF.%$#"K!L ,-234/01QHPNOIMJC6>?@5978=&'()*+:;AB< DNonePHbfuthark1Translate a kernels-program to an OpenCL-program.bbNoneggNone    EFh h   EFNonebijkijkNone>    EFl l   EFNone futharkBoolean negation. futharkBitwise complement. futharkNumerical negation. futharkAbsolute/numerical value.PO! "#$%&'()*mnopqrstuv}|{xy~wz2uv}|{xy~wzmnstqropNoneZfutharkrtspython opencl.py embedded as a string.futhark*Python code (as a string) that calls the initiatialize_opencl_object5 procedure. Should be put in the class constructor.Nonefuthark&Whether an option accepts an argument.futharkrSpecification 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.futharkZGenerate 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.  NoneMP_ ?futhark_The 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.futharktAllocate a memory block of the given size in the given memory space, saving a reference in the given variable name.futhark^Read a scalar from the given memory block with the given index and in the given memory space.futhark]Write a scalar to the given memory block with the given index and in the given memory space.futharkNA substitute expression compiler, tried before the main compilation function.futharkqA 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 B 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.33None  None> SNoneO q futharkBoolean negation.futharkBitwise complement.futharkNumerical negation.futharkAbsolute/numerical value.O! "#$%&'()*     )% &!"#$'(*,+-./0A64231JO@7NHLI:;?K9B58<=>CDEFGMPQRSTUVWXZY[\_]^`abcdefghijklmnopqp0A64231JO@7NHLI:;?K9B58<=>CDEFGM\_]^`abcdXZY[PQRSTUVWmnopqhijklefg-./*,+)% &!"#$'(     None futhark&Whether an option accepts an argument.futharkrSpecification 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.futharkZGenerate 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.  NoneMP_ 7-futhark_The 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 C# 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.futharktAllocate a memory block of the given size in the given memory space, saving a reference in the given variable name.futhark^Read a scalar from the given memory block with the given index and in the given memory space.futhark]Write a scalar to the given memory block with the given index and in the given memory space.futharkNA substitute expression compiler, tried before the main compilation function.futharkqA 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 BB where the function is a variable and every argument is a simple ,.futharkA BB where the function is a variable and every argument is a simple ,.futhark A CallMethodfuthark#The ctypes type corresponding to a .futhark#The ctypes type corresponding to a , taking sign into account.futharknSelect function to retrieve bytes from byte array as specific data type | The ctypes type corresponding to a .futhark#The ctypes type corresponding to a .futhark#The ctypes type corresponding to a .futhark+Public names must have a consistent prefix.OONone 9None :      None> :o  None ; futharkFutlib embedded as C values, one for every file.  None1=>?@A UfutharkA set of names.futharkLThe program described by a single Futhark file. May depend on other files.futharkA top-level binding.,futhark)The contents of another file as a module..futharkFunctor application.7futharkA type refinement.BfutharkAbstract type.Kfuthark%A type parameter that must be a size.Lfuthark%A type parameter that must be a type.Mfuthark,The liftedness of a type parameter. By the Ord instance, Unlifted is less than Lifted.Nfuthark0May only be instantiated with a zero-order type.Ofuthark)May be instantiated to a functional type.PfutharkType DeclarationsWfutharkFunction DeclarationsYfuthark(True if this function is an entry point.bfuthark1Documentation strings, including source location.dfutharkOA pattern as used most places where variables are bound (function parameters, let expressions, etc).kfutharkWhether the loop is a for -loop or a while-loop.ofutharkAn entry in a record literal.ufuthark The Futhark expression language.In a value of type Exp f vn*, annotations are wrapped in the functor f, and all names are of type vn.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   H, in which type information is always present and all names are unique.wfutharkA polymorphic integral literal.xfutharkA polymorphic decimal literal.yfutharkA 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.futharkType ascription: e : t.futhark;Numeric negation (ugly special case; Haskell did it first).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]).futhark*map (+1) [1, 2, ..., n] = [2, 3, ..., n+1].futhark*reduce (+) 0 ([1,2,...,n]) = (0+1+2+...+n).futhark  gen_reduce  +1,1,1 0 [1,1,1] [1,1,1] = [4,1,1]futhark&scan (+) 0 ([ 1, 2, 3 ]) = [ 1, 3, 6 ].futhark?Return those elements of the array that satisfy the predicate.futharkpartition k f a, where f& returns an integer, returns a tuple (a', is)# that describes a partitioning of a into n equivalence classes. Here, a' is a re-ordering of a, and is is an array of k offsets into a'.futharkStreaming: intuitively, this gives a size-parameterized composition for SOACs that cannot be fused, e.g., due to scan. For example, assuming 'A : [int], f : int->int, g : real->real , the code: 5let x = map(f,A) in let y = scan(op+,0,x) in map(g,y)C can be re-written (streamed) in the source-Futhark language as: let (acc, z) = < stream (fn (int,[real]) (real chunk, real acc, [int] a) => ' let x = map (f, A ) ' let y0= scan(op +, 0, x ) ' let y = map (op +(acc), y0) * ( acc+y0[chunk-1], map(g, y) )  ) 0 A where (i) chunk2 is a symbolic int denoting the chunk size, (ii) 0I is the initial value of the accumulator, which allows the streaming of scan". Finally, the unnamed function (fn...;) implements the a fold that: computes the accumulator of scanS, as defined inside its body, AND implicitly concatenates each of the result arrays across the iteration space. In essence, sequential codegen can choose chunk = 1 and thus eliminate the SOACs on the outermost level, while parallel codegen may choose the maximal chunk size that still satisfies the memory requirements of the device.futharkaConventional zip taking nonzero arrays as arguments. All arrays must have the exact same length.futhark[Unzip that can unzip to tuples of arbitrary size. The types are the elements of the tuple.futharkExplore the Danger Zone and elide safety checks on array operations and other assertions during execution of this expression. Make really sure the code is correct.futharknFail if the first expression does not return true, and return the value of the second expression if it does.futhark6A name qualified with a breadcrumb of module accesses.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 Numbersfuthark |>futhark<| MiscfutharkVAn identifier consists of its name and the type of the value bound to the identifier.futharkYSimple Futhark values. Values are fully evaluated and their type is always unambiguous.futharkGIt is assumed that the array is 0-indexed. The type is the full type.futhark;Information about which parts of a value/type are consumed.futhark$Consumes these fields in the record.futhark?A function that consumes its argument(s) like this. The final  should always be A, 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.futhark'A declaration of the type of something.futharkThe type declared by the user.futhark%The type deduced by the type checker.futhark_A "structural" type with shape annotations and no aliasing information, used for declarations.futhark~An unstructured type with type variables and possibly shape declarations - this is what the user types in the source program.futharkcA type with aliasing information and shape annotations, used for describing the type of a pattern.futharkjA type with aliasing information and no shape annotations, used for describing the type of a computation.futharkAn expanded Futhark type is either an array, a prim type, a tuple, or a type variable. When comparing types for equality with cY, aliases are ignored, but dimensions much match. Function parameter names are ignored.futharkAThe aliasing corresponds to the lexical closure of the function.futhark+Types that can be elements of tuple-arrays.futhark?A type name consists of qualifiers (for error messages) and a  (for equality checking).futharkAThe size of an array type is a list of its dimension sizes. If 83, that dimension is of a (statically) unknown size.futhark Declaration of a dimension size.futharkyThe 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 dimension declaration.futhark unifyDims x y combines x and yJ to contain their maximum common information, and fails if they conflict.futharkNon-array values.futharkLow-level primitive types. futharkSome information. The dual to   futharkUNo information functor. Usually used for placeholder type- or aliasing information.futharkConvenience class for deriving  instances for the AST.futhark.The number of dimensions contained in a shape.futharkstripDims n shape strips the outer n dimensions from shape , returning 83 if this would result in zero or fewer dimensions.futharkunifyShapes x y combines x and yJ to contain their maximum common information, and fails if they conflict.4O! "#$%&'()* !"#$%&'()*+,-./0123456789:;<=>?B@ACDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdhefgijknlmopqrstuv~}wxyz{|     !  uv~}wxyz{|opqknlmdhefgijrst?B@ACDEFGHI9:;<=>78123456)*+,-./0!"#$%&'( bcWXYZ[\]^_`aMNOPQRSTUVJKL    None=>? 6Cfuthark+A Futhark program 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"An index with no type annotations.futhark'An identifier with no type annotations.futhark)A type declaration with no expanded type.futhark3An array element type with no aliasing information.futhark:A type with no aliasing information but shape annotations.futharkThe nature of something predefined. 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 8, representing the overloaded parameter 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.futhark5Return the shape of a type - for non-arrays, this is d.futharkDReturn any shape declarations in the type, with duplicates removed.futhark_Set the dimensions of an array. If the given type is not an array, return the type unchanged.futhark*Change the shape of a type to be just the Rank.futhark"Change all size annotations to be .futhark&Change the size annotations of a type.futhark Return the uniqueness of a type.futharkunique t is e' if the type of the argument is unique.futharkEReturn 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.futharkt  d removes aliases (sets them to d) from the parts of t that are denoted as Consumed by the  d.futhark`Convert 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.futharkmRemove names from a type - this involves removing all size annotations from arrays, as well as all aliasing.futhark arrayOf t s uC 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. The function returns 8= in case an attempt is made to create an array of functions.futharkstripArray n t removes the nZ outermost layers of the array. Essentially, it is the type of indexing an array of type t with n indexes.futharkLCreate a record type corresponding to a tuple with the given element types.futhark1Increasing field names for a tuple (starts at 1).futharkSort fields by their name; taking care to sort numeric fields by their numeric value. This ensures that tuples and tuple-like records match.futharktSet the uniqueness attribute of a type. If the type is a tuple, 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.futhark Construct a 7 with the given number of zero-information dimensions.futharklThe type of an Futhark term. The aliasing will refer to itself, if the term is a non-tuple-typed variable.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.futhark#The type names mentioned in a type.futharkThe result of applying the arguments of the given types to a function with the given return type, consuming its parameters with the given diets.futharkIIs the type concrete, i.e, without any type variables or function arrows?futhark orderZero t is e 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.futhark:Extract all the shape names that occur in a given pattern.futhark7Extract all the shape names that occur in a given type.futharkpatternOrderZero pat is e8 if all of the types in the given pattern have order 0.futhark*The set of identifiers bound in a pattern.futhark(The type of values bound by the pattern.futharkIThe type matched by the pattern, including shape declarations if present.futharkeWhen viewed as a function parameter, does this pattern correspond to a named parameter of some type?futharkKRemove all shape annotations from a pattern, leaving them unnamed instead.futharkjNames 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.futharkPThe 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.futhark2Create a type name name with no qualifiers from a .futhark*The modules imported by a Futhark program.futhark-The modules imported by a single declaration.futharkFThe 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.futhark/Find all the identifier references in a string.futharkXGiven an operator name, return the operator that determines its syntactical properties.R R None=>? *futharkClass for type constructors that represent annotations. Used in the prettyprinter to either print the original AST, or the computed attribute.futharkkA class for types that are variable names in the Futhark source language. This is used instead of a mere F 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 Fs 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.OSOSNoneF /HfutharkA lexical token. It does not itself contain position information, so in practice the parser will consume tokens tagged with a source position.hfuthark&A value tagged with a source location.futhark+Suffix a zero if the last character is dot.Mag [\PQRSTUcVWXed^_`b]YZLMNO&!"#$%'()*+,-./0123456789:;<=>?@ABCDEFGHIJKfhijNone=?FPh 5kfutharkA parse error. Use % to get a human-readable description.futharkKParse an Futhark expression incrementally from monadic actions, using the ' as the source name for error messages.mfutharkhParse either an expression or a declaration incrementally; favouring declarations in case of ambiguity. kl !"#m$9 %9 None ?nfuthark/Parse an entire Futhark program from the given C , using the ' as the source name for error messages.ofuthark+Parse an Futhark expression from the given a , using the ' as the source name for error messages.pfuthark%Parse an Futhark type from the given a , using the ' as the source name for error messages.qfuthark'Parse any Futhark value from the given a , using the ( as the source name for error messages.rfutharkEParse several Futhark values (separated by anything) from the given a , using the ( as the source name for error messages.Tag [\PQRSTUcVWXed^_`b]YZLMNO&!"#$%'()*+,-./0123456789:;<=>?@ABCDEFGHIJKfhijklmnopqrTnopqrmkljhiag [\PQRSTUcVWXed^_`b]YZLMNO&!"#$%'()*+,-./0123456789:;<=>?@ABCDEFGHIJKfNone OsfutharkPA known array element type with no shape annotations, but aliasing information.tfutharkA type-checked type parameter.ufutharkDA known type arg with shape annotations but no aliasing information.vfuthark)An Futhark program with type information.wfutharkA type-checked specification.xfutharkA type-checked declaration.yfuthark&A type-checked module type expression.zfuthark 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(A type declaration with type informationfuthark.An constant declaration with type information.futhark A pattern with type information.futhark$An expression with type information.futharkAn index with type information.futhark2An identifier with type- and aliasing information.OS! "#$%&'()* !"#$%&'()*+,-./0123456789:;<=>?B@ACDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdhefgijknlmopqrstuv~}wxyz{|     stuvwxyz{|}~{zy}|xwv~ustNone nfuthark6Modules produces environment with this representation.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.futhark2A binding from a name to its definition as a type.futhark Representation of a module type.futhark"Abstract types in the module type.futhark{A parametric functor consists of a set of abstract types, the environment of its parameter, and the resulting module type.futharklRepresentation 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.futharkEA mapping from import names to imports. The ordering is significant.futharkbThe result of type checking some file. Can be passed to further invocations of the type checker.futharkAbstract types.futharkCCanonical reference to a Futhark code file. Does not include the .futb extension. This is most often a path relative to the current working directory of the compiler.futharkJCreate an import name immediately from a file path specified by the user.futhark We resolve '..'u 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 .((NoneMP ~Q &futharkA TermValue with a 8! type annotation is an intrinsic.'futhark4A shape is a tree to accomodate the case of records.futhark A fully evaluated Futhark value.(futhark*The monad in which evaluation takes place.futharkKCreate an array value; failing if that would result in an irregular array.)futhark>This is where we enforce the regularity constraint for arrays.*futharkFor matching size annotations (the actual type will have been verified by the type checker). It is assumed that previously unbound names are in binding position here.+futhark,, but with 0 as 1.-futharkqExpand type based on information that was not available at type-checking time (the structure of abstract types).futharkPThe initial environment contains definitions of the various intrinsic functions.futhark^Execute the named function on the given arguments; will fail horribly if these are ill-typed.None>M futharkJThe names that are bound for some types, either implicitly or explicitly.futhark)Determine the names bound for some types.futharkAs >, but returns components of a top-level tuple type piecemeal.futharkcHow many core language values are needed to represent one source language value of the given type?futhark7Convert an external primitive to an internal primitive.futharkCConvert an external primitive value to an internal primitive value.  None> futhark%A function for internalising lambdas.NoneM .futharkDefunctionalization monad. The Reader environment tracks both the current Env as well as the set of globally defined dynamic functions. This is used to avoid unnecessarily large closure environments./futharkDEnvironment mapping variable names to their associated static value.0futharkA static value stores additional information about the result of defunctionalization of an expression, aside from the residual expression.1futharkThe .s are shape parameters that are bound by the .2futharkeReturns the defunctionalization environment restricted to the given set of variable names and types.3futharkRun a computation in the defunctionalization monad. Returns the result of the computation, a new name source, and a list of lifted function declations.4futharkILooks up the associated static value for a given name in the environment.5futharkDefunctionalization of an expression. Returns the residual expression and the associated static value in the defunctionalization monad.6futharkSame as 5%, 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.8futhark8Defunctionalize an indexing of a single array dimension.9futharkrDefunctionalize a let-bound function, while preserving parameters that have order 0 types (i.e., non-functional).:futharkDefunctionalize 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.;futhark Check if a 0P and a given application depth corresponds to a fully applied dynamic function.<futharkConverts a dynamic function 0 into a list of dimensions, a list of parameters, a function body, and the appropriate static value for applying the function at the given depth of partial application.=futharkConverts a pattern to an environment that binds the individual names of the pattern to their corresponding types wrapped in a > static value.?futhark6Create an environment that binds the shape parameters.@futhark}Create a new top-level value declaration with the given function name, return type, list of parameters, and body expression.Afuthark^Given a closure environment, construct a record pattern that binds the closed over variables.BfutharkzGiven 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.Cfuthark8Compute the corresponding type for a given static value.DfutharkwConstruct the type for a fully-applied dynamic function from its static value and the original types of its arguments.EfutharkMatch 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.FfutharkGiven a pattern and the static value for the defunctionalized argument, update the pattern to reflect the changes in the types.GfutharkConvert a record (or tuple) type to a record static value. This is used for "unwrapping" tuples and records that are nested in > static values.Hfuthark3Compute the set of free variables of an expression.Ifuthark2Extract all the variable names bound in a pattern.Jfuthark'Combine 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.KfutharkDefunctionalize 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 L.Mfuthark1Defunctionalize 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.None> ANfutharksFlatten a pattern. Returns a list of identifiers. The structural type of each identifier is returned separately.None ϗ            None futharkTwo values differ in some way.Ofuthark?The position the value number and a flat index into the array.futhark/An efficiently represented Futhark value. Use O? to get a human-readable representation, and the instances of P and Q" to obtain binary representationsfutharkA textual description of the type of a value. Follows Futhark type notation, and contains the exact dimension sizes if an array.Rfuthark_A character that can be part of a value. This doesn't work for string and character literals.futhark/Parse Futhark values from the given bytestring.futhark@A human-readable description of how two values are not the same.futharkTCompare two sets of Futhark values for equality. Shapes and types must also match.None vfuthark)How a test case is expected to terminate.futhark;Execution suceeds, with or without expected result values.futhark Execution fails with this error.futhark=Several Values - either literally, or by reference to a file. 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.)futharkpA 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.0futhark'The error expected for a negative test.3futhark/Input and output pairs for some entry point(s).7futharkHow to test a program.:futharkhDescription of a test to be carried out on a Futhark program. The Futhark program is stored separately.SfutharkLike T+, but does not consume trailing linebreaks.?futharkMRead the test specification from the given Futhark program. Note: will call h on parse errors.Ufuthark[Read test specifications from the given path, which can be a file or directory containing .fut' files and further directories. Calls hN on parse errors, or if the given path name does not name a file that exists.@futhark_Read test specifications from the given paths, which can be a files or directories containing .fut( files and further directories. Calls ha on parse errors, or if any of the immediately passed path names do not name a file that exists.Afuthark7Try to parse a several values from a byte string. The a' parameter is used for error messages.Bfuthark6Get the actual core Futhark values corresponding to a  specification. The 9 is the directory which file paths are read relative to.Cfuthark(Extract a pretty 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.- !"#$%&'()*+,-./0123456789:;<=>?@ABC-?@ABC:;<=>)*+,-./'(7890123456 !"#$%&None=? YOfutharkTMap a monadic action across the immediate children of an object. Importantly, the O action is not invoked for the object itself, and the mapping does not descend recursively into subexpressions. The mapping is done left-to-right.PfutharkExpress a monad mapping operation on a syntax node. Each element of this structure expresses the operation to be performed on a given child. NOPQURSTVWX PQURSTVWXNONoneM Vfuthark5A pairing of a lexical closure and a module function.WfutharkA non-parametric module.Xfuthark^A substitution from names in the original program to names in the generated/residual program.Yfuthark(A general-purpose substitution of names.mmNone xfuthark,The warnings produced by the compiler. The 1 instance produces a human-readable description.xyxyNone>MP Afuthark?Tracking breadcrumbs to give a kind of "stack trace" in errors.futharkA piece of information that describes what process the type checker currently performing. This is used to give better error messages.futhark$The type checker runs in this monad.futhark6Information about an error during type checking. The ? instance for this type produces a human-readable description.futharkzExtract from a type either a function type comprising a list of parameter types and a return type, or a first-order type.Oxy~M~None=>? $futharkbClass of types which allow for substitution of types with no annotations for type variable names.futharkunifyTypes uf t2 t2 attempts to unify t1 and t2". If unification cannot happen, 8> is returned, otherwise a type that combines the aliasing of t1 and t2* is returned. Uniqueness is unified with uf.futharkx `subtypeOf` y is true if x is a subtype of y (or equal to y ), meaning x is valid whenever y is.futharkx  y is true if x is not less unique than y.futharkwCheck for duplication of names inside a pattern group. Produces a description of all names used in the pattern group.Zfuthark$Check 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).futharkPerform substitutions, from type names to types, on a type. Works regardless of what shape and uniqueness information is attached to the type.None>M .futharkMapping from fresh type variables, instantiated from the type schemes of polymorphic functions, to (possibly) specific types as determined on application and the location of that application, or a partial constraint on their type.[futharkpIs the given type variable actually the name of an abstract type or type parameter, which we cannot substitute?futharkUnifies two types.futharkPerform a unification of two types outside a monadic context. The type parameters are allowed to be instantiated (with 'TypeParamDim ignored); all other types are considered rigid.None>M \\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.]futharkType checking happens with access to this environment. The tables will be extended during type-checking as bindings come into scope.^futharkMost recent first._futhark4Aliases in parameters indicate the lexical closure.`futharkThe 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.afutharkGA null occurence is one that we can remove without affecting anything.bfutharkA 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.cfutharkQGet the type of an expression, with all type variables substituted. Never call ; directly (except in a few carefully inspected locations)!dfutharkWrap d; to also perform an observation of every size in the type.efutharkInstantiate 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.ffutharkNCreate a new type name and insert it (unconstrained) in the substitution map.gfutharkEDetermine if two types are identical, ignoring uniqueness. Causes a ; if they fail to match, and otherwise returns one of them.hfuthark5Assumes that the two types have already been unified.ifutharkuEnsure that every shape parameter is used in positive position at least once before being used in negative position.jfutharkZReturn the shapes used in a given pattern in postive and negative position, respectively.kfuthark require ts e causes a  if  expType e is not one of the types in ts. Otherwise, simply returns e.futhark=Type-check a top-level (or module-level) function definition.lfutharkfThis is "fixing" as in "setting them", not "correcting them". We only make very conservative fixing.mfutharkFind at all type variables in the given type that are covered by the constraints, and produce type parameters that close over them. Produce an error if the given list of type parameters is non-empty, yet does not cover all type variables in the type.nfuthark?Proclaim that we have made read-only use of the given variable.ofuthark4Proclaim that we have written to the given variable.pfutharkProclaim that we have written to the given variable, and mark accesses to it and all of its aliases as invalid inside the given computation.qfutharkMake all bindings nonunique.rfutharkPerform substitutions of instantiated variables on the type annotations (including the instance lists) of an expression, or something else.None>P ifutharkType 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 checker results. The  is used to resolve relative imports.futharkType check a single expression containing no type information, yielding either a type error or the same expression annotated with type information. See also .futharkType check a single declaration 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 .futharkMAn initial environment for the type checker, containing intrinsics and such.sfuthark,Refine the given type name in the given env.xxNone>P uYfutharkHPre-typechecked imports, including a starting point for the name source. futhark'Files that should be implicitly opened.tfuthark?A little monad for reading and type-checking a Futhark program. futharkNA basis that contains no imports, and has a properly initialised name source.futhark^Read Futhark files from some basis, and printing log messages if the first parameter is True.ufutharkqRead and type-check a Futhark library (multiple files, relative to the same search path), including all imports.futhark(Read and type-check Futhark imports (no .fut extension; may refer to baked-in futlib). This is an exotic operation that probably only makes sense in an interactive environment.x     x     NoneM vfutharkMapping from function name and instance list to a new function name in case the function has already been instantiated with those concrete types.wfutharkThe monomorphization monad.xfutharkMonomorphization environment mapping names of polymorphic functions to a representation of their corresponding function bindings.yfutharkMapping from record names to the variable names that contain the fields. This is used because the monomorphiser also expands all record patterns.zfuthark!The monomorphization monad reads z s and writes  ValBindings. The ts in a  ValBinding can only be shape parameters.{futhark Monomorphization of expressions.|futhark,Transform an operator section into a lambda.}futharkConvert a collection of ds to a nested sequence of let-bound, monomorphic functions with the given expression at the bottom.~futharkMonomorphize a polymorphic function at the types given in the instance list. Monomorphizes the body of the function as well. Returns the fresh name of the generated monomorphic function and its  representation.futhark7Perform a given substitution on the types in a pattern.futharkFRemove all type variables and type abbreviations from a value binding.futharkMonomorphize a list of top-level declarations. A module-free input program is expected, so only value declarations and type declaration are accepted.None>HPV futharkOConvert a program in source Futhark to a program in the Futhark core language.futhark[Promote to dimension type as appropriate for the original type. Also return original type.futharkbSome operators and functions are overloaded or otherwise special - we detect and treat them here.futharkvIs the name a value constant? If so, create the necessary function call and return the corresponding subexpressions.None> 4futhark Warn if True. futharkIf true, error on any warnings.!futharkIf True, ignore unsafe.$futharkCatch all IO exceptions and print a better error message if they happen. Use this at the top-level of all Futhark compiler frontends.'futhark=Read and type-check a Futhark program, including all imports.(futharkJRead and type-check a collection of Futhark files, including all imports.x      !"#$%&'( &% !"#$'(Safe None /)futharkiThe version of Futhark that we are using. This is equivalent to the version defined in the .cabal file.*futhark/The version of Futhark that we are using, as a a)*)*None +futharkhA command line option that either purely updates a configuration, or performs an IO action (and stops).,futharkXGenerate a main action that parses the given command line options (while always adding -).futhark*Short-hand for 'liftIO . hPutStrLn stderr'-futharkCommon definitions for -v and -h', given the list of all other options.+,-+,-None .futhark,Are we compiling a library or an executable?1futhark2An option that modifies the configuration of type cfg.2futhark,Run a parameterised Futhark compiler, where cfg6 is a user-given configuration type. Call this from main.futhark"The configuration of the compiler.2futharkInitial 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../01221./0None ZfutharkYWe keep a mapping of the names we have actually documented, so we can generate an index.futharkjLocal module types that show up in the interface. These should be documented, but clearly marked local.futhark}A set of names that we should not generate links to, because they are uninteresting. These are for example type parameters.futharkcThe header documentation (which need not be present) can contain an abstract and further sections.66      !"#$%&'()*+,-./0123456789:;<=>?@ABCDBCEBCFBCGBCHBCIBCJBCJBCKBCLBCMNOPQRRSTUVWXYZ[\]^_`abcdefghiijklmnopqrstuvwxyz{|} ~   ~                                                                                   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`^ab]cdefghijkilmhnopqrstuvwxyz{|}~      !"#$%&'(()*+*,-./0012334565789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"# $%U7-#&'()*+,-./01234567898:;<=>?@ABCDDEFGHGIJ KLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY Z [ \ ] ^ _ ` 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!{!|!}!~!!!!!!!!!!!!!!!!!"""""""""""########################$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&&&&&&&&&&&&&&''''''' ' ' ' ' '''''''''''''''''(( (!("(#($)%)%)&)')()))*)+),)-).)/)0)1)2)3)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,Z,T,U,V,W,?,B,C,D,X,Y,Z,[,\,],^,_,`,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-{-|-}.~.......................................///////////////////0000000111111111111111112222222222222222222222223333333333333333333333333333334444444 4 4 4 4 4444444444444444444 4!4"4#4$4%4&4'44(4)4*5+5,55-556.6/60616262636465666768696:6;6<6=6>6?6@6A6B6C66(66D6E6F6G6H6I6J66K6L6M6N6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6\6]7^7_7`7a7b7c7d7e7f7g7h7i7j7k7l7m7n7o7p7q7r7s7t7u7v7w7x7y7z7{7|7}7~77777777777777777888888888888888888q88888888888888888888888888888888888888888888888888888888888888888888999999999999999999999999999999999::::::: : : ; ; ;;;;;<<<<<<<<<<<<<<<< <!<"<#<$<%<&<'<(<)<*<+<,<-<.</<0<1<2<3<4<5<6<7<8<9<:<;===="=#========= =$=%=&===<===>=?=@=3=/=0=1=2=4=5=;=:>A>B>>C>D>E>F>>G>H>I>J>K>L>M>N>O>P>Q>R>S>>T>U>V>>W>X>Y>>>>Z>[>\>>]>^>_>`>a>b>c>d>e>f>g>h?i?i?j?k?l?m?n?o?o?p?q?r?s?s?t?u?v?w?x?y?z?{?|?}?~????????????????????????????????????????????????@@@@@@@@AAAB BB B BBBGB?B8BB BBBBBBBBCCCCCCCCDDDEEEEEEEEEEE F F G G H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H !H "H #H $H %H &H 'H (H )H *H +H ,H -H .H /H 0H 1H 2H 3H 4H 5H 6H 7H 8H 9H :H ;H <H =H >H ?I @I @I AI BI CI DI EI FI GI GI HI II JI KI LI MI NI OI PI QI RI SI TI UI VI WI XI XI YI ZI [I \I ]I ^I _I _I `I aI bI cI dI eI fI gI hI iI jI gI kI kI lI mI nI oI pI qI rI sI tI uI vI wI xI yI zI {I |I }I ~I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I J J J J J J J J J J J J J J K K L M M MMM M N N N N N N N N N N N N N N N N N N N N N N N N O O O O O P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P Q Q Q Q Q Q R S T T T T T T T T T T T T T T U U U U U U U U U U U !V "W #W $W %W &W 'W (W )W *W +W ,W -W .W /W 0W 1W 2W 3W 4W 5W 6W 7W 6W 5W 4W 3W 8W 9WW :W ;W <W =W >W ?W @W AW BW CW DW EW FW GW HW IX JX KY LY MZ NZtZ OZ PZ QZ RZ SZ TZ TZ UZ VZ WZ XZ YZ ZZ [Z \Z \Z ]Z ^Z _Z `Z aZ bZ cZ dZ eZ fZ gZ hZ iZ jZ kZ lZ mZ nZ oZ pZ qZ rZ Z sZ tZ uZ vZ wZ xZ yZ zZ {Z |Z }Z ~Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z [ [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \\\ \ \\\\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ !^ "^^^ #^ $^ %^ &^ '^ (^ )^ *^ +^ ,_ -_ ._ /_ 0_ 1_ 2_ 3_ 4_ 5_ 6_ 7_ 8_ 9_ :_ ;_ <_ =_ >_ ?_ @_ A_ B_ C_ D_ E_ F_ G_ H_ I_ J_ K_ L_ M_ N` O` P` Q` R` Sa Ta Pa Qa Ra Sb Ub Vb Wb Xb Yb Pb Qb Rb Sc Zc Pc Qc Rc Sc [d \d Pd Qd Rd ]d Sd [e ^e _e `e Pe Qe Re ]e [f af bf `f cf Pf Qf Rf ]f [f df eg fg Pg Qg Rg ]g Sh gh `h ch Ph Qh Rh ]h Sh [i hi ii ji ki li `i ci Pi Qi Ri ]i Si [j mj nj oj pj `j Pj Qj Rj ]j Sj [k qk Pk Qk Rk Sl rl sl tl ul vm wn xn yn zn Pn Qn Rn ]n Sn [o {o `o co Po Qo Ro ]o [p |p }p ~p Pp Qp Rp Sp [q qq q q Pq Qq Rq Sr r cr `r Pr Qr Rr ]r [s t t Pt Qt Rt Su u u u `u Pu Qu Ru ]u [v v v v v v v v v v v v v v w x y y z z z z z z z z z { { { { { { { | | | ~| {| y} ~ ~ ~ {~ y~                      { yt   xyz|{          10  - _                               x   u  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 7 8 9 : ; < = >' ? @ A B C D E F G H I J4* K L M N"& O P Q P R S T U V W X Y Z [ \ ] ^ _ _ ` 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 { | } ~    Y           =                r B P      h j i      B P                     ! " # $ % &  ' ( ) * + , g g - . / 0 1 l 2 3 3 4 5 6 7 8 9 : ; < = > ? ; h j i @ A B C B P D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n n o p q r s  t u v w x y z { |* } ~ J            k           "  F E   &        9     j   7U ' N       NOPQRRSTUVW   s s      t u v x y { }* J              "  F E  &  !"# $% &  9'  ( j   )*+,7-./ '0 N12345  & 6789:;<=>?@ABCDEFGHIJKLM<NO;PQRS:TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~NOPQRRSTUVW   s s        t u v x y { }* J             P E Fp    % "!#7'( <m{n3y& !"#7$%&Q'()*+,-.P/ST0123456789:\ \;<=>?@ABCDEFGHIJKLMNOPQ$%&RSTUVWXYZ[\\]^__7`abcdefg\hi^_gjkijllmnn-.opqrstuvwxyz{|}~qpgi      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~>G Y Y )## Y Y:D      !"#$%&'A()*+,-.:!/01D2345677899:;<=>?@AABCDEFGHIJJKLMNOPPQRSTUVWXYZ[\]^_`abcdeefghijklmnopqrstuvwxyz{|}~o      !"#$%&'()*+,-./0123456789:;<=>?@ABACADAEAFGH IJIKLMNOPQRSTUVWXYZ[\]^_/ /`abc/daefabghijklmn/o p q rst$u$v'w'x,y-z-{-|.}1~16h8 Y8888888 9<<<<<<<>>>>>FGKNNNNNOPPPPSWWWWtXXYYYYYYZZZZ+\]]]]]fffffffffffffjrrrrrrrrrrrrrrzzz{~~~~~~VWXVWX   v  5s ! Y"#$%&'()*+,-./0123456789:;<=>?@ABCADEFGHIJrKLMNOPQRSTUVWXYZ[\]^_` sabc Ydefghijklmnopqrstuvwxyz{|$futhark-0.7.4-DdMeIl6TiKI6Tcc13qBV2mLanguage.Futhark.CoreFuthark.Util.PrettyFuthark.Pkg.TypesFuthark.Internalise.Monad)Futhark.CodeGen.Backends.GenericC.Options2Futhark.CodeGen.Backends.GenericCSharp.Definitions2Futhark.CodeGen.Backends.GenericPython.DefinitionsFuthark.CodeGen.OpenCL.Kernels Futhark.Error Futhark.Util/Futhark.Representation.AST.Attributes.RearrangeFuthark.Util.IntegralExpFuthark.Util.LogFuthark.Pkg.InfoFuthark.Pkg.Solve Futhark.Representation.PrimitiveFuthark.Util.Table&Futhark.Representation.AST.Syntax.Core/Futhark.Representation.AST.Attributes.Constants+Futhark.Representation.AST.Attributes.Types"Futhark.Representation.AST.RetType&Futhark.Representation.AST.Annotations!Futhark.Representation.AST.Syntax-Futhark.Representation.AST.Attributes.Reshape.Futhark.Representation.AST.Attributes.Patterns!Futhark.Representation.AST.Pretty$Futhark.Representation.Kernels.Sizes+Futhark.Representation.AST.Attributes.Scope%Futhark.Representation.AST.Traversals+Futhark.Representation.AST.Attributes.Names,Futhark.Representation.AST.Attributes.TypeOfFuthark.Analysis.PrimExpFuthark.Transform.SubstituteFuthark.FreshNamesFuthark.MonadFreshNamesFuthark.Transform.Rename%Futhark.Representation.AST.Attributes-Futhark.Representation.AST.Attributes.AliasesFuthark.Analysis.UsageTableFuthark.Analysis.UsageFuthark.Analysis.RephraseFuthark.Analysis.Metrics!Futhark.Analysis.DataDependenciesFuthark.Analysis.ScalExpFuthark.Analysis.AlgSimplify,Futhark.Representation.AST.Attributes.RangesFuthark.Representation.RangesFuthark.Analysis.Range Futhark.PassFuthark.Binder.ClassFuthark.BinderFuthark.Representation.AliasesFuthark.Analysis.AliasFuthark.Optimise.Simplify.LoreFuthark.ConstructFuthark.TypeCheckFuthark.Pipeline!Futhark.Internalise.AccurateSizes Futhark.Analysis.PrimExp.Convert*Futhark.Representation.ExplicitMemory.Lmad3Futhark.Representation.ExplicitMemory.IndexFunctionFuthark.Analysis.SymbolTable!Futhark.Representation.SOACS.SOAC Futhark.Tools2Futhark.Optimise.InPlaceLowering.SubstituteIndicesFuthark.Representation.SOACS%Futhark.Transform.FirstOrderTransform"Futhark.Pass.ExtractKernels.ISRWIM!Futhark.Optimise.Fusion.TryFusionFuthark.Analysis.CallGraph Futhark.Optimise.InliningDeadFun(Futhark.Representation.Kernels.KernelExp%Futhark.Representation.Kernels.KernelFuthark.Representation.KernelsFuthark.Pass.KernelBabysitting Futhark.Pass.FirstOrderTransform%Futhark.Pass.ExtractKernels.Kernelise)Futhark.Pass.ExtractKernels.BlockedKernel%Futhark.Pass.ExtractKernels.Segmented(Futhark.Pass.ExtractKernels.Distribution'Futhark.Pass.ExtractKernels.InterchangeFuthark.Optimise.UnstreamFuthark.Optimise.TileLoops-Futhark.Optimise.InPlaceLowering.LowerIntoStm Futhark.Optimise.InPlaceLowering&Futhark.Pass.ExtractKernels.IntragroupFuthark.Optimise.Simplify.Rule$Futhark.Optimise.Simplify.ClosedFormFuthark.Optimise.Simplify.Rules Futhark.Optimise.Simplify.Engine!Futhark.Analysis.PrimExp.Simplify%Futhark.Representation.ExplicitMemory Futhark.Pass.ExplicitAllocations)Futhark.Optimise.MemoryBlockMerging.Types1Futhark.Optimise.MemoryBlockMerging.Miscellaneous2Futhark.Optimise.MemoryBlockMerging.VariableMemory3Futhark.Optimise.MemoryBlockMerging.VariableAliases9Futhark.Optimise.MemoryBlockMerging.Reuse.AllocationSizes,Futhark.Optimise.MemoryBlockMerging.PrimExps<+/><+> softbreaksoftlinelinesrclocemptyrparenlparenrbracketlbracketrbracelbraceranglelangledquotesquote backquotespacesspacesemiequalsdotcommacolonstarlazyText strictTextrationaldoublefloatintegerintstringcharbooltextDocRLineRPos RLazyTextRTextRStringRCharREmptyRDoc'megaparsec-7.0.3-33us1Wj7Xo51sKKEffQvN7Text.Megaparsec.ErrorerrorBundlePretty mtl-2.2.2Control.Monad.Error.Class throwError%versions-3.5.0-A2Z8hbyQR7YBGI22ic2ym7 Data.Versions prettySemVer_svMeta _svPreRel_svPatch_svMinor_svMajorSemVerStrDigitsVUnitOptionArgument NoArgumentRequiredArgumentOptionalArgumentOptionoptionLongNameoptionShortNameoptionArgument optionActiongenerateOptionParser csFunctionscsMemorycsScalarcsReadercsPanic csExceptionscsOpenCLcsMemoryOpenCL pyFunctions pyUtilitypyValuespyPanic TransposeTypeTransposeNormalTransposeLowWidthTransposeLowHeightTransposeSmall SizeHeuristic platformName deviceType heuristicSizeheuristicValue WhichSize LockstepWidth NumGroups GroupSizeTileSizeHeuristicValueHeuristicConstHeuristicDeviceInfo DeviceType DeviceCPU DeviceGPUsizeHeuristicsTable mapTranspose$fEqTransposeType$fOrdTransposeType$fShowTransposeType InternalError CompilerError ExternalError ErrorClass CompilerBugCompilerLimitation externalErrorexternalErrorS compilerBugcompilerLimitation internalError compilerBugScompilerLimitationS$fShowCompilerError$fEqErrorClass$fOrdErrorClass$fShowErrorClass BuildList unBuildList PkgManifestmanifestPkgPathmanifestRequiremanifestEndCommentsRequired requiredPkgrequiredPkgRev requiredHash Commentedcomments commentedComment PkgRevDepsPkgPathpkgPathFilePathisCommitVersion commitVersion parseVersion futharkPkgnewPkgManifestprettyPkgManifest pkgRevDepspkgDiraddRequiredToManifestremoveRequiredFromManifestparsePkgManifestparsePkgManifestFromFileprettyBuildList$fMonoidPkgRevDeps$fSemigroupPkgRevDeps$fTraversableCommented$fFoldableCommented$fFunctorCommented$fShowPkgRevDeps$fShowCommented $fEqCommented$fShowRequired $fEqRequired$fShowPkgManifest$fEqPkgManifest $fEqBuildList$fShowBuildList mapAccumLMchunkchunksdropAttakeLastdropLast mapEithermaybeNth maybeHead splitFromEndsplitAt3splitAt4focusNthunixEnvironment isEnvVarSetrunProgramWithExitCodedirectoryContents roundFloat roundDoubletoPOSIX fromPOSIXtrim zEncodeStringrearrangeShaperearrangeInverserearrangeReachrearrangeComposeisPermutationOftransposeIndexisMapTransposeWrapped wrappedValue IntegralExpquotremdivmodsgnfromInt8 fromInt16 fromInt32 fromInt64quotRoundingUp$fIntegralExpWrapped $fNumWrapped $fEqWrapped $fOrdWrapped $fShowWrapped 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$fShowRoughBuildListpretty prettyText prettyOneLine prettyDoc prettyTupleapplyoneLineannot nestedBlockConvOpZExtSExtFPConvFPToUIFPToSIUIToFPSIToFPIToBBToICmpOpCmpEqCmpUltCmpUleCmpSltCmpSleFCmpLtFCmpLeCmpLltCmpLleBinOpAddFAddSubFSubMulFMulUDivSDivFDivUModSModSQuotSRemSMinUMinFMinSMaxUMaxFMaxShlLShrAShrAndOrXorPowFPowLogAndLogOrUnOpNot ComplementAbsFAbsSSignumUSignum PrimValueIntValue FloatValue BoolValueChecked Float32Value Float64Value Int8Value Int16Value Int32Value Int64ValuePrimTypeIntType FloatTypeBoolCertFloat32Float64 allIntTypes allFloatTypes allPrimTypesintValue intValueType valueIntegral floatValuefloatValueType primValueTypeblankPrimValueallUnOps allBinOps allCmpOps allConvOpsdoUnOp doComplementdoAbsdoFAbs doSSignum doUSignumdoBinOpdoAdddoMuldoSDivdoSModdoPowdoConvOpdoZExtdoSExtdoFPConvdoFPToUIdoFPToSIdoUIToFPdoSIToFPdoCmpOpdoCmpEqdoCmpUltdoCmpUledoCmpSltdoCmpSledoFCmpLtdoFCmpLe intToWord64 intToInt64 binOpType cmpOpTypeunOpType convOpTypeprimFunszeroIshoneIsh negativeIsh primBitSize primByteSizecommutativeBinOp convOpFun prettySigned$fPrettyIntType$fPrettyFloatType$fPrettyPrimType$fBoundedPrimType$fEnumPrimType$fPrettyIntValue$fPrettyFloatValue$fPrettyPrimValue $fPrettyUnOp $fPrettyBinOp $fPrettyCmpOp$fPrettyConvOp $fEqIntType $fOrdIntType $fShowIntType $fEnumIntType$fBoundedIntType $fEqFloatType$fOrdFloatType$fShowFloatType$fEnumFloatType$fBoundedFloatType $fEqPrimType $fOrdPrimType$fShowPrimType $fEqIntValue $fOrdIntValue$fShowIntValue$fEqFloatValue$fOrdFloatValue$fShowFloatValue $fEqPrimValue$fOrdPrimValue$fShowPrimValue$fEqUnOp $fOrdUnOp $fShowUnOp $fEqBinOp $fOrdBinOp $fShowBinOp $fEqCmpOp $fOrdCmpOp $fShowCmpOp $fEqConvOp $fOrdConvOp $fShowConvOpEntrymkEntry buildTable$fShowRowTemplateVNameName CommutativityNoncommutative Commutative StreamOrdInOrderDisorder Uniqueness NonuniqueUniquedefaultEntryPoint nameToStringnameFromString nameToText nameFromTextlocStrbaseTagbaseName baseString$fPrettyUniqueness$fMonoidUniqueness$fSemigroupUniqueness$fMonoidCommutativity$fSemigroupCommutativity $fPrettyName $fOrdVName $fEqVName$fEqUniqueness$fOrdUniqueness$fShowUniqueness $fEqStreamOrd$fOrdStreamOrd$fShowStreamOrd$fEqCommutativity$fOrdCommutativity$fShowCommutativity $fShowName$fEqName $fOrdName$fIsStringName$fSemigroupName $fShowVName ErrorMsgPart ErrorString ErrorInt32ErrorMsgNamesPatElemTPatElem patElemName patElemAttrSliceDimIndexDimFixDimSliceParamParamT paramName paramAttrSubExpConstantVar CertificatesunCertificatesIdent identName identTypeDietConsumeObserve DeclExtTypeDeclTypeExtTypeTypeTypeBasePrimArrayMem NoUniquenessSpaceIdSpace DefaultSpace ArrayShape shapeRank stripDims subShapeOfRankExtShapeExtSizeExtFreeShape ShapeBase shapeDimsdimFix sliceIndices sliceDims unitSlicefixSlice$fFunctorShapeBase$fMonoidShapeBase$fSemigroupShapeBase $fMonoidRank$fSemigroupRank$fArrayShapeRank$fMonoidCertificates$fSemigroupCertificates$fArrayShapeShapeBase$fArrayShapeShapeBase0 $fOrdIdent $fEqIdent$fTraversableParamT$fFunctorParamT$fFoldableParamT$fTraversableDimIndex$fFoldableDimIndex$fFunctorDimIndex$fFunctorPatElemT$fTraversableErrorMsgPart$fFoldableErrorMsgPart$fFunctorErrorMsgPart$fIsStringErrorMsgPart$fTraversableErrorMsg$fFoldableErrorMsg$fFunctorErrorMsg$fIsStringErrorMsg $fEqShapeBase$fOrdShapeBase$fShowShapeBase$fEqExt$fOrdExt $fShowExt $fShowRank$fEqRank $fOrdRank $fShowSpace $fEqSpace $fOrdSpace$fEqNoUniqueness$fOrdNoUniqueness$fShowNoUniqueness$fEqDiet $fOrdDiet $fShowDiet$fEqCertificates$fOrdCertificates$fShowCertificates $fShowSubExp $fEqSubExp $fOrdSubExp$fShowTypeBase $fEqTypeBase $fOrdTypeBase $fShowIdent $fOrdParamT $fShowParamT $fEqParamT $fEqDimIndex $fOrdDimIndex$fShowDimIndex $fOrdPatElemT$fShowPatElemT $fEqPatElemT$fEqErrorMsgPart$fOrdErrorMsgPart$fShowErrorMsgPart $fEqErrorMsg $fOrdErrorMsg$fShowErrorMsgIsValuevalueconstantintConst floatConst$fIsValueFloatValue$fIsValueIntValue$fIsValuePrimValue $fIsValueBool$fIsValueFloat$fIsValueDouble$fIsValueWord64$fIsValueWord32$fIsValueWord16$fIsValueWord8$fIsValueInt64$fIsValueInt32$fIsValueInt16 $fIsValueInt8 $fIsValueIntFixExtfixExtSetTypesetType DeclExtTyped declExtTypeOfExtTyped extTypeOf DeclTyped declTypeOfTypedtypeOf rankShaped arrayRank arrayShapemodifyArrayShape setArrayShape existential uniquenessunique setUniqueness staticShapes staticShapes1arrayOf arrayOfRow arrayOfShape setArrayDimssetArrayExtDims setOuterSize setDimSize setOuterDimsetDim peelArray stripArray shapeSize arrayDims arrayExtDims arraySize arraysSizerowTypeprimTypeelemType transposeType rearrangeTypediet subtypeOf subtypesOftoDeclfromDeclextractShapeContext shapeContextshapeContextSizehasStaticShapehasStaticShapesgeneraliseExtTypesexistentialiseExtTypes shapeMapping shapeMapping'shapeExtMappingint8int16int32int64float32float64 $fTyped(,)$fTypedPatElemT $fTypedParamT $fTypedIdent$fTypedTypeBase$fTypedTypeBase0$fDeclTypedParamT$fDeclTypedTypeBase$fSetTypePatElemT $fSetType(,)$fSetTypeTypeBase $fFixExt() $fFixExtExt $fFixExt[]$fFixExtShapeBase$fFixExtTypeBase$fDeclExtTypedTypeBase$fExtTypedTypeBase IsRetType primRetType applyRetType IsBodyType primBodyTypebodyTypeValues retTypeValues expectedTypes$fIsBodyTypeTypeBase$fIsRetTypeTypeBase AnnotationsLetAttrExpAttrBodyAttr FParamAttr LParamAttrRetType BranchTypeOpProgProgT progFunctionsFunDefEntryPointType TypeUnsigned TypeOpaque TypeDirect EntryPointFunDefTfunDefEntryPoint funDefName funDefRetType funDefParams funDefBodyLParamFParamLambdaLambdaT lambdaParams lambdaBodylambdaReturnTypeIfSortIfNormal IfFallbackIfAttr ifReturnsifSortLoopFormForLoop WhileLoopSafetyUnsafeSafeExpTBasicOpApplyIfDoLoopOpaqueArrayLitAssertIndexUpdateConcatCopyManifestIota ReplicateRepeatScratchReshape RearrangeRotate Partition ShapeChange DimChange DimCoercionDimNewBodyBodyTbodyAttrbodyStms bodyResultResultStmsStmLet stmPatternstmAuxstmExpStmAux stmAuxCerts stmAuxAttrPatternPatternTpatternContextElementspatternValueElementsoneStm stmsFromList stmsToListstmsHead$fMonoidPatternT$fSemigroupPatternT$fFunctorPatternT$fTraversableDimChange$fFoldableDimChange$fFunctorDimChange $fOrdPatternT$fShowPatternT $fEqPatternT $fOrdStmAux $fShowStmAux $fEqStmAux $fEqDimChange$fOrdDimChange$fShowDimChange $fEqBasicOp $fOrdBasicOp $fShowBasicOp $fEqSafety $fOrdSafety $fShowSafety $fEqIfSort $fShowIfSort $fOrdIfSort $fEqIfAttr $fShowIfAttr $fOrdIfAttr$fEqEntryPointType$fShowEntryPointType$fOrdEntryPointType $fEqProgT $fOrdProgT $fShowProgT $fOrdFunDefT $fShowFunDefT $fEqFunDefT $fOrdLambdaT $fShowLambdaT $fEqLambdaT $fOrdLoopForm$fShowLoopForm $fEqLoopForm $fOrdExpT $fShowExpT$fEqExpT $fEqBodyT $fShowBodyT $fOrdBodyT$fEqStm $fShowStm$fOrdStmnewDimnewDimsnewShape shapeCoerce repeatShapes repeatDims reshapeOuter reshapeInner shapeCoercion fuseReshape fuseReshapes informReshape reshapeIndexunflattenIndex flattenIndex sliceSizes paramType paramDeclType paramIdent patElemIdent patElemTypesetPatElemLorepatternElements patternIdentspatternContextIdentspatternValueIdents patternNamespatternContextNamespatternValueNames patternTypespatternValueTypespatternExtTypes patternSize basicPattern PrettyLore ppExpLore PrettyAnnotppAnnotbindingAnnotationppTuple'$fPrettyDimIndex$fPrettyDimChange$fPrettyErrorMsg$fPrettyBasicOp$fPrettyParamT$fPrettyParamT0$fPrettyParamT1$fPrettyPatElemT$fPrettyPatElemT0$fPrettyPatternT$fPrettyCertificates$fPrettySubExp $fPrettyIdent$fPrettyTypeBase$fPrettyTypeBase0$fPrettyTypeBase1 $fPrettySpace$fPrettyShapeBase $fPrettyExt$fPrettyShapeBase0$fPrettyCommutativity$fPrettyNoUniqueness $fPrettyVName$fPrettyAnnot()$fPrettyAnnotParamT$fPrettyAnnotPatElemT $fPrettyProgT$fPrettyFunDefT$fPrettyLambdaT $fPrettyExpT $fPrettyStm $fPrettyBodyT $fPrettySeq SizeClass SizeThreshold SizeGroup SizeNumGroupsSizeTile KernelPath$fPrettySizeClass $fEqSizeClass$fOrdSizeClass$fShowSizeClass ExtendedScope SameScopeScopedscopeOf LocalScope localScopeHasScope lookupType lookupInfoaskScope asksScopeScopeNameInfoLetInfo FParamInfo LParamInfo IndexInfo inScopeOfscopeOfPatternscopeOfPatElemscopeOfLParamsscopeOfFParams castScope castNameInfo extendedScope$fTypedNameInfo$fHasScopeloreRWST$fHasScopeloreRWST0$fHasScopeloreExceptT$fHasScopeloreReaderT$fLocalScopeloreRWST$fLocalScopeloreRWST0$fLocalScopeloreReaderT$fLocalScopeloreExceptT$fScopedloreLambdaT$fScopedloreLoopForm$fScopedlore(,)$fScopedloreFunDefT$fScopedloreStm$fScopedloreSeq$fScopedlore[]$fHasScopeloreExtendedScope$fFunctorExtendedScope$fApplicativeExtendedScope$fMonadExtendedScope$fMonadReaderExtendedScope$fShowNameInfoWalker walkOnSubExp walkOnBody walkOnVNamewalkOnCertificates walkOnRetTypewalkOnBranchType walkOnFParam walkOnLParamwalkOnOpMapper mapOnSubExp mapOnBody mapOnVNamemapOnCertificates mapOnRetTypemapOnBranchType mapOnFParam mapOnLParammapOnOpidentityMappermapBodymapExpM mapOnExtType mapOnLoopFormmapExp mapOnTypeidentityWalkerwalkExpMwalkExpFreeAttr precomputedFreeInfreeInfreeInStmsAndRes freeInBody freeInExp freeInStm freeInLambda boundInBody boundByStm boundByStms boundByLambda$fFreeInIfAttr$fFreeInStmAux$fFreeInCertificates$fFreeInPatternT$fFreeInDimIndex$fFreeInDimChange$fFreeInLoopForm$fFreeInPatElemT$fFreeInParamT$fFreeInTypeBase $fFreeInExt$fFreeInShapeBase$fFreeInSubExp $fFreeInIdent $fFreeInVName $fFreeInMaybe $fFreeInBool $fFreeInSet $fFreeInSeq $fFreeIn[] $fFreeIn(,,) $fFreeIn(,) $fFreeInInt $fFreeIn()$fFreeAttrMaybe $fFreeAttr[] $fFreeAttr(,) $fFreeAttr()TypedOpopType subExpTypemapType primOpType expExtTypeexpExtTypeSize bodyExtTypesubExpShapeContextloopResultContext loopExtType$fHasScopeloreFeelBad$fApplicativeFeelBad$fFunctorFeelBad $fTypedOp()PrimExpLeafExpValueExpBinOpExpCmpOpExpUnOpExp ConvOpExpFunExp evalPrimExp primExpTypecoerceIntPrimExp$fPrettyPrimExp$fIntegralExpPrimExp $fNumPrimExp$fFreeInPrimExp$fTraversablePrimExp$fFoldablePrimExp$fFunctorPrimExp $fEqPrimExp $fOrdPrimExp $fShowPrimExp Substitutable SubstitutesubstituteNames Substitutions$fSubstitutePrimExp$fSubstituteDimIndex$fSubstituteDimChange$fSubstituteIdent$fSubstituteTypeBase$fSubstituteSet$fSubstituteExt$fSubstituteShapeBase$fSubstitute()$fSubstituteRank$fSubstituteCertificates$fSubstitutePatternT$fSubstituteParamT$fSubstituteStmAux$fSubstitutePatElemT$fSubstituteSubExp$fSubstituteVName$fSubstituteBool$fSubstituteMaybe$fSubstitute(,,,)$fSubstitute(,,)$fSubstitute(,)$fSubstituteSeq$fSubstitute[]$fSubstituteNameInfo$fSubstituteLambdaT$fSubstituteBodyT$fSubstituteStm$fSubstituteExpT VNameSourcenewNameblankNameSource newNameSourcenewVNamenewVNameFromName$fMonoidVNameSource$fSemigroupVNameSource$fLiftVNameSource$fEqVNameSource$fOrdVNameSourceMonadFreshNames getNameSource putNameSourcemodifyNameSourcenewNameFromStringnewIDnewIDFromString newVName'newIdent newIdent' newIdentsnewParam newParam'$fMonadFreshNamesExceptT$fMonadFreshNamesMaybeT$fMonadFreshNamesWriterT$fMonadFreshNamesWriterT0$fMonadFreshNamesReaderT$fMonadFreshNamesRWST$fMonadFreshNamesRWST0$fMonadFreshNamesStateT$fMonadFreshNamesStateT0 RenameableRenamerenameRenameM renameProg renameExp renameStm renameBody renameLambda renameFun renamePatternsubstituteRenamebindingForRename renamingStms$fRenameDimIndex $fRename() $fRenameExt$fRenameShapeBase $fRenameRank $fRenameSet$fRenameTypeBase$fRenameStmAux$fRenameCertificates$fRenamePatElemT$fRenamePatternT$fRenameParamT$fRenameSubExp $fRenameIdent $fRenameBool $fRenameMaybe $fRename(,,) $fRename(,) $fRename[] $fRenameVName$fRenameLambdaT $fRenameExpT $fRenameStm $fRenameBodyT$fRenameFunDefT AttributesexpTypesFromPatternIsOpsafeOpcheapOpisBuiltInFunctionbuiltInFunctions funDefByName asBasicOpsafeExp subExpVars subExpVar shapeVarscommutativeLambdaentryPointSizedefAuxstmCertscertifyexpExtTypesFromPattern$fIsOp() CanBeAliased OpWithAliasesremoveOpAliases addOpAliases AliasedOp opAliases consumedInOp AliasesOf aliasesOfAliased bodyAliasesconsumedInBody vnameAliases subExpAliases primOpAliases expAliases consumedInStm consumedInExpconsumedByLambdapatternAliases$fAliasesOfPatElemT$fAliasesOfSet $fAliasedOp()$fCanBeAliased()Usages UsageTablecontainswithoutlookupusedexpandkeys isConsumed isInResultisUsedDirectly allConsumedusagesusage consumedUsage inResultUsage leftScope$fMonoidUsages$fSemigroupUsages$fSubstituteUsageTable$fMonoidUsageTable$fSemigroupUsageTable $fEqUsages $fOrdUsages $fShowUsages$fEqUsageTable$fShowUsageTable UsageInOp usageInOp usageInStm usageInExp usageInLambda $fUsageInOp() RephraserrephraseExpLorerephraseLetBoundLorerephraseFParamLorerephraseLParamLorerephraseBodyLorerephraseRetTyperephraseBranchType rephraseOp rephraseProgrephraseFunDef rephraseExp rephraseStmrephrasePatternrephrasePatElem rephraseBodyrephraseLambdacastStmMetricsM OpMetrics opMetrics AstMetricsseeninside progMetrics bodyMetricsbindingMetrics lambdaMetrics$fReadAstMetrics$fShowAstMetrics$fMonoidCountMetrics$fSemigroupCountMetrics $fOpMetrics()$fMonadMetricsM$fApplicativeMetricsM$fFunctorMetricsM$fMonadWriterMetricsM DependenciesdataDependenciesfindNecessaryForReturned LookupVarScalExpValIdSNegSNotSAbsSPlusSMinusSTimesSPowMaxMinRelExpSLogAndSLogOrRelOp0LTH0LEQ0 scalExpType scalExpSizesubExpToScalExp toScalExp expandScalExp$fFreeInScalExp$fRenameScalExp$fSubstituteScalExp$fPrettyScalExp $fNumScalExp $fEqRelOp0 $fOrdRelOp0 $fEnumRelOp0$fBoundedRelOp0 $fShowRelOp0 $fEqScalExp $fOrdScalExp $fShowScalExpError RangesRep ppRangesRepsimplify linFormScalE mkSuffConds pickSymToElim $fEqNNumExp $fOrdNNumExp $fShowNNumExp $fEqBTerm $fOrdBTerm $fShowBTerm CanBeRanged OpWithRangesremoveOpRanges addOpRangesRangedOpopRangesRangesOfrangesOfRangeOfrangeOfRanged ScalExpRangeRangeBound KnownBoundVarBound MinimumBound MaximumBound ScalarBoundboundToScalExp minimumBound maximumBound unknownRange expRanges$fPrettyKnownBound$fFreeAttrKnownBound$fFreeInKnownBound$fRenameKnownBound$fSubstituteKnownBound$fRangeOfSubExp$fRangeOfPatElemT $fRangeOf(,)$fRangesOfPatternT $fRangesOf[] $fRangedOp()$fRangesOfBodyT$fCanBeRanged()$fEqKnownBound$fOrdKnownBound$fShowKnownBoundRangesremoveProgRangesremoveFunDefRangesremoveExpRangesremoveBodyRangesremoveStmRangesremoveLambdaRangesremovePatternRangesaddRangesToPattern mkRangedBodymkPatternRanges mkBodyRangesmkRangedLetStm $fRangesOf(,)$fPrettyLoreRanges$fAttributesRanges$fAnnotationsRangesRangeM rangeAnalysis analyseBody analyseStms analyseExp analyseLambda runRangeMPasspassNamepassDescription passFunctionPassMrunPassM liftEither liftEitherMpassLongOptionintraproceduralTransformation$fMonadFreshNamesPassM$fMonadLoggerPassM$fFunctorPassM$fApplicativePassM $fMonadPassM$fMonadErrorPassM MonadBinderLore mkExpAttrMmkBodyM mkLetNamesMaddStmaddStms collectStms certifyingBindablemkExpPat mkExpAttrmkBody mkLetNamesmkLetMletBindletBind_mkLet letBindNames letBindNames_ collectStms_bodyBind insertStms insertStmBinderBinderT BinderOps mkExpAttrBmkBodyB mkLetNamesBbindableMkExpAttrBbindableMkBodyBbindableMkLetNamesB runBinderT runBinder runBinder_ joinBinder runBodyBinder addBinderStmscollectBinderStmscertifyingBinder$fMonadErroreBinderT$fMonadWriterwBinderT$fMonadStatesBinderT$fMonadReaderrBinderT$fMonadBinderBinderT$fLocalScopeloreBinderT$fHasScopeloreBinderT$fMonadFreshNamesBinderT$fMonadFailBinderT$fMonadTransBinderT$fFunctorBinderT$fMonadBinderT$fApplicativeBinderTAliasesAndConsumed BodyAliasing ConsumedInExp VarAliasesNames'unNamesAliasesremoveScopeAliasesremoveProgAliasesremoveFunDefAliasesremoveExpAliasesremoveBodyAliasesremoveStmAliasesremoveLambdaAliasesremovePatternAliasesaddAliasesToPattern mkAliasedBodymkPatternAliases mkBodyAliasesconsumedInStms trackAliasesmkAliasedLetStm$fBinderOpsAliases$fAttributesAliases$fBindableAliases$fPrettyLoreAliases$fAliasedAliases$fFreeAttrNames'$fPrettyNames'$fFreeInNames'$fSubstituteNames'$fRenameNames' $fOrdNames' $fEqNames'$fMonoidNames'$fSemigroupNames'$fAliasesOf(,)$fAnnotationsAliases $fShowNames' aliasAnalysis analyseFun analyseStm CanBeWise OpWithWisdomremoveOpWisdom ExpWisdom VarWisdomvarWisdomAliasesvarWisdomRangeWiseremoveScopeWisdomaddScopeWisdomremoveProgWisdomremoveFunDefWisdomremoveStmWisdomremoveLambdaWisdomremoveBodyWisdomremoveExpWisdomremovePatternWisdomremovePatElemWisdomaddWisdomToPattern mkWiseBody mkWiseLetStm mkWiseExpAttr$fFreeInVarWisdom$fSubstituteVarWisdom$fRenameVarWisdom$fRenameExpWisdom$fSubstituteExpWisdom$fFreeAttrExpWisdom$fFreeInExpWisdom$fFreeAttrBodyWisdom$fFreeInBodyWisdom$fSubstituteBodyWisdom$fRenameBodyWisdom $fCanBeWise()$fBindableWise $fAliasedWise$fPrettyLoreWise$fAttributesWise$fAnnotationsWise $fEqVarWisdom$fOrdVarWisdom$fShowVarWisdom $fEqExpWisdom$fOrdExpWisdom$fShowExpWisdom$fEqBodyWisdom$fOrdBodyWisdom$fShowBodyWisdomToExptoExp letSubExpletExp letInPlace letSubExpsletExps letTupExp letTupExp'eSubExpeIfeIf'eBinOpeCmpOpeConvOpeNegateeNoteAbseSignumeCopyeAsserteBodyeLambdaeDivRoundingUpeRoundToMultipleOf eSliceArray eSplitArray eWriteArrayasIntSasIntZ foldBinOp binOpLambda cmpOpLambda fullSlice fullSliceNum isFullSliceifCommon resultBody resultBodyM insertStmsM mapResultinstantiateShapesinstantiateShapes'instantiateShapesFromIdentListinstantiateExtTypesinstantiateIdentsremoveExistentialssimpleMkLetNames $fToExpVName $fToExpSubExp Checkable checkExpLore checkBodyLorecheckFParamLorecheckLParamLorecheckLetBoundLore checkRetTypecheckOp matchPattern primFParam primLParammatchReturnTypematchBranchTypeTypeMUsageMap Occurences TypeError ErrorCaseUnexpectedTypeReturnTypeErrorDupDefinitionError DupParamErrorDupPatternErrorInvalidPatternErrorUnknownVariableErrorUnknownFunctionErrorParameterMismatch SlicingError BadAnnotation ReturnAliasedUniqueReturnAliased NotAnArrayPermutationErrorusageMapbadcontextmessageconsumecollectOccurencesconsumeOnlyParamsbinding lookupVar lookupAliasesrequirerequireI checkProgcheckLambdaParams checkFun'subCheck checkSubExp checkStmscheckLambdaBody checkBodycheckExpcheckSOACArrayArgs checkType checkExtTypecheckStmmatchExtPatternmatchExtReturnTypematchExtBranchTypeargType argAliases noArgAliasescheckArg checkLambdarequirePrimExp$fMonoidConsumption$fSemigroupConsumption$fHasScopeAliasesTypeM$fShowTypeError$fShowErrorCase $fEqUsage $fOrdUsage $fShowUsage $fEqOccurence$fShowOccurence$fShowConsumption $fMonadTypeM$fFunctorTypeM$fApplicativeTypeM$fMonadReaderTypeM$fMonadWriterTypeM$fMonadStateTypeMPipelinePipelineConfigpipelineVerbosepipelineValidateAction actionNameactionDescriptionactionProcedureFutharkM Verbosity NotVerboseVerbose VeryVerbose runFutharkMinternalErrorS runPasses runPipelineonePasspasses$fMonadLoggerFutharkM$fMonadFreshNamesFutharkM$fCategoryTYPEPipeline $fEqVerbosity$fOrdVerbosity$fApplicativeFutharkM$fFunctorFutharkM$fMonadFutharkM$fMonadErrorFutharkM$fMonadStateFutharkM$fMonadReaderFutharkM$fMonadIOFutharkM shapeBodyannotateArrayShape argShapesensureResultShapeensureResultExtShapeensureResultExtShapeNoCtxensureExtShape ensureShapeensureArgShapes primExpToExpprimExpFromExpprimExpFromSubExpMprimExpFromSubExpreplaceInPrimExpsubstituteInPrimExp$fToExpPrimExpIxFunsubstituteInIxFunisDirect isContiguousshapeindexiotapermuterepeatrotateslicereshaperankrebasegetMonotonicity offsetIndex strideIndexlinearWithOffsetrearrangeWithOffsetisLinear$fPrettyDimInfo$fTraversableLmad$fFoldableLmad $fFunctorLmad $fFreeInLmad $fRenameLmad$fSubstituteLmad $fPrettyLmad$fTraversableIxFun$fFoldableIxFun$fFunctorIxFun $fFreeInIxFun $fRenameIxFun$fSubstituteIxFun $fPrettyIxFun $fShowDimInfo $fEqDimInfo $fShowLmad$fEqLmad $fShowIxFun $fEqIxFungetInfoMaxUnificationixFunsCompatibleRaw ixFunHasIndexsubsInIndexIxFunoffsetIndexDWIMIndexOpindexOp SymbolTable loopDepthbindingsavailableAtClosestLoop fromScopetoScopecastSymbolTabledeepen entryType asScalExp bindingDepth valueRangeentryStmentryLetBoundAttrentryFParamLore loopVariableelem lookupStm lookupExp lookupBasicOp lookupSubExp lookupScalExp lookupValueindex'enclosingLoopVars rangesRep insertFParams insertLParaminsertArrayLParaminsertChunkLParam insertLoopVar updateBounds setUpperBound setLowerBound isAtLeast$fMonoidSymbolTable$fSemigroupSymbolTable $fIndexOp() SOACMappermapOnSOACSubExpmapOnSOACLambdamapOnSOACVNameReduceScan ScremaForm StreamFormParallel Sequential GenReduceOpgenReduceWidth genReduceDestgenReduceNeutral genReduceOpSOACStreamScatter GenReduceScrema CmpThreshold scremaTypemkIdentityLambdaisIdentityLambda composeLambdanilFn scanomapSOAC redomapSOACscanSOAC reduceSOACmapSOACisScanomapSOAC isScanSOAC isRedomapSOAC isReduceSOAC isMapSOACidentitySOACMappermapSOACMsoacType typeCheckSOACgetStreamAccumsgetStreamOrderppScrema ppGenReduce $fPrettySOAC$fOpMetricsSOAC$fUsageInOpSOAC $fIndexOpSOAC$fRangedOpSOAC $fIsOpSOAC$fAliasedOpSOAC $fTypedOpSOAC$fCanBeWiseSOAC$fCanBeRangedSOAC$fCanBeAliasedSOAC $fRenameSOAC$fSubstituteSOAC $fFreeInSOAC$fEqGenReduceOp$fOrdGenReduceOp$fShowGenReduceOp$fEqStreamForm$fOrdStreamForm$fShowStreamForm$fEqScremaForm$fOrdScremaForm$fShowScremaForm$fEqSOAC $fOrdSOAC $fShowSOACnonuniqueParamsredomapToMapAndReducescanomapToMapAndScan dissectScremasequentialStreamWholeArraypartitionChunkedFoldParameters$partitionChunkedKernelFoldParameters&partitionChunkedKernelLambdaParametersIndexSubstitutionsIndexSubstitutionsubstituteIndicesSOACS$fPrettyLoreSOACS$fBinderOpsSOACS$fBindableSOACS$fCheckableSOACS$fAttributesSOACS$fAnnotationsSOACS TransformertransformFunDef transformBodytransformStmRecursively transformSOACtransformLambdadoLoopMapAccumLdoLoopMapAccumL'iswimirwim rwimPossible TryFusion tryFusion liftMaybe$fFunctorTryFusion$fApplicativeTryFusion$fAlternativeTryFusion$fMonadTryFusion$fMonadFailTryFusion$fMonadFreshNamesTryFusion$fHasScopeTryFusion$fLocalScopeTryFusionInternaliseTypeMDimTable InternaliseMInternaliseEnv envSubstsenvDoBoundsChecksenvSafeVarSubstitutionsFunInfoClosure ConstParamsrunInternaliseMsubstitutingVars addFunctionlookupFunction'lookupFunction bindFunction asserting assertingOneliftInternaliseMrunInternaliseTypeMwithDims lookupDim$fMonadBinderInternaliseM$fMonadFailInternaliseM$fSemigroupInternaliseResult$fMonoidInternaliseResult$fFunctorInternaliseM$fApplicativeInternaliseM$fMonadInternaliseM$fMonadReaderInternaliseM$fMonadStateInternaliseM$fMonadFreshNamesInternaliseM$fMonadErrorInternaliseM$fHasScopeInternaliseM$fLocalScopeInternaliseM$fFunctorInternaliseTypeM$fApplicativeInternaliseTypeM$fMonadInternaliseTypeM$fMonadReaderInternaliseTypeM$fMonadStateInternaliseTypeM$fMonadErrorInternaliseTypeM CallGraphbuildCallGraphinlineAndRemoveDeadFunctionsremoveDeadFunctionsGroupStreamLambdagroupStreamChunkSizegroupStreamChunkOffsetgroupStreamAccParamsgroupStreamArrParamsgroupStreamLambdaBody KernelExp SplitSpaceCombine GroupReduce GroupScan GroupStreamGroupGenReduceBarrier CombineSpace cspaceScatter cspaceDims SplitOrderingSplitContiguous SplitStrided combineSpacescopeOfCombineSpacetypeCheckKernelExp$fRenameSplitOrdering$fSubstituteSplitOrdering$fFreeInSplitOrdering$fRenameCombineSpace$fSubstituteCombineSpace$fPrettyGroupStreamLambda$fScopedloreGroupStreamLambda$fRenameGroupStreamLambda$fSubstituteGroupStreamLambda$fFreeInGroupStreamLambda$fPrettyKernelExp$fOpMetricsKernelExp$fUsageInOpKernelExp$fIndexOpKernelExp$fCanBeWiseKernelExp$fCanBeRangedKernelExp$fCanBeAliasedKernelExp$fRenameKernelExp$fSubstituteKernelExp$fAliasedOpKernelExp$fRangedOpKernelExp$fFreeInKernelExp$fTypedOpKernelExp$fIsOpKernelExp$fEqSplitOrdering$fOrdSplitOrdering$fShowSplitOrdering$fEqCombineSpace$fOrdCombineSpace$fShowCombineSpace $fEqKernelExp$fOrdKernelExp$fShowKernelExp$fOrdGroupStreamLambda$fShowGroupStreamLambda$fEqGroupStreamLambda KernelWalkerwalkOnKernelSubExpwalkOnKernelLambdawalkOnKernelBodywalkOnKernelVNamewalkOnKernelLParamwalkOnKernelKernelBody KernelMappermapOnKernelSubExpmapOnKernelLambdamapOnKernelBodymapOnKernelVNamemapOnKernelLParammapOnKernelKernelBody WhichThreads AllThreadsOneResultPerGroupThreadsPerGroupThreadsInSpace KernelResult ThreadsReturn WriteReturn ConcatReturnsKernelInPlaceReturn KernelBodykernelBodyLorekernelBodyStmskernelBodyResultSpaceStructureFlatThreadSpaceNestedThreadSpace KernelSpace spaceGlobalId spaceLocalId spaceGroupIdspaceNumThreadsspaceNumGroupsspaceGroupSizespaceStructureKernelGetSize GetSizeMax CmpSizeLeKernelDebugHints kernelName kernelHintsspaceDimensionskernelResultSubExpidentityKernelMapper mapKernelMidentityKernelWalker walkKernelMscopeOfKernelSpace kernelTypechunkedKernelNonconcatOutputstypeCheckKernel$fSubstituteSpaceStructure$fPrettyKernelSpace$fSubstituteKernelSpace$fRenameWhichThreads$fSubstituteWhichThreads$fFreeInWhichThreads$fPrettyKernelResult$fRenameKernelResult$fSubstituteKernelResult$fFreeInKernelResult$fPrettyKernelBody$fRenameKernelBody$fSubstituteKernelBody$fFreeInKernelBody$fPrettyKernel$fOpMetricsKernel$fUsageInOpKernel$fIndexOpKernel$fRangedOpKernel $fIsOpKernel$fAliasedOpKernel$fTypedOpKernel$fCanBeWiseKernel$fCanBeRangedKernel$fCanBeAliasedKernel$fRenameKernel$fSubstituteKernel$fFreeInKernel$fEqKernelDebugHints$fShowKernelDebugHints$fOrdKernelDebugHints$fEqSpaceStructure$fShowSpaceStructure$fOrdSpaceStructure$fEqKernelSpace$fShowKernelSpace$fOrdKernelSpace$fEqWhichThreads$fShowWhichThreads$fOrdWhichThreads$fEqKernelResult$fShowKernelResult$fOrdKernelResult $fEqKernel $fShowKernel $fOrdKernel$fEqKernelBody$fShowKernelBody$fOrdKernelBodyInKernelKernels$fPrettyLoreKernels$fBinderOpsKernels$fBindableKernels$fCheckableKernels$fAttributesKernels$fBinderOpsInKernel$fBindableInKernel$fCheckableInKernel$fPrettyLoreInKernel$fAttributesInKernel$fAnnotationsInKernel$fAnnotationsKernelsbabysitKernelsnonlinearInMemoryfirstOrderTransform transformStms transformStmgroupStreamMapAccumLmapIsh KernelInputkernelInputNamekernelInputTypekernelInputArraykernelInputIndicesgetSize cmpSizeLeblockedReductionStream chunkLambdakerneliseLambdablockedReductionblockedGenReduce blockedMap splitArrays blockedScan mapKernelmapKernelFromBodyreadKernelInputnewKernelSpace$fEqKernelSize$fOrdKernelSize$fShowKernelSize$fShowKernelInputregularSegmentedRedomapregularSegmentedScan$fEqSegmentedVersion$fOrdSegmentedVersion$fShowSegmentedVersion KernelNestNestingsNestingnestingLetBound nestingLoop LoopNesting MapNestingloopNestingPatternloopNestingCertificatesloopNestingWidthloopNestingParamsAndArrsTargetsTarget ppTargets singleTarget outerTarget innerTargetpushInnerTargetpopInnerTarget targetsScope ppLoopNesting ppNestings singleNestingpushInnerNestingletBindInInnerNesting ppKernelNestpushKernelNestingpushInnerKernelNestingremoveArraysFromNest newKernelkernelNestLoopsboundInKernelNestboundInKernelNestskernelNestWidthsconstructKernel flatKernel tryDistributetryDistributeStm$fFreeInLoopNesting$fScopedKernelsLoopNesting$fShowLoopNesting $fShowNestingBranchSeqLoopinterchangeLoopsinterchangeBranchunstream tileLoops LowerUpdate DesiredUpdate updateName updateTypeupdateCertificates updateSource updateIndices updateValuelowerUpdateKernelslowerUpdateInKernel$fFunctorDesiredUpdate$fShowDesiredUpdate$fShowLoopResultSummaryinPlaceLowering$fMonoidBottomUp$fSemigroupBottomUp$fHasScopeAliasesForwardingM$fMonadFreshNamesForwardingM$fMonadForwardingM$fApplicativeForwardingM$fFunctorForwardingM$fMonadReaderForwardingM$fMonadWriterForwardingM$fMonadStateForwardingMintraGroupParalleliseRuleBook BottomUpRuleBottomUpRuleOpBottomUpRuleDoLoopBottomUpRuleIfBottomUpRuleBasicOpBottomUpRuleGenericBottomUp TopDownRule TopDownRuleOpTopDownRuleDoLoop TopDownRuleIfTopDownRuleBasicOpTopDownRuleGenericTopDownSimplificationRule RuleGeneric RuleBasicOpRuleIf RuleDoLoopRuleOpRuleMcannotSimplifyruleBooktopDownSimplifyStmbottomUpSimplifyStm$fMonadBinderRuleM$fMonadFailRuleM $fMonoidRules$fSemigroupRules$fMonoidRuleBook$fSemigroupRuleBook$fFunctorRuleM$fApplicativeRuleM $fMonadRuleM$fMonadFreshNamesRuleM$fHasScopeRuleM$fLocalScopeRuleM$fMonadErrorRuleMfoldClosedFormloopClosedForm standardRulesremoveUnnecessaryCopy SimplifiableSimplifiableLoreSimplifiedBody BlockPredSimpleM SimplifyOp SimpleOps mkExpAttrSmkBodyS mkLetNamesS simplifyOpSEnvenvRulesenvHoistBlockers HoistBlockers blockHoistPar blockHoistSeqblockHoistBranch getArraySizes isAllocationnoExtraHoistBlockersemptyEnvbindableSimpleOps runSimpleM subSimpleM asksEngineEnv askVtable localVtablechanged enterLoop bindLParamsbindChunkLParams bindLoopVar protectIf neverBlocksisFalseorIfisOp constructBodyblockIfhasFree isNotSafe simplifyBody simplifyStms simplifyParamsimplifyLambdasimplifyLambdaSeqsimplifyLambdaNoHoisting simplifyFun$fMonadFreshNamesSimpleM$fSimplifiableCertificates$fSimplifiableDimIndex$fSimplifiableTypeBase$fSimplifiableExt$fSimplifiableShapeBase$fSimplifiableVName$fSimplifiableSubExp$fSimplifiable[]$fSimplifiableMaybe$fSimplifiableInt$fSimplifiable(,,)$fSimplifiable(,)$fLocalScopeWiseSimpleM$fHasScopeWiseSimpleM$fApplicativeSimpleM$fFunctorSimpleM$fMonadSimpleM$fMonadReaderSimpleM$fMonadStateSimpleM$fMonadWriterSimpleMsimplifyPrimExpsimplifyExtPrimExp FunReturns BodyReturns ExpReturns MemReturnReturnsInBlockReturnsNewBlockMemBindArrayInMemBoundMemInfoMemPrimMemMemMemArrayExtIxFunMemOpAllocInnerExplicitMemorishExplicitMemory isStaticIxFunexistentialiseIxFunnoUniquenessReturnsbodyReturnsToExpReturns lookupMemInfo subExpMemInfolookupArraySummary lookupMemSize extReturns expReturns sliceInfo fullyLinearixFunMatchesInnerShape$fPrettyLoreExplicitMemory$fAttributesExplicitMemory$fIndexOpMemOp$fCanBeWiseMemOp$fUsageInOpMemOp $fIsOpMemOp$fOpMetricsMemOp $fPrettyMemOp$fSubstituteMemOp $fRenameMemOp$fCanBeRangedMemOp$fRangedOpMemOp$fCanBeAliasedMemOp$fAliasedOpMemOp$fTypedOpMemOp $fFreeInMemOp$fCheckableExplicitMemory$fPrettyMemInfo$fSimplifiableMemInfo$fRenameMemInfo$fSubstituteMemInfo$fFreeInMemInfo$fDeclTypedMemInfo$fTypedMemInfo$fTypedMemInfo0$fFixExtMemInfo$fExtTypedMemInfo$fDeclExtTypedMemInfo$fSimplifiableMemBind$fFreeInMemBind$fPrettyMemBind$fSubstituteMemBind$fRenameMemBind $fOrdMemBind $fEqMemBind$fSimplifiableMemReturn$fFreeInMemReturn$fPrettyMemReturn$fFixExtMemReturn$fSubstituteMemReturn$fRenameMemReturn$fOrdMemReturn $fEqMemReturn$fIsBodyTypeMemInfo$fAnnotationsExplicitMemory$fIsRetTypeMemInfo$fOpReturnsInKernel$fOpReturnsExplicitMemory $fEqMemOp $fOrdMemOp $fShowMemOp $fEqMemInfo $fShowMemInfo $fOrdMemInfo $fShowMemBind$fShowMemReturnarraySizeInBytesExpexplicitAllocationsexplicitAllocationsInStms simplifiable$fBinderOpsWise$fBinderOpsExplicitMemory$fBinderOpsWise0$fMonadFailAllocM$fSizeSubstKernelExp$fSizeSubstMemOp$fSizeSubstKernel$fAllocatorInKernelPatAllocM"$fAllocatorExplicitMemoryPatAllocM$fAllocatorInKernelAllocM$fAllocatorExplicitMemoryAllocM$fMonadBinderAllocM $fEqAllocStm $fOrdAllocStm$fShowAllocStm$fApplicativeAllocM$fFunctorAllocM $fMonadAllocM$fMonadFreshNamesAllocM$fHasScopeAllocM$fLocalScopeAllocM$fMonadReaderAllocM$fApplicativePatAllocM$fFunctorPatAllocM$fMonadPatAllocM$fHasScopePatAllocM$fMonadWriterPatAllocM$fMonadFreshNamesPatAllocMActualVariablesKernelFirstUse(PotentialKernelDataRaceInterferenceGroup$PotentialKernelDataRaceInterferences InterferencesLastUsesStmOrResFromStmFromRes FirstUses MemAliasesVarMemMappings MemoryLoc memLocName memLocIxFun MemorySrc memSrcName memSrcIxFun memSrcShapeMNamesMName$fShowMemorySrc $fEqMemorySrc$fShowMemoryLoc $fEqMemoryLoc$fShowStmOrRes $fEqStmOrRes $fOrdStmOrRes $fShowLog$fEqLog$fOrdLogFullWalkAliasesfullWalkAliasesExpMFullWalk fullWalkExpMFullMap fullMapExpMmakeCommutativeMapinsertOrUpdateinsertOrUpdateMany insertOrNewremoveEmptyMapsremoveKeyFromMapElemsnewDeclarationsStmlookupEmptyablefromJustmaybeFromBoolMexpandWithAliasesfixpointIterateMaymapFromListSetUnion expandPrimExp expandIxFun<&&><||>anyMwhenM mapMaybeM sortByKeyM filterSetM$fFullMapInKernel$fFullMapExplicitMemory$fFullWalkInKernel$fFullWalkExplicitMemory$fFullWalkAliasesInKernel$fFullWalkAliasesExplicitMemoryfindVarMemMappings $fMonadFindM$fFunctorFindM$fApplicativeFindM$fMonadWriterFindMfindVarAliasesSizesmemBlockSizesFunDefmemBlockSizesParamsBodyNonRec$fAllocSizeUtilsInKernel$fAllocSizeUtilsExplicitMemoryfindPrimExpsFunDef$fMonadStateFindMfindSizeUsesFunDef$fMonadReaderFindMtransformFromVarMemMappings$fMonadFreshNamesFindM $fShowContextcoreReuseFunDef$fEqVarWithLooseEquality $fShowCurrent$fShowVarWithLooseEquality$fShowReplacementfindMemAliases findLastUsesfindInterferences$fKernelInterferencesInKernel#$fKernelInterferencesExplicitMemory$fSpecialBodyExceptionsInKernel%$fSpecialBodyExceptionsExplicitMemory findFirstUsescreatesNewArrayBase$fArrayUtilsInKernel$fArrayUtilsExplicitMemoryfindExistentialsmoveUpInFunDef $fEqOrigin $fOrdOrigin $fShowOrigin$fShowPrimBindingmoveUpAllocSizesFunDeffindSafetyCondition5FunDef$fExtractKernelDefVarsInKernel$$fExtractKernelDefVarsExplicitMemorygetVarUsesBetweenfindSafetyCondition2FunDef$fIsAllocInKernel$fIsAllocExplicitMemoryExp'findExpsFunDef $fShowExp'coreCoalesceFunDefmoveUpAllocsFunDeffindAllExpVarsfindActualVariables$fLookInKernelExpInKernel$fLookInKernelExpExplicitMemory AuxiliaryInfoauxNameauxVarMemMappings auxMemAliases auxVarAliases auxFirstUses auxLastUsesauxInterferences'auxPotentialKernelDataRaceInterferencesauxActualVariablesauxExistentialsgetAuxiliaryInfo$fShowAuxiliaryInfo reuseInProgcoalesceInProgmemoryBlockMergingCoalescingmemoryBlockMergingReuse doubleBuffer$fLocalScopeloreDoubleBufferM$fHasScopeloreDoubleBufferM$fFunctorDoubleBufferM$fApplicativeDoubleBufferM$fMonadDoubleBufferM$fMonadReaderDoubleBufferM$fMonadFreshNamesDoubleBufferM$fShowDoubleBufferCSEInOp performCSE $fCSEInOpSOAC$fCSEInOpMemOp$fCSEInOpKernelExp$fCSEInOpKernel $fCSEInOp() simplifyProgsimplifySomethingcopyPropagateInStms simpleSOACS simplifySOACSextractKernels$fMonoidPostKernels$fSemigroupPostKernels$fMonoidKernelRes$fSemigroupKernelRes$fMonadLoggerKernelM$fLocalScopeKernelsKernelM$fHasScopeKernelsKernelM$fFunctorDistribM$fApplicativeDistribM$fMonadDistribM$fHasScopeDistribM$fLocalScopeDistribM$fMonadFreshNamesDistribM$fMonadLoggerDistribM$fFunctorKernelM$fApplicativeKernelM$fMonadKernelM$fMonadReaderKernelM$fMonadWriterKernelM$fMonadFreshNamesKernelMsimplifyKernelssimplifyKernelOpsimplifyKernelExp$fSimplifiableWhichThreads$fSimplifiableKernelResult$fSimplifiableSpaceStructure$fSimplifiableKernelSpace$fSimplifiableCombineSpace$fSimplifiableSplitOrderingsimplifyExplicitMemoryexpandAllocationsresolveAssertionsNotSOACInputViewLEmptyL:>ViewFEmptyF:<ArrayTransformsArrayTransform ReshapeOuter ReshapeInner noTransformsnullTransformssingleTransformviewfviewl|><|transformFromExpvarInput identInput isVarInput isVarishInput addTransform addTransformsaddInitialTransforms inputArray inputType inputRowType inputRank transformRowstransposeInputinputs setInputslambda setLambdatoSOACfromExp soacToStream$fSubstituteArrayTransform$fSubstituteArrayTransforms$fMonoidArrayTransforms$fSemigroupArrayTransforms $fPrettyInput$fSubstituteInput$fShowArrayTransform$fEqArrayTransform$fOrdArrayTransform$fEqArrayTransforms$fOrdArrayTransforms$fShowArrayTransforms $fShowInput $fEqInput $fOrdInput $fShowNotSOACfuseMaps fuseRedomapmergeReduceOpsMapNestnestingParamNames nestingResultnestingReturnType nestingWidthparamsfromSOAC $fEqNesting $fOrdNesting $fShowMapNestFusedKerfsoacinplace fusedVars fusedConsumed kernelScopeoutputTransformoutNames certificatestransformOutput arrInputs attemptFusion$fShowFusedKer fuseSOACs $fShowError$fMonoidFusedRes$fSemigroupFusedRes$fHasScopeSOACSFusionGM$fMonadFreshNamesFusionGM $fEqKernName $fOrdKernName$fShowKernName$fMonadFusionGM$fApplicativeFusionGM$fFunctorFusionGM$fMonadErrorFusionGM$fMonadStateFusionGM$fMonadReaderFusionGMstandardPipelinekernelsPipelinesequentialPipelinesequentialCpuPipeline gpuPipelineBytesElementsCountinnerExpArgExpArgMemArgExpLeaf ScalarVarSizeOf VolatilityVolatile NonvolatileCodeSkip:>>:ForWhile DeclareMem DeclareScalar DeclareArrayAllocateWrite SetScalarSetMemCall DebugPrintFunction FunctionT functionEntryfunctionOutput functionInput functionbBodyfunctionResult functionArgs ExternalValue OpaqueValueTransparentValue ValueDesc ArrayValue ScalarValue Signedness FunctionsMemParam ScalarParamScalarDimSizeMemSizeSize ConstSizeVarSizeelementsbytes withElemType dimSizeToExp memSizeToExp sizeToExpvar $fFreeInSize $fPrettySize $fPrettyParam$fPrettyValueDesc$fPrettyExternalValue$fFreeInExpLeaf$fPrettyExpLeaf $fFreeInArg $fPrettyArg $fFreeInCode$fTraversableCode$fFoldableCode $fFunctorCode $fPrettyCode $fMonoidCode$fSemigroupCode$fTraversableFunctionT$fFoldableFunctionT$fFunctorFunctionT$fPrettyFunctionT$fTraversableFunctions$fFoldableFunctions$fFunctorFunctions$fPrettyFunctions$fMonoidFunctions$fSemigroupFunctions$fEqSize $fShowSize $fShowParam$fEqSignedness$fShowSignedness $fEqValueDesc$fShowValueDesc$fShowExternalValue$fEqVolatility$fOrdVolatility$fShowVolatility $fEqExpLeaf $fShowExpLeaf $fEqCount $fShowCount $fNumCount$fIntegralExpCount $fFreeInCount $fPrettyCount $fShowArg $fShowCode$fShowFunctionTsetDefaultSpaceImpM envVtableenvDefaultSpaceValueDestinationScalarDestinationArrayElemDestinationMemoryDestinationArrayDestination DestinationdestinationTagvalueDestinationsVarEntryArrayVarMemVar ScalarEntryentryScalarTypeMemEntry entryMemSize entryMemSpace ArrayEntryentryArrayLocationentryArrayElemType MemLocationmemLocationNamememLocationShapememLocationIxFun OperationsopsExpCompiler opsOpCompileropsBodyCompileropsCopyCompiler CopyCompiler ExpCompiler BodyCompiler OpCompilerdefaultOperationssubImpM_subImpMcollectcommentemit compileProg compileBodydefCompileBodycompileLoopBody compileStms compileExp defCompileExpdeclaringFParamsdeclaringLParamsdeclaringVarEntrydeclaringPrimVardeclaringPrimVarsdeclaringScopedeclaringScopes withPrimVareverythingVolatilefuncallTargetssubExpToDimSizecompileSubExpTo compileSubExpcompileSubExpOfTypecompilePrimExpvarIndex lookupArray arrayLocation lookupMemorydestinationFromParamdestinationFromParamsdestinationFromPatternfullyIndexArrayfullyIndexArray' sliceArray offsetArray strideArraycopycopyElementWise copyDWIMDestcopyDWIM compileAllocdimSizeToSubExp$fHasScopeSOACSImpM$fMonadFreshNamesImpM$fMonadFailImpM$fEqMemLocation$fShowMemLocation$fShowValueDestination$fShowDestination $fFunctorImpM$fApplicativeImpM $fMonadImpM$fMonadStateImpM$fMonadReaderImpM$fMonadWriterImpM$fMonadErrorImpMProgram$fFreeInSequential$fPrettySequentialOpenCL LaunchKernelHostCode KernelArg ValueKArgMemKArgSharedMemoryKArg KernelName openClProgram openClPreludeopenClKernelNamesopenClUsedTypes openClSizes hostFunctionstransposeBlockDim$fPrettyOpenCL$fShowKernelArg $fShowOpenCLAtomicOp AtomicAdd AtomicSMax AtomicSMin AtomicUMax AtomicUMin AtomicAndAtomicOr AtomicXor AtomicCmpXchg AtomicXchgKernelOp GetGroupId GetLocalId GetLocalSize GetGlobalSize GetGlobalIdGetLockstepWidthAtomicMemFence KernelUse ScalarUse MemoryUseConstUseLocalMemoryUse kernelBodykernelLocalMemory kernelUseskernelNumGroupskernelGroupSize kernelDesc MapKernelmapKernelThreadNum mapKernelDesc mapKernelBody mapKernelUsesmapKernelNumGroupsmapKernelGroupSize mapKernelSize CallKernelMap AnyKernel MapTransposeHostOpKernelConstExp KernelConst SizeConst KernelCode getKernels$fPrettyKernelConst$fPrettyKernelUse$fFreeInAtomicOp$fFreeInKernelOp$fPrettyKernelOp$fFreeInMapKernel$fPrettyMapKernel$fFreeInCallKernel$fPrettyCallKernel$fFreeInHostOp$fPrettyHostOp$fEqKernelConst$fOrdKernelConst$fShowKernelConst $fEqKernelUse$fShowKernelUse$fShowAtomicOp$fShowKernelOp$fShowMapKernel$fShowCallKernel $fShowHostOp printAction rangeAction metricsActionimpCodeGenActionkernelImpCodeGenActionintTypeToCTypefloatTypeToCTypeprimTypeToCTypesignedPrimTypeToCTypesameRepresentation tupleField tupleFieldExpfunNamedefaultMemBlockTypecIntOps cFloat32Ops cFloat64Ops cFloatConvOps cFloat32Funs cFloat64FunsCPartscHeadercUtilscCLIcLib CompilerMopsWriteScalar opsReadScalar opsAllocate opsDeallocateopsCopyopsStaticArray opsMemoryType opsCompiler opsFatMemory StaticArray Deallocate ReadScalar WriteScalar MemoryType PointerQuals HeaderSection ArrayDecl OpaqueDecl EntryDeclMiscDeclInitDecl CompilerState compUserStatecontextContentscontextFinalInits runCompilerM getUserState putUserStatemodifyUserStateatInititem publicDef publicDef_ headerDecllibDecl earlyDecls contextField debugReportstmstmsdecl publicName contextTyperawMemcopyMemoryDefaultSpace asLibrary asExecutable compileFuncompilePrimValuewriteScalarPointerWithQualsreadScalarPointerWithQualscompileExpToName compileCode blockScope$fToExpPrimValue$fToExpFloatValue$fToExpIntValue$fToIdentVName$fMonoidCompilerAcc$fSemigroupCompilerAcc$fMonadFreshNamesCompilerM$fEqHeaderSection$fOrdHeaderSection$fFunctorCompilerM$fApplicativeCompilerM$fMonadCompilerM$fMonadStateCompilerM$fMonadReaderCompilerM$fMonadWriterCompilerMkernelsToOpenCL$fMonoidOpenClRequirements$fSemigroupOpenClRequirements$fMonoidToOpenCL$fSemigroupToOpenCLgenerateBoilerplate kernelRuntime kernelRunsPyProg PyClassDefClassPyFunDefDefPyExceptCatchPyStmtTryWithAssignAssignOpRaiseReturnImportClassDefEscapePyArg ArgKeywordPyIdxIdxRangeIdxExpPyExpIntegerFloatStringRawStringLiteralCondCastTupleListFieldDictNone $fPrettyPyExp $fPrettyPyArg $fPrettyPyIdx$fPrettyPyExcept$fPrettyPyClassDef$fPrettyPyFunDef$fPrettyPyStmt$fPrettyPyProg $fEqPyArg $fShowPyArg $fEqPyExp $fShowPyExp $fEqPyIdx $fShowPyIdx$fEqPyClassDef$fShowPyClassDef $fEqPyStmt $fShowPyStmt $fEqPyFunDef$fShowPyFunDef $fEqPyExcept$fShowPyExcept $fEqPyProg $fShowPyProg openClInit Constructor compNameSrccompInit CompilerEnv envOperations envFtableopsEntryOutput opsEntryInput EntryInput EntryOutputcollect'emptyConstructor simpleCall compileName compileDim unpackDimcompilePrimTypecompilePrimTypeExtcompilePrimToNpcompilePrimToExtNpCSProgCSConstructorDefClassConstructor CSClassDef PublicClassCSFunDef CSFunDefArgCSExceptCSStmtForEach UsingWithFixedReassign AssignTypedThrowUsing StaticFunDef PublicFunDef PrivateFunDef NamespaceConstructorDef StructDefCSArgCSIdxCSExpAddrRefOutDerefPreUnOpPostUnOpTernaryPair CallMethod CreateObject CreateArrayCreateSystemTuple AllocArray CollectionThisNullCSPrimCSIntCSUIntCSFloatBoolTByteTStringTIntPtrTCSCompArrayTTupleT SystemTupleTCSType CompositePointerT PrimitiveCustomTStaticTOutTRefTVoidTFloatTDoubleTUInt8TUInt16TUInt32TUInt64TInt8TInt16TInt32TInt64T$fPrettyArgMemType $fPrettyCSInt$fPrettyCSUInt$fPrettyCSFloat$fPrettyCSPrim$fPrettyCSType$fPrettyCSComp$fPrettyCSExcept$fPrettyCSConstructorDef$fPrettyCSClassDef$fPrettyCSFunDef$fPrettyCSStmt $fPrettyCSArg $fPrettyCSExp$fPrettyCSProg$fEqMemT $fShowMemT$fEqArgMemType$fShowArgMemType $fEqCSInt $fShowCSInt $fEqCSUInt $fShowCSUInt $fEqCSFloat $fShowCSFloat $fEqCSPrim $fShowCSPrim $fEqCSType $fShowCSType $fEqCSComp $fShowCSComp$fEqCSConstructorDef$fShowCSConstructorDef $fEqCSStmt $fShowCSStmt$fEqCSClassDef$fShowCSClassDef $fEqCSFunDef$fShowCSFunDef $fEqCSExcept$fShowCSExcept $fEqCSExp $fShowCSExp $fEqCSArg $fShowCSArg $fEqCSIdx $fShowCSIdx $fEqCSProg $fShowCSProgcompBeforeParsecompStaticMemDeclscompStaticMemAllocscompDebugItemscompMemberDeclscompAssignedVarscompDeclaredMem opsSyncRun beforeParse staticMemDeclstaticMemAlloc addMemberDeclgetDefaultDeclassignScalarPointerparametrizedCall callMethodsimpleInitClasscompilePrimTypeToASTcompilePrimTypeToASTextsizeOf publicFunDef privateFunDef consoleWriteconsoleWriteLineconsoleErrorWriteconsoleErrorWriteLinetoIntPtrfutlibpreludeProgBaseprogDocprogDecsDecBaseValDecTypeDecSigDecModDecOpenDecLocalDec ModParamBaseModParam modParamName modParamType modParamAbsmodParamLocation ModBindBaseModBindmodName modParams modSignaturemodExpmodDoc modLocation ModExpBaseModVar ModParens ModImportModDecsModApply ModAscript ModLambda SigBindBaseSigBindsigNamesigExpsigDocsigLoc TypeRefBaseTypeRef SigExpBaseSigVar SigParensSigSpecsSigWithSigArrowSpecBaseValSpec TypeAbbrSpecTypeSpecModSpec IncludeSpecspecNamespecTypeParamsspecTypespecDoc specLocation TypeParamBase TypeParamDim TypeParamType LiftednessUnliftedLifted TypeBindBaseTypeBind typeAlias typeParamstypeExptypeDoctypeBindLocation ValBindBaseValBindvalBindEntryPoint valBindNamevalBindRetDeclvalBindRetTypevalBindTypeParams valBindParams valBindBody valBindDocvalBindLocation DocComment PatternBase TuplePattern RecordPattern PatternParensWildcardPatternAscription LoopFormBaseForIn FieldBaseRecordFieldExplicitRecordFieldImplicitMapLikeRedLikeExpBaseLiteralIntLitFloatLitParens QualParensTupLit RecordLitAscriptLetPatLetFunNegate OpSection OpSectionLeftOpSectionRightProjectSection IndexSectionProjectLetWith RecordUpdateFilterZipUnzipQualName qualQualsqualLeaf DimIndexBase InclusivenessDownToExclusive ToInclusive UpToExclusiveBacktickPlusMinusTimesDivideModQuotRemShiftRShiftLBandBorEqualNotEqualLessLeqGreaterGeq PipeRightPipeLeft IdentBase identSrcLocValue RecordDietFuncDiet TypeDeclBaseTypeDecl declaredType expandedType StructType TypeArgExp TypeArgExpDimTypeArgExpTypeTypeExpTEVarTETupleTERecordTEArrayTEUniqueTEApplyTEArrow PatternTypeCompTypeTypeArg TypeArgDim TypeArgTypeRecordTypeVarArrowArrayElemTypeBase ArrayPrimElem ArrayPolyElemArrayRecordElemRecordArrayElemTypeBaseRecordArrayElemRecordArrayArrayElemTypeName typeQualstypeLeaf ShapeDeclDimDeclNamedDimConstDimAnyDimArrayDim unifyDims IsPrimValue primValue SignedValue UnsignedValueSignedUnsignedInfounInfoNoInfo unifyShapestypeNameFromQualNamequalNameFromTypeName typeParamName$fTraversableNoInfo$fFoldableNoInfo$fFunctorNoInfo$fTraversableInfo$fFoldableInfo $fFunctorInfo$fIsPrimValueBool$fIsPrimValueDouble$fIsPrimValueFloat$fIsPrimValueWord64$fIsPrimValueWord32$fIsPrimValueWord16$fIsPrimValueWord8$fIsPrimValueInt64$fIsPrimValueInt32$fIsPrimValueInt16$fIsPrimValueInt8$fIsPrimValueInt $fArrayDim()$fMonoidShapeDecl$fSemigroupShapeDecl$fFunctorShapeDecl$fTraversableShapeDecl$fFoldableShapeDecl $fOrdTypeName $fEqTypeName$fBifoldableTypeArg$fBifunctorTypeArg$fBitraversableTypeArg$fBifoldableTypeBase$fBifunctorTypeBase$fBitraversableTypeBase$fBifoldableArrayElemTypeBase$fBifunctorArrayElemTypeBase $fBitraversableArrayElemTypeBase#$fBifoldableRecordArrayElemTypeBase"$fBifunctorRecordArrayElemTypeBase&$fBitraversableRecordArrayElemTypeBase$fTraversableInclusiveness$fFoldableInclusiveness$fFunctorInclusiveness$fLocatedInclusiveness$fTraversableQualName$fFoldableQualName$fFunctorQualName$fArrayDimDimDecl$fTraversableDimDecl$fFoldableDimDecl$fFunctorDimDecl$fLocatedTypeArgExp$fLocatedTypeExp$fLocatedTypeDeclBase$fLocatedDocComment$fLocatedTypeParamBase$fTraversableTypeParamBase$fFoldableTypeParamBase$fFunctorTypeParamBase$fLocatedTypeBindBase$fLocatedTypeRefBase$fLocatedSigExpBase$fLocatedSpecBase$fLocatedSigBindBase$fLocatedModParamBase$fLocatedPatternBase$fLocatedIdentBase$fOrdIdentBase $fEqIdentBase$fLocatedFieldBase$fLocatedExpBase$fLocatedValBindBase$fLocatedDecBase$fLocatedModBindBase$fLocatedModExpBase$fShowableInfovn$fShowableNoInfovn $fEqNoInfo $fOrdNoInfo $fShowNoInfo$fEqInfo $fOrdInfo $fShowInfo $fEqShapeDecl$fOrdShapeDecl$fShowShapeDecl$fShowTypeName $fEqTypeArg $fShowTypeArg$fEqArrayElemTypeBase$fShowArrayElemTypeBase$fEqRecordArrayElemTypeBase$fShowRecordArrayElemTypeBase $fEqValue $fShowValue $fEnumBinOp$fBoundedBinOp$fEqInclusiveness$fOrdInclusiveness$fShowInclusiveness $fEqQualName $fOrdQualName$fShowQualName $fEqDimDecl $fOrdDimDecl $fShowDimDecl $fEqTypeExp $fShowTypeExp$fEqTypeArgExp$fShowTypeArgExp$fShowDocComment$fEqLiftedness$fOrdLiftedness$fShowLiftedness$fEqTypeParamBase$fShowTypeParamBase$fShowProgBase $fShowDecBase$fShowModParamBase$fShowModBindBase$fShowModExpBase$fShowSigBindBase$fShowTypeRefBase$fShowSigExpBase$fShowSpecBase$fShowTypeBindBase$fShowValBindBase$fShowPatternBase$fShowLoopFormBase$fShowFieldBase $fShowExpBase$fShowDimIndexBase$fShowIdentBase$fShowTypeDeclBase UncheckedProg UncheckedDecUncheckedValBindUncheckedPatternUncheckedTypeParamUncheckedSigExpUncheckedModExp UncheckedExpUncheckedDimIndexUncheckedIdentUncheckedTypeDeclUncheckedArrayElemTypeUncheckedTypeExp UncheckedType IntrinsicIntrinsicMonoFunIntrinsicOverloadedFunIntrinsicPolyFun IntrinsicTypeIntrinsicEqualityIntrinsicOpaque nestedDimsremoveShapeAnnotationsvacuousShapeAnnotationsmodifyShapeAnnotationsrecordArrayElemUniquenessaliases toStructuraltoStruct fromStructarrayOfWithAliasestypeToRecordArrayElemtypeToRecordArrayElem'recordArrayElemToType tupleRecord isTupleRecordareTupleFieldstupleFieldNames sortFields isTypeParam setAliases addAliases valueType foldFunType unfoldFunTypetypeVars returnType concreteType orderZeropatternDimNames typeDimNamespatternOrderZero patIdentSet patternTypepatternStructType patternParampatternNoShapeAnnotationsnamesToPrimTypes intrinsicsmaxIntrinsicTagqualNamequalifytypeName progImports decImportsprogModuleTypesidentifierReferenceidentifierReferencesleadingOperatorAnnotIsNamepprName prettyName$fPrettyTypeArg$fPrettyArrayElemTypeBase$fPrettyRecordArrayElemTypeBase$fPrettyShapeDecl $fPrettyValue$fPrettyTypeParamBase$fPrettyIdentBase$fPrettyQualName$fPrettyTypeArgExp$fPrettyTypeExp$fPrettyShapeDecl0$fPrettyDimDecl $fIsNameName $fIsNameVName$fPrettyModBindBase$fPrettyModParamBase$fPrettySigBindBase$fPrettySigExpBase$fPrettySpecBase$fPrettyValBindBase$fPrettyTypeBindBase$fPrettyModExpBase$fPrettyDecBase$fPrettyProgBase$fPrettyPatternBase$fPrettyLoopFormBase$fPrettyFieldBase$fPrettyExpBase$fPrettyDimIndexBase$fPrettyTypeDeclBase $fAnnotInfo $fAnnotNoInfoTokenIDINDEXING QUALINDEXING QUALPARENUNOPQUALUNOPSYMBOLINTLIT STRINGLITI8LITI16LITI32LITI64LITU8LITU16LITU32LITU64LITFLOATLITF32LITF64LITCHARLITCOLON BACKSLASH APOSTROPHEAPOSTROPHE_THEN_HATBACKTICKHASHDOTTWO_DOTS TWO_DOTS_LT TWO_DOTS_GT THREE_DOTSLPARRPARRPAR_THEN_LBRACKETLBRACKETRBRACKETLCURLYRCURLYCOMMA UNDERSCORE RIGHT_ARROW LEFT_ARROWEQUASTERISKNEGATELTHHATIFTHENELSELETLOOPINFORDOWITHUNSAFEASSERTTRUEFALSEWHILEINCLUDEIMPORTENTRYTYPEMODULEVALOPENLOCALDOCEOFLscanTokensText ParseErrorparseDecOrExpIncrM parseFutharkparseExp parseType parseValue parseValues ArrayElemType TypeParam StructTypeArgSpecDecSigExpModExp envTypeTable envSigTable envModTable envNameMapNameMapBoundV TypeBindingTypeAbbrMTymtyAbsmtyModFunSig funSigAbs funSigMod funSigMtyModEnvModFunTySetTerm SignatureImports FileModulefileAbsfileEnvfileProg ImportNamemkInitialImport mkImportFromincludeToFilePathincludeToString$fLocatedImportName $fMonoidEnv$fSemigroupEnv$fEqImportName$fOrdImportName$fShowImportName $fEqNamespace$fOrdNamespace$fShowNamespace$fEnumNamespace$fEqTypeBinding$fShowTypeBinding $fShowBoundV $fShowEnv $fShowMTy $fShowMod $fShowFunSigCtxctxEnv ctxImportsInterpreterErrorenvTermenvType ValuePrim ValueArray ValueRecordExtOp ExtOpTrace ExtOpBreak ExtOpErrormkArray isEmptyArray fromTupletypeEnv initialCtx interpretExp interpretDecinterpretImportinterpretFunction $fPrettyShape$fShowInterpreterError$fPrettyIndexing$fMonadFailEvalM$fFunctorExtOp $fEqShape $fShowShape $fMonadEvalM$fApplicativeEvalM$fFunctorEvalM$fMonadFreeEvalM$fMonadReaderEvalM BoundInTypes boundInTypesinternaliseParamTypesinternaliseReturnTypeinternaliseEntryReturnTypeinternaliseTypeinternalisedTypeSizeinternalisePrimTypeinternalisePrimValue$fSemigroupBoundInTypes$fMonoidBoundInTypesInternaliseLambdainternaliseMapLambdainternaliseStreamMapLambdainternaliseFoldLambdainternaliseStreamLambdainternalisePartitionLambda transformProg$fMonoidNameSet$fSemigroupNameSet$fShowStaticVal $fFunctorDefM$fApplicativeDefM $fMonadDefM$fMonadReaderDefM$fMonadWriterDefM$fMonadFreshNamesDefM MatchPattern bindingParamsbindingLambdaParams primTypeHtmlprettyTypeNameprettyU renderNamejoinBycommasMismatch readValuesexplainMismatch compareValues $fBinaryValue$fShowMismatchExpectedResultSucceedsRunTimeFailureValuesInFileTestRunrunTagsrunInputrunExpectedResultrunIndexrunDescription WarningTestExpectedWarning StructureTestStructurePipelineKernelsPipeline SOACSPipelineSequentialCpuPipeline GpuPipeline ExpectedErrorAnyError ThisError InputOutputs iosEntryPoint iosTestRuns TestActionCompileTimeFailureRunCases ProgramTesttestDescriptiontestTags testActiontestSpecFromFiletestSpecsFromPathsvaluesFromByteString getValues getValuesBS$fShowExpectedError$fShowWarningTest$fShowStructurePipeline$fShowStructureTest $fShowValues$fShowExpectedResult $fShowTestRun$fShowInputOutputs$fShowTestAction$fShowProgramTest ASTMappableastMap ASTMappermapOnExp mapOnName mapOnQualName mapOnCompTypemapOnStructTypemapOnPatternType$fASTMappable(,,)$fASTMappable(,)$fASTMappable[]$fASTMappableInfo$fASTMappableFieldBase$fASTMappablePatternBase$fASTMappableIdentBase$fASTMappableTypeDeclBase$fASTMappableTypeBase$fASTMappableTypeBase0$fASTMappableTypeBase1$fASTMappableTypeBase2$fASTMappableSet$fASTMappableDimIndexBase$fASTMappableTypeParamBase$fASTMappableDimDecl$fASTMappableTypeArgExp$fASTMappableTypeExp$fASTMappableLoopFormBase$fASTMappableExpBase $fMonoidScope$fSemigroupScope $fShowScope$fApplicativeTransformM$fFunctorTransformM$fMonadTransformM$fMonadFreshNamesTransformM$fMonadReaderTransformM$fMonadWriterTransformMWarnings singleWarning$fShowWarnings$fMonoidWarnings$fSemigroupWarnings $fEqWarningsMonadTypeCheckerwarn bindNameMaplocalEnv checkQualName lookupMod lookupMTy lookupImportMonadBreadCrumbs breadCrumbgetBreadCrumbs BreadCrumb MatchingTypesMatchingFields ImportTableunexpectedType undefinedTypefunctionIsNotValueunappliedFunctorunknownVariableError underscoreUserunTypeMaskEnv askRootEnv localTmpEnv typeError checkName bindSpacedgetTypecheckQualNameWithEnvqualifyTypeVars badOnLeft anySignedTypeanyUnsignedType anyIntType anyFloatType anyNumberType anyPrimTypeppSpaceintrinsicsNameMaptopLevelNameMap$fShowBreadCrumb$fMonadTypeCheckerTypeM$fMonadErrorTypeM applySubstTypeSubsTypeSubDimSub unifyTypesU subuniqueOf checkTypeDecl checkTypeExpcheckForDuplicateNamescheckTypeParamssubstituteTypessubstituteTypesInBoundV substTypesAny$fSubstitutableTypeBase$fSubstitutableTypeBase0$fSubstitutableTypeBase1$fSubstitutableTypeBase2 $fShowBindage $fEqBindage $fShowTypeSub MonadUnifygetConstraintsputConstraintsmodifyConstraints newTypeVar Constraint NoConstraint ParamType Overloaded HasFieldsEquality Constraints lookupSubst normaliseTypeunify mustBeOneOf equalityType zeroOrderType mustHaveField doUnification$fLocatedConstraint$fMonadBreadCrumbsUnifyM$fMonadUnifyUnifyM$fShowConstraint $fMonadUnifyM$fFunctorUnifyM$fApplicativeUnifyM$fMonadStateUnifyM$fMonadErrorUnifyM checkOneExp checkFunDef$fLocatedOccurence$fMonoidTermScope$fSemigroupTermScope$fMonadTypeCheckerTermTypeM$fMonadBreadCrumbsTermTypeM$fMonadUnifyTermTypeM$fMonadFailTermTypeM$fShowValBinding$fShowTermScope$fMonadTermTypeM$fFunctorTermTypeM$fApplicativeTermTypeM$fMonadReaderTermTypeM$fMonadWriterTermTypeM$fMonadStateTermTypeM$fMonadErrorTermTypeMcheckDec initialEnvBasis basisImportsbasisNameSource basisRoots emptyBasisreadLibraryWithBasis readImportsrunMonoM transformDecs$fFunctorMonoM$fApplicativeMonoM $fMonadMonoM$fMonadReaderMonoM$fMonadWriterMonoM$fMonadFreshNamesMonoMinternaliseProg FutharkConfigfutharkVerbose futharkWarn futharkWerror futharkSafenewFutharkConfig dumpErrorreportingIOErrorsrunCompilerOnProgramrunPipelineOnProgram readProgram readLibraryversion versionString FunOptDescrmainWithOptions commonOptions CompilerMode ToLibrary ToExecutableCompilerOption compilerMain$fEqCompilerMode$fOrdCompilerMode$fShowCompilerMode renderFilesrequiredInManifest GHC.MaybeNothingData.Traversable mapAccumLGHC.Basemap Data.EitherpartitionEithersGHC.ListsplitAtprocess-1.6.3.0System.ProcessreadProcessWithExitCodeControl.Monad.IO.ClassMonadIOmemoiseGetManifestRoughBuildList buildList doSolveDeps text-1.2.3.1Data.Text.InternalTextText.PrettyPrint.Mainland.ClasspprintPrettypprpprPrecpprList integer-gmpGHC.Integer.TypeGHC.RealIntegralRationaldoSubdoUDivdoUModdoSQuotdoSRemdoSMindoUMindoSMaxdoUMaxdoShldoLShrdoAShrdoAnddoOrdoXorintToInt zeroIshIntnegativeIshInt intByteSize floatByteSizeMonoidghc-prim GHC.Classes==mempty GHC.TypesTrueOrdtransformers-0.5.5.0Control.Monad.Trans.ReaderReaderGHC.ErrerrorData.Functor.IdentityIdentityfail zeroIshExp oneIshExpvalueExpGHC.NumNumrenamerSubstitutionsnewmatcheswithoutUsminusAlgSimplifyEnvmaxSteps markInSolve scalExpRangeEitherLeft BodyWisdomControl.Monad.Trans.Writer.LazyWriter Consumption FunBindingGHC.ShowShowboundobserve expandAliasescheckAnnotationLmadDimInfoUnknownsubstituteInLmadshape0index0shaveoffRepeats freeVarIndex letBoundIndex IndexArraynoUpdateBounds updateBounds' buildCGfundoInlineInCallerExpMapkernelWorkgroupskernelWorkgroupSizekernelElementsPerThreadkernelTotalElementskernelNumThreadsaddManualIspaceCalcStmsDistributionBodydistributionExpandTargetletBindInNestingboundInNesting VarianceTable BottomUpRules TopDownRulesRules VarLookup checkResults SimpleRule TypeLookuphoistBranchInvariantcopyScratchToScratchremoveDeadBranchResultprotectIfHoistedprotectLoopHoistednotWorthHoistingsimplifyResultJust getExtMaps PatAllocMAllocMaggressiveReuseChunkMapdimAllocationSizecurUses curEqAssertscurVarToMemRescurVarToMaxExpRescurKernelMaxSizedRes ctxFirstUsesctxPotentialKernelInterferencesctxSizes ctxVarToMem ctxActualVarsctxExistentialsctxVarPrimExpsctxSizeVarsUsesBeforectxCurOuterFirstUses ctxFunDef ctxMemAliases ctxVarAliases ctxLastUses ctxVarExps ctxAllocatedBlocksBeforeCreationctxVarsInUseBeforeMemctxCurSnapshot tryCoalesce DoubleBuffer BufferCopyLoreConstraintscseInOp getShapeNamesremoveReplicateMappingremoveReplicateWriteremoveUnusedSOACInputremoveDeadReductionremoveDeadWritenestedParallelismworthSequentialisingworthIntraGroupunExistentialiseMemorycopyCopyToCopyremoveIdentityCopy RebaseMapextractKernelBodyAllocationsextractThreadAllocationsinputsToSubExps mapFusionOKmapWriteFusionOKfuseSOACwithKer toSeqStreamrearrangeReturnTypesrsuccoutArrinpArr infusiblekernelsKernNamesoacsbindVarbindingFamilyVar bindingFamilybindResrunFusionGatherMexpandSoacInpArr greedyFuse finaliseSOACmkFreshFusionRes getIdentArrfromScalarDestination withFParams defaultCopy copyArrayDWIMkernelStreamedkernelCompiler inKernelCopy isStaticExpmakeAllMemoryGlobaluintTypeToCTypeprintStmcproductcompileTypecastExtcompileTypecastShowable maskAliases removeNamessuffZero scanTokensshow parseExpIncrMGHC.IOFilePath ParserMonadprog futharkType expressionanyValue anyValuesparseHappyStk TermBindingEvalMtoArraymatchValueToTypesignum'signumevalTypeDefM StaticValLambdaSV restrictEnvTorunDefM defuncExp defuncExp' defuncSoacExpdefuncDimIndex defuncLet defuncApply fullyApplied liftDynFunenvFromPatternDynamicenvFromShapeParams liftValDecbuildEnvPattern buildRetType typeFromSVdynamicFunTypematchPatternSV updatePattern svFromTypefreeVars patternVarscombineTypeShapes defuncValBind DynamicFun defuncValsflattenPatternPrimValueMismatchbinary-0.8.6.0Data.Binary.Get.InternalGetData.Binary.PutPut constituentlexeme'lexemetestSpecsFromPathModModtransformNamescheckForDuplicateNamesInTypeisRigid TermTypeState TermScopescopeBreadCrumbs Occurence nullOccurenceseminullOccurenceexpTypeinstantiateTypeSchemeinstantiateTypeParam unifyExpTypesunifyTypeAliasescheckShapeParamUses patternUsesfixOverloadedTypescloseOverTypes consumingnoUniqueupdateExpTypes refineEnv readLibrary'LiftsMonoMRecordReplacements PolyBinding transformExpdesugarBinOpSection unfoldLetFunsmonomorphizeBinding substPatternremoveTypeVariablesinternaliseDimExpisOverloadedFunctionlookupConstant getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNameerrputnewCompilerConfig DocumentedctxVisibleMTysNoLink headerDoc