! Y      !"#$%&'()*+,-./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'{'|'}'~''''''(((((()))))))))))))))))))********************+++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-------------............................... . . . . .....////////////// /!/"/#/$/%0&0'0(0)0*0+0,1-1.1/101112131415161718191:1;1<1=2>2?2@2A2B2C2D2E2F2G2H2I2J2K2L2M2N2O2P2Q2R2S2T2U3V3W3X3Y3Z3[3\3]3^3_3`3a3b3c3d3e3f3g3h3i3j3k3l3m3n3o3p3q3r3s4t4u4v4w4x4y4z4{4|4}4~4444444444444444444444444444445555556666666666666666666666666666666666666666666666666666677777777777777777777777777777777777777777777777777 7 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@8A8B8C8D8E8F8G8H8I8J8K8L8M8N8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8\8]8^9_9`9a9b9c9d9e9f9g9h9i9j9k9l9m9n9o9p9q9r9s9t9u9v9w9x9y9z9{9|9}9~9:::::::::;;;;;;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<==================================================>>>>>>>>>>>>>>>>>>>>>>>>>> > > > > >>>>>>>>>>>>>>>>>>> >!>">#>$>%>&>'>(>)>*>+>,>->.>/>0>1>2>3>4>5>6>7>8?9?:?;?<?=?>???@@A@B@CADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWBXBYBZB[B\B]B^B_C`CaCbDcDdDeDfDgDhDiDjDkDlDmnopqrstuvwxyz{|}~EEFFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH 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 .H /H 0H 1H 2H 3H 4H 5H 6H 7H 8H 9H :H ;H <H =H >H ?H @H AH BH CH DH EH FH GH HH IH JH KH LH MH NH OH PH QH RH SH TH UH VH WH XH YH ZH [H \H ]H ^H _H `H aH bH cH dH eH fH gH hH iI jI kI lI mI nI oI pI qI rI sI tI uI vI wI xI yJ zJ {K |L }L ~L L L L M M M M M M M M M M M M M M M M M M M M M M M M M N O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O P P P P P P 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 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 WZ XZ YZ ZZ [Z \Z ]Z ^Z _Z `Z aZ bZ 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 b b b b c c c c c c c c c c c c c c c c c c c c c c d d !d "d #d $d %d &d 'd (d )d *d +e ,e -f .f /f 0f 1g 2g 3g 4g 5g 6g 7g 8h 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 \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 |i }i ~i i i j j j k k k k k k k k k k k k k k k k k k l l l l l l l l l l l l l l l l l l l l m m m m m m m m m m m m m m m n n n n n o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o !o "o #o $o %o &o 'o (o )o *o +o ,o -o .o /o 0o 1o 2o 3o 4o 5o 6o 7o 8o 9o :o ;o <o =o >o ?p @q Aq Bq Cq Dq Eq Fq Gq Hq Iq Jq Kq Lq Mq Nq Oq Pq Qq Rq Sq Tq Uq Vq Wq Xq Yq Zq [q \q ]q ^q _q `q aq bq cq dq eq fq gq hq iq jq kq lq mq nq oq pq qq rq sq tq uq vq wq xq yq zq {q |q }q ~q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q r r r r r r s t t t t t t t t t t t t t t 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 u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u v v v v v v !v "v #v $v %v &w 'w (w )w *w +w ,w -w .w /w 0w 1w 2w 3w 4w 5w 6w 7w 8w 9w :w ;w <w =w >w ?w @w Aw Bw Cw Dw Ew Fw Gw Hw Iw Jw Kw Lw Mw Nw Ow Pw Qw Rx Sx Ty Uz 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{|}~Nonexfuthark&Whether an option accepts an argument.zfutharkThe  becomes part of the help text.|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{NoneNoneSafe`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. Safe>nfutharkAn 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.NoneGfutharkcA 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.futharkPCheck if the manifest specifies a required package with the given package path.futhark6Remove a required package from the manifest. Returns X 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 NonedfutharkLike , 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! NonewfutharkdCalculate 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. SafezfutharksThis 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=>?5futhark*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.*futharkEA 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.+futharkLInformation about a package. The name of the package is stored separately..futharkILook up information about a specific commit, or HEAD in case of Nothing./futhark[Information about a version of a single package. The version number is stored separately.2futhark1The directory inside the zipball containing the lib\ directory, in which the package files themselves are stored (Based on the package path).3futhark~The commit ID can be used for verification ("freezing"), by storing what it was at the time this version was last selected.5futhark8Timestamp for when the revision was made (rarely used).6futharkThe 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 6 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..<futhark:Look up information about a specific version of a package.=futhark%Find the newest version of a package.&'()*+,-./0123456789:;<=+,-.9:/012345678*&'();<=None>DfutharkZA mapping of package revisions to the dependencies of that package. Can be considered a *t 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. futhark Construct a  from a  L. This involves pruning all packages that cannot be reached from the root.futharkGiven a list of immediate dependency minimum version constraints, find dependency versions that fit, including transitive dependencies.EfutharkxRun the solver, producing both a package registry containing a cache of the lookups performed, as well as a build list.FfutharkYPerform package resolution with only pre-known information. This is useful for testing.DEFEFDNone Ifuthark.Prettyprint a value, wrapped to 80 characters.JfutharkPrettyprint a value to a , wrapped to 80 characters.Kfuthark2Prettyprint a value without any width restriction.Lfuthark Re-export of .Mfuthark,Prettyprint a list enclosed in curly braces.Nfuthark The document N ds separates ds1 with commas and encloses them with parentheses.OfutharkCMake sure that the given document is printed on just a single line.PfutharkStack 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.QfutharkKSurround the given document with enclosers and add linebreaks and indents.q  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abjihgfedcIJKLMNOPQl  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abjihgfedcILMJKNOPQNoneSX_4ۆRfuthark+Conversion operators try to generalise the from t0 x to t1 instructions from LLVM.SfutharklZero-extend the former integer type to the latter. If the new type is smaller, the result is a truncation.TfutharklSign-extend the former integer type to the latter. If the new type is smaller, the result is a truncation.UfutharkyConvert value of the former floating-point type to the latter. If the new type is smaller, the result is a truncation.VfutharkXConvert a floating-point value to the nearest unsigned integer (rounding towards zero).WfutharkVConvert a floating-point value to the nearest signed integer (rounding towards zero).Xfuthark6Convert an unsigned integer to a floating-point value.Yfuthark3Convert a signed integer to a floating-point value.ZfutharkSConvert an integer to a boolean value. Zero becomes false; anything else is true.[futharkIConvert a boolean to an integer. True is converted to 1 and False to 0.\futharkComparison operators are like fs, but they return As. The somewhat ugly constructor names are straight out of LLVM.]futharkAll types equality.^futharkUnsigned less than._futharkUnsigned less than or equal.`futharkSigned less than.afutharkSigned less than or equal.bfutharkFloating-point less than.cfuthark"Floating-point less than or equal.dfutharkBoolean less than.efutharkBoolean less than or equal.ffutharkBinary operators. These correspond closely to the binary operators in LLVM. Most are parametrised by their expected input and output types.gfutharkInteger addition.hfutharkFloating-point addition.ifutharkInteger subtraction.jfutharkFloating-point subtraction.kfutharkInteger multiplication.lfutharkFloating-point multiplication.mfutharkeUnsigned integer division. Rounds towards negativity infinity. Note: this is different from LLVM.nfutharkcSigned integer division. Rounds towards negativity infinity. Note: this is different from LLVM.ofutharkFloating-point division.pfuthark,Unsigned integer modulus; the countepart to m.qfuthark*Signed integer modulus; the countepart to n.rfutharkHSigned integer division. Rounds towards zero. This corresponds to the sdiv instruction in LLVM.sfutharkHSigned integer division. Rounds towards zero. This corresponds to the srem instruction in LLVM.tfuthark,Returns the smallest of two signed integers.ufuthark.Returns the smallest of two unsigned integers.vfuthark3Returns the smallest of two floating-point numbers.wfuthark,Returns the greatest of two signed integers.xfuthark.Returns the greatest of two unsigned integers.yfuthark3Returns the greatest of two floating-point numbers.zfuthark 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 .futhark Convert an  to any  type.futhark Create a  from a type and a .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.futharkInteger subtraction.futharkInteger multiplication.futharkeUnsigned 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.futhark,Unsigned integer modulus; the countepart to m.futhark*Signed integer modulus; the countepart to n.futharkHSigned integer division. Rounds towards zero. This corresponds to the sdiv instruction in LLVM.futharkHSigned integer division. Rounds towards zero. This corresponds to the srem instruction in LLVM.futharkMinimum of two signed integers.futhark!Minimum of two unsigned integers. futharkMaximum of two signed integers.!futhark!Maximum of two unsigned integers."futhark Left-shift.#futhark#Logical right-shift, zero-extended.$futhark&Arithmetic right-shift, sign-extended.%futhark Bitwise and.&futhark 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.RSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{|ߎf}gik~nqrshjlmoptuvwxyz{|RSTUVWXYZ[\]^_`abcdeSafe>gfutharkdA 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.NoneMU_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. 4s, being lists of characters, are very slow, while s are based on byte-arrays.futhark2Whether some operator is commutative or not. The +: 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 ."futhark Convert a  to the corresponding name.#futhark/A human-readable location string, of the form filename:lineno:columnno?. This follows the GNU coding standards for error messages: 8https://www.gnu.org/prep/standards/html_node/Errors.htmlThis function assumes that both start and end position is in the same file (it is not clear what the alternative would even mean).$futhark Return the tag contained in the .%futhark!Return the name contained in the .&futharkReturn the base  converted to a string.I !"#$%&# !"$%&INone=>?.>futharkA part of an error message.?futharkA literal string.@futharkA run-time integer value.Afuthark]An error message is a list of error parts, which are concatenated to form the final message.CfutharkA set of names.DfutharkAn element of a pattern - consisting of a name (essentially a pair of the name and type) and an addditional parametric attribute. This attribute is what is expected to contain the type of the resulting variable.FfutharkThe name being bound.GfutharkPattern element attribute.Hfuthark A list of JLs, indicating how an array should be sliced. Whenever a function accepts a H{, that slice should be total, i.e, cover all dimensions of the array. Deviators should be indicated by taking a list of I es instead.Ifuthark,How to index a single dimension of an array.JfutharkFix index in this dimension.Kfuthark&DimSlice start_offset num_elems stride.Lfuthark#A type alias for namespace control.MfutharkA function parameter.OfutharkName of the parameter.PfutharkFunction parameter attribute.QfutharkA 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.Tfuthark:A list of names used for certificates in some expressions.WfutharkVAn 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.]futharkROnly observes value in this position, does not consume. A result may alias this.^futharkAs ]P, but the result will not alias, because the parameter does not carry aliases._futharkAn a> with uniqueness information, used for function return types.`futhark[A type with shape and uniqueness information, used declaring return- and parameters types.afutharkA type with existentially quantified shapes - used as part of function (and function-like) return types. Generally only makes sense when used in a list.bfutharkJA type with shape information, used for describing the type of variables.cfuthark`An Futhark type is either an array or an element type. When comparing types for equality with ,, shapes must match.gfuthark<A fancier name for '()' - encodes no uniqueness information.ifuthark:A string representing a specific non-default memory space.jfuthark!The memory space of a block. If kL, 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 (k) and GPU space.mfuthark>A class encompassing types containing array shape information.nfuthark0Return the rank of an array with the given size.ofutharkstripDims n shape strips the outer n dimensions from shape.pfuthark5Check whether one shape if a subset of another shape.qfuthark[The size of an array type as merely the number of dimensions, with no further information.sfutharkLike yq but some of its elements may be bound in a local environment instead. These are denoted with integral indices.tfutharkThe size of this dimension.ufuthark"Something that may be existential.xfuthark{The size of an array as a list of subexpressions. If a variable, that variable must be in scope where this array is used.yfutharkeThe size of an array type as a list of its dimension sizes, with the type of sizes being parametric.|futharkIf the argument is a J, return its component.}futharkIf the slice is all Js, return the components.~futhark3The dimensions of the array produced by this slice.futharkA slice with a stride of one.futharkFix the K?s of a slice. The number of indexes must equal the length of ~ for the slice.IRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABCDEFGHIJKLMNOPQSRTUVWXYZ[\]^_`abcedfghijlkmnopqrstuwvxyz{|}~Kghyz{xuwvtsqrmnopjlkicedfba`_[\]^AB>?@WXYZTUVQSRMNOPLIJKH|}~DEFGCNonefuthark$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 R Q 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 _s.futhark"Typeclass for things that contain as.futhark"Typeclass for things that contain `s.futhark"Typeclass for things that contain bs.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 -.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 .' 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 w.futharkAs , but on a single type.futhark arrayOf t s uC constructs an array type. The convenience compared to using the e 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 y-. 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 as.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 b.futharkGiven two lists of a(s of the same length, return a list of as that is a subtype (as per  isSubtypeOf) of the two operands.futharkGiven a list of aAs and a list of "forbidden" names, modify the dimensions of the as such that they are u where they were previously w0 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 a set of the corresponding dimensions in ts2% (because they may not fit exactly).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.@     @     None=?HV e-futharkA type representing the return type of a function. In practice, a list of these will be used. It should contain at least the information contained in an a5, but may have more, notably an existential context..futhark-Contruct a return type from a primitive type./futharkGiven a function return type, the parameters of the function, and the arguments for a concrete call, return the instantiated return type for the concrete call, if valid.0futharksA type representing the return type of a body. It should contain at least the information contained in a list of a6s, but may have more, notably an existential context.1futhark,Construct a body type from a primitive type.4futhark`Given shape parameter names and value parameter types, produce the types of arguments accepted.-./01234012-./34None>HV8futhark)Annotation for every let-pattern element.9futhark Annotation for every expression.:futharkAnnotation for every body.;futhark5Annotation for every (non-lambda) function parameter.<futhark/Annotation for every lambda function parameter.=futhark-The return type annotation of function calls.>futhark'The return type annotation of branches.?futharkExtensible operation.-./012347?=89:;<> 7?=89:;<>None1=>?HVe9@futhark!Type alias for namespace reasons.AfutharkAn entire Futhark program.Dfuthark!Type alias for namespace reasons.EfutharkzEvery entry point argument and return value has an annotation indicating how it maps to the original source program type.Ffuthark6Is an unsigned integer or array of unsigned integers.GfutharkyA black box type comprising this many core values. The string is a human-readable description with no other semantics.HfutharkMaps directly.IfutharkInformation about the parameters and return value of an entry point. The first element is for parameters, the second for return value.JfutharkFunction DeclarationsLfuthark5Contains a value if this function is an entry point.Sfuthark#Type alias for namespacing reasons.Tfuthark%Anonymous function for use in a SOAC.Yfuthark#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.]futharkData associated with a branch.afutharkFor-loop or while-loop?dfutharkWhether something is safe or unsafe (mostly function calls, and in the context of whether operations are dynamically checked). When we inline an e: function, we remove all safety checks in its body. The 0 instance picks e as being less than f.gfuthark'The root Futhark expression type. The g constructor contains a lore-specific operation. Do-loops, branches and function calls are special. Everything else is a simple m.hfuthark#A simple (non-recursive) operation.kfuthark'loop {a} = {v} (for i < n|while b) do bA. The merge parameters are divided into context and value part.mfutharkeA primitive operation that returns something of known size and does not itself contain any bindings.nfutharkA variable or constant.ofutharkSemantically 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).pfutharkArray literals, e.g., [ [1+x, 3], [2, 1+4] ]N. Second arg is the element type of the rows of the array. Scalar operationsqfutharkUnary operation.rfutharkBinary operation.sfuthark+Comparison - result type is always boolean.tfutharkConversion "casting".ufutharkmTurn a boolean into a certificate, halting the program with the given error message if the boolean is false.vfuthark5The certificates for bounds-checking are part of the .wfutharkQAn in-place update of the given array at the given position. Consumes the array.xfutharkconcat!0([1],[2, 3, 4]) = [1, 2, 3, 4]@.yfuthark:Copy the given array. The result will not alias anything.zfutharkgManifest 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.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. The two constructors are considered equal for purposes of 1.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.aIRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABCDEFGHIJKLMNOPQSRTUVWXYZ[\]^_`abcedfghijlkmnopqrstuwvxyz{|}~-./012347?=89:;<>@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfegjlihkmovqr{|ynstpuwxz}~ghqrmnopjlkcedf[\]^WXYZQSRDEFGmovqr{|ynstpuwxz}~f}gik~nqrshjlmoptuvwxyz{|\]^_`abcdeRSTUVWXYZ[gjlihkYabc]^_`Z[\dfeTUVWXSMNOPRQJKLMNOPDIEFGHABC@NonefutharkThe 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 .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 b of a parameter.futharkThe ` of a parameter.futharkAn W corresponding to a parameter.futharkAn W$ 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 Ws bound by the .futharkReturn a list of the context Ws bound by the .futharkReturn a list of the value Ws 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 b as the attribute.None=>?futhark:The class of lores whose annotations can be prettyprinted.futhark=Class for values that may have some prettyprinted annotation.IMMINonefutharkeThe 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=>?@ACHMVm 'futhark4A monad transformer that carries around an extended 2. Its .( method will first look in the extended 2, and then use the . 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 T*, is is the parameters (including index).+futhark,The class of monads that not only provide a 21, but also the ability to locally extend it. A 2 containing a 2- is the prototypical example of such a monad.,futharkRun a computation with an extended type environment. Note that this is intended to *add* to the current type environment, it does not replace it.-futharkThe class of applicative functors (or more common in practice: monads) that permit the lookup of variable types. A default method for .L exists, which is sufficient (if not always maximally efficient, and using 3 to fail) when 0 is defined..futharkUReturn the type of the given variable, or fail if it is not in the type environment./futharkUReturn the info of the given variable, or fail if it is not in the type environment.0futharkBReturn the type environment contained in the applicative functor.1futharkEReturn the result of applying some function to the type environment.2futharkIA scope is a mapping from variable names to information about that name.3futhark!How some name in scope was bound.=futharkJIf two scopes are really the same, then you can convert one to the other.?futhark3Run a computation in the extended type environment.'()*+,-./1023456789:;<=>?-./1034567+,2)*8;<9:(=>'?Noneb VfutharkExpress a monad expression on a syntax node. Each element of this structure expresses the action to be performed on a given child.afutharkExpress a monad mapping operation on a syntax node. Each element of this structure expresses the operation to be performed on a given child.dfutharkLMost bodies are enclosed in a scope, which is passed along for convenience.lfuthark/A mapper that simply returns the tree verbatim.mfutharkMap across the bindings of a .nfutharkXMap 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.qfutharkLike q , but in the 4 monad.sfutharkA no-op traversal.tfutharkAs  walkBodyM, but for expressions.ufutharkAs u, but runs in the 4 monad.. VWXYZ[\]^_`abcdefghijklmnopqrstu abcdefghijklmnqrpoVWXYZ[\]^_`stuNone=>? vfutharkEither return precomputed free names stored in the attribute, or the freshly computed names. Relies on lazy evaluation to avoid the work.xfutharkZA class indicating that we can obtain free variable information from values of this type.zfutharkReturn 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.Cvwxyz{|}~xyCz{|}~vwNone =>?@AHV< 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.,-./01234'()*+,-./1023456789:;<=>?  NoneAfuthark_A primitive expression parametrised over the representation of free variables. Note that the 5, 6, and 7< instances perform automatic (but simple) constant folding.futharkPerform quick and dirty constant folding on the top level of a PrimExp. This is necessary because we want to consider e.g. equality modulo constant folding.futharkLifted logical conjunction.futharkLifted logical conjunction.futharkJLifted relational operators; assuming signed numbers in case of integers.futharkJLifted relational operators; assuming signed numbers in case of integers.futharkJLifted relational operators; assuming signed numbers in case of integers.futharkJLifted relational operators; assuming signed numbers in case of integers.futharkJLifted relational operators; assuming signed numbers in case of integers.futharkLifted bitwise operators.futharkLifted bitwise operators.futharkLifted bitwise operators.futhark Evaluate a  in the given monad. Invokes 8 on type errors.futhark!The type of values returned by a 4. This function returning does not imply that the  is type-correct.9futhark/Is the expression a constant zero of some sort?:futhark.Is the expression a constant one of some sort?futhark If the given { is a constant of the wrong integer type, coerce it to the given integer type. This is a workaround for an issue in the 7 instance.futharkBoolean-valued PrimExps.futharkBoolean-valued PrimExps.RSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{|3244444!None,=>?futhark: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:zfutharkA 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 0O 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=?0 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  for the name template.futharkProduce a fresh ID*, using the given base name as a template.futharkAs , but takes 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 W%, using the given name as a template.futharkProduce a fresh W, using the given W1 as a template, but possibly modifying the name.futharkProduce several WAs, using the given name as a template, based on a list of types. futharkProduce a fresh M%, using the given name as a template. futharkProduce a fresh M, using the given M1 as a template, but possibly modifying the name.    $None,=>?Vfuthark.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.;futharkLProduce 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.<futhark"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,=>?HVsN;futharkNLore-specific attributes; also means the lore supports some basic facilities.<futharkpGiven a pattern, construct the type of a body that would match it. An implementation for many lores would be M.=futharkA type class for operations.>futharkLike D, but for arbitrary ops.?futhark,Should we try to hoist this out of branches?@futharkisBuiltInFunction k is . if k is an element of A.Afuthark0A map of all built-in functions and their types.Bfuthark;Find the function of the given name in the Futhark program.CfutharkIf the expression is a m, return that m , otherwise .DfutharkAn 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.Efuthark"Return the variable names used in S* subexpressions. May contain duplicates.FfutharkIf the m is a S return the variable name.Gfuthark>Return the variable dimension sizes. May contain duplicates.HfutharkDoes 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.IfutharkHow 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).JfutharkA  with empty T.Kfuthark-The certificates associated with a statement.Lfuthark Add certificates to a statement.MfutharkAConstruct the type of an expression that would match the pattern.Nfuthark2Create a pattern corresponding to some parameters.C     -./01234'()*+,-./1023456789:;<=>?vwxyz{|}~;<=>?@ABCDEFGHIJKLMN@ABCDEFGHIJKLMN=>?;<&None=>?HVxxWfuthark*Something that contains alias information.Xfuthark"The alias of the argument element.PQRSTUVWXYZ[\]^_`abc\]^_cYZ[WX`abTUVPQRSNoneyN;IMRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABCDEFGHIJKLMNOPQSRTUVWXYZ[\]^_`abcedfghijlkmnopqrstuwvxyz{|}~     -./012347?=89:;<>@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfegjlihkmovqr{|ynstpuwxz}~'()*+,-./1023456789:;<=>?VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~;<=>?@ABCDEFGHIJKLMN'Nonelm8ofuthark5Expand the usage table based on aliasing information.sfutharkfHas the given name been used directly (i.e. could we rename it or remove it without anyone noticing?)=futharkVCheck whether the bits that are set in the first argument are also set in the second.>futharkx - y, but for Usages.hijklmnopqrstuvwxyijklmpnoqrstuvwxhy(None>)None&',futhark8Convert a binding from one lore to another, if possible.*None>Mp  +None>futharkA 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.?futharkl"Smart constructor" that checks whether we are subtracting zero, and if so just returns the first argument.RSTUVWXYZ[\]^_`abcdef}gik~hjlmoptuvwxyz{|ϥRSTUVWXYZ[\]^_`abcdef}gik~hjlmoptuvwxyz{|-None=?_@futharkOenvironment recording the position and a list of variable-to-range bindings.Afuthark[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.Bfuthark1Binds 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.Cfuthark!The range of a scalar expression.futhark,Ranges of the value parts of the expression./None =>?HVXȹfuthark&The lore for the basic representation.`IMRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABCDEFGHIJKLMNOPQSRTUVWXYZ[\]^_`abcedfghijlkmnopqrstuwvxyz{|}~     -./012347?=89:;<>@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfegjlihkmovqr{|ynstpuwxz}~'()*+,-./1023456789:;<=>?VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~;<=>?@ABCDEFGHIJKLMN 0None>ԁ&futharkkPerform variable range analysis on the given program, returning a program with embedded range annotations.%&'()*+&+%)*'(1None>Mh,futharkA compiler pass transforming a A of a given lore to a A 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 5./futharkQA slightly longer description, which will show up in the command-line help text.1futhark"The monad in which passes execute.2futhark Execute a 1L action, yielding logging information and either an error text or a result.3futharkTurn an D computation into a 1 . If the D is E, the result is a .4futharkTurn an D monadic computation into a 1 . If the D is E, the result is an exception.5futharkWTake the name of the pass, turn spaces into dashes, and make all characters lowercase. ,-./0123456 1234,-./0562None>HV=futharkA 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.FfutharkThe 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 =F instance, it is acceptable for them to create new bindings, however.Sfuthark1Add several bindings at the outermost level of a .Tfuthark1Add a single binding at the outermost level of a .,  =>?@ABCDEFGHIJKLMNOPQRSTFGHIJN=>?@ABCDEKSTLMOPQR3None ,=>?@AHMV`futharkLike _@, but throw away the result and just return the added bindings.afutharkAs _ , but uses B8 to add the returned bindings to the surrounding monad.=  =>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdeV^WXYZ[\]U_`abcde4None=>?HVTtfuthark'The aliases of what is returned by the %, and what is consumed inside of it.ufuthark&Everything consumed in the expression.vfuthark&The aliases of the let-bound variable.wfutharkA wrapper around C) to get around the fact that we need an 0 instance, which C does not have.zfuthark&The lore for the basic representation.futharkIEverything consumed in the given bindings and result (even transitively).fIMRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABCDEFGHIJKLMNOPQSRTUVWXYZ[\]^_`abcedfghijlkmnopqrstuwvxyz{|}~     -./012347?=89:;<>@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfegjlihkmovqr{|ynstpuwxz}~'()*+,-./1023456789:;<=>?VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~;<=>?@ABCDEFGHIJKLMNPQRSTUVWXYZ[\]^_`abcstuvwxyz{|}~zwxyvut|}~{s5None>`futhark,Perform alias analysis on a Futhark program.6None=>?HV FfutharkWisdom 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 =.futharkAs  , but an Z can be given.futharkNote: unsigned division.futhark Construct an v3 expressions that slices an array with unit stride.futhark Construct an vO expressions that splits an array in different parts along the outer dimension.futhark.Are these indexes out-of-bounds for the array?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 ms.futharkfullSlice t slice returns slice , but with K?s of entire dimensions appended to the full dimensionality of tP. This function is used to turn incomplete indexing complete, as required by v.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 KQs 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 B.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 mls. You should call this function within some monad that allows you to collect the actions performed (say, G).futhark!Can be used as the definition of J for a F& instance for simple representations.n  =>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde18None 8=>?@AHMVXN futhark,The class of lores that can be type-checked.futhark$The type checker runs in this monad.HfutharkThe 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.IfutharkThe I data structure is used to keep track of which variables have been consumed, as well as whether a violation has been detected.JfutharkCA tuple of a return type and a list of parameters, possibly named.futhark A type error.futhark6Information about an error during type checking. The K? 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 ,.LfutharkbMark a name as bound. If the name has been bound previously in the program, report a type error.MfutharkjProclaim that we have made read-only use of the given variable. No-op unless the variable is array-typed./futhark5Proclaim that we have written to the given variables.1futharkPermit 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.NfutharkfGiven the immediate aliases, compute the full transitive alias set (including the immediate aliases).OfutharkcheckAnnotation loc s t1 t2 checks if t2 is equal to t1 . If not, a ' is raised.5futhark require ts se* causes a '(TypeError vn)' if the type of se* is not a subtype of one of the types in ts.6futhark Variant of 5 working on variable names.7futharkType check a program containing arbitrary type information, yielding either a type error or a program with complete type information.HfutharkRemove all aliases from the P.C     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLC7 !"#$%&'()*+,-.    340:56L;?<CABDEFGHIJ@K98>=/129None>MRifutharkkIf Verbose, print log messages to standard error. If VeryVerbose, also print logs from individual passes.#^_`abcdefghijklmnopqr^_`abcdefghmijklnqrop:None>VfutharkReshape 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.  ;None^Dfuthark 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 ms.futharkConvert ms of a given type.futhark-Applying a transformation to the leaves in a .futhark3Substituting names in a PrimExp with other PrimExpsRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{|<Nonefuthark8ignoring permutations, is the index function contiguous?Qfuthark.monotonously increasing, decreasing or unknownRfutharkLMAD's representation consists of a permutation, a general offset, and, for each dimension a stride, rotate factor, number of elements, permutation, and monotonicity 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.LMAD algebra is closed under composition w.r.t. operators such as permute, repeat, index and slice. However, other operations, such as reshape, cannot always be represented inside the LMAD algebra.It follows that the general representation of an index function is a list of LMADS, in which each following LMAD in the list implicitly corresponds to an irregular reshaping operation.dHowever, 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??By definition, the LMAD denotes the set of points (simplified):!{ o + Sigma_{j=0}^{k} ((i_j+r_j)  : n_j)*s_j, forall i_j such that 0<=i_j<n_j, j=1..k }Sfuthark,Substitute a name with a PrimExp in an LMAD.futhark6Substitute a name with a PrimExp in an index function.futharkIs this is a row-major array?futhark7Does the index function have contiguous memory support?Tfuthark6Does the index function have an ascending permutation?futharkShape of an index function.UfutharkShape of an LMAD.Vfuthark(Shape of an LMAD, ignoring permutations.futhark1Compute the flat memory index for a complete set inds. of array indices and a certain element size  elem_size.futharkiota.futharkPermute dimensions.futharkRepeat dimensions.futharkRotate an index function.Wfuthark<Handle the case where a slice can stay within a single LMAD.futharkSlice an index function.XfutharkBHandle the simple case where all reshape dimensions are coercions.YfutharkHHandle the case where a reshape operation can stay inside a single LMAD.uThere are four conditions that all must hold for the result of a reshape operation to remain in the one-LMAD domain: ythe permutation of the underlying LMAD must leave unchanged the LMAD dimensions that were *not* reshape coercions.~the repetition of dimensions of the underlying LMAD must refer only to the coerced-dimensions of the reshape operation.qsimilarly, the rotated dimensions must refer only to dimensions that are coerced by the reshape operation.>finally, the underlying memory is contiguous (and monotonous).If any of these conditions do not hold, then the reshape operation will conservatively add a new LMAD to the list, leading to a representation that provides less opportunities for further analysis.futharkReshape an index function.ZfutharkHandle the case where a rebase operation can stay within m + n - 1 LMADs, where m is the number of LMADs in the index function, and n is the number of LMADs in the new base. If both index function have only on LMAD, this means that we stay within the single-LMAD domain.yWe can often stay in that domain if the original ixfun is essentially a slice, e.g. `x[i, (k1,m,s1), (k2,n,s2)] = orig`.,XXX: TODO: handle repetitions in both lmads.2How to handle repeated dimensions in the original?(a) Shave them off of the last lmad of original (b) Compose the result from (a) with the first lmad of the new base (c) apply a repeat operation on the result of (b).However, I strongly suspect that for in-place update what we need is actually the INVERSE of the rebase function, i.e., given an index function new-base and another one orig, compute the index function ixfun0 such that:Onew-base == rebase ixfun0 ixfun, or equivalently: new-base == ixfun o ixfun0because then I can go bottom up and compose with ixfun0 all the index functions corresponding to the memory block associated with ixfun.futhark.Rebase an index function on top of a new base.futharkMOffset index. Results in the index function corresponding to indexing with i on the outermost dimension.futharkiStride index. 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 linearWithOffsetI except for transpositions, which are returned together with the offset.[futhark8Generalised iota with user-specified offset and strides.\futhark(Check monotonicity of an index function.=None,>HV ]futhark#Index a delayed array, if possible.^futharkTrue if consumed._futhark#Index a delayed array, if possible.`futharkTrue if consumed.afuthark%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).futhark!In symbol table and not consumed.bfutharkmUpdating the ranges of all symbols whenever we enter a branch is presently too expensive, and disabled here.cfuthark]Refines the ranges in the symbol table with ranges extracted from branch conditions. cond# is the condition of the if-branch.//>None ,=>?HV futharkLike a, 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 m. 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/     /     ?None>HV49futharkTurns 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 Ws for the result of the map.Only handles a  with an empty :futharkLike 9 , but for Scanomap.;futharkTurn 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."RSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{|  =>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde89:;<=>?89:;<=?>@None>HV>@ABBA@ANone=?HVzOfuthark&The lore for the basic representation.kIMRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABCDEFGHIJKLMNOPQSRTUVWXYZ[\]^_`abcedfghijlkmnopqrstuwvxyz{|}~     -./012347?89:;<>ABCEFGHIJKLMNOPTUVWXZ[\]^_`abcdfeghjlikovqr{|ynstpuwxz}~'()*+,-./1023456789:;<=>?VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~;<=>?@ABCDEFGHIJKLMN     CDEFGHIJKLMNOkONKJIMLHGFEDCIRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABCDFGHIJKLMNOPQSRTUVWXYZ[\]^_`abcedfghijlkmnopqrstuwvxyz{|}~-./012347?89:;<>ACEFGHIJLMNOPTVWXZ[\]^_`abcdfegjlikovqr{|ynstpuwxz}~TUDEABghJKMNBNone,>HVnWfuthark]The constraints that a monad must uphold in order to be used for first-order transformation.ZfutharkFirst transform any nested K or H elements, then apply [ if the expression is a SOAC.[futharkTransform a single [ into a do-loop. The body of the lambda is untouched, and may or may not contain further s depending on the given lore.\futhark+Recursively first-order-transform a lambda.]futhark_Turn a Haskell-style mapAccumL into a sequential do-loop. This is the guts of transforming a Redomap.WXYZ[\]^XWZ\[Y]^CNone>HV_futhark1Interchange Scan With Inner Map. Tries to turn a  scan(map) into a @map(scan)`futhark3Interchange Reduce With Inner Map. Tries to turn a  reduce(map) into a @map(reduce)_`a_`aDNoneM<bcdbcdNone =?@AHMVufutharkYA mapping from external variable names to the corresponding internalised subexpressions.wfutharkuExtra 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 s/ is true, otherwise just return an empty list.futharkExecute the given action if s/ is true, otherwise just return an empty list.;lRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{|  =>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde89:;<=>?mnopqrstuvwxyz{|}~oylupqrstxwvz{}|~mnENonefutharkThe 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.dfutharkbuildCallGraph ftable cg fname updates Call Graph cg% with the contributions of function fname=, and recursively, with the contributions of the callees of fname.FNone>efuthark"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.GNone ,1=>?@AHV?Mfuthark!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.HNone,1=>?@AHVXWfuthark=A host-level operation; parameterised by what else it can do.futhark'Produce some runtime-configurable size.futharkThe maximum size of some class.futhark8Compare size (likely a threshold) with some Int32 value.futharkThe arbitrary operation.futharkLike V, but just for  s.futharkLike a, 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 futharksThe KernelSpace must always have at least two dimensions, implying that the result of a SegRed is always an array. futharkIn case this operator is semantically a vectorised operator (corresponding to a perfect map nest in the SOACS representation), these are the logical "dimensions". This is used to generate more efficient code. 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.K"                           ! " #K                      " ! "     #INone=?HVZIMRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABCDEFGHIJKLMNOPQSRTUVWXYZ[\]^_`abcedfghijlkmnopqrstuwvxyz{|}~     -./012347?=89:;<>@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfegjlihkmovqr{|ynstpuwxz}~ !"'()*+,-./1023456789:;<=>?VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~;<=>?@ABCDEFGHIJKLMN                           ! " # i j j iJNone>HVjffuthark=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. y z y zKNonek  { {LNone,>HVk | } ~   } | ~  MNone>HVsxgfutharkInt32hfutharkInt32ifutharkInt64jfutharkInt64kfutharkInt32 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.  NNone>HVt~  ONone =>?@AHPV_ lfuthark"Description of distribution to do.mfuthark*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.nfutharkiFirst pair element is the very innermost ("current") nest. In the list, the outermost nest comes first.ofutharkBoth 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.' ' PNone>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.  QNone>HV  RNone>HVD futharkFExpects a kernel statement as argument. CONDITIONS for 3D tiling optimization to fire are: 1. a) The kernel body can be broken into scalar-code-1 ++ [GroupStream stmt] ++ scalar-code-2. b) The kernels has a "ThreadsReturn ThreadsInSpace" result, and obviously the result is variant to the 3rd dimension (counter from innermost to outermost) 2. For the GroupStream (morally StreamSeq): a) the arrays' outersize must equal the maximal chunk size b) the streamed arrays are one dimensional c) each of the array arguments of GroupStream are variant to exactly one of the three innermost-parallel dimension of the kernel. This condition can be relaxed by interchanging kernel dimensions whenever possible. 3. For scalar-code-1: a) each of the statements is a slice that produces one of the streamed arrays 4. For simplicity assume scalar-code-2 is empty! (To be extended later.) ASSUME the initial kernel is (as in tests reg-tilingreg-tiling-3d.fut):Akernel map(num groups: num_groups, group size: group_size, num threads: num_threads, global TID -> global_tid, local TID -> local_tid, group ID -> group_id) (gtid_z < size_z, gtid_y < size_xy, gtid_x < size_xy) : {f32} { let {[size_com]f32 flags} =  empty_or_match_cert_6685fss_6664[gtid_z, 0i32:+size_com*1i32] let {[size_com]f32 ass} = ass_6662[gtid_y, 0i32:+size_com*1i32] let {[size_com]f32 bss} = res_6687[gtid_x, 0i32:+size_com*1i32] let {f32 res_ker} = stream(size_com, size_com, fn (int chunk_size_out, int chunk_offset_6736, f32 acc_out, [chunk_size_out]f32 flags_chunk_out, [chunk_size_out]f32 ass_chunk_out, [chunk_size_out]f32 bss_chunk_out) => let {f32 res_out} = stream(chunk_size_out, 1i32, fn (int chunk_size_in, int i_6743, f32 acc_in, [chunk_size_in]f32 flags_chunk_in, [chunk_size_in]f32 ass_chunk_in, [chunk_size_in]f32 bss_chunk_in) => let {f32 f} = flags_chunk_in[0i32] let {f32 a} = ass_chunk_in[0i32] let {f32 b} = bss_chunk_in[0i32] let {bool cond} = lt32(f, 9.0f32) let {f32 tmp} = if cond then { let {f32 tmp1} = fmul32(a, b) in {tmp1} } else {0.0f32} let {f32 res_in} = fadd32(acc_in, tmp) in {res_in}, {acc_out}, flags_chunk_out, ass_chunk_out, bss_chunk_out) in {res_out}, {0.0f32}, flags, ass, bss) return {thread in space returns res_ker} }pfutharkClone the variant statements, by creating a new if-then-else big statement that cheks that `mm + i < m_M` for `i = 0...regTile-1` Return the if-then-else statement together with the result variables so that the body of the loop and the loop results and paramters can be constructed. In order to disallow hoisting from the loop we will generate: let zero = mask & loop_ind let mmpi = zero + mm + iqfutharkArguments are: 1. mmH this is the length of z-parallel dimension divided by reg_tile 2. space: the kernel space 3.  strm_res_nms7: the z-variant results of the original stream 4.  keres_patels: the kernel result names tupled with the corresponding pattern elements of the kernel statement. 5.  code2_varA: the z-variant statements of the code after the stream. 6.  ip_arr_nmsB: the "current" new names for the in-place update arrays.  unroll_code): the current unrolled code. Both form a r accumulator. 7. k% the "current" clone number;  loop_res_nms the names of the loop result corresponding to the current clone. Result: 1. the new name for the current in-place update result, 2. a new if-statement is added to the unrolled-code accumulator which actually perform the in-place update.sfutharkInsert the necessary translations for a statement that is indexing in one of the streamed arrays, which is invariant to the z-parallel dimension. The index is necessarily `0` at this point, and we use tabv to figure out to what global array does the streamed array actually refers to, and to compute the global index.tfutharkInsert the necessary translations for a statement that is indexing inside one of the streamed arrays, which is variant to the outermost parallel dimension.ufuthark!translates an LParam to an FParamvfutharkiTries to identified the following pattern: code folowed by a group stream followed by another code.wfuthark<Checks that all streamed arrays are variant to exacly one of the three innermost parallel dimensions, and conversly for each of the three innermost parallel dimensions, there is at least one streamed array variant to it. The result is the the number of the only variant parallel dimension for each array.  SNone>HV9xfutharkRThe 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>HVc futharkName of result. futharkType of result. UNone ,=>?@AHMVo futhark>Apply the in-place lowering optimisation to the given program.  VNone>HVc 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>HMVP futhark2A collection of both top-down and bottom-up rules.yfuthark A collection of bottom-up rules.zfutharkA 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>HPSVX,futharkKA 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.. GfutharkSimplify 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?K       ! " # $ % & ' ) ( * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M4  4 5 ! " # $ % & 3 ' ) ( 2 * + , - . / 0 > 1  @ E A ? B F 6 7 8    H M J K L I : ; < 9 G  D C =[None>D cfuthark Simplify a $, including copy propagation. If a  refers to a name that is a R, the node turns into a . dfutharkLike  c, but where leaves may be us. c d c d\None ,=>?@AHVnD efuthark_The memory return of a function, which must always indicate where returned arrays are located. ffutharkTThe return of a body, which must always indicate where returned arrays are located. gfutharkAThe 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 ).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. hfutharkSA description of the memory properties of an array being returned by an operation. ifutharkAThe array is located in a memory block that is already in scope. jfutharkTThe operation returns a new (existential) block, with an existential or known size. kfuthark?Memory information for an array bound somewhere in the program. lfuthark7Located in this memory block with this index function. nfutharkA summary of the memory information for every let-bound identifier, function parameter, and return value. Parameterisered over uniqueness, dimension, and auxiliary array information. ofutharkA primitive value. pfutharkA memory block. qfutharkThe 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. rfuthark9An index function that may contain existential variables. sfuthark>The index function representation used for memory annotations. ufuthark`Allocate a memory block. This really should not be an expression, but what are you gonna do... yfuthark.A lore containing explicit memory information.futhark/Helper function for index function unification.0The first return value maps a VName (wrapped in w) to its Int (wrapped in uH). In case of duplicates, it is mapped to the *first* Int that occurs.5The second return value maps each Int (wrapped in an u) to a  u: with the Int at which its associated VName first occurs. futhark{The return information of an expression. This can be seen as the "return type with memory annotations" of the expression. futharkZIs an array of the given shape stored fully flat row-major with the given index function?IMRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABCDEFGHIJKLMNOPQSRTUVWXYZ[\]^_`abcedfghijlkmnopqrstuwvxyz{|}~     -./012347?=89:;<>@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfegjlihkmovqr{|ynstpuwxz}~"'()*+,-./1023456789:;<=>?VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~;<=>?@ABCDEFGHIJKLMN                           ! " # e f g h i j k l m n o p q r s t u v w x y z { | } ~  " y x t u v n o p q m k l h i j s r z g f e | } w ~  {]None,8=>?@AHMPVfuthark1Monad 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 ,=>?@AHMVXfutharkQThe 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=>?@A futharkThe operations that permit CSE.futhark*Perform CSE within any nested expressions. futhark+Perform CSE on every function in a program.  `None,>{ 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 T. futharkSimplify a list of s.   ! " # $ % & * 1 3     ! " # $ % &  3 1  * aNone,> futharkRun copy propagation.  bNone =>?@AHV7futhark]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.        cNone=>?@AHMSVX_u 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.  dNone ,=>?@AHV  ! "  ! "eNone ,=>?@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. + , + ,fNone>W - . / 0 - . / 0gNone>HMVfuthark:A map from memory block names to new index function bases.futharkExtract allocations from Thread statements with . 1 1hNone 8futharkThe assertion-resolver pass. 8 8iNone=?HV- 9futhark8The 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  I list is applied first. Bfuthark0A view of the last transformation to be applied. Efuthark1A view of the first transformation to be applied. Hfuthark:A sequence of array transformations, heavily inspired by Data.Seq. You can decompose it using viewF and viewL, and grow it by using  T and  U. 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. IfutharkVA single, simple transformation. If you want several, don't just create a list, use  H instead. Jfuthark*A permutation of an otherwise valid input. Kfuthark(A reshaping of an otherwise valid input. Lfuthark#A reshaping of the outer dimension. Mfuthark2A reshaping of everything but the outer dimension. Nfuthark2Replicate the rows of the array a number of times. OfutharkThe empty transformation list. Pfuthark#Is it an empty transformation list? Qfuthark>A transformation list containing just a single transformation. Rfuthark7Decompose the input-end of the transformation sequence. Sfuthark8Decompose the output-end of the transformation sequence. Tfuthark6Add a transform to the end of the transformation list. Ufuthark<Add a transform at the beginning of the transformation list. VfutharkGiven an expression, determine whether the expression represents an input transformation of an array variable. If so, return the variable and the transformation. Only  J and  K# are possible to express this way. Wfuthark<Create a plain array variable input with no transformations. XfutharkECreate a plain array variable input with no transformations, from an W. YfutharkWIf the given input is a plain variable input, with no transforms, return the variable. ZfutharkcIf the given input is a plain variable input, with no non-vacuous transforms, return the variable. [futhark;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. afutharkNReturn the array rank (dimensionality) of an input. Just a convenient alias. bfuthark4Apply the transformations to every row of the input. cfutharkAdd to the input a  J transform that performs an (k,n)[ transposition. The new transform will be at the end of the current transformation list. dfuthark"Returns the inputs used in a SOAC. efutharkSet the inputs to a SOAC. ffuthark The lambda used in a given SOAC. gfuthark Set the lambda used in the SOAC. hfutharkThe return type of a SOAC. ifutharkuThe "width" of a SOAC is the expected outer size of its array inputs _after_ input-transforms have been carried out. jfuthark/Convert a SOAC to the corresponding expression. kfuthark'Convert a SOAC to a Futhark-level SOAC. lfutharkEither convert an expression to the normalised SOAC representation, or a reason why the expression does not have the valid form. mfutharkqTo-Stream translation of SOACs. Returns the Stream SOAC and the extra-accumulator body-result ident if any.7 9 : ; < = ? > @ A B D C E G F H I J K N L M O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m7 ; < = ? > d e f g h i 9 : l j k @ A W X Y Z [ \ ] ^ a _ ` b c H O Q P T U R E G F S B D C I J K N L M V mjNone 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.  kNone>HPV =  lNone>HVh futhark/the SOAC expression, e.g., mapT( f(a,b), x, y ) futharkVariables 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. futhark-whether at least a fusion has been performed. futharkThe 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 y expressions. futhark!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.  mNone %>@AHMVDfuthark)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 D" 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])'  nNone>DR  oNone=?MPl 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. futharkCreate an array containing the given values. The lifetime of the array will be the entire application. This is mostly used for constant arrays, but also for some bookkeeping data, like the synchronisation counts used to implement reduction. 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. futharkThe contents of a statically declared constant array. Such arrays are always unidimensional, and reshaped if necessary in the code that uses them. futharkPrecisely these values. futharkThis many zeroes. 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.IRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABijlk         ]     jlki  AB>?@     pNones ?futharkSet all uses of k0 in the given functions to another memory space. ? ?qNone ,=>?@AHMV_\ Afuthark)The symbol table used during compilation.futhark=Do not actually generate allocations for these memory spaces. Dfuthark&Name of the function we are compiling.futharkThe  U is # if a copy if required. If it is P, 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. Ffuthark;Every non-scalar variable must be associated with an entry. Ufuthark3When an array is dared, this is where it is stored. afutharkHow to compile an Y. bfutharkHow to compile some . cfutharkHow to compile an g. dfutharkDAn operations set for which the expression compiler always returns  CompileExp. hfutharkGExecute a code generation action, returning the code that was emitted. ifutharkHExecute a code generation action, wrapping the generated code within a   with the given description. jfuthark$Emit some generated imperative code. kfuthark&Emit a function in the generated code. lfuthark+Check if a function of a given name exists.futhark+Note: a hack to be used only for functions.futharkLike  daringFParamsT, but does not create new declarations. Note: a hack to be used only for functions.futhark Another hack.futharkRemove the array targets. futharkGet the current symbol table. futharkwRun an action with a modified symbol table. All changes to the symbol table will be reverted once the action is done!futharkUse an   if possible, otherwise  .futharkGCopy from here to there; both destination and source may be indexeded. futharkLike  , but the target is a  E instead of a variable name. futharkCopy from here to there; both destination and source be indexeded. If so, they better be arrays of enough dimensions. This function will generally just Do What I Mean, and Do The Right Thing. Both destination and source must be in scope. futharkcompileAlloc pat size space allocates n bytes of memory in space, writing the result to dest, which must be a single , futhark Uses linear/iota index function. futhark Uses linear/iota index function. futhark ASsignment. `futhark%Number of row elements of the source.d  @ A B C D E F H G 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 { | } ~  d m c a ` b Z [ \ ] ^ _ d E e U V W X Y M N O P J K L @ B C D A g f j k l h i F H G I Q R S T  ~ } n o p r q s t  v u z { | x w y  3rNone] futhark8Phantom type for identifying sequential imperative code. futharkA piece of imperative code. futharkAn imperative function. futharkAn imperative program.IRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABijlk          IRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABijlk         sNoneHV  tNone] futhark8The target platform when compiling imperative code to a  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.8IRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABijlk !"         3 IRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABijlk         uNone> futhark2A generic kernel containing arbitrary kernel code./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. futharkSA short descriptive and _unique_ name - should be alphanumeric and without spaces. 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. futhark:Get an atomic operator corresponding to a binary operator.QIRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABijlk !"                L       IRSTUVWXYZ[\]^_`abcdef}gik~nqrshjlmoptuvwxyz{| !"#$%&>?@ABijlk          vNone futhark1Which form of transposition to generate code for. futhark6For small arrays that do not benefit from coalescing. !futharksGenerate a transpose kernel. There is special support to handle input arrays with low width, low height, or both.Normally when transposing a [2][n] array we would use a FUT_BLOCK_DIM x FUT_BLOCK_DIM group to process a [2][FUT_BLOCK_DIM]- slice of the input array. This would mean that many of the threads in a group would be inactive. We try to remedy this by using a special kernel that will process a larger part of the input, by using more complex indexing. In our example, we could use all threads in a group if we are processing (2/FUT_BLOCK_DIM)8 as large a slice of each rows per group. The variable mulxM contains this factor for the kernel to handle input arrays with low height.*See issue #308 on GitHub for more details.+These kernels are optimized to ensure all global reads and writes are coalesced, and to avoid bank conflicts in shared memory. Each thread group transposes a 2D tile of block_dim*2 by block_dim*2 elements. The size of a thread group is block_dim/2 by block_dim*2, meaning that each thread will process 4 elements in a 2D tile. The shared memory array containing the 2D tile consists of block_dim*2 by block_dim*2+1 elements. Padding each row with an additional element prevents bank conflicts from occuring when the tile is accessed column-wise.Note that input_size and output_size may not equal width*height if we are dealing with a truncated array - this happens sometimes for coalescing optimisations.      ! "      ! "wNone>HV_  &futhark\A function for generating code for an atomic update. Assumes that the bucket is in-bounds. 'futhark+Locking strategy used for an atomic update. )futharkArray containing the lock. *futhark'Value for us to consider the lock free. +futharkWhat to write when we lock it. ,futhark What to write when we unlock it. -futharkA transformation from the logical lock index to the physical position in the array. This can also be used to make the lock array smaller. <futhark9Chunk sizes and their maximum size. Hint for unrolling.futhark\We have no bulk copy operation (e.g. memmove) inside kernels, so turn any copy into a loop. Bfuthark AN, but where it is explicitly visible whether a locking strategy is necessary.futhark<Horizontally fission a lambda that models a binary operator.futharkOnly some constant expressions qualify 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. Ifuthark 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 dared as variables in the kernel). Ofuthark"Perform a Replicate with a kernel. PfutharkPerform an Iota with a kernel., & ' ( ) * + , - . / 8 7 6 0 1 2 3 4 5 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q, . / 8 7 6 0 1 2 3 4 5 9 : ; < ? C @ > = D F E G I J M K L H N O P Q A B ' ( ) * + , - &xNone>HV pfutharkFor many kernels, we may not have enough physical groups to cover the logical iteration space. Some groups thus have to perform double duty; we put an outer loop to accomplish this. The advantage over just launching a bazillion threads is that the cost of memory expansion should be proportional to the number of *physical* threads (hardware parallelism), not the amount of application parallelism. RfutharkCompile  < instance to host-level code with calls to various kernels. SfutharkLike  R), but where the body is a monadic action. R S R SyNone>HV  T TzNone,>HVX \ U U{None>  V W X Y Z V Y Z W X|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. afutharktupleFieldExp e i& is the expression for accesing field i of tuple e. If e4 is an lvalue, so will the resulting expression be. bfuthark funName fF is the name of the C function corresponding to the Futhark function f. cfuthark6The type of memory blocks in the default memory space. [ \ ] ^ _ ` a b c d e f g h i _ ` a b c [ \ ] ^ d e h f i g}None=?MP @J jfutharkThe 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. mfutharkHUtility 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. futharkConstruct 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. futharkAs  , but ignores the public name. futhark*Public names must have a consitent prefix. futhark7The generated code must define a struct with this name.futhark5Return a statement printing the given external value. futhark(Produce header and implementation files. futhark*As executable with command-line interface. futhark~Compile imperative program to a C program. Always uses the function named "main" as entry point, so make sure it is defined. futharkTell 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 ] j k l m n o p q r s t u v w x y z { | } ~  H j k l m n o q r s t u v w x y z {  ~ | } p ] ~NoneP Cfuthark1Translate a kernels-program to an OpenCL-program.  None D  None D>  None D j k l m n o j k l m n o None E  None> Ex j k l m n o j k l m n o None F  NoneP F\ j k l m n o j k l m n o None HfutharkBoolean negation.futharkBitwise complement.futharkNumerical negation.futharkAbsolute/numerical value.PI !"#$%&   2    None Mfutharkrtspython 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.None Ufuthark&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_ j*futhark_The class generated by the code generator must have a constructor, although it can be vacuous.Afuthark0Unpack the array being passed to an entry point.Bfuthark>Construct the Python array being returned from an entry point.Cfuthark;Create a static array of values - initialised at load time.Dfuthark&Copy from one memory block to another.EfutharktAllocate a memory block of the given size in the given memory space, saving a reference in the given variable name.Ffuthark^Read a scalar from the given memory block with the given index and in the given memory space.Gfuthark]Write a scalar to the given memory block with the given index and in the given memory space.HfutharkNA substitute expression compiler, tried before the main compilation function.IfutharkqA set of operations that fail for every operation involving non-default memory spaces. Uses plain pointers and malloc for memory management.Ofuthark7A constructor that takes no arguments and does nothing.QfutharkA  B where the function is a variable and every argument is a simple  .Vfuthark#The ctypes type corresponding to a .Wfuthark#The ctypes type corresponding to a , taking sign into account.Xfuthark"The Numpy type corresponding to a .Yfuthark"The Numpy type corresponding to a , taking sign into account.3*+,-./2103465789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\3P*+ORS[\ZVWXY789:;<=>?@IT,-HGFEDCBA3465./210MNLKJQUNone lddNone> leeNoneO o futharkBoolean negation.futharkBitwise complement.futharkNumerical negation.futharkAbsolute/numerical value.I !"#$%&fghijklmnopqrsz}{uvytwx|~prsz}{uvytwx|~fgpqmnojklhiNone z 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_ futhark_The class generated by the code generator must have a constructor, although it can be vacuous.3futhark0Unpack the array being passed to an entry point.4futhark:Construct the C# array being returned from an entry point.5futhark;Create a static array of values - initialised at load time.6futhark&Copy from one memory block to another.7futharktAllocate a memory block of the given size in the given memory space, saving a reference in the given variable name.8futhark^Read a scalar from the given memory block with the given index and in the given memory space.9futhark]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.Hfuthark7A constructor that takes no arguments and does nothing.KfutharkA B where the function is a variable and every argument is a simple .LfutharkA B where the function is a variable and every argument is a simple .Mfuthark A CallMethod\futhark#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 .afuthark+Public names must have a consistent prefix.O #!"$%'&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abOIHJbOR_`^\]PQCF()*+,-./012;S:9876543$%'& #!"DE?@AB>=<KMNL[YZWXaTVUGNone wllNone mnomnoNone> ppNone TqfutharkFutlib embedded as  values, one for every file.qrqrNone1=>?@A DOsfutharkLThe program described by a single Futhark file. May depend on other files.wfutharkA top-level binding.futhark)The contents of another file as a module.futharkFunctor application.futharkA type refinement.futharkAbstract type.futhark%A type parameter that must be a size.futhark%A type parameter that must be a type.futhark,The liftedness of a type parameter. By the Ord instance, Unlifted is less than Lifted.futhark0May only be instantiated with a zero-order type.futhark)May be instantiated to a functional type.futharkType DeclarationsfutharkFunction Declarationsfuthark(True if this function is an entry point.futhark1Documentation strings, including source location.futharkOA pattern as used most places where variables are bound (function parameters, let expressions, etc).futharkWhether the loop is a for -loop or a while-loop.futharkA case in a match expression.futharkAn entry in a record literal.futhark The Futhark expression language.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 q ., and the type checker will convert these to Exp n H, in which type information is always present and all names are unique.futharkA polymorphic integral literal.futharkA polymorphic decimal literal.futharkA parenthesized expression.futharkTuple literals, e.g., {1+3, {x, y+z}}.futharkRecord literals, e.g.  {x=2,y=3,z}.futharkArray literals, e.g., [ [1+x, 3], [2, 1+4] ]7. Second arg is the row type of the rows of the array.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]).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.futharkAn enum element, e.g., #foo.futharkA match expression.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.3futhark~An unstructured type with type variables and possibly shape declarations - this is what the user types in the source program.<futhark_A "structural" type with shape annotations and no aliasing information, used for declarations.=futharkoA type with aliasing information and shape annotations, used for describing the type patterns and expressions.>futharkGAliasing for a type, which is a set of the variables that are aliased.?futharkA variable that is aliased. Can be still in-scope, or have gone out of scope and be free. In the latter case, it behaves more like an equivalence class. See uniqueness-error18.fut for an example of why this is necessary.FfutharkAn expanded Futhark type is either an array, a prim type, a tuple, or a type variable. When comparing types for equality with ,Y, aliases are ignored, but dimensions much match. Function parameter names are ignored.LfutharkAThe aliasing corresponds to the lexical closure of the function.Rfuthark+Types that can be elements of tuple-arrays.Ufuthark?A type name consists of qualifiers (for error messages) and a  (for equality checking).YfutharkAThe size of an array type is a list of its dimension sizes. If 3, 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.afuthark unifyDims x y combines x and yJ to contain their maximum common information, and fails if they conflict.dfutharkNon-array values.ifutharkLow-level primitive types.nfutharkSome information. The dual to qqfutharkUNo information functor. Usually used for placeholder type- or aliasing information.futharkConvenience class for deriving K instances for the AST.sfuthark.The number of dimensions contained in a shape.tfutharkstripDims n shape strips the outer n dimensions from shape , returning 3 if this would result in zero or fewer dimensions.ufutharkunifyShapes x y combines x and yJ to contain their maximum common information, and fails if they conflict.4I !"#$%&stuvwxyz{|}~      !"#$%&'*+(),-./0123456789:;<=>?@ABCDEFHILGJKMNOPQRSTUVWXYZ[\]^_`abcdghefimjklnopqrstuvwximjkl`a\]^_YZ[stuUVWXvwFHILGJKCDE3456789:;012RSTMNOPQ=<'*+(),-./dghefbc$%&      !"#xstuvwxyz{|}~qrnop?@AB>None=>? _ACfuthark8A case (of a match expression) with no type annotations.futhark+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 , 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 -.,futharkDReturn any shape declarations in the type, with duplicates removed.-futhark*Change the shape of a type to be just the Rank..futhark"Add size annotations that are all _./futhark"Change all size annotations to be _.futhark&Change the size annotations of a type.0futhark Return the uniqueness of a type.1futharkunique t is .' if the type of the argument is unique.2futharkEReturn the set of all variables mentioned in the aliasing of a type.3futharkdiet t< returns a description of how a function parameter of type t might consume its argument.4futhark`Convert any type to one that has rank information, no alias information, and no embedded names.5futhark(Remove aliasing information from a type.6futhark,Replace no aliasing with an empty alias set.7futhark 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.8futhark arrayOf t s uC constructs an array type. The convenience compared to using the I 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 = 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.Afuthark'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.BfutharktSet the uniqueness attribute of a type. If the type is a tuple, the uniqueness of its components will be modified.Cfutharkt `setAliases` als returns t , but with als/ substituted for any already present aliasing.Dfutharkt `addAliases` f returns t5, but with any already present aliasing replaced by f applied to that aliasing.futharkThe type of a basic value.Ffuthark Construct a Y7 with the given number of zero-information dimensions.GfutharkThe type is leaving a scope, so clean up any aliases that reference the bound variables, and turn any dimensions that name them into AnyDim instead.HfutharklThe type of an Futhark term. The aliasing will refer to itself, if the term is a non-tuple-typed variable.JfutharkExtract the parameter types and return type from a type. If the type is not an arrow type, the list of parameter types is empty.Kfuthark#The type names mentioned in a type.Lfuthark orderZero t is . 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.Mfuthark:Extract all the shape names that occur in a given pattern.Nfuthark7Extract all the shape names that occur in a given type.OfutharkpatternOrderZero pat is .8 if all of the types in the given pattern have order 0.Pfuthark*The set of identifiers bound in a pattern.Qfuthark(The type of values bound by the pattern.Rfuthark3The type of a pattern, including shape annotations.SfutharkIThe type matched by the pattern, including shape declarations if present.TfutharkeWhen viewed as a function parameter, does this pattern correspond to a named parameter of some type?UfutharkKRemove all shape annotations from a pattern, leaving them unnamed instead.VfutharkjNames of primitive types to types. This is only valid if no shadowing is going on, but useful for tools.WfutharkA map of all built-ins.XfutharkPThe largest tag used by an intrinsic - this can be used to determine whether a / refers to an intrinsic or a user-defined name.Yfuthark-Create a name with no qualifiers from a name.Zfuthark8Add 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.afutharkXGiven an operator name, return the operator that determines its syntactical properties.Oqr !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`aO$%&'()*WXVYZ[Ea\]^_`HPQSRTUOM0123+,LJIKNF7:8456CDB-./9;<=>?@AGqr#"! None=>? nbfutharkClass for type constructors that represent annotations. Used in the prettyprinter to either print the original AST, or the computed attribute.cfutharkkA class for types that are variable names in the Futhark source language. This is used instead of a mere  instance because in the compiler frontend we want to print VNames differently depending on whether the FUTHARK_COMPILER_DEBUGGING environment variable is set, yet in the backend we want to always print VNames with the tag. To avoid erroneously using the s instance for VNames, we in fact only define it inside the modules for the core language (as an orphan instance).ufutharkDepending on the environment variable FUTHARK_COMPILER_DEBUGGING, VNames are printed as either the name with an internal tag, or just the base name.IMabcdeIMacdebNoneF sCfutharkA lexical token. It does not itself contain position information, so in practice the parser will consume tokens tagged with a source position.futhark&A value tagged with a source location.futhark+Suffix a zero if the last character is dot.PNone=?FPh yfutharkA 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.futharkhParse either an expression or a declaration incrementally; favouring declarations in case of ambiguity. 9 9 None futhark/Parse an entire Futhark program from the given  , using the ' as the source name for error messages.futhark+Parse an Futhark expression from the given  , using the ' as the source name for error messages.futhark1Parse a Futhark module expression from the given  , using the ' as the source name for error messages.futhark%Parse an Futhark type from the given  , using the ' as the source name for error messages.futhark'Parse any Futhark value from the given  , using the ( as the source name for error messages.futharkEParse several Futhark values (separated by anything) from the given  , using the ( as the source name for error messages.XXNone futhark,A type-checked case (of a match expression).futhark5A known array element type with no shape annotations.futharkA type-checked type parameter.futhark(A known type arg with shape annotations.futhark)An Futhark program with type information.futharkA type-checked specification.futharkA type-checked declaration.futhark&A type-checked module type expression.futhark A type-checked module parameter.futhark!A type-checked module expression.futhark#A type-checked module type binding.futharkA type-checked module binding.futhark%A type binding with type information.futhark(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.IM !"#$%&stuvwxyz{|}~      !"#$%&'*+(),-./0123456789:;<=>?@ABCDEFHILGJKMNOPQRSTUVWXYZ[\]^_`abcdghefimjklnopqrstuvwx !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdeNone futhark6Modules 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 9futhark^A mapping from type parameters to the shapes of the value to which they were initially bound.futharkA TermValue with a ! 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.BfutharkKCreate 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).FfutharkPThe initial environment contains definitions of the various intrinsic functions.Jfuthark^Execute the named function on the given arguments; will fail horribly if these are ill-typed.0123456789:;<=>?@ABCDEFGHIJ0123567894FGHIJ>?@AE:;<=BDCNone>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.afutharkcHow many core language values are needed to represent one source language value of the given type?bfuthark7Convert an external primitive to an internal primitive.cfutharkCConvert an external primitive value to an internal primitive value. [\]^_`abc [\^_]`bacNone> kffuthark%A function for internalising lambdas.fghijkfghijkNoneM 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.futharkA static value stores additional information about the result of defunctionalization of an expression, aside from the residual expression.futharkThe .s are shape parameters that are bound by the .futharkeReturns the defunctionalization environment restricted to the given set of variable names and types.futharkRun a computation in the defunctionalization monad. Returns the result of the computation, a new name source, and a list of lifted function declations.futharkILooks up the associated static value for a given name in the environment.futharkDefunctionalization of an expression. Returns the residual expression and the associated static value in the defunctionalization monad.futharkSame as %, except it ignores the static value.futharkDefunctionalize the function argument to a SOAC by eta-expanding if necessary and then defunctionalizing the body of the introduced lambda.futhark8Defunctionalize an indexing of a single array dimension.futharkrDefunctionalize 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 P and a given application depth corresponds to a fully applied dynamic function.futharkConverts a dynamic function  into a list of dimensions, a list of parameters, a function body, and the appropriate static value for applying the function at the given depth of partial application.futharkConverts a pattern to an environment that binds the individual names of the pattern to their corresponding types wrapped in a  static value.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.futhark^Given a closure environment, construct a record pattern that binds the closed over variables.futharkzGiven 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.futhark8Compute the corresponding type for a given static value. futharkwConstruct the type for a fully-applied dynamic function from its static value and the original types of its arguments. futharkMatch a pattern with its static value. Returns an environment with the identifier components of the pattern mapped to the corresponding subcomponents of the static value. futharkGiven a pattern and the static value for the defunctionalized argument, update the pattern to reflect the changes in the types. futharkConvert a record (or tuple) type to a record static value. This is used for "unwrapping" tuples and records that are nested in  static values. futhark3Compute the set of free variables of an expression.futhark2Extract all the variable names bound in a pattern.futharkDefunctionalize a top-level value binding. Returns the transformed result as well as an environment that binds the name of the value binding to the static value of the transformed body. The boolean is true if the function is a .futhark1Defunctionalize a list of top-level declarations.lfutharkTransform a list of top-level value bindings. May produce new lifted function definitions, which are placed in front of the resulting list of declarations.llNone> futharksFlatten a pattern. Returns a list of identifiers. The structural type of each identifier is returned separately.vwxywxyvNone d z{|}~ z{|}~None !c futhark$Two values differ in some way. The K1 instance produces a human-readable explanation.futhark?The position the value number and a flat index into the array.futharkBA representation of the simple values we represent in this module.futhark/An efficiently represented Futhark value. Use I? to get a human-readable representation, and the instances of  and " 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.futhark_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.futharkAs  , but only reports one mismatch.None>P \S futhark/The result expected from a succesful execution.futharkThese values are expected.futharkNCompute expected values from executing a known-good reference implementation.futhark)How a test case is expected to terminate.futhark;Execution suceeds, with or without expected result values.futhark Execution fails with this error.futhark]Generate a value of the given rank and primitive type. Scalars are considered 0-ary arrays.futharkA fixed non-randomised integer.futhark\Several Values - either literally, or by reference to a file, or to be generated on demand.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.futhark'The error expected for a negative test.futhark/Input and output pairs for some entry point(s).futharkHow to test a program.futharkhDescription of a test to be carried out on a Futhark program. The Futhark program is stored separately.futhark?A prettyprinted representation of type of value produced by a .futharkLike +, but does not consume trailing linebreaks.futharkLike +, but does not consume trailing linebreaks.futharkMRead the test specification from the given Futhark program. Note: will call 3 on parse errors.futhark[Read test specifications from the given path, which can be a file or directory containing .fut' files and further directories. Calls 3N 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 3a on parse errors, or if any of the immediately passed path names do not name a file that exists.futhark7Try to parse a several values from a byte string. The ' parameter is used for error messages.futhark6Get the actual core Futhark values corresponding to a  specification. The 9 is the directory which file paths are read relative to.futhark(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.futharkJThere is a risk of race conditions when multiple programs have identical <. In such cases, multiple threads in 'futhark test' might attempt to create the same file (or read from it, while something else is constructing it). This leads to a mess. To avoid this, we create a temporary file, and only when it is complete do we move it into place. It would be better if we could use file locking, but that does not work on some file systems. The approach here seems robust enough for now, but certainly it could be made even better. The race condition that remains should mostly result in duplicate work, not crashes or data corruption.futharkkCompute the expected size of the file. We use this to check whether an existing file is broken/truncated.futharkqWhen/if generating a reference output file for this run, what should it be called? Includes the "data/" folder.futhark;Get the values corresponding to an expected result, if any.futharkEnsure that any reference output files exist, or create them (by compiling the program with the reference compiler and running it on the input) if necessary.futharktDetermine the --tuning options to pass to the program. The first argument is the extension of the tuning file, or  if none should be used.;;None=? dfutharkTMap a monadic action across the immediate children of an object. Importantly, the  action is not invoked for the object itself, and the mapping does not descend recursively into subexpressions. The mapping is done left-to-right.futharkExpress a monad mapping operation on a syntax node. Each element of this structure expresses the operation to be performed on a given child.  NoneM i futhark5A pairing of a lexical closure and a module function.!futharkA non-parametric module."futhark^A substitution from names in the original program to names in the generated/residual program.#futhark(A general-purpose substitution of names.None jfuthark,The warnings produced by the compiler. The K1 instance produces a human-readable description.  None>MP vfuthark?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 K? instance for this type produces a human-readable description.-futhark$The name of the current file/import.2futharkzExtract from a type either a function type comprising a list of parameter types and a return type, or a first-order type.6futharkEnclose a string in the prefered quotes used in error messages. These are picked to not collide with characters permitted in identifiers.Q       !"#$%&'()*+,-./0123456789:;<=>?O *+,-.3142"#$%'()&/056 !   789:;< >?=None=>? " JfutharkbClass of types which allow for substitution of types with no annotations for type variable names.LfutharkA type substituion may be a substitution or a yet-unknown substitution (but which is certainly an overloaded primitive type!). The latter is used to remove aliases from types that are yet-unknown but that we know cannot carry aliases (see issue #682).SfutharkunifyTypes uf t2 t2 attempts to unify t1 and t2". If unification cannot happen, > is returned, otherwise a type that combines the aliasing of t1 and t2* is returned. Uniqueness is unified with uf.Tfutharkx `subtypeOf` y is true if x is a subtype of y (or equal to y ), meaning x is valid whenever y is.Ufutharkx U y is true if x is not less unique than y.XfutharkwCheck for duplication of names inside a pattern group. Produces a description of all names used in the pattern group.$futhark$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).YfutharkuEnsure that every shape parameter is used in positive position at least once before being used in negative position.[futharkcReturn the shapes used in a given type expression in positive and negative position, respectively.]futharkPerform substitutions, from type names to types, on a type. Works regardless of what shape and uniqueness information is attached to the type.JKLMNOPQRSTUVWXYZ[\]WVSTUXZ[YPQRO\LMNJK]None>M qfutharkMapping 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?tfutharkUnifies two types.zfutharkConstruct a the name of a new type variable given a base description and a tag number (note that this is distinct from actually constructing a VName; the tag here is intended for human consumption but the machine does not care).{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./defghiljkmnopqrstuvwxyz{iljkmnopqrdefgh/zwxyuvst{None>M &futharkMapping from function name and instance list to a new function name in case the function has already been instantiated with those concrete types.'futharkThe monomorphization monad.(futharkMonomorphization environment mapping names of polymorphic functions to a representation of their corresponding function bindings.)futharkMapping from record names to the variable names that contain the fields. This is used because the monomorphiser also expands all record patterns.*futhark!The monomorphization monad reads * s and writes  ValBindings. The s in a  ValBinding can only be shape parameters.Each  Polybinding is also connected with the )X that were active when the binding was defined. This is used only in local functions.+futharkHThis carries out record replacements in the alias information of a type.,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.0futhark7Perform a given substitution on the types in a pattern.1futharkFRemove 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.2futhark[Promote to dimension type as appropriate for the original type. Also return original type.3futharkbSome operators and functions are overloaded or otherwise special - we detect and treat them here.4futharkvIs the name a value constant? If so, create the necessary function call and return the corresponding subexpressions.None4=>?M w5futharkcAn unmatched pattern. Used in in the generation of unmatched pattern warnings by the type checker.6futharkThe 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.7futharkType checking happens with access to this environment. The tables will be extended during type-checking as bindings come into scope.8futharkMost recent first.9futhark4Aliases in parameters indicate the lexical closure.:futhark2Whether something is a global or a local variable.;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.<futharkGA null occurence is one that we can remove without affecting anything.=futharkA 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.>futharkQGet the type of an expression, with all type variables substituted. Never call H; directly (except in a few carefully inspected locations)!?futharkWrap V; to also perform an observation of every size in the type.@futharkInstantiate a type scheme with fresh type variables for its type parameters. Returns the names of the fresh type variables, the instance list, and the instantiated type.AfutharkNCreate a new type name and insert it (unconstrained) in the substitution map.BfutharkEDetermine if two types are identical, ignoring uniqueness. Causes a "; if they fail to match, and otherwise returns one of them.Cfuthark5Assumes that the two types have already been unified.DfutharkZReturn the shapes used in a given pattern in postive and negative position, respectively.Efuthark require ts e causes a " if  expType e is not one of the types in ts. Otherwise, simply returns e.Ffuthark%returnType ret_type arg_diet arg_type gives result of applying an argument the given types to a function with the given return type, consuming the argument with the given diet.Gfutharkt G d removes aliases (sets them to -) from the parts of t that are denoted as H by the ' d.futharkType-check a top-level (or module-level) function definition. Despite the name, this is also used for checking constant definitions, by treating them as 0-ary functions.IfutharkfThis is "fixing" as in "setting them", not "correcting them". We only make very conservative fixing.Jfuthark5The set of in-scope variables that are being aliased.KfutharkFind 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.Lfuthark?Proclaim that we have made read-only use of the given variable.Mfuthark4Proclaim that we have written to the given variable.NfutharkProclaim that we have written to the given variable, and mark accesses to it and all of its aliases as invalid inside the given computation.OfutharkMake all bindings nonunique.PfutharkPerform substitutions of instantiated variables on the type annotations (including the instance lists) of an expression, or something else.None>P futharkType 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. Also returns a list of type parameters, which will be nonempty if the expression is polymorphic. See also .futharkType check a single declaration containing no type information, yielding either a type error or the same declaration annotated with type information along the Env produced by that declaration. See also .futharkType check a single module expression containing no type information, yielding either a type error or the same expression annotated with type information along the Env produced by that declaration. See also .futharkMAn initial environment for the type checker, containing intrinsics and such.Qfuthark,Refine the given type name in the given env.""None>P futharkHPre-typechecked imports, including a starting point for the name source.futhark'Files that should be implicitly opened.Rfuthark?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.SfutharkqRead 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.None> futhark Warn if True.futharkIf true, error on any warnings.futharkIf True, ignore unsafe.futhark=Read and type-check a Futhark program, including all imports.futharkJRead and type-check a collection of Futhark files, including all imports. Safe TUVWXYZ[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 None "vfutharkhA 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 ,6futhark,Are we compiling a library or an executable?futhark2An option that modifies the configuration of type cfg.futhark,Run a parameterised Futhark compiler, where cfg6 is a user-given configuration type. Call this from main.]futhark"The configuration of the compiler.futharkInitial configuration.futhark&Options that affect the configuration.futhark,The short action name (e.g. "compile to C").futharkThe longer action description.futharkThe pipeline to use.futhark1The action to take on the result of the pipeline.futhark Program namefutharkCommand line arguments.None> ,None> ,None> -(None> -nNone> -None> -None> .@None>_ /x^futhark/Extra options passed to the programs being run.None>X /NoneM >D_futhark$The monad in which futhark-pkg runs.`futhark5Install the packages listed in the build list in the lib directory of the current working directory. Since we are touching the file system, we are going to be very paranoid. In particular, we want to avoid corrupting the lib- directory if something fails along the way.The procedure is as follows:1) Create a directory  'lib~new'. Delete an existing  'lib~new' if necessary. 2) Populate  'lib~new' based on the build list. 3) Rename lib to  'lib~old'. Delete an existing  'lib~old' if necessary. 4) Rename  'lib~new' to lib+5) If the current package has package path p, move  'lib~old/p' to  'lib~new/p'. 6) Delete  'lib~old'.Since POSIX at least guarantees atomic renames, the only place this can fail is between steps 3, 4, and 5. In that case, at least the  'lib~old'2 will still exist and can be put back by the user.None> >NoneSX K8 afutharkeA human-readable description of the representation expected or contained, usable for error messages.bfutharkYNothing is distinct from a empty pipeline - it means we don't even run the internaliser.cfutharkJIf true, prints programs as raw ASTs instead of their prettyprinted form.dfuthark3What to do with the program after it has been read.efutharkJust print it.ffuthark(Run the type checker; print type errors.gfutharkRun this pipeline.hfuthark,Partially evaluate away the module language.ifutharkDefunctorise and monomorphise.jfuthark0Defunctorise, monomorphise, and defunctionalise.kfutharkMGet a Futhark pipeline from the configuration - an empty one if none exists.futharkZEntry point. Non-interactive, except when reading interpreter input from standard input.None L?lfutharkClosed interval, as in  System.Random.None LNone> Omfuthark&The name we use for compiled programs.nfutharkNumerically stable meanofuthark Standard deviation of populationpfutharkPopulation varianceqfutharkCentral momentsNone VrfutharkYWe keep a mapping of the names we have actually documented, so we can generate an index.sfutharkjLocal module types that show up in the interface. These should be documented, but clearly marked local.tfuthark}A set of names that we should not generate links to, because they are uninteresting. These are for example type parameters.ufutharkcThe header documentation (which need not be present) can contain an abstract and further sections.NoneP WeNone>MX Yvfuthark)Are we currently stopped at a breakpoint?wfuthark$Skip breakpoints at these locations.xfutharkThe currently loaded file.y      !"#$%&'()*+,-./0123456789:;<=>?@>?A>?B>?C>?D>?E>?F>?F>?G>?H>?IJKLMNNOPQRSTUVWXYZ[\]^_`aabcdefghijklmnopqr s t u s v w x y z { | } ~                                                                           !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVTWXSYZ[\]^_`a_bc^defghijklmnopqrstuvwxyz{|}~       !!"#$#%&'())*+,,-./.0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      K-# !"#$%&'()*+,-./0/123456789:;;<=>?>@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP 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,P,Y,Z,[,\,5,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-{-|-}-~----........................................///////////////////0000000111111111111111112222222222222222222222223333333333333333333333333333334 4 4 4 4 4 4444444444444444444 4!4"4#4$4%4&4'4(4)4*4+4,44-4.4/50515525563646566676768696:6;6<6=6>6?6@6A6B6C6D6E6F6G6H66-66I6J6K6L6M6N6O66P6Q6R6S6T6U6V6W6X6Y6Z6[6\6]6^6_6`6a6b7c7d7e7f7g7h7i7j7k7l7m7n7o7p7q7r7s7t7u7v7w7x7y7z7{7|7}7~7777777777777777777777788888888888888888v8888888888888888888888888888888888888888888888888888888888888888888999999999999999999999999999999999::: : : : : ::;;;;;;;<<<<<<<<<<<< <!<"<#<$<%<&<'<(<)<*<+<,<-<.</<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>l>m>n>o>p>q>r>r>s>t>u>v>v>w>x>y>z>{>|>}>~>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>????????@@@AAAAAAA>A6A/AAAAAAAAAAABBBBBBBBCCCDDDDDDDDDDD     E E F F G G G G G G G G G G G G G G G G G G G G G G G G G G G !G "G #G $G %G &G 'G (G )G *G +G ,G -G .G /G 0G 1G 2G 3G 4G 5G 6G 7G 8G 9G :G ;G <G =G >G ?G @G AG BG CH DH EH FH GH DH HH HH IH JH KH LH MH NH OH OH PH QH RH SH TH UH VH WH XH YH ZH [H \H ]H ^H _H `H `H aH bH cH dH eH fH gH gH hH iH jH kH lH mH nH oH oH pH qHvHvHwHxHyH rHzH sH sH tH uH vH wH xH yH zH {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 H H H H HHHH H H H H H H H H H H H H H H H H H H H H I I I I I I I I I I I I I I I I J J K L L LLL L M M M M M M M M M M M M M M M M M M M M M M M M M N O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O P P P P P P Q !R "S #T $T %T %T &T 'T (T )T *T +T ,T -T .T /T 0U 1U 2U 3U 4U 5U 6U 7U 8U 9U :U ;V <W =W >W ?W @W AW BW CW DW EW FW GW HW IW JW KW LW MW NW OW PW QW PW OW NW MW RW SWW TW UW VW WW XW YW ZW [W \W ]W ^W _W `W aW bW cX dX eY fY gZ hZyZ iZ jZ kZ lZ mZ nZ nZ oZ pZ qZ rZ sZ tZ uZ vZ vZ wZ xZ yZ zZ {Z |Z }Z ~Z Z Z Z Z Z Z Z Z Z Z Z Z 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 Z Z Z Z Z Z Z Z [ [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \\\ \ \\\\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] !] "] #] $] %] &] '] (^ )^ *^ +^ ,^ -^ .^ /^ 0^ 1_ 2_ 3_ 4_ 5_ 6_ 7_ 8_ 9` :` ;` ` ` a <b =b >b b b c ?c @c Ac Bc Cc Dc Ec Fc Gc Hc Ic Jc Kc Lc Mc Nc Oc Pc Qc Rc Sc Td Ud d Vd Wd d d Xd Yd Zd [d \d ]e ^e fyf >f Uf ^g _g `g ag bg cg dg eh fi gi gi{i|i}ii~i hi hi ii ji ki li mi ni oi pi)i(i qi ri%i si ti ui vi wi xi yi zi {i |i }i ~i i i i i i i i i i i i i iiidi i i i i i i i i ii i i i i i i i i iii j j j k k k k k k k k kk k k k k k k k k l l l l l l l l l l l l{l l l l l l }l l m m m m m m m m m m m m m m m n n n n n o o o o o o o o oo o o oo o o o o o o o o o o o o-o"o o o o oooo oo o o o o o o o o o o o o o o o o o o ooo o o o o oo o o o o o o o o o o o o o o oo o o o o o o o o o o o o o o o o o o o o o o o !o "o #o $o %o &o 'o (o )o *o +o ,o -o .o /o 0o 1o 2o 3o 4o 5o 6o 7o 8o 9o :o ;p <q =q >q sq ?q @q Aq Bq Cq q Dq Eq Eq Fq Gq Gq Hq Iq Jq Jq Kq Lq Mq Mq Nq Oq Pq Qq Qq Rq Sq Tq Uq Vq Wq Xq Yq Zq [q \q ]q ^q _q `q aq bq cq dq eq fq gq hq iq jq kq lq mq nq oq pq qq rq sq tq uq vq wq xq yq zq {qq |q }q ~q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q rur r r r r s ct t t t t t t Et Gt Ft t t t t 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 u u u u u u u u u u u u u u u u u ou ou u u u u u tu Du u Eu Gu Fu u u u u u u u u u u u u u u u u u u u u u u u u u u v v v v v v v v v v 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 *z c{ +{ ,{ -{ .{ /| 0| 1| 2| 3| 4| 5| 6| 7| 8| 9| :| ;| <| =| >} ?} ?} @} A} B} C} D} Q} Q} E} F} G} H} I} J} K} L} M}"} N} O} } P} Q} R} S} Y} T} U} V} W} X} Y} Z} [} Z} \} ]} ^} _} `} a} b} c} d} e} f} g} h} i} j} k} l} m} n} o} p} q} r} s} c} t} u} } v} w} x} i} x} y} z} {} |} }}} ~} } } } } } } } } } } } ~ ~ ~ ~ ~ ~  c c c c c                            `   -K         JKLMNNOPQRS   D D Z Z [   Q Q E F G I J L    N"  P Q Y Z ^ b k l c q u i y c c                                          `       -           !"#$%& '()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[JKLMNNOPQRS   D D Z Z \ ]^_ [`ab   Q Q E F G I J L c   N"  P Q Y Z ^ d befg ] k l jh ci jkl mn opqrstu q u i y nv c cwxyz{|}~U  - -GFIJ     R  !"#$%&'()*+,-./01234567789::0;<=>?@ABRCDTU]EF_`GGHII&'JKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmjnopqrstuvwxyz{|}~i`b%      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~> s s  s s%     8YZ[\ WXU!"#%$%&'()*+,-../001233456789:;;<=>?@ABCDDEFGHIJJKLMNOPQRSTUVWXYZ[\]^_`abcdefgghijklmnopqrstuvwxyz{|}~s      !"#$%&'()*+,-./01234555555556789:;<=55>?@ABCDEF5GHI5JKL55MNO55PQRSTUV WXYZ[V\]^_`abcdefghijklmnmompmqmrst uvuwxyz{|}~VVVZV  $$'',---.]]68 s8888888 <<.<<<<<<<<<<=======EFJMMMMM OOOORRRRRRRSWWWWyXXYYYYYYZZZZZX\]]]]]^^^_bbbbbbccceeeegggil l l l l mmmmmmmmmmmmmmmmmqq q!q"q#q$q%q&q'q(w)w*w+x,|-}.}/~0LMNLMN1234l56789:;<=>?@ABCCD.EFGHIJK sLMNOPQRSTUVWXYZ[\]^_`abcdefghijkljmnopqrstuvwxyvz{|}~ s D(%futhark-0.10.2-HLPshhyywOPBxpmJGttYXsLanguage.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.Convert3Futhark.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.Unstream&Futhark.Optimise.TileLoops.RegTiling3DFuthark.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.ExplicitAllocationsFuthark.Optimise.DoubleBufferFuthark.Optimise.CSEFuthark.Optimise.SimplifyFuthark.Transform.CopyPropagate%Futhark.Representation.SOACS.SimplifyFuthark.Pass.ExtractKernels'Futhark.Representation.Kernels.Simplify.Futhark.Representation.ExplicitMemory.SimplifyFuthark.Pass.SimplifyFuthark.Pass.ExpandAllocationsFuthark.Pass.ResolveAssertions&Futhark.Analysis.HORepresentation.SOAC!Futhark.Optimise.Fusion.Composing)Futhark.Analysis.HORepresentation.MapNest"Futhark.Optimise.Fusion.LoopKernelFuthark.Optimise.FusionFuthark.PassesFuthark.CodeGen.ImpCodeFuthark.CodeGen.SetDefaultSpaceFuthark.CodeGen.ImpGen"Futhark.CodeGen.ImpCode.Sequential!Futhark.CodeGen.ImpGen.SequentialFuthark.CodeGen.ImpCode.OpenCLFuthark.CodeGen.ImpCode.Kernels(Futhark.CodeGen.ImpGen.Kernels.Transpose#Futhark.CodeGen.ImpGen.Kernels.Base%Futhark.CodeGen.ImpGen.Kernels.SegRed(Futhark.CodeGen.ImpGen.Kernels.SegGenRedFuthark.CodeGen.ImpGen.KernelsFuthark.Actions-Futhark.CodeGen.Backends.SimpleRepresentation!Futhark.CodeGen.Backends.GenericC'Futhark.CodeGen.ImpGen.Kernels.ToOpenCLFuthark.CodeGen.ImpGen.OpenCLFuthark.CodeGen.ImpGen.CUDA$Futhark.CodeGen.Backends.SequentialC,Futhark.CodeGen.Backends.COpenCL.Boilerplate Futhark.CodeGen.Backends.COpenCL*Futhark.CodeGen.Backends.CCUDA.BoilerplateFuthark.CodeGen.Backends.CCUDA*Futhark.CodeGen.Backends.GenericPython.AST-Futhark.CodeGen.Backends.PyOpenCL.Boilerplate.Futhark.CodeGen.Backends.GenericPython.Options&Futhark.CodeGen.Backends.GenericPython)Futhark.CodeGen.Backends.SequentialPython!Futhark.CodeGen.Backends.PyOpenCL*Futhark.CodeGen.Backends.GenericCSharp.AST.Futhark.CodeGen.Backends.GenericCSharp.Options&Futhark.CodeGen.Backends.GenericCSharp)Futhark.CodeGen.Backends.SequentialCSharp-Futhark.CodeGen.Backends.CSOpenCL.Boilerplate!Futhark.CodeGen.Backends.CSOpenCLLanguage.Futhark.FutlibLanguage.Futhark.SyntaxLanguage.Futhark.AttributesLanguage.Futhark.PrettyLanguage.Futhark.ParserLanguage.FutharkLanguage.Futhark.SemanticLanguage.Futhark.InterpreterFuthark.Internalise.TypesValuesFuthark.Internalise.Lambdas#Futhark.Internalise.DefunctionaliseFuthark.Internalise.BindingsFuthark.Doc.HtmlFuthark.Test.Values Futhark.TestLanguage.Futhark.Traversals Futhark.Internalise.DefunctoriseLanguage.Futhark.Warnings"Language.Futhark.TypeChecker.Monad"Language.Futhark.TypeChecker.Types"Language.Futhark.TypeChecker.Unify Futhark.Internalise.MonomorphiseFuthark.Internalise"Language.Futhark.TypeChecker.TermsLanguage.Futhark.TypeCheckerFuthark.Compiler.ProgramFuthark.CompilerFuthark.VersionFuthark.Util.OptionsFuthark.Compiler.CLIFuthark.CLI.PythonFuthark.CLI.PyOpenCLFuthark.CLI.OpenCLFuthark.CLI.CUDAFuthark.CLI.CSharpFuthark.CLI.CSOpenCL Futhark.CLI.CFuthark.CLI.TestFuthark.CLI.RunFuthark.CLI.PkgFuthark.CLI.MiscFuthark.CLI.DevFuthark.CLI.DatasetFuthark.CLI.DatacmpFuthark.CLI.BenchFuthark.Doc.GeneratorFuthark.CLI.DocFuthark.CLI.REPLFuthark.Representation.ASTImpExpLanguage.Futhark.Parser.LexerLanguage.Futhark.Parser.Parser Paths_futharkbaseGHC.IntInt8Int16Int32Int64GHC.WordWord8Word16Word32Word64*mainland-pretty-0.7-IGJvQJjOk88223mM6SIkHlText.PrettyPrint.Mainland hPutDocLnhPutDocputDocLnputDocprettyPragmaLazyTextdisplayPragmaLazyTextprettyLazyTextdisplayLazyText prettyPragma prettyPragmaSdisplayPragmaS prettyCompactprettyCompactSprettySdisplayS renderCompactrendererrordocfaildoc fillbreakfillwidthnestingcolumnnestindenthangalignlisttuple enclosesepsemisepcommasep punctuatesepcatstackspreadfolddocparensIfparensbracketsbraces backquotesanglesdquotessquotesencloseflattengroup<|><+/><+> softbreaksoftlinelinesrclocemptyrparenlparenrbracketlbracketrbracelbraceranglelangledquotesquote backquotespacesspacesemiequalsdotcommacolonstarlazyText strictTextrationaldoublefloatintegerintstringcharbooltextDocRLineRPos RLazyTextRTextRStringRCharREmptyRDoc'megaparsec-7.0.4-BfaLKPDwnJrCF7VMBxwscQText.Megaparsec.ErrorerrorBundlePretty mtl-2.2.2Control.Monad.Error.Class throwError$versions-3.5.0-1NQypMPmwTQ1vqyJ86FMV Data.Versions prettySemVer_svMeta _svPreRel_svPatch_svMinor_svMajorSemVerStrDigitsVUnitOptionArgument NoArgumentRequiredArgumentOptionalArgumentOptionoptionLongNameoptionShortNameoptionArgument optionActiongenerateOptionParser csFunctionscsMemorycsScalarcsReadercsPanic csExceptionscsOpenCLcsMemoryOpenCL pyFunctions pyUtilitypyValuespyPanicpyTuning SizeHeuristic platformName deviceType heuristicSizeheuristicValue WhichSize LockstepWidth NumGroups GroupSizeTileSize ThresholdHeuristicValueHeuristicConstHeuristicDeviceInfo DeviceType DeviceCPU DeviceGPUsizeHeuristicsTable 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 fromPOSIXtrimpmapIO 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 primByteSize intByteSize floatByteSizecommutativeBinOp 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 ObservePrim 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 shapeMappingshapeExtMappingint8int16int32int64float32float64 $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 ShapeChange DimChange DimCoercionDimNewBodyBodyTbodyAttrbodyStms bodyResultResultStmsStmLet stmPatternstmAuxstmExpStmAux stmAuxCerts stmAuxAttrPatternPatternTpatternContextElementspatternValueElementsoneStm stmsFromList stmsToListstmsHead$fMonoidPatternT$fSemigroupPatternT$fFunctorPatternT$fTraversableDimChange$fFoldableDimChange$fFunctorDimChange $fEqDimChange $fOrdPatternT$fShowPatternT $fEqPatternT $fOrdStmAux $fShowStmAux $fEqStmAux$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 ConvOpExpFunExpconstFoldPrimExp.&&..||..<..<=..==..>..>=..&..|..^. evalPrimExp primExpTypecoerceIntPrimExptruefalse$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 shapeVarscommutativeLambdaentryPointSizedefAuxstmCertscertifyexpExtTypesFromPatternpatternFromParams$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 eOutOfBounds eWriteArrayasIntSasIntZ foldBinOp binOpLambda cmpOpLambda fullSlice fullSliceNum isFullSliceifCommon resultBody resultBodyM insertStmsM mapResultinstantiateShapesinstantiateShapes'instantiateShapesFromIdentListinstantiateExtTypesinstantiateIdentsremoveExistentialssimpleMkLetNames $fToExpVName $fToExpSubExp Checkable checkExpLore checkBodyLorecheckFParamLorecheckLParamLorecheckLetBoundLore checkRetType matchPattern primFParammatchReturnTypematchBranchType CheckableOpcheckOpTypeM Occurences TypeError ErrorCaseUnexpectedTypeReturnTypeErrorDupDefinitionError DupParamErrorDupPatternErrorInvalidPatternErrorUnknownVariableErrorUnknownFunctionErrorParameterMismatch SlicingError BadAnnotation ReturnAliasedUniqueReturnAliased NotAnArrayPermutationErrorbadcontextmessageconsumecollectOccurencesconsumeOnlyParamsbinding 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$fToExpPrimExpIxFun ixfunLMADs ixfunContigsubstituteInIxFunisDirect isContiguousshapeindexiotapermuterepeatrotateslicereshaperankrebase offsetIndex strideIndexlinearWithOffsetrearrangeWithOffsetisLinear$fPrettyMonotonicity$fTraversableLMAD$fFoldableLMAD $fFunctorLMAD $fFreeInLMAD $fRenameLMAD$fSubstituteLMAD $fPrettyLMAD$fTraversableIxFun$fFoldableIxFun$fFunctorIxFun $fFreeInIxFun $fRenameIxFun$fSubstituteIxFun $fPrettyIxFun$fShowMonotonicity$fEqMonotonicity $fShowLMADDim $fEqLMADDim $fShowLMAD$fEqLMAD $fShowIxFun $fEqIxFunIndexOpindexOp SymbolTable loopDepthbindingsavailableAtClosestLoop fromScopetoScopecastSymbolTabledeepen entryType asScalExp bindingDepth valueRangeentryStmentryLetBoundAttrentryFParamLore loopVariableelem lookupStm lookupExp lookupBasicOp lookupSubExp lookupScalExp lookupValue availableindex'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$fCheckableOpSOACS$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$fEqGroupStreamLambdaHostOpGetSize GetSizeMax CmpSizeLe KernelWalkerwalkOnKernelSubExpwalkOnKernelLambdawalkOnKernelBodywalkOnKernelVNamewalkOnKernelLParamwalkOnKernelKernelBody KernelMappermapOnKernelSubExpmapOnKernelLambdamapOnKernelBodymapOnKernelVNamemapOnKernelLParammapOnKernelKernelBody WhichThreads AllThreadsOneResultPerGroupThreadsPerGroupThreadsInSpace KernelResult ThreadsReturn WriteReturn ConcatReturnsKernelInPlaceReturn KernelBodykernelBodyLorekernelBodyStmskernelBodyResultSpaceStructureFlatThreadSpaceNestedThreadSpace KernelSpace spaceGlobalId spaceLocalId spaceGroupIdspaceNumThreadsspaceNumGroupsspaceGroupSizespaceStructureKernelSegRed SegGenRedgenReduceShapeKernelDebugHints kernelName kernelHintsspaceDimensionskernelResultSubExpidentityKernelMapper mapKernelMidentityKernelWalker walkKernelMscopeOfKernelSpace kernelTypechunkedKernelNonconcatOutputstypeCheckKerneltypeCheckHostOp$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$fUsageInOpHostOp$fOpMetricsHostOp$fPrettyHostOp$fIndexOpHostOp$fCanBeWiseHostOp$fCanBeRangedHostOp$fCanBeAliasedHostOp$fFreeInHostOp$fRangedOpHostOp$fAliasedOpHostOp$fTypedOpHostOp $fIsOpHostOp$fRenameHostOp$fSubstituteHostOp$fEqKernelDebugHints$fShowKernelDebugHints$fOrdKernelDebugHints$fEqSpaceStructure$fShowSpaceStructure$fOrdSpaceStructure$fEqKernelSpace$fShowKernelSpace$fOrdKernelSpace$fEqWhichThreads$fShowWhichThreads$fOrdWhichThreads$fEqKernelResult$fShowKernelResult$fOrdKernelResult $fEqKernel $fShowKernel $fOrdKernel $fEqHostOp $fOrdHostOp $fShowHostOp$fEqKernelBody$fShowKernelBody$fOrdKernelBodyInKernelKernels$fPrettyLoreKernels$fBinderOpsKernels$fBindableKernels$fCheckableKernels$fCheckableOpKernels$fAttributesKernels$fBinderOpsInKernel$fBindableInKernel$fCheckableInKernel$fCheckableOpInKernel$fPrettyLoreInKernel$fAttributesInKernel$fAnnotationsInKernel$fAnnotationsKernelsbabysitKernelsnonlinearInMemoryfirstOrderTransform transformStms transformStmgroupStreamMapAccumLmapIsh KernelInputkernelInputNamekernelInputTypekernelInputArraykernelInputIndicesgetSizeblockedReductionStream chunkLambdakerneliseLambdasegRed nonSegRedblockedReductionblockedGenReduce blockedMap splitArrays blockedScan mapKernelmapKernelFromBodyreadKernelInputnewKernelSpace$fEqKernelSize$fOrdKernelSize$fShowKernelSize$fShowKernelInputregularSegmentedScan KernelNestNestingsNestingnestingLetBound nestingLoop LoopNesting MapNestingloopNestingPatternloopNestingCertificatesloopNestingWidthloopNestingParamsAndArrsTargetsTarget ppTargets singleTarget outerTarget innerTargetpushInnerTargetpopInnerTarget targetsScope ppLoopNesting ppNestings singleNestingpushInnerNestingletBindInInnerNesting ppKernelNestpushKernelNestingpushInnerKernelNestingremoveArraysFromNest newKernelkernelNestLoopsboundInKernelNestboundInKernelNestskernelNestWidthsconstructKernel flatKernel tryDistributetryDistributeStm$fFreeInLoopNesting$fScopedKernelsLoopNesting$fShowLoopNesting $fShowNestingBranchSeqLoopinterchangeLoopsinterchangeBranchunstream doRegTiling3D 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 localVtable 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$fCheckableOpExplicitMemory$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$fSizeSubstHostOp$fAllocatorInKernelPatAllocM"$fAllocatorExplicitMemoryPatAllocM$fAllocatorInKernelAllocM$fAllocatorExplicitMemoryAllocM$fMonadBinderAllocM $fEqAllocStm $fOrdAllocStm$fShowAllocStm$fApplicativeAllocM$fFunctorAllocM $fMonadAllocM$fMonadFreshNamesAllocM$fHasScopeAllocM$fLocalScopeAllocM$fMonadReaderAllocM$fApplicativePatAllocM$fFunctorPatAllocM$fMonadPatAllocM$fHasScopePatAllocM$fMonadWriterPatAllocM$fMonadFreshNamesPatAllocM doubleBuffer$fLocalScopeloreDoubleBufferM$fHasScopeloreDoubleBufferM$fFunctorDoubleBufferM$fApplicativeDoubleBufferM$fMonadDoubleBufferM$fMonadReaderDoubleBufferM$fMonadFreshNamesDoubleBufferM$fShowDoubleBufferCSEInOp performCSE $fCSEInOpSOAC$fCSEInOpMemOp$fCSEInOpKernelExp$fCSEInOpKernel$fCSEInOpHostOp $fCSEInOp() simplifyProgsimplifySomethingcopyPropagateInStms simpleSOACS simplifySOACSextractKernels$fMonadFreshNamesDistribM$fMonoidPostKernels$fSemigroupPostKernels$fMonoidKernelRes$fSemigroupKernelRes$fMonadLoggerKernelM$fLocalScopeKernelsKernelM$fHasScopeKernelsKernelM$fMonadFreshNamesKernelM$fFunctorDistribM$fApplicativeDistribM$fMonadDistribM$fHasScopeDistribM$fLocalScopeDistribM$fMonadStateDistribM$fMonadLoggerDistribM$fFunctorKernelM$fApplicativeKernelM$fMonadKernelM$fMonadReaderKernelM$fMonadWriterKernelMsimplifyKernelssimplifyKernelOpsimplifyKernelExp$fSimplifiableWhichThreads$fSimplifiableKernelResult$fSimplifiableSpaceStructure$fSimplifiableKernelSpace$fSimplifiableCombineSpace$fSimplifiableSplitOrderingsimplifyExplicitMemoryexpandAllocations$fApplicativeOffsetM$fFunctorOffsetM$fMonadOffsetM$fHasScopeOffsetM$fLocalScopeOffsetM$fMonadErrorOffsetMresolveAssertionsNotSOACInputViewLEmptyL:>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 DebugPrint ArrayContents ArrayValues ArrayZerosFunction FunctionT functionEntryfunctionOutput functionInput functionbBodyfunctionResult functionArgs ExternalValue OpaqueValueTransparentValue ValueDesc ArrayValue ScalarValue Signedness FunctionsMemParam ScalarParamScalarDimSizeMemSizeSize ConstSizeVarSizeelementsbytes withElemType dimSizeToExp memSizeToExp sizeToExpvar $fFreeInSize $fPrettySize $fPrettyParam$fPrettyValueDesc$fPrettyExternalValue$fPrettyArrayContents$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$fShowArrayContents$fEqVolatility$fOrdVolatility$fShowVolatility $fEqExpLeaf $fShowExpLeaf $fEqCount $fShowCount $fNumCount$fIntegralExpCount $fFreeInCount $fPrettyCount $fShowArg $fShowCode$fShowFunctionTsetDefaultSpaceImpMVTableenvDefaultSpace envFunctionValueDestinationVarEntryArrayVarMemVar ScalarEntryentryScalarTypeMemEntry entryMemSize entryMemSpace ArrayEntryentryArrayLocationentryArrayElemType MemLocationmemLocationNamememLocationShapememLocationIxFun OperationsopsExpCompiler opsOpCompileropsStmsCompileropsCopyCompiler CopyCompiler ExpCompiler StmsCompiler OpCompilerdefaultOperationsarrayDestinationsubImpM_subImpMcollectcommentemit emitFunction hasFunction compileProg compileBody compileBody'compileLoopBody compileStmsdefCompileStms compileExp defCompileExpdFParamsdLParamsdPrim_dPrimdPrimVdScopedScopesdArrayeverythingVolatilesubExpToDimSizecompileSubExpTo compileSubExpcompileSubExpOfTypecompilePrimExpvarIndex getVTable localVTable lookupArray lookupMemoryfullyIndexArrayfullyIndexArray' offsetArray strideArraycopycopyElementWise copyDWIMDestcopyDWIM compileAllocdimSizeToSubExpsForsWhilesCommentsIfsWhensUnlesssOp sDeclareMemsAlloc_sAllocsArray sAllocArray sStaticArraysWritesUpdate<--$fHasScopeSOACSImpM$fMonadFreshNamesImpM$fMonadFailImpM$fEqMemLocation$fShowMemLocation$fShowArrayEntry$fShowMemEntry$fShowScalarEntry$fShowVarEntry$fShowValueDestination$fShowDestination $fFunctorImpM$fApplicativeImpM $fMonadImpM$fMonadStateImpM$fMonadReaderImpM$fMonadWriterImpM$fMonadErrorImpMProgram$fFreeInSequential$fPrettySequential KernelTarget TargetOpenCL TargetCUDAOpenCL LaunchKernelHostCode KernelArg ValueKArgMemKArgSharedMemoryKArg KernelName openClProgram openClPreludeopenClKernelNamesopenClUsedTypes openClSizes hostFunctions$fPrettyOpenCL$fShowKernelArg $fShowOpenCL$fEqKernelTargetAtomicOp AtomicAdd AtomicSMax AtomicSMin AtomicUMax AtomicUMin AtomicAndAtomicOr AtomicXor AtomicCmpXchg AtomicXchgKernelOp GetGroupId GetLocalId GetLocalSize GetGlobalSize GetGlobalIdGetLockstepWidthAtomic LocalBarrier GlobalBarrierMemFence KernelUse ScalarUse MemoryUseConstUseLocalMemoryUse kernelBodykernelLocalMemory kernelUseskernelNumGroupskernelGroupSize CallKernelKernelConstExp KernelConst SizeConst KernelCode getKernels atomicBinOp$fPrettyKernelConst$fPrettyKernelUse$fFreeInAtomicOp$fFreeInKernelOp$fPrettyKernelOp$fEqKernelConst$fOrdKernelConst$fShowKernelConst $fEqKernelUse$fShowKernelUse$fShowAtomicOp$fShowKernelOp TransposeArgs TransposeTypeTransposeNormalTransposeLowWidthTransposeLowHeightTransposeSmall mapTransposemapTransposeKernel$fEqTransposeType$fOrdTransposeType$fShowTransposeType AtomicUpdateLocking lockingArraylockingIsUnlocked lockingToLocklockingToUnlocklockingMappingKernelConstantskernelGlobalThreadIdkernelLocalThreadId kernelGroupIdkernelGlobalThreadIdVarkernelLocalThreadIdVarkernelGroupIdVarkernelNumThreadskernelWaveSizekernelDimensionskernelThreadActivekernelStreamed InKernelGen CallKernelGeninKernelOperationskeyWithEntryPoint atomicUpdateatomicUpdateLockingcomputeKernelUsescomputeThreadChunkSizekernelInitialisationSetSpacekernelInitialisationsetSpaceIndicesisActivemakeAllMemoryGlobal allThreads groupReduce groupScancompileKernelStmssKernel sReplicatesIotasCopy compileSegRedcompileSegRed'compileSegGenRed 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 $fToIdentName$fMonoidCompilerAcc$fSemigroupCompilerAcc$fMonadFreshNamesCompilerM$fEqHeaderSection$fOrdHeaderSection$fFunctorCompilerM$fApplicativeCompilerM$fMonadCompilerM$fMonadStateCompilerM$fMonadReaderCompilerM$fMonadWriterCompilerM kernelsToCUDAkernelsToOpenCL$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 ImportDec 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 PatternLit LoopFormBaseForInCaseBaseCasePat FieldBaseRecordFieldExplicitRecordFieldImplicitExpBaseLiteralIntLitFloatLitParens QualParensTupLit RecordLitAscriptLetPatLetFunNegate OpSection OpSectionLeftOpSectionRightProjectSection IndexSectionProjectLetWith RecordUpdateVConstr0MatchQualName qualQualsqualLeaf DimIndexBase InclusivenessDownToExclusive ToInclusive UpToExclusiveBacktickPlusMinusTimesDivideModQuotRemShiftRShiftLBandBorEqualNotEqualLessLeqGreaterGeq PipeRightPipeLeft IdentBase identSrcLocValue RecordDietFuncDiet TypeDeclBaseTypeDecl declaredType expandedType TypeArgExp TypeArgExpDimTypeArgExpTypeTypeExpTEVarTETupleTERecordTEArrayTEUniqueTEApplyTEArrowTEEnum StructType PatternTypeAliasingAlias AliasBound AliasFreealiasVarTypeArg TypeArgDim TypeArgTypeEnumRecordTypeVarArrowArrayElemTypeBase ArrayPrimElem ArrayPolyElemArrayRecordElem ArrayEnumElemRecordArrayElemTypeBaseRecordArrayElemRecordArrayArrayElemTypeName 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$fFoldableTypeArg$fFunctorTypeArg$fTraversableTypeArg$fBifoldableTypeBase$fBifunctorTypeBase$fBitraversableTypeBase$fFoldableArrayElemTypeBase$fFunctorArrayElemTypeBase$fTraversableArrayElemTypeBase!$fFoldableRecordArrayElemTypeBase $fFunctorRecordArrayElemTypeBase$$fTraversableRecordArrayElemTypeBase$fTraversableInclusiveness$fFoldableInclusiveness$fFunctorInclusiveness$fLocatedInclusiveness$fTraversableQualName$fFoldableQualName$fFunctorQualName $fOrdQualName$fOrdQualName0 $fEqQualName $fEqQualName0$fArrayDimDimDecl$fTraversableDimDecl$fFoldableDimDecl$fFunctorDimDecl$fLocatedTypeArgExp$fLocatedTypeExp$fLocatedTypeDeclBase$fLocatedIdentBase$fOrdIdentBase $fEqIdentBase$fShowableInfovn$fShowableNoInfovn$fLocatedDocComment$fLocatedTypeParamBase$fTraversableTypeParamBase$fFoldableTypeParamBase$fFunctorTypeParamBase$fLocatedTypeBindBase$fLocatedPatternBase$fLocatedCaseBase$fLocatedFieldBase$fLocatedExpBase$fLocatedValBindBase$fLocatedTypeRefBase$fLocatedSigExpBase$fLocatedSpecBase$fLocatedSigBindBase$fLocatedModParamBase$fLocatedDecBase$fLocatedModBindBase$fLocatedModExpBase $fEqNoInfo $fOrdNoInfo $fShowNoInfo$fEqInfo $fOrdInfo $fShowInfo $fEqShapeDecl$fOrdShapeDecl$fShowShapeDecl$fShowTypeName $fEqTypeArg $fShowTypeArg$fEqArrayElemTypeBase$fShowArrayElemTypeBase$fEqRecordArrayElemTypeBase$fShowRecordArrayElemTypeBase $fEqAlias $fOrdAlias $fShowAlias $fEqValue $fShowValue $fEnumBinOp$fBoundedBinOp$fEqInclusiveness$fOrdInclusiveness$fShowInclusiveness$fShowQualName $fShowDimDecl $fShowTypeExp$fShowTypeArgExp$fShowDocComment$fEqLiftedness$fOrdLiftedness$fShowLiftedness$fEqTypeParamBase$fShowTypeParamBase$fShowProgBase $fShowDecBase$fShowModParamBase$fShowModBindBase$fShowModExpBase$fShowSigBindBase$fShowTypeRefBase$fShowSigExpBase$fShowSpecBase$fShowTypeBindBase$fShowValBindBase$fShowPatternBase$fShowLoopFormBase$fShowCaseBase$fShowFieldBase $fShowExpBase$fShowDimIndexBase$fShowIdentBase$fShowTypeDeclBase$fEqTypeArgExp$fEqTypeArgExp0 $fEqTypeExp $fEqTypeExp0 $fEqDimDecl $fEqDimDecl0 UncheckedCase UncheckedProg UncheckedDecUncheckedValBindUncheckedPatternUncheckedTypeParamUncheckedSigExpUncheckedModExp UncheckedExpUncheckedDimIndexUncheckedIdentUncheckedTypeDeclUncheckedArrayElemTypeUncheckedTypeExp UncheckedType IntrinsicIntrinsicMonoFunIntrinsicOverloadedFunIntrinsicPolyFun IntrinsicTypeIntrinsicEqualityIntrinsicOpaque nestedDimsremoveShapeAnnotationsvacuousShapeAnnotationsanyDimShapeAnnotationsaliases toStructuraltoStruct fromStructrecordArrayElemToType tupleRecord isTupleRecordareTupleFieldstupleFieldNames sortFields isTypeParamcombineTypeShapes setAliases addAliases valueType unscopeType foldFunType unfoldFunTypetypeVars orderZeropatternDimNames typeDimNamespatternOrderZero patternTypepatternPatternTypepatternStructType 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$fPrettyCaseBase$fPrettyFieldBase$fPrettyExpBase$fPrettyDimIndexBase$fPrettyTypeDeclBase $fAnnotInfo $fAnnotNoInfoTokenIDINDEXING QUALINDEXING QUALPARENUNOPQUALUNOPSYMBOL CONSTRUCTOR PROJ_FIELD PROJ_INDEXINTLIT STRINGLITI8LITI16LITI32LITI64LITU8LITU16LITU32LITU64LITFLOATLITF32LITF64LITCHARLITCOLON BACKSLASH APOSTROPHEAPOSTROPHE_THEN_HATBACKTICKTWO_DOTS TWO_DOTS_LT TWO_DOTS_GT THREE_DOTSLPARRPARRPAR_THEN_LBRACKETLBRACKETRBRACKETLCURLYRCURLYCOMMA UNDERSCORE RIGHT_ARROWEQUASTERISKNEGATELTHHATPIPEIFTHENELSELETLOOPINFORDOWITHUNSAFEASSERTTRUEFALSEWHILEINCLUDEIMPORTENTRYTYPEMODULEVALOPENLOCALMATCHCASEDOCEOFLscanTokensText ParseErrorparseDecOrExpIncrM parseFutharkparseExp parseModExp parseType parseValue parseValuesCase ArrayElemType TypeParam StructTypeArgSpecDecSigExpModExp envVtable envTypeTable envSigTable envModTable envNameMapNameMapBoundV TypeBindingTypeAbbrMTymtyAbsmtyModFunSig funSigAbs funSigMod funSigMtyModEnvModFunTySetTerm SignatureImports FileModulefileAbsfileEnvfileProg ImportNamemkInitialImport mkImportFromincludeToFilePathincludeToString$fLocatedImportName $fPrettyEnv $fPrettyMod $fPrettyMTy $fMonoidEnv$fSemigroupEnv$fEqImportName$fOrdImportName$fShowImportName $fEqNamespace$fOrdNamespace$fShowNamespace$fEnumNamespace$fEqTypeBinding$fShowTypeBinding $fShowBoundV $fShowEnv $fShowMTy $fShowMod $fShowFunSigCtxctxEnv ctxImportsInterpreterErrorenvTermenvType envShapes 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 renderNamejoinBycommaspipesMismatch ValueType Word8Value Word16Value Word32Value Word64Value readValues compareValuescompareValues1 $fBinaryValue$fPrettyValueType$fShowMismatch$fShowValueTypeSuccess SuccessValuesSuccessGenerateValuesExpectedResultSucceedsRunTimeFailureGenValueGenIntValuesInFile GenValuesTestRunrunTagsrunInputrunExpectedResultrunIndexrunDescription WarningTestExpectedWarning StructureTestStructurePipelineKernelsPipeline SOACSPipelineSequentialCpuPipeline GpuPipeline ExpectedErrorAnyError ThisError InputOutputs iosEntryPoint iosTestRuns TestActionCompileTimeFailureRunCases ProgramTesttestDescriptiontestTags testActiontestSpecFromFiletestSpecsFromPathsvaluesFromByteString getValues getValuesBStestRunReferenceOutputgetExpectedResultcompileProgram runProgramensureReferenceOutputdetermineTuning$fShowExpectedError$fShowWarningTest$fShowStructurePipeline$fShowStructureTest$fShowGenValue $fShowValues$fShowExpectedResult $fShowSuccess $fShowTestRun$fShowInputOutputs$fShowTestAction$fShowProgramTest ASTMappableastMap ASTMappermapOnExp mapOnName mapOnQualNamemapOnStructTypemapOnPatternType$fASTMappable(,,)$fASTMappable(,)$fASTMappable[]$fASTMappableInfo$fASTMappableCaseBase$fASTMappableFieldBase$fASTMappablePatternBase$fASTMappableIdentBase$fASTMappableTypeDeclBase$fASTMappableTypeBase$fASTMappableTypeBase0$fASTMappableSet$fASTMappableAlias$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 askImportName localTmpEnv typeError checkName bindSpacedgetTypecheckQualNameWithEnvqualifyTypeVars badOnLeftquote anySignedTypeanyUnsignedType anyIntType anyFloatType anyNumberType anyPrimTypeppSpaceintrinsicsNameMaptopLevelNameMap$fShowBreadCrumb$fMonadTypeCheckerTypeM$fMonadErrorTypeM applySubstSubst PrimSubstTypeSubsTypeSubDimSub unifyTypesU subuniqueOf checkTypeDecl checkTypeExpcheckForDuplicateNamescheckShapeParamUsescheckTypeParams typeExpUsessubstituteTypes substTypesAny$fFunctorSubst$fSubstitutableTypeBase$fSubstitutableTypeBase0$fSubstitutableTypeBase1$fSubstitutableTypeBase2 $fShowTypeSub MonadUnifygetConstraintsputConstraintsmodifyConstraints newTypeVar Constraint NoConstraint ParamType Overloaded HasFieldsEquality HasConstrs Constraints lookupSubst normaliseTypeunify mustBeOneOf equalityType zeroOrderTypemustHaveConstr mustHaveField mkTypeVarName doUnification$fLocatedConstraint$fMonadBreadCrumbsUnifyM$fMonadUnifyUnifyM$fShowConstraint $fMonadUnifyM$fFunctorUnifyM$fApplicativeUnifyM$fMonadStateUnifyM$fMonadErrorUnifyMrunMonoM transformDecs$fFunctorMonoM$fApplicativeMonoM $fMonadMonoM$fMonadReaderMonoM$fMonadWriterMonoM$fMonadFreshNamesMonoMinternaliseProg checkOneExp checkFunDef$fLocatedOccurence$fMonoidTermScope$fSemigroupTermScope$fMonadTypeCheckerTermTypeM$fMonadBreadCrumbsTermTypeM$fMonadUnifyTermTypeM$fMonadFailTermTypeM$fPrettyUnmatched$fShowLocality$fShowValBinding$fShowTermScope$fMonadTermTypeM$fFunctorTermTypeM$fApplicativeTermTypeM$fMonadReaderTermTypeM$fMonadWriterTermTypeM$fMonadStateTermTypeM$fMonadErrorTermTypeM$fFunctorUnmatched$fShowUnmatchedcheckDec checkModExp initialEnvBasis basisImportsbasisNameSource basisRoots emptyBasisreadLibraryWithBasis readImports FutharkConfigfutharkVerbose futharkWarn futharkWerror futharkSafenewFutharkConfig dumpErrorrunCompilerOnProgramrunPipelineOnProgram readProgram readLibraryversion versionString FunOptDescrmainWithOptions commonOptions CompilerMode ToLibrary ToExecutableCompilerOption compilerMain$fEqCompilerMode$fOrdCompilerMode$fShowCompilerModemain $fOrdTestCase $fEqTestCase$fEqTestResult$fShowTestResult$fShowProgConfig $fEqTestMode$fShowTestMode$fShowTestCase$fMonadLoggerPkgM$fMonadPkgRegistryPkgM $fMonadPkgM $fFunctorPkgM$fApplicativePkgM $fMonadIOPkgM$fMonadReaderPkgM mainCheck mainImports$fPrettyUntypedPassState $fRepresentationUntypedPassState$fRepresentationUntypedAction$fEqOutputFormat$fOrdOutputFormat$fShowOutputFormat$fToJSONDataResults$fEqSkipReason renderFiles$fFunctorFutharkiM$fApplicativeFutharkiM$fMonadFutharkiM$fMonadStateFutharkiM$fMonadIOFutharkiM$fMonadErrorFutharkiMGHC.BaserequiredInManifest GHC.MaybeNothingData.Traversable mapAccumLmap 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 zeroIshIntnegativeIshIntMonoidghc-prim GHC.Classes==mempty GHC.TypesTrue shapeMapping'OrdEqtransformers-0.5.5.0Control.Monad.Trans.ReaderReaderGHC.ErrerrorData.Functor.IdentityIdentityFunctor TraversableGHC.NumNumfail zeroIshExp oneIshExprenamerSubstitutionsnewmatcheswithoutUsminusAlgSimplifyEnvmaxSteps markInSolve scalExpRangeEitherLeft BodyWisdomControl.Monad.Trans.Writer.LazyWriter Consumption FunBindingGHC.ShowShowboundobserve expandAliasescheckAnnotationUnknownsubstituteInLMADhasContiguousPerm lmadShape lmadShapeBase sliceOneLMADreshapeCoercionreshapeOneLMAD rebaseNice makeRotIotaixfunMonotonicityRots freeVarIndexfreeVarConsumed letBoundIndexletBoundConsumed IndexArraynoUpdateBounds updateBounds' buildCGfundoInlineInCallerExpMapkernelWorkgroupskernelWorkgroupSizekernelElementsPerThreadkernelTotalElementsDistributionBodydistributionExpandTargetletBindInNestingboundInNesting cloneVarStms cloneVarCode2 Control.MonadfoldMtransfInvIndStmtransfVarIndStmtranslParamToFParammatchCodeStreamCode is3dTileable VarianceTable BottomUpRules TopDownRulesRules VarLookup checkResults SimpleRule TypeLookuphoistBranchInvariantcopyScratchToScratchremoveDeadBranchResultchangedprotectIfHoistedprotectLoopHoistednotWorthHoistingsimplifyResultJust getExtMaps PatAllocMAllocMaggressiveReuseChunkMapdimAllocationSize DoubleBuffer BufferCopyLoreConstraintscseInOp getShapeNamesremoveReplicateMappingremoveReplicateWriteremoveUnusedSOACInputremoveDeadReductionremoveDeadWritenestedParallelismworthSequentialisingworthIntraGroupunExistentialiseMemorycopyCopyToCopyremoveIdentityCopy RebaseMapextractKernelBodyAllocationsextractThreadAllocationsinputsToSubExps mapFusionOKmapWriteFusionOKfuseSOACwithKer toSeqStreamrearrangeReturnTypesrsuccoutArrinpArr infusiblekernelsKernNamesoacsbindVarbindingFamilyVar bindingFamilybindResrunFusionGatherMexpandSoacInpArr greedyFuse finaliseSOACmkFreshFusionRes getIdentArr envFakeMemoryArrayDestination Destination addArrays addFParams addLoopVarfuncallTargets defaultCopy copyArrayDWIMMemoryDestination inKernelCopysplitOp isStaticExpvirtualiseGroupsuintTypeToCTypeprintStmcproducttranslateKernelscompileTypecastExtcompileTypecastShowablemodifyShapeAnnotationssuffZero scanTokensshow parseExpIncrMGHC.IOFilePath ParserMonadprog futharkType expression modExpressionanyValue anyValuesparseHappyStk TermBindingEvalMtoArraymatchValueToTypesignum'signumevalTypeDefM StaticValLambdaSV restrictEnvTorunDefM defuncExp defuncExp' defuncSoacExpdefuncDimIndex defuncLet defuncApply fullyApplied liftDynFunenvFromPatternDynamicenvFromShapeParams liftValDecbuildEnvPattern buildRetType typeFromSVdynamicFunTypematchPatternSV updatePattern svFromTypefreeVars patternVars defuncValBind DynamicFun defuncValsflattenPatternPrimValueMismatchbinary-0.8.6.0Data.Binary.Get.InternalGetData.Binary.PutPut constituentexplainMismatch genValueTypelexeme'lexemelexstr'lexstrtestSpecsFromPathgetGenBS genFileSizeModModtransformNamescheckForDuplicateNamesInTypeisRigidLiftsMonoMRecordReplacements PolyBinding transformType transformExpdesugarBinOpSection unfoldLetFunsmonomorphizeBinding substPatternremoveTypeVariablesinternaliseDimExpisOverloadedFunctionlookupConstant Unmatched TermTypeState TermScopescopeBreadCrumbsLocality Occurence nullOccurenceseminullOccurenceexpTypeinstantiateTypeSchemeinstantiateTypeParam unifyExpTypesunifyTypeAliases patternUses returnType maskAliasesConsumedfixOverloadedTypes boundAliasescloseOverTypes consumingnoUniqueupdateExpTypes refineEnv readLibrary' getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNameerrputnewCompilerConfigconfigExtraOptionsPkgMinstallBuildListrepresentationfutharkPipelinefutharkPrintASTFutharkPipeline PrettyPrint TypeCheck Defunctorise MonomorphiseDefunctionalisegetFutharkPipeline binaryNamemeanstddevppvar centralMoment DocumentedctxVisibleMTysNoLink headerDocfutharkiBreakingfutharkiSkipBreaksfutharkiLoaded