! j G      !"#$%&'()*+,-./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/1/2/3/4/5/6/7/8/9/:/;/</=/>/?/@/A/B/C0D0E0F0G0H0I0J1K1L1M1N1O1P1Q1R1S1T1U1V1W1X1Y1Z1[2\2]2^2_2`2a2b2c2d2e2f2g2h2i2j2k2l2m2n2o2p2q2r2s3t3u3v3w3x3y3z3{3|3}3~3333333333333333333333444444444444444444444444444444444444444445555556666666666666666666666666666666666666666666666666666677777777777777777 7 7 7 7 7777777777777777777 7!7"7#7$7%7&7'7(7)8*8+8,8-8.8/808182838485868788898:8;8<8=8>8?8@8A8B8C8D8E8F8G8H8I8J8K8L8M8N8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8\8]8^8_8`8a8b8c8d8e8f8g8h8i8j8k8l8m8n8o8p8q8r8s8t8u8v8w8x8y8z8{8|8}9~99999999999999999999999999999999:::::::::;;;;;;;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<============================================ = = = = =====>>>>>>>>>>>>>> >!>">#>$>%>&>'>(>)>*>+>,>->.>/>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@oApAqArAsAtAuAvAwAxAyAzA{A|A}A~AAABBBBBBCCCDDDDDDDDDDDEEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFG 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 *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 CG DG EG FG GG HG IG JG KG LG MG NG OG PG QG RG SG TG UG VG WG XG YG ZG [G \G ]G ^G _G `G aG bG cG dG eG fG gG hG iG jG kG lG mG nG oG pG qG rG sG tG uG vG wG xG yG zG {G |G }G ~G G G G G G G G G G G G G G G G G G H H H H H H H H I I J K K K K K K K K K K K K K 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 L L L 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 N O O O P P P P P P P P P P P P P Q Q Q Q Q Q Q Q Q Q Q R R R R R R R R R R R R R R R R R R R R R R R R R R !R "R #R $R %R &R 'R (R )R *R +R ,R -R .R /R 0R 1R 2R 3R 4R 5R 6S 7S 8S 9T :T ;U <U =U >U ?U @U AU BU CU DU EU FU GU HU IU JU KU LU MU NU OU PU QU RU SU TU UU VU WU XU YU ZU [U \U ]U ^U _U `U aU bU cU dU eU fU gU hU iU jU kU lU mU nU oU pU qU rU sU tU uU vU wU xU yU zU {U |U }U ~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 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 W W W W W W W X X X X X X X X X X X X X X X X X X X X X X X X X X X X Y Y Y Y Y Y Y Y Y Z Z Z Z Z Z Z [ [ [ [ [ \ ] ] ] ] ] ] ] ] ] ] ] ^ ^ ^ ^ ^ !^ "^ #^ $^ %^ &^ '^ (^ )^ *^ +^ ,^ -^ .^ /^ 0^ 1^ 2^ 3^ 4^ 5^ 6^ 7^ 8^ 9^ :^ ;^ <^ =^ >^ ?^ @^ A^ B^ C^ D^ E^ F^ G^ H^ I^ J^ K_ L_ M_ N_ O` P` Q` R` S` T` U` V` W` Xa Ya Zb [b \b ]b ^b _b `b ab bc cc dd ed fd gd he ie je ke le me ne of pg qg rg sg tg ug vg wg xg yg zg {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 g g g g g g g g g g g g g g g g g g g h h h i i i i i i i i i i i i i i i i i i j j j j j j j j j j j j j j j j j j j j k k k k k k k k k k k k k k k 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 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 'm (m )m *m +m ,m -m .m /m 0m 1m 2m 3m 4m 5m 6m 7m 8m 9m :m ;m <m =m >m ?m @m Am Bm Cm Dm Em Fm Gm Hm Im Jm Km Lm Mm Nm Om Pm Qm Rm Sm Tm Um Vm Wm Xm Ym Zm [m \m ]m ^m _m `m am bm cm dm em fm gm hm im jm km lm mm nn oo po qo ro so to uo vo wo xo yo zo {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 p p p p p p q r r r r r r r r r r r r r r r r r r r r r r r r r r r r s s s s s s s s s s s s s s s s s s s s !s "s #s $s %s &s 's (s )s *s +s ,s -s .s /s 0s 1s 2s 3s 4s 5s 6s 7s 8s 9s :s ;s <s =s >s ?s @s As Bs Cs Ds Es Fs Gs Hs Is Js Ks Ls Ms Ns Os Ps Qs Rt St Tt Ut Vt Wt Xt Yt Zt [t \t ]u ^u _u `u au bu cu du eu fu gu hu iu ju ku lu mu nu ou pu qu ru su tu uu vu wu xu yu zu {u |u }u ~u u u u u u u v w w w x y z { { { { { | | | | | | | | | | | | | | | } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } ~ ~ ~ ~ ~ ~ ~ ~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFNoneqxfuthark&Whether an option accepts an argument.zfutharkThe G 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{NoneNoneSafefuthark8A 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>"futharkAn error that is not the users fault, but a bug (or limitation) in the compiler. Compiler passes should only ever report this error - any problems after the type checker are *our* fault, not the users.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.NoneKsfutharkcA 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.HfutharkPCheck if the manifest specifies a required package with the given package path.futhark6Remove a required package from the manifest. Returns IX 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 Nonel/futharkLike J, 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 K and L.futharkBReturn the list element at the given index, if the index is valid.futhark3Return the first element of the list, if it exists.futharkLike M, but from the end.futharkLike M, but produces three lists.futharkLike M, 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. Also does shenanigans to handle improperly encoded outputs.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.futharkThe system-level lgamma() function.futharkThe system-level  lgammaf() function.futharkThe system-level tgamma() function.futharkThe system-level  tgammaf() function.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! NoneKfutharkdCalculate the given permutation of the list. It is an error if the permutation goes out of bounds.futhark Produce the inverse permutation.futhark[Return the first dimension not affected by the permutation. For example, the permutation [1,0,2] would return 2.futharkQCompose two permutations, with the second given permutation being applied first.futharkCheck whether the first list is a permutation of the second, and if so, return the permutation. This will also find identity permutations (i.e. the lists are the same) The implementation is naive and slow. futharkIf l is an index into the array a, then transposeIndex k n l. is an index to the same element in the array transposeArray k n a. futharkIf perm, is conceptually a map of a transposition, isMapTranspose perm returns the number of dimensions being mapped and the number dimension being transposed. For example, we can consider the permutation  [0,1,4,5,2,3]5 as a map of a transpose, by considering dimensions [0,1], [4,5], and [2,3] as single dimensions each.GIf the input is not a valid permutation, then the result is undefined.    Safe. futharksThis wrapper allows you to use a type that is an instance of the true class whenever the simile class is required.futharkLike , but rounds up.       Safe=>?futhark*Typeclass for monads that support logging.futharkAdd one log entry. futharkAppend an entire log.!futhark@Typeclass for things that can be turned into a single-entry log.$futharktTransform a log into text. Every log entry becomes its own line (or possibly more, in case of multi-line entries). !"#$#$!" None ,futhark^Monads that support a stateful package registry. These are also required to be instances of OF because most package registry operations involve network operations.0futharkEA package registry is a mapping from package paths to information about the package. It is unlikely that any given registry is global; rather small registries are constructed on-demand based on the package paths referenced by the user, and may also be combined monoidically. In essence, the PkgRegistry is just a cache.1futharkLInformation about a package. The name of the package is stored separately.4futharkILook up information about a specific commit, or HEAD in case of Nothing.5futhark[Information about a version of a single package. The version number is stored separately.8futhark1The directory inside the zipball containing the lib\ directory, in which the package files themselves are stored (Based on the package path).9futhark~The commit ID can be used for verification ("freezing"), by storing what it was at the time this version was last selected.;futhark8Timestamp for when the revision was made (rarely used).<futharkThe manifest is stored as a monadic action, because we want to fetch them on-demand. It would be a waste to fetch it information for every version of every package if we only actually need a small subset of them.PfutharkCreate memoisation around a < action to ensure that multiple inspections of the same revisions will not result in potentially expensive network round trips.@futharkRetrieve information about a package based on its package path. This uses Semantic Import Versioning when interacting with repositories. For example, a package  github.comuserrepo6 will match version 0.* or 1.* tags only, a package  github.comuserrepo/v2$ will match 2.* tags, and so forth..Bfuthark:Look up information about a specific version of a package.Cfuthark%Find the newest version of a package.,-./0123456789:;<=>?@ABC1234?@56789:;<=>0,-./ABCNone>JfutharkZA mapping of package revisions to the dependencies of that package. Can be considered a 0t without the option of obtaining more information from the Internet. Probably useful only for testing the solver.QfutharkA 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.RfutharkGiven a list of immediate dependency minimum version constraints, find dependency versions that fit, including transitive dependencies.KfutharkxRun the solver, producing both a package registry containing a cache of the lookups performed, as well as a build list.LfutharkYPerform package resolution with only pre-known information. This is useful for testing.JKLKLJNone Ofuthark.Prettyprint a value, wrapped to 80 characters.PfutharkPrettyprint a value to a S, wrapped to 80 characters.Qfuthark2Prettyprint a value without any width restriction.Rfuthark Re-export of T.Sfuthark,Prettyprint a list enclosed in curly braces.Tfuthark The document T ds separates ds1 with commas and encloses them with parentheses.UfutharkCMake sure that the given document is printed on just a single line.VfutharkStack and prepend a list of b s to another b?, separated by a linebreak. If the list is empty, the second b1 will be returned without a preceding linebreak.WfutharkKSurround the given document with enclosers and add linebreaks and indents.qUVWXY  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abjihgfedcOPQRSTUVWl  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abjihgfedcORSPQTUVWNoneSX_:Xfuthark+Conversion operators try to generalise the from t0 x to t1 instructions from LLVM.YfutharklZero-extend the former integer type to the latter. If the new type is smaller, the result is a truncation.ZfutharklSign-extend the former integer type to the latter. If the new type is smaller, the result is a truncation.[futharkyConvert value of the former floating-point type to the latter. If the new type is smaller, the result is a truncation.\futharkXConvert a floating-point value to the nearest unsigned integer (rounding towards zero).]futharkVConvert a floating-point value to the nearest signed integer (rounding towards zero).^futhark6Convert an unsigned integer to a floating-point value._futhark3Convert a signed integer to a floating-point value.`futharkSConvert an integer to a boolean value. Zero becomes false; anything else is true.afutharkIConvert a boolean to an integer. True is converted to 1 and False to 0.bfutharkComparison operators are like ls, but they return As. The somewhat ugly constructor names are straight out of LLVM.cfutharkAll types equality.dfutharkUnsigned less than.efutharkUnsigned less than or equal.ffutharkSigned less than.gfutharkSigned less than or equal.hfutharkFloating-point less than.ifuthark"Floating-point less than or equal.jfutharkBoolean less than.kfutharkBoolean less than or equal.lfutharkBinary operators. These correspond closely to the binary operators in LLVM. Most are parametrised by their expected input and output types.mfutharkInteger addition.nfutharkFloating-point addition.ofutharkInteger subtraction.pfutharkFloating-point subtraction.qfutharkInteger multiplication.rfutharkFloating-point multiplication.sfutharkeUnsigned integer division. Rounds towards negativity infinity. Note: this is different from LLVM.tfutharkcSigned integer division. Rounds towards negativity infinity. Note: this is different from LLVM.ufutharkFloating-point division.vfuthark,Unsigned integer modulus; the countepart to s.wfuthark*Signed integer modulus; the countepart to t.xfutharkHSigned integer division. Rounds towards zero. This corresponds to the sdiv instruction in LLVM.yfutharkHSigned integer division. Rounds towards zero. This corresponds to the srem instruction in LLVM.zfuthark,Returns the smallest of two signed integers.{futhark.Returns the smallest of two unsigned integers.|futhark3Returns the smallest of two floating-point numbers.}futhark,Returns the greatest of two signed integers.~futhark.Returns the greatest of two unsigned integers.futhark3Returns the greatest of two floating-point numbers.futhark Left-shift.futhark#Logical right-shift, zero-extended.futhark&Arithmetic right-shift, sign-extended.futhark Bitwise and.futhark Bitwise or.futharkBitwise exclusive-or.futharkInteger exponentiation.futharkFloating-point exponentiation.futhark#Boolean and - not short-circuiting.futhark"Boolean or - not short-circuiting.futharkVarious unary operators. It is a bit ad-hoc what is a unary operator and what is a built-in function. Perhaps these should all go away eventually.futharkE.g., ! True == False.futharkE.g.,  ~(~1) = 1.futhark abs(-2) = 2.futharkfabs(-2.0) = 2.0.futharkSigned sign function:  ssignum(-2) = -1.futharkUnsigned sign function:  usignum(2) = 1.futharkNon-array values.futharkThe only value of type cert.futharkA floating-point value.futharkAn integer value.futharkLow-level primitive types.futharkA floating point type.futharkAn integer type, ordered by size. Note that signedness is not a property of the type, but a property of the operations performed on values of these types.futharkA list of all integer types.futhark#A list of all floating-point types.futharkA list of all primitive types.futhark Create an  from a type and an Z.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 s.futhark*Signed integer modulus; the countepart to t.`futharkHSigned integer division. Rounds towards zero. This corresponds to the sdiv instruction in LLVM.afutharkHSigned integer division. Rounds towards zero. This corresponds to the srem instruction in LLVM.bfutharkMinimum of two signed integers.cfuthark!Minimum of two unsigned integers.dfutharkMaximum of two signed integers.efuthark!Maximum of two unsigned integers.ffuthark Left-shift.gfuthark#Logical right-shift, zero-extended.hfuthark&Arithmetic right-shift, sign-extended.ifuthark Bitwise and.jfuthark Bitwise or.kfutharkBitwise 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.lfuthark.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?mfuthark(Is the given integer value kind of zero?nfuthark,Is the given integer value kind of negative?futhark7The size of a value of a given primitive type in bites.futharkAThe size of a value of a given primitive type in eight-bit bytes.futhark?The size of a value of a given integer type in eight-bit bytes.futharkFThe size of a value of a given floating-point type in eight-bit bytes.futhark1True if the given binary operator is commutative.futhark;True if signed. Only makes a difference for integer types.XYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~lmoqtwxynprsuvz{|}~XYZ[\]^_`abcdefghijkSafeD@futharkdA 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.NoneM[8futharkbA 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. G4s, being lists of characters, are very slow, while Ss are based on byte-arrays.futhark2Whether some operator is commutative or not. The o: 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 S.(futhark Convert a S 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.O !#"$%&'()*+,!#" )%&'(*+,O$None=>?,DfutharkA part of an error message.EfutharkA literal string.FfutharkA run-time integer value.Gfuthark]An error message is a list of error parts, which are concatenated to form the final message.IfutharkAn 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.KfutharkThe name being bound.LfutharkPattern element attribute.Mfuthark A list of OLs, indicating how an array should be sliced. Whenever a function accepts a M{, that slice should be total, i.e, cover all dimensions of the array. Deviators should be indicated by taking a list of N es instead.Nfuthark,How to index a single dimension of an array.OfutharkFix index in this dimension.Pfuthark&DimSlice start_offset num_elems stride.QfutharkA function or lambda parameter.SfutharkName of the parameter.TfutharkFunction parameter attribute.UfutharkA subexpression is either a scalar constant or a variable. One important property is that evaluation of a subexpression is guaranteed to complete in constant time.Xfuthark:A list of names used for certificates in some expressions.[futharkVAn identifier consists of its name and the type of the value bound to the identifier._futharkInformation about which parts of a value/type are consumed. For example, we might say that a function taking three arguments of types ([int], *[int], [int]) has diet [Observe, Consume, Observe].`futharkConsumes this value.afutharkROnly observes value in this position, does not consume. A result may alias this.bfutharkAs aP, but the result will not alias, because the parameter does not carry aliases.cfutharkAn e> with uniqueness information, used for function return types.dfuthark[A type with shape and uniqueness information, used declaring return- and parameters types.efutharkA type with existentially quantified shapes - used as part of function (and function-like) return types. Generally only makes sense when used in a list.ffutharkJA type with shape information, used for describing the type of variables.gfuthark`An Futhark type is either an array or an element type. When comparing types for equality with p, shapes must match.kfuthark<A fancier name for '()' - encodes no uniqueness information.mfuthark:A string representing a specific non-default memory space.nfuthark!The memory space of a block. If oL, 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 (o) and GPU space.qfuthark>A class encompassing types containing array shape information.rfuthark0Return the rank of an array with the given size.sfutharkstripDims n shape strips the outer n dimensions from shape.tfuthark5Check whether one shape if a subset of another shape.ufuthark[The size of an array type as merely the number of dimensions, with no further information.wfutharkLike }q but some of its elements may be bound in a local environment instead. These are denoted with integral indices.xfutharkThe size of this dimension.yfuthark"Something that may be existential.|futhark{The size of an array as a list of subexpressions. If a variable, that variable must be in scope where this array is used.}futharkeThe size of an array type as a list of its dimension sizes, with the type of sizes being parametric.futharkIf the argument is a O, return its component.futharkIf the slice is all Os, return the components.futhark3The dimensions of the array produced by this slice.futharkA slice with a stride of one.futharkFix the P?s of a slice. The number of indexes must equal the length of  for the slice.OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefgihjklmnpoqrstuvwxy{z|}~I!#"kl}~|y{zxwuvqrstnpomgihjfedc_`abGHDEF[\]^XYZUWVQRSTNOPMIJKLNonefuthark$If a Haskell type is an instance of D, it means that a value of that type can be converted to a Futhark . This is intended to cut down on boilerplate when writing compiler code - for example, you'll quickly grow tired of writing Constant (LogVal True) loc.futhark Create a V U containing the given value.futhark1Utility definition for reasons of type ambiguity.futhark1Utility definition for reasons of type ambiguity.None=>?2futharkESomething 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 cs.futhark"Typeclass for things that contain es.futhark"Typeclass for things that contain ds.futhark"Typeclass for things that contain fs.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 q.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 r' 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 {.futharkAs , but on a single type.futhark 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. If the shape s has rank 0, then the tP will be returned, although if it is an array, with the uniqueness changed to u.futharkConstruct an array whose rows are the given type, and the outer size is the given dimension. This is just a convenient wrapper around .futharkSConstruct an array whose rows are the given type, and the outer size is the given }-. This is just a convenient wrapper around .futhark_Set the dimensions of an array. If the given type is not an array, return the type unchanged.futharkkSet the existential dimensions of an array. If the given type is not an array, return the type unchanged.futharkwReplace the size of the outermost dimension of an array. If the given type is not an array, it is returned unchanged.futharksReplace the size of the given dimension of an array. If the given type is not an array, it is returned unchanged.futhark2Replace the outermost dimension of an array shape.futhark2Replace the specified dimension of an array shape.futhark peelArray n t4 returns the type resulting from peeling the first n array dimensions from t . Returns Nothing if t has less than n dimensions.futharkstripArray n t removes the nZ outermost layers of the array. Essentially, it is the type of indexing an array of type t with n indexes.futharkiReturn the size of the given dimension. If the dimension does not exist, the zero constant is returned.futharkJReturn the dimensions of a type - for non-arrays, this is the empty list.futharkVReturn the existential dimensions of a type - for non-arrays, this is the empty list.futharkiReturn the size of the given dimension. If the dimension does not exist, the zero constant is returned.futharkReturn the size of the given dimension in the first element of the given type list. If the dimension does not exist, or no types are given, the zero constant is returned.futhark0Return the immediate row-type of an array. For [[int]], this would be [int].futharkAA type is a primitive type if it is not an array or memory block.futhark.Returns the bottommost type of an array. For [[int]], this would be int5. If the given type is not an array, it is returned. futhark*Swap the two outer dimensions of the type. futharkRearrange the dimensions of the type. If the length of the permutation does not match the rank of the type, the permutation will be extended with identity. futharkdiet t< returns a description of how a function parameter of type t might consume its argument. futharkx `subtypeOf` y is true if x is a subtype of y (or equal to y ), meaning x is valid whenever y is. futharkxs `subtypesOf` ys is true if xs is the same size as ys, and each element in xs/ is a subtype of the corresponding element in ys..futharkGiven the existential return type of a function, and the shapes of the values returned by the function, return the existential shape context. That is, those sizes that are existential in the return type.futhark@The set of identifiers used for the shape context in the given es.futharkIf all dimensions of the given RetType9 are statically known, return the corresponding list of f.futharkGiven two lists of e(s of the same length, return a list of es that is a subtype (as per  isSubtypeOf) of the two operands.futharkGiven a list of eAs and a list of "forbidden" names, modify the dimensions of the es such that they are y where they were previously {0 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.sfutharkLike  shapeMapping%, but works with explicit dimensions.futharkLike 4, but produces a mapping for the dimensions context.>     >     None=?HVG/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 e5, but may have more, notably an existential context.0futhark-Contruct a return type from a primitive type.1futharkGiven 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.2futharksA type representing the return type of a body. It should contain at least the information contained in a list of e6s, but may have more, notably an existential context.3futhark,Construct a body type from a primitive type.6futhark`Given shape parameter names and value parameter types, produce the types of arguments accepted./0123456234/0156None>HV:futhark)Annotation for every let-pattern element.;futhark Annotation for every expression.<futharkAnnotation for every body.=futhark5Annotation for every (non-lambda) function parameter.>futhark/Annotation for every lambda function parameter.?futhark-The return type annotation of function calls.@futhark'The return type annotation of branches.AfutharkExtensible operation./01234569A?:;<=>@ 9A?:;<=>@None1=>?HVg7BfutharkAn entire Futhark program.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 t 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 u.futharkHThe new dimension is guaranteed to be numerically equal to the old one.futharkGThe new dimension is not necessarily numerically equal to the old one.futhark!Type alias for namespace reasons.futhark`A body consists of a number of bindings, terminating in a result (essentially a tuple literal).futhark5The result of a body is a sequence of subexpressions.futharkA sequence of statements.futharkA local variable binding.futhark3Auxilliary Information associated with a statement.futhark#A type alias for namespace control.futhark?A pattern is conceptually just a list of names and their types.futhark-existential context (sizes and memory blocks)futhark "real" valuesfuthark#A type alias for namespace control.]OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefgihjklmnpoqrstuvwxy{z|}~/01234569A?:;<=>@BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfegjlihkmovqr{|ynstpuwxz}~!#"kluvqrstnpogihj_`ab[\]^UWVIJKLmovqr{|ynstpuwxz}~lmoqtwxynprsuvz{|}~bcdefghijkXYZ[\]^_`agjlihkYabc]^_`Z[\dfeTUVWXSQRSTRQJKLMNOPIEFGHBCDNonefutharkThe 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 I.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>HVGfutharkThe f of a parameter.futharkThe d of a parameter.futharkAn [ corresponding to a parameter.futharkAn [$ corresponding to a pattern element.futharkThe type of a name bound by a .futharkSet the lore of a .futharkAAll pattern elements in the pattern - context first, then values.futharkReturn a list of the [s bound by the .futharkReturn a list of the context [s bound by the .futharkReturn a list of the value [s bound by the .futharkReturn a list of the s bound by the .futharkReturn a list of the #s bound by the context part of the .futharkReturn a list of the !s bound by the value part of the .futharkReturn a list of the typess bound by the .futharkReturn a list of the Types!s bound by the value part of the .futharkReturn a list of the ExtTypes"s bound by the value part of the I, with existentials where the sizes are part of the context part of the .futhark(Return the number of names bound by the .futharkCreate a pattern using f as the attribute.None=>?Ufuthark:The class of lores whose annotations can be prettyprinted.futhark=Class for values that may have some prettyprinted annotation.OSSONone,1=>?@ACHMV futhark4A monad transformer that carries around an extended (. Its $( method will first look in the extended (, and then use the $ method of the underlying monad.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 (1, but also the ability to locally extend it. A v containing a (- is the prototypical example of such a monad."futharkRun a computation with an extended type environment. Note that this is intended to *add* to the current type environment, it does not replace it.#futharkThe class of applicative functors (or more common in practice: monads) that permit the lookup of variable types. A default method for $L exists, which is sufficient (if not always maximally efficient, and using w to fail) when & 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.&futharkBReturn the type environment contained in the applicative functor.'futharkEReturn the result of applying some function to the type environment.(futharkIA scope is a mapping from variable names to information about that name.)futhark!How some name in scope was bound.3futharkJIf two scopes are really the same, then you can convert one to the other.5futhark3Run a computation in the extended type environment. !"#$%'&()*+,-./012345#$%'&)*+,-!"( .12/0345NoneyLfutharkExpress a monad expression on a syntax node. Each element of this structure expresses the action to be performed on a given child.VfutharkExpress a monad mapping operation on a syntax node. Each element of this structure expresses the operation to be performed on a given child.YfutharkLMost bodies are enclosed in a scope, which is passed along for convenience.`futhark/A mapper that simply returns the tree verbatim.afutharkXMap 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.dfutharkLike d , but in the x monad.ffutharkA no-op traversal.gfutharkAs a$, but do not construct a result AST.LMNOPQRSTUVWXYZ[\]^_`abcdefgVWXYZ[\]^_`adecbLMNOPQRSTUfgNone =>?@AHV׬hfutharkuAny operation must define an instance of this class, which describes the type of the operation (at the value level).jfutharkThe type of a subexpression.kfutharkmapType 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.lfuthark"The type of a primitive operation.mfutharkThe type of an expression.nfuthark/The number of values returned by an expression.ofuthark|The type of a body. Watch out: this only works for the degenerate case where the body does not already return its context.yfuthark:Given the context and value merge parameters of a Futhark loop, produce the return type.)/0123456 !"#$%'&()*+,-./012345hijklmnomnjolkhiNone=>?tfutharkEither return precomputed free names stored in the attribute, or the freshly computed names. Relies on lazy evaluation to avoid the work.vfutharkZA class indicating that we can obtain free variable information from values of this type.xfuthark+A computation to build a free variable set.yfutharkA set of names.zfuthark(Does the set of names contain this name?{futhark(Construct a name set from a list. Slow.|futhark,Turn a name set into a list of names. Slow.}futhark(Construct a name set from a single name.~futhark"The intersection of two name sets.futharkDo the two name sets intersect?futhark-Subtract the latter name set from the former.futharkMap over the names in a set.futhark-Consider a variable to be bound in the given x computation.futhark"Take note of a variable reference.futhark*Take note of a set of variable references.futharkReturn the set of variable names that are free in the given statements and result. Filters away the names that are bound by the statements.futhark/The free variables of some syntactic construct.futhark1The names bound by the bindings immediately in a .futharkThe names bound by a binding.futhark The names bound by the bindings.futhark<The names of the lambda parameters plus the index parameter.tuvwxyz{|}~yz}{|~vwtuxNoneMfuthark#Phantom type for number of threads.futhark/Phantom type for the group size of some kernel.futhark5Phantom type for the number of groups of some kernel.futharkHA wrapper supporting a phantom type for indicating what we are counting.futharkeThe class of some kind of configurable size. Each class may impose constraints on the valid values.futharkELikely not useful on its own, but querying the maximum can be handy.futharkwAn indication of which comparisons have been performed to get to this point, as well as the result of each comparison.   None7futhark_A primitive expression parametrised over the representation of free variables. Note that the z, {, and |< 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 } on type errors.futhark!The type of values returned by a 4. This function returning does not imply that the  is type-correct.~futhark/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 | instance.futharkBoolean-valued PrimExps.futharkBoolean-valued PrimExps.XYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~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:#pfutharkA 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 tO 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=?5 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 G for the name template.futharkProduce a fresh ID*, using the given base name as a template.#futharkProduce a fresh *, using the given base name as a template.$futharkProduce a fresh N, using the given name as a template, but possibly appending something more..%futharkProduce a fresh [%, using the given name as a template.&futharkProduce a fresh [, using the given [1 as a template, but possibly modifying the name.'futharkProduce several [As, using the given name as a template, based on a list of types.(futharkProduce a fresh Q%, using the given name as a template.)futharkProduce a fresh Q, using the given Q1 as a template, but possibly modifying the name. !"#$%&'() !"#$%&'()$None,=>?MZ3futhark.Lores in which all annotations are renameable.4futharkMembers of class 4 can be uniquely renamed.5futharkwRename the given value such that it does not contain shadowing, and has incorporated any substitutions present in the 6 environment.6futhark)The monad in which renaming is performed.7futharkRename 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.8futharkRename 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.9futharkRename 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;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.3456789:;<=>?@789:;<=6>?@453%None,=>?HVw/_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 q.afutharkA type class for operations.bfutharkLike h, but for arbitrary ops.cfuthark,Should we try to hoist this out of branches?dfutharkisBuiltInFunction k is r if k is an element of e.efuthark0A map of all built-in functions and their types.ffuthark;Find the function of the given name in the Futhark program.gfutharkIf the expression is a m, return that m , otherwise I.hfutharkAn 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.ifuthark"Return the variable names used in W* subexpressions. May contain duplicates.jfutharkIf the m is a W return the variable name.kfuthark>Return the variable dimension sizes. May contain duplicates.lfutharkDoes 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.mfutharkHow 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).nfutharkA  with empty X.ofuthark-The certificates associated with a statement.pfuthark Add certificates to a statement.qfutharkAConstruct the type of an expression that would match the pattern.rfuthark2Create a pattern corresponding to some parameters.       /0123456 !"#$%'&()*+,-./012345hijklmnotuvwxyz{|}~_`abcdefghijklmnopqrdefghijklmnopqrabc_`&None=>?HV|i{futhark*Something that contains alias information.|futhark"The alias of the argument element.tuvwxyz{|}~}~{|xyztuvwNone}?8  OSXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefgihjklmnpoqrstuvwxy{z|}~     /01234569A?:;<=>@BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfegjlihkmovqr{|ynstpuwxz}~ !"#$%'&()*+,-./012345LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnotuvwxyz{|}~_`abcdefghijklmnopqr'Nonelmfuthark5Expand the usage table based on aliasing information.futharkfHas 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.(None>)None&',Gfuthark8Convert a binding from one lore to another, if possible.*None>M-  +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.XYZ[\]^_`abcdefghijklmoqnprsuvz{|}~XYZ[\]^_`abcdefghijklmoqnprsuvz{|}~-None=?_futharkOenvironment recording the position and a list of variable-to-range bindings.futhark[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.futhark1Binds 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 ,=>?HVrfutharkLSomething 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.futhark!The range of a scalar expression.futhark,Ranges of the value parts of the expression.          /None =>?HVXv0futhark&The lore for the basic representation.]  OSXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefgihjklmnpoqrstuvwxy{z|}~     /01234569A?:;<=>@BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfegjlihkmovqr{|ynstpuwxz}~ !"#$%'&()*+,-./012345LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnotuvwxyz{|}~_`abcdefghijklmnopqr     0123456789:;< 08<9:;12345670None>2DfutharkkPerform variable range analysis on the given program, returning a program with embedded range annotations.CDEFGHIDICGHEF1None>MJfutharkA compiler pass transforming a B of a given lore to a B of another lore.Lfuthark{Name of the pass. Keep this short and simple. It will be used to automatically generate a command-line option name via S.MfutharkQA slightly longer description, which will show up in the command-line help text.Ofuthark"The monad in which passes execute.Pfuthark Execute a OL action, yielding logging information and either an error text or a result.QfutharkTurn an  computation into a O . If the  is , the result is a .RfutharkTurn an  monadic computation into a O . If the  is , the result is an exception.SfutharkWTake the name of the pass, turn spaces into dashes, and make all characters lowercase. JKLMNOPQRST OPQRJKLMNST2None>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.dfutharkThe 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.qfuthark1Add several bindings at the outermost level of a .rfuthark1Add a single binding at the outermost level of a .* !"#$%&'()[\]^_`abcdefghijklmnopqrdefghl[\]^_`abciqrjkmnop3None ,=>?@AHMVfutharkLike @, but throw away the result and just return the added bindings.futharkAs  , but uses `8 to add the returned bindings to the surrounding monad.> !"#$%&'()[\]^_`abcdefghijklmnopqrstuvwxyz{|}~t|}~uvwxyz{s4None=>?HV futhark'The aliases of what is returned by the %, and what is consumed inside of it.futhark&Everything consumed in the expression.futhark&The aliases of the let-bound variable.futharkA wrapper around y) to get around the fact that we need an t instance, which y does not have.futhark&The lore for the basic representation.futharkIEverything consumed in the given bindings and result (even transitively).c  OSXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefgihjklmnpoqrstuvwxy{z|}~     /01234569A?:;<=>@BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfegjlihkmovqr{|ynstpuwxz}~ !"#$%'&()*+,-./012345LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnotuvwxyz{|}~_`abcdefghijklmnopqrtuvwxyz{|}~5None> futhark,Perform alias analysis on a Futhark program.6None=>?HV ufutharkWisdom about a body.futharkWisdom about an expression.futhark%The wisdom of the let-bound variable.7None=>?HV1(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.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.futhark1Construct an unspecified value of the given type.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 P?s of entire dimensions appended to the full dimensionality of tP. This function is used to turn incomplete indexing complete, as required by v.futhark sliceAt t n slice returns slice but with Ps of the outer nf dimensions prepended, and as many appended as to make it a full slice. This is a generalisation of .futharkLike (, but the dimensions are simply numeric.futhark^Does the slice describe the full size of the array? The most obvious such slice is one that PQs 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 `."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, ).&futhark!Can be used as the definition of h for a d& instance for simple representations.m !"#$%&'()[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&/      !"#$%&8None8=>?@AHMPVXUc)futhark,The class of lores that can be type-checked.5futhark/Used at top level; can be locally changed with P.6futhark$The type checker runs in this monad.futharkThe environment contains a variable table and a function table. Type checking happens with access to this environment. The function table is only initialised at the very beginning, but the variable table will be extended during type-checking when let-expressions are encountered.futharkThe  data structure is used to keep track of which variables have been consumed, as well as whether a violation has been detected.futharkCA tuple of a return type and a list of parameters, possibly named.8futhark A type error.:futhark6Information about an error during type checking. The ? instance for this type produces a human-readable description.LfutharkAdd 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 K.futharkbMark a name as bound. If the name has been bound previously in the program, report a type error.futharkjProclaim that we have made read-only use of the given variable. No-op unless the variable is array-typed.Nfuthark5Proclaim that we have written to the given variables.QfutharkPermit consumption of only the specified names. If one of these names is consumed, the consumption will be rewritten to be a consumption of the corresponding alias set. Consumption of anything else will result in a type error.futharkfGiven the immediate aliases, compute the full transitive alias set (including the immediate aliases).futharkcheckAnnotation loc s t1 t2 checks if t2 is equal to t1 . If not, a F is raised.Ufuthark require ts se* causes a '(TypeError vn)' if the type of se* is not a subtype of one of the types in ts.Vfuthark Variant of U working on variable names.WfutharkType check a program containing arbitrary type information, yielding either a type error or a program with complete type information.gfutharkRemove all aliases from the .C)1/,-2+3.*0456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkCW89:;<=>?@ABCDEFGHIJ6KLM)1/,-2+3.*045ST7OPUVkZ^[b`acdefghi_jYX]\NQR9None>MYfutharkkIf Verbose, print log messages to standard error. If VeryVerbose, also print logs from individual passes.#}~}~:None>]futharkReshape the arguments to a function so that they fit the expected shape declarations. Not used to change rank of arguments. Assumes everything is otherwise type-correct.  ;Noneefuthark 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.futhark5Applying a monadic transformation to the leaves in a .futhark3Substituting names in a PrimExp with other PrimExpsXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~<Nonefuthark8ignoring permutations, is the index function contiguous?futhark.monotonously increasing, decreasing or unknownfutharkLMAD'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 }futhark,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?futhark6Does the index function have an ascending permutation?futharkShape of an index function.futharkShape of an LMAD.futhark(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.futhark<Handle the case where a slice can stay within a single LMAD.futharkSlice an index function.futharkBHandle the simple case where all reshape dimensions are coercions.futharkHHandle 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.futharkHandle 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.futhark%Indexing a delayed array if possible.futhark?Which names are available just before the most enclosing loop?futhark/We are in a situation where we should simplifyhoistKun-existentialise memory as much as possible - typically, inside a kernel.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.futharkmUpdating the ranges of all symbols whenever we enter a branch is presently too expensive, and disabled here.futhark]Refines the ranges in the symbol table with ranges extracted from branch conditions. cond# is the condition of the if-branch. futhark>Hide definitions of those entries that satisfy some predicate.futharkSHide these definitions, if they are protected by certificates in the set of names.2     2     >None ,=>?HVڰ futharkLike V, 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..futhark1How many reduction results are produced by these s?/futhark:Combine multiple reduction operators to a single operator.1futhark_Construct a lambda that takes parameters of the given types and simply returns them unchanged.2futhark'Is the given lambda an identity lambda?4futhark3A 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.Cfuthark2Get Stream's accumulators as a sub-expression list5! "#$%&'()*+,-./0123456789:;<=>?@ABCDEF5()*+,-! "#$%&'./DC0AB123456789:<;=>EF?@?None>HVefutharkTurns a binding of a redomap into two seperate bindings, a map binding and a reduce" binding (returned in that order).$Reuses the original pattern for the reduce&, and creates a new pattern with new [s for the result of the map.Only handles a  with an empty ffutharkLike e , but for Scanomap.gfutharkTurn a Screma into simpler Scremas that are all simple scans, reduces, and maps. This is used to handle Scremas that are so complicated that we cannot directly generate efficient parallel code for them. In essense, what happens is the opposite of horisontal fusion."XYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !"#$%&'()[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&defghijkdefghikj@None>HV%lmnnmlANone=?HVayfuthark&The lore for the basic representation.n  OSXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefgihjklmnpoqrstuvwxy{z|}~     /01234569A:;<=>@BCDEFGHIJKLMNOPTUVWXZ[\]^_`abcdfeghjlikovqr{|ynstpuwxz}~ !"#$%'&()*+,-./012345LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnotuvwxyz{|}~_`abcdefghijklmnopqr! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFopqrstuvwxycyvutxwsrqpoOXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHIKLMNOPQRSTUWVXYZ[\]^_`abcdefgihjklmnpoqrstuvwxy{z|}~/01234569A:;<=>@BCDEFGHIJKLMNOPTVWXZ[\]^_`abcdfegjlikovqr{|ynstpuwxz}~TUIJghBNone,>HVxfuthark]The constraints that a monad must uphold in order to be used for first-order transformation.futharkFirst transform any nested v or s 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.CNone>HVfuthark1Interchange 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)DNoneM6None =?@AHMVfutharkYA mapping from external variable names to the corresponding internalised subexpressions.futharkuExtra parameters to pass when calling this function. This corresponds to the closure of a locally defined function.futhark;Add a function definition to the program being constructed.futharkExecute the given action if / is true, otherwise just return an empty list.futharkExecute the given action if / is true, otherwise just return an empty list.;lXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !"#$%&'()[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&defghijklENonefutharkThe call graph is just a mapping from a function name, i.e., the caller, to a list of the names of functions called by the function. The order of this list is not significant.futharkbuildCallGraph progw build the program's Call Graph. The representation is a hashtable that maps function names to a list of callee names.futharkbuildCallGraph ftable cg fname updates Call Graph cg% with the contributions of function fname=, and recursively, with the contributions of the callees of fname.FNone ,1=>?@AHVA futhark!SplitSpace o w i elems_per_thread.Computes how to divide array elements to threads in a kernel. Returns the number of elements in the chunk that the current thread should take.w5 is the length of the outer dimension in the array. i: is the current thread index. Each thread takes at most elems_per_thread elements. If the order o is , thread with index i should receive elements Zi*elems_per_tread, i*elems_per_thread + 1, ..., i*elems_per_thread + (elems_per_thread-1). If the order o is  stride$, the thread will receive elements =i, i+stride, i+2*stride, ..., i+(elems_per_thread-1)*stride.futharkCombine cspace ts aspace bodyX will combine values from threads to a single (multidimensional) array. If we define (is, ws) = unzip cspace, then ws0 is defined the same accross all threads. The cspace defines the shape of the resulting array, and the identifiers used to identify each individual element. Only threads for which all ((i,w) -> i < w) aspace( is true will provide a value (of type ts), which is generated by body.NThe result of a combine is always stored in local memory (OpenCL terminology)9The same thread may be assigned to multiple elements of , if the size of the  exceeds the group size.futharkGroupReduce w lam input (with (nes, arrs) = unzip input+), will perform a reduction of the arrays arrs+ using the associative reduction operator lam and the neutral elements nes. The arrays arrs must all have outer dimension w0, which must not be larger than the group size.qCurrently a GroupReduce consumes the input arrays, as it uses them for scratch space to store temporary resultsKAll threads in a group must participate in a GroupReduce (due to barriers)The length of the arrays wb can be smaller than the number of elements in a group (neutral element will be filled in), but w* can never be larger than the group size.futharkSame restrictions as with .futharkGroupGenReduce  length  destarrays  op  bucket  values locksarraysfutharkxHACK: Semantically identity, but inserts a barrier afterwards. This reflects a weakness in our kernel representation.futharkqA combine can be fully or partially in-place. The initial arrays here work like the ones from the Scatter SOAC.futhark"How an array is split into chunks.GNone,1=>?@AHVXmXfuthark=A host-level operation; parameterised by what else it can do. futhark!SplitSpace o w i elems_per_thread.Computes how to divide array elements to threads in a kernel. Returns the number of elements in the chunk that the current thread should take.w5 is the length of the outer dimension in the array. i: is the current thread index. Each thread takes at most elems_per_thread elements. If the order o is  =, thread with index i should receive elements Zi*elems_per_tread, i*elems_per_thread + 1, ..., i*elems_per_thread + (elems_per_thread-1). If the order o is  > stride$, the thread will receive elements =i, i+stride, i+2*stride, ..., i+(elems_per_thread-1)*stride. futhark'Produce some runtime-configurable size. futharkThe maximum size of some class. futhark8Compare size (likely a threshold) with some Int32 value. futharkA segmented operation. futharkLike L, but just for  s. futharkLike V, but just for  s. futharksThe KernelSpace must always have at least two dimensions, implying that the result of a SegRed is always an array. futharkIndex space of a  . futharkkFlat physical index corresponding to the dimensions (at code generation used for a thread ID or similar). futharkAt which level the *body* of a   executes. futharkLike  , but with the invariant that the results produced are only used within the same physical thread later on, and can thus be kept in registers. May only occur within an enclosing   construct. "futharkFDo we need group-virtualisation when generating code for the segmented operation? In most cases, we do, but for some simple kernels, we compute the full number of groups in advance, and then virtualisation is an unnecessary (but generally very small) overhead. This only really matters for fairly trivial but very wide mapC kernels where each thread performs constant-time work on scalars. &futharkuEach "worker" in the kernel returns this. Whether this is a result-per-thread or a result-per-group depends on the  . *futharkThe body of a Kernel. 4futharkIn 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. :futharkIn case this operator is semantically a vectorised operator (corresponding to a perfect map nest in the SOACS representation), these are the logical "dimensions". This is used to generate more efficient code. <futhark"How an array is split into chunks. ?futhark1How many reduction results are produced by these  /s? Ffuthark!A mapper that simply returns the   verbatim. HfutharkA no-op traversal. IfutharkAs  G, but ignoring the results.Y                           ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 ; : < = > ? @ A B C D E F G H I JL 5 6 7 8 9 ; : / 0 1 2 3 4 ? * + , - . % & ' ( ) @ < = >           ! " # $ C D E     B A     F G    H I      JHNone=?HVpR  OSXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefgihjklmnpoqrstuvwxy{z|}~     /01234569A?:;<=>@BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfegjlihkmovqr{|ynstpuwxz}~ !"#$%'&()*+,-./012345LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnotuvwxyz{|}~_`abcdefghijklmnopqr! ()*+,-./0123456789:;<=>?@ABCDEF                           ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 ; : < = > ? @ A B C D E F G H I J 0 ! ()*+,-./0123456789:;<=>?@ABCDEFINone>HVfuthark=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.  JNone  KNone>HVdfutharkInt32futharkInt32futharkInt64futharkInt64futharkInt32 futharkLike  u, but cap the thread count to the input size. This is more efficient for small kernels, e.g. summing a small array.futharkGiven a chunked fold lambda that takes its initial accumulator value as parameters, bind those parameters to the neutral element instead. futharkSegment indexes and sizes.  LNone =>?@AHPV_ futhark"Description of distribution to do.futhark*Also related to avoiding identity mapping. futharkaNote: first element is *outermost* nesting. This is different from the similar types elsewhere! futharkFirst pair element is the very innermost ("current") target. In the list, the outermost target comes first. Invariant: Every element of a pattern must be present as the result of the immediately enclosing target. This is ensured by  & by removing unused pattern elements.futharkiFirst pair element is the very innermost ("current") nest. In the list, the outermost nest comes first.futharkBoth parameters and let-bound. futharkvAdd new outermost nesting, pushing the current outermost to the list, also taking care to swap patterns if necessary. futharkaAdd new innermost nesting, pushing the current outermost to the list. It is important that the  U has the right order (non-permuted compared to what is expected by the outer nests). futharkqRemove these arrays from the outermost nesting, and all uses of corresponding parameters from innermost nesting. futharkFlatten a kernel nesting to: The index space.:The kernel inputs - note that some of these may be unused.' ' MNone>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.  NNone>HV  ONone>HVfutharkRThe 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).futharkInformation about a loop that has been tiled inside a kernel, as well as the kinds of changes that we would then like to perform on the kernel.futharkStatements that we insert directly into every thread-private SegMaps. This is for things that cannot efficiently be computed once in advance in the prelude SegMap, primarily (exclusively?) array slicing operations.futhark]Move statements from prelude to postlude if they are not used in the tiled statement anyway.futharkrPartition prelude statements preceding a tiled loop (or something containing a tiled loop) into three categories:I1) Group-level statements that are invariant to the threads in the group.V2) Thread-variant statements that should be computed once with a segmap_thread_scalar.Q3) Thread-variant statements that should be recomputed whenever they are needed.%The third category duplicates computation, so we only want to do it when absolutely necessary. Currently, this is necessary for results that are views of an array (slicing, rotate, etc), because these cannot be efficiently represented by a scalar segmap (they'll be manifested in memory).  PNone>HV futharkName of result. futharkType of result. QNone ,=>?@AHMV futhark>Apply the in-place lowering optimisation to the given program.  RNone>HMV> futhark2A collection of both top-down and bottom-up rules.futhark A collection of bottom-up rules.futharkA collection of top-down rules. futharkzContext for a rule applied during bottom-up traversal of the program. Takes a symbol table and usage table as arguments. futharkhContext for a rule applied during top-down traversal of the program. Takes a symbol table as argument.futharkNA collection of rules grouped by which forms of statements they may apply to. futhark`A simplification rule takes some argument and a statement, and tries to simplify the statement. futharkTAn efficient way of encoding whether a simplification rule should even be attempted. !futharkGive it a shot. "futhark Don't bother. #futhark6The monad in which simplification rules are evaluated.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."                     ! " # $ % & ' (" # $ % ! "                     & ' (SNone>$ 6futhark?A function that, given a variable name, returns its definition. 7futhark+foldClosedForm look foldfun accargs arrargs, determines whether each of the results of foldfun# can be expressed in a closed form. 8futhark+loopClosedForm pat respat merge bound bodysC determines whether the do-loop can be expressed in a closed form.futhark Lambda-bound 6 7 8 7 8 6TNone>HPSVXfutharkKA simple rule is a top-down rule that can be expressed as a pure function.futhark9A function that, given a subexpression, returns its type. 9futharkA 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. 9 : 9 :UNone ,=>?@AHMV Mfuthark+Blocker for hoisting out of parallel loops. Nfuthark-Blocker for hoisting out of sequential loops. Ofuthark%Blocker for hoisting out of branches. Pfuthark(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.. cfutharkSimplify 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?F ; < = > ? @ A B C D E F G H J I 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/ @ U V B C D E F G A T H J I S K L M N O P Q [ R ? ] a ^ \ _ b W X Y = ; < d i f g h e Z c > `VNone>a ~futhark Simplify a $, including copy propagation. If a  refers to a name that is a V, the node turns into a . futharkLike  ~, but where leaves may be ys. ~  ~ WNone ,=>?@AHV2 futhark_The memory return of a function, which must always indicate where returned arrays are located. futharkTThe return of a body, which must always indicate where returned arrays are located. futharkAThe memory return of an expression. An array is annotated with Maybe MemReturn{, which can be interpreted as the expression either dictating exactly where the array is located when it is returned (if 8), or able to put it whereever the binding prefers (if I).This is necessary to capture the difference between an expression that is just an array-typed variable, in which the array being "returned" is located where it already is, and a copy expression, whose entire purpose is to store an existing array in some arbitrary location. This is a consequence of the design decision never to have implicit memory copies. futharkSA description of the memory properties of an array being returned by an operation. futharkAThe array is located in a memory block that is already in scope. futhark8The operation returns a new (existential) memory block. futhark?Memory information for an array bound somewhere in the program. futhark7Located in this memory block with this index function. futharkA summary of the memory information for every let-bound identifier, function parameter, and return value. Parameterisered over uniqueness, dimension, and auxiliary array information. futharkA primitive value. futharkA memory block. futharkThe array is stored in the named memory block, and with the given index function. The index function maps indices in the array to element offset, notl byte offsets! To translate to byte offsets, multiply the offset with the size of the array element type. futhark9An index function that may contain existential variables. futhark>The index function representation used for memory annotations. futhark`Allocate a memory block. This really should not be an expression, but what are you gonna do... futhark.A lore containing explicit memory information.futhark/Helper function for index function unification.0The first return value maps a VName (wrapped in {) to its Int (wrapped in yH). In case of duplicates, it is mapped to the *first* Int that occurs.5The second return value maps each Int (wrapped in an y) to a  y: 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? futharkJConstruct the scalar memory space corresponding to a given primitive type. futhark/A mapping from all scalar memory spaces to the  they store.  OSXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefgihjklmnpoqrstuvwxy{z|}~     /01234569A?:;<=>@BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfegjlihkmovqr{|ynstpuwxz}~ !"#$%'&()*+,-./012345LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnotuvwxyz{|}~_`abcdefghijklmnopqr                           ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 ; : < = > ? @ A B C D E F G H I J " XNone,8=>?@AHMPVIfuthark1Monad 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.futharkWhen allocating memory, put it in this memory space. This is primarily used to ensure that group-wide statements store their results in local memory.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.  YNone ,=>?@AHMVXM*futharkQThe 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.  ZNone=>?@AO futharkThe operations that permit CSE.futhark*Perform CSE within any nested expressions. futhark+Perform CSE on every function in a program.    [None,>X 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.  = @ A B C D E F G K R T     B C D E F G @ A T R = K \None,>Z futharkRun copy propagation.  ]None =>?@AHVdfutharkNever constructed.futhark]Getting the roots of what to hoist, for now only variable names that represent shapes/sizes.futharkmRemove all arguments to the map that are simply replicates. These can be turned into free variables instead.futharkLike  , but for *.futhark0Remove inputs that are not used inside the SOAC.futharkSome of the results of a reduction (or really: Redomap) may be dead. We remove them here. The trick is that we need to look at the data dependencies to see that the "dead" result is not actually used for computing one of the live ones.futhark@If we are writing to an array that is never used, get rid of it.              ^None=>?@AHMSVX_e!     ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; ?HVq KfutharkEConvert 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". K K`None=>?@AHMSVX_x OfutharkqTransform a program using SOACs to a program using explicit kernels, using the kernel extraction transformation.futhark(Returns the sizes of nested parallelism.futharkIntra-group parallelism is worthwhile if the lambda contains non-map nested parallelism, or any nested parallelism inside a loop.futhark\A lambda is worth sequentialising if it contains nested parallelism of an interesting kind. O OaNone>futhark"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. XfutharkA composition of inlineAggressively and  Y=, to avoid the cost of type-checking the intermediate stage. YfutharkremoveDeadFunctions progU removes the functions that are unreachable from the main function from the program. X Y X YbNone ,=>?@AHV Z [ \ Z [ \cNone ,=>?@AHVfutharkmGetting 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 not 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. b c b cdNone> d e f g d e f geNone>HMVfuthark:A map from memory block names to new index function bases.futharkhA description of allocations that have been extracted, and how much memory (and which space) is needed.futharkExtract allocations from Thread statements with extractThreadAllocations. h hfNone ofutharkThe assertion-resolver pass. o ogNone=?HVВ- pfuthark8The reason why some expression cannot be converted to a  r value. qfuthark,The expression is not a (tuple-)SOAC at all. rfuthark/A definite representation of a SOAC expression. wfuthark&One array input to a SOAC - a SOAC may have multiple inputs, but all are of this form. Only the array inputs are expressed with this type; other arguments, such as initial accumulator values, are plain expressions. The transforms are done left-to-right, that is, the first element of the   list is applied first. yfuthark0A view of the last transformation to be applied. |futhark1A view of the first transformation to be applied. futhark:A sequence of array transformations, heavily inspired by Data.Seq. You can decompose it using viewF and viewL, and grow it by using   and  . These correspond closely to the similar operations for sequences, except that appending will try to normalise and simplify the transformation sequence.The data type is opaque in order to enforce normalisation invariants. Basically, when you grow the sequence, the implementation will try to coalesce neighboring permutations, for example by composing permutations and removing identity transformations. futharkVA single, simple transformation. If you want several, don't just create a list, use   instead. futhark*A permutation of an otherwise valid input. futhark(A reshaping of an otherwise valid input. futhark#A reshaping of the outer dimension. futhark2A reshaping of everything but the outer dimension. futhark2Replicate the rows of the array a number of times. futharkThe empty transformation list. futhark#Is it an empty transformation list? futhark>A transformation list containing just a single transformation. futhark7Decompose the input-end of the transformation sequence. futhark8Decompose the output-end of the transformation sequence. futhark6Add a transform to the end of the transformation list. futhark<Add a transform at the beginning of the transformation list. futharkGiven an expression, determine whether the expression represents an input transformation of an array variable. If so, return the variable and the transformation. Only   and  # are possible to express this way. futhark<Create a plain array variable input with no transformations. futharkECreate a plain array variable input with no transformations, from an [. futharkWIf the given input is a plain variable input, with no transforms, return the variable. futharkcIf 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. futharkNReturn the array rank (dimensionality) of an input. Just a convenient alias. futhark4Apply the transformations to every row of the input. futharkAdd to the input a   transform that performs an (k,n)[ transposition. The new transform will be at the end of the current transformation list. futhark"Returns the inputs used in a SOAC. futharkSet the inputs to a SOAC. futhark The lambda used in a given SOAC. futhark Set the lambda used in the SOAC. futharkThe return type of a SOAC. futharkuThe "width" of a SOAC is the expected outer size of its array inputs _after_ input-transforms have been carried out. futhark/Convert a SOAC to the corresponding expression. futhark'Convert a SOAC to a Futhark-level SOAC. futharkEither convert an expression to the normalised SOAC representation, or a reason why the expression does not have the valid form. futharkqTo-Stream translation of SOACs. Returns the Stream SOAC and the extra-accumulator body-result ident if any.7 p q r s t v u w x y { z | ~ }  7 r s t v u p q w x  | ~ } y { z hNone 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.  iNone>HPV   jNone>HV5 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.  kNone>@AHMV"futhark)Whether we have fused something anywhere.futharkIAssociates an array to the name of the SOAC kernel that has produced it.futharkAssociates an array to the names of the SOAC kernels that uses it. These sets include only the SOAC input arrays used as full variables, i.e., no `a[i]'.futhark1the (names of) arrays that are not fusible, i.e., 9they are either used other than input to SOAC kernels, ortare used as input to at least two different kernels that are not located on disjoint control-flow branches, or*are used in the lambda expression of SOACsfutharkThe map recording the usesfutharkA type used for (hopefully) uniquely referring a producer SOAC. The uniquely identifying value is the name of the first array returned from the SOAC.futhark0Mapping from variable name to its entire family.futhark1Binds an array name to the set of used-array varsfuthark4Binds an array name to the set of soac-produced varsfuthark!Updates the environment: (i) the soacs (map) by binding each pattern element identifier to all pattern elements (identifiers) and (ii) the variables in scope (map) by inserting each (pattern-array) name. Finally, if the binding is an in-place update, then the inplaceK field of each (result) kernel is updated with the new in-place updates.futhark+Binds the fusion result to the environment.futharkThe fusion transformation runs in this monad. The mutable state refers to the fresh-names engine. The reader hides the vtable that associates ... to ... (fill in, please). The " 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])'  lNone>#  mNone=?PK futhark"Phantom type for a count of bytes. futhark%Phantom type for a count of elements. 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. If no type/value pair, just print the string. 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. @futharkTurn a  into a int32 .OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHmnpo                           ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A^ + ,        ! % & ' ( ) * " # $ - . / 8 5 6 7 4 3 0 1 2npom                 ? @ AGHDEF    9 : ; > < =nNoneR nfutharkSet all uses of o0 in the given functions to another memory space. n noNone ,=>?@AHMV_~# ofutharkCompile things to  . pfutharkCompile to an  J, where the type (must must still be a primitive) is deduced monadically. qfuthark*Compile where we know the type in advance. sfuthark)The symbol table used during compilation. vfuthark&Name of the function we are compiling.futharkThe   is # if a copy if required. If it is IP, 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. xfuthark;Every non-scalar variable must be associated with an entry. futhark3When an array is dared, this is where it is stored. futhark,An alternate way of compiling an allocation. futharkHow to compile an Y. futharkHow to compile some . futharkHow to compile an g. futharkDAn operations set for which the expression compiler always returns  CompileExp. futharkGExecute a code generation action, returning the code that was emitted. futharkHExecute a code generation action, wrapping the generated code within a   with the given description. futhark$Emit some generated imperative code. futhark&Emit a function in the generated code. futhark+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  w 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 , futharkZThe number of bytes needed to represent the array in a straightforward contiguous format. futharkLike  G, but permute the in-memory representation of the indices as specified. futhark Uses linear/iota index function. futhark Uses linear/iota index function. futhark ASsignment. futhark%Number of row elements of the source.h < o p q r s t u v w x y z { | } ~  h w  | } ~ r t u v s x y z { o p q <  3pNone futhark8Phantom type for identifying sequential imperative code. futharkA piece of imperative code. futharkAn imperative function. futharkAn imperative program.OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHmnpo                         ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A    OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHmnpo                        ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ AqNoneHVU  rNone 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.=OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHmnpo                         ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A        4           OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHmnpo                        ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ AsNone> +futhark2A generic kernel containing arbitrary kernel code./In-kernel name and per-workgroup size in bytes. .futhark,The host variables referenced by the kernel. 1futharkSA short descriptive and _unique_ name - should be alphanumeric and without spaces. 7futhark3An expression whose variables are kernel constants. 8futhark'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.XOXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHmnpo                         ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A                   ! " # $ % & ' ( ) * + , - . / 0 1 2 4 5 6 3 7 8 9 : ; < = > ?O = <   ; : 8 9 7 2 4 5 6 3         ! " # $ %           + , - . / 0 1 * & ' ( )OXYZ[\]^_`abcdefghijklmoqtwxynprsuvz{|}~ !#"$%&'()*+,DEFGHmnpo                        ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A > ?tNone Sfuthark1Which form of transposition to generate code for. Wfuthark6For small arrays that do not benefit from coalescing. XfutharksGenerate 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. R S T U V W X Y S T U V W R X YuNone>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. afuthark'Value for us to consider the lock free. bfutharkWhat to write when we lock it. cfuthark What to write when we unlock it. dfutharkA transformation from the logical lock index to the physical position in the array. This can also be used to make the lock array smaller.futharkAssign iterations of a for-loop to threads in the workgroup. The passed-in function is invoked with the (symbolic) iteration. For multidimensional loops, use .futharkIterate collectively though a multidimensional space, such that all threads in the group participate. The passed-in function is invoked with a (symbolic) point in the index space. vfuthark uN, 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. futhark Change every memory block to be in the global address space, except those who are in the local memory space. This only affects generated code - we still need to make sure that the memory is actually present on the device (and dared as variables in the kernel). |futharkFor many kernels, we may not have enough physical groups to cover the logical iteration space. Some groups thus have to perform double duty; we put an outer loop to accomplish this. The advantage over just launching a bazillion threads is that the cost of memory expansion should be proportional to the number of *physical* threads (hardware parallelism), not the amount of application parallelism. futharkCA kernel with the given number of threads, running per-thread code. futhark"Perform a Replicate with a kernel. futharkPerform an Iota with a kernel.( ] ^ _ ` a b c d e f o m n g h i j k l p q r s t u v w x y z { | } ~  ( e f o m n g h i j k l p q t s r w y z x } ~  | { u v ^ _ ` a b c d ]vNone>HV futhark7Produce partially scanned intervals; one per workgroup. futharkCompile  < instance to host-level code with calls to various kernels.  wNone>HV  futhark&A SegRedOp with auxiliary information. futharkYThe arrays used for computing the intra-group reduction (either local or global memory).futhark1Places to store accumulator in stage 1 reduction.futhark{The maximum number of operators we support in a single SegRed. This limit arises out of the static allocation of counters. futharkCompile  < instance to host-level code with calls to various kernels. futharkLike  ), but where the body is a monadic action.futhark[Prepare intermediate arrays for the reduction. Prim-typed arguments go in local memory (so we need to do the allocation of those arrays inside the kernel), while array-typed arguments go in global memory. Allocations for the former have already been performed. This policy is baked into how the allocations are done in ExplicitAllocations.futhark!Arrays for storing group results.The group-result arrays have an extra dimension (of size groupsize) because they are also used for keeping vectorised accumulators for first-stage reduction, if necessary. When actually storing group results, the first index is set to 0.  xNone>HV  futharkCompile   instance code.  yNone>HV QfutharkbFigure out how much memory is needed per histogram, and compute some other auxiliary information.futharkUHow many bytes will be spent on lock arrays if we use a local memory implementation?  zNone,>HVX   {None>   |None  futhark2The C type corresponding to a signed integer type.futhark5The C type corresponding to an unsigned integer type. futhark)The C type corresponding to a float type. futharkTThe C type corresponding to a primitive type. Integers are assumed to be unsigned. futhark`The C type corresponding to a primitive type. Integers are assumed to have the specified sign. futharkvTrue if both types map to the same runtime representation. This is the case if they are identical modulo uniqueness. futhark tupleField i is the name of field number i in a tuple. futharktupleFieldExp e i& is the expression for accesing field i of tuple e. If e4 is an lvalue, so will the resulting expression be. futhark funName fF is the name of the C function corresponding to the Futhark function f. futhark6The type of memory blocks in the default memory space.  }None=?MP > futharkThe result of compilation to C is four parts, which can be put together in various ways. The obvious way is to concatenate all of them, which yields a CLI program. Another is to compile the library part by itself, and use the header file to call into it. futharkHUtility definitions that must be visible to both CLI and library parts. futhark<If true, use reference counting. Otherwise, bare pointers. futhark&Copy from one memory block to another. futhark;Create a static array of values - initialised at load time. futhark[De-allocate the given memory block with the given tag, which is in the given memory space. futharkAllocate a memory block of the given size and with the given tag in the given memory space, saving a reference in the given variable name. futharkfRead a scalar from the given memory block with the given element index and in the given memory space. futharkeWrite a scalar to the given memory block with the given element 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 H ~NoneP Bmfuthark1Translate a kernels-program to an OpenCL-program.  None BNone BNone C7   None CNone> D+   None DNoneP E   None GefutharkBoolean negation.futharkBitwise complement.futharkNumerical negation.futharkAbsolute/numerical value.PO !#"$%&'()*+,     " !#%$&'()/-+,*3567:10284.92)/-+,*3567:10284.9&'(#%$" !     None LUfutharkrtspython opencl.py embedded as a string.Vfuthark*Python code (as a string) that calls the initiatialize_opencl_object5 procedure. Should be put in the class constructor.UVVUNone TcWfuthark&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.afutharkZGenerate 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. WXYZ[\]^_`a [\]^_`WXYZaNoneMP_ ibfuthark_The class generated by the code generator must have a constructor, although it can be vacuous.yfuthark0Unpack the array being passed to an entry point.zfuthark>Construct the Python array being returned from an entry point.{futhark;Create a static array of values - initialised at load time.|futhark&Copy from one memory block to another.}futharktAllocate a memory block of the given size in the given memory space, saving a reference in the given variable name.~futhark^Read a scalar from the given memory block with the given index and in the given memory space.futhark]Write a scalar to the given memory block with the given index and in the given memory space.futharkNA substitute expression compiler, tried before the main compilation function.futharkqA set of operations that fail for every operation involving non-default memory spaces. Uses plain pointers and malloc for memory management.futhark7A constructor that takes no arguments and does nothing.futharkA 4B where the function is a variable and every argument is a simple %.futhark#The ctypes type corresponding to a .futhark#The ctypes type corresponding to a , taking sign into account.futhark"The Numpy type corresponding to a .futhark"The Numpy type corresponding to a , taking sign into account.3bcdefgjihklnmopqrstuvwxyz{|}~3bcopqrstuvwxde~}|{zyklnmfgjihNone k\None> kNoneO mfutharkBoolean negation.futharkBitwise complement.futharkNumerical negation.futharkAbsolute/numerical value.O !#"$%&'()*+,     s     None yzDfuthark&Whether an option accepts an argument.HfutharkrSpecification 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.NfutharkZGenerate 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. DEFGHIJKLMN HIJKLMDEFGNNoneMP_ Ofuthark_The class generated by the code generator must have a constructor, although it can be vacuous.ofuthark0Unpack the array being passed to an entry point.pfuthark:Construct the C# array being returned from an entry point.qfuthark;Create a static array of values - initialised at load time.rfuthark&Copy from one memory block to another.sfutharktAllocate a memory block of the given size in the given memory space, saving a reference in the given variable name.tfuthark^Read a scalar from the given memory block with the given index and in the given memory space.ufuthark]Write a scalar to the given memory block with the given index and in the given memory space.vfutharkNA substitute expression compiler, tried before the main compilation function.wfutharkqA set of operations that fail for every operation involving non-default memory spaces. Uses plain pointers and malloc for memory management.futhark7A constructor that takes no arguments and does nothing.futharkA B where the function is a variable and every argument is a simple .futharkA B where the function is a variable and every argument is a simple .futhark A CallMethodfuthark#The ctypes type corresponding to a .futhark#The ctypes type corresponding to a , taking sign into account. futharknSelect function to retrieve bytes from byte array as specific data type | The ctypes type corresponding to a .!futhark#The ctypes type corresponding to a .futhark#The ctypes type corresponding to a .futhark+Public names must have a consistent prefix.POPQRST[WUZ^VXY\]_`acbdefghijklmnopqrstuvwxyz{|}~POPdefghijklmnwQRvutsrqpo`acbST[WUZ^VXY\]_{|}~zyxNone JNone None> None 'futharkFutlib embedded as S values, one for every file.None1=>?@A PfutharkLThe program described by a single Futhark file. May depend on other files.futharkA top-level binding.futhark)The contents of another file as a module.futharkFunctor application.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 DeclarationsfutharkTrue if this function is an entry point. If so, it also contains the externally visible type. Note that this may not strictly be well-typed after some desugaring operations, as it may refer to abstract types that are no longer in scope.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  ., and the type checker will convert these to Exp  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]).4futharkExplore 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.5futharknFail if the first expression does not return true, and return the value of the second expression if it does.6futharkAn n-ary value constructor.7futharkA match expression.8futhark6A 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.Afuthark%May be "down to" if step is negative.CfutharkDefault binary operators.DfutharkA pseudo-operator standing in for any normal identifier used as an operator (they all have the same fixity). Binary Ops for NumbersZfuthark |>[futhark<| Misc\futharkVAn identifier consists of its name and the type of the value bound to the identifier.afutharkYSimple Futhark values. Values are fully evaluated and their type is always unambiguous.cfutharkGIt is assumed that the array is 0-indexed. The type is the full type.dfuthark;Information about which parts of a value/type are consumed.efuthark$Consumes these fields in the record.ffuthark?A function that consumes its argument(s) like this. The final d should always be hA, as there is no way for a function to consume its return value.gfutharkConsumes this value.hfuthark8Only observes value in this position, does not consume.ifuthark'A declaration of the type of something.kfutharkThe type declared by the user.lfuthark%The type deduced by the type checker.pfuthark~An unstructured type with type variables and possibly shape declarations - this is what the user types in the source program.yfuthark_A "structural" type with shape annotations and no aliasing information, used for declarations.zfutharkoA 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.futhark An expanded Futhark type is either an array, or something that can be an element of an array. When comparing types for equality, function parameter names are ignored. This representation permits some malformed types (arrays of functions), but importantly rules out arrays-of-arrays.futharkTypes that can be elements of arrays. This representation does allow arrays of records of functions, which is nonsensical, but it convolutes the code too much if we try to statically rule it out.futharkAThe aliasing corresponds to the lexical closure of the function.futhark0The name (if any) of a function parameter. The u and t5 instances always compare values of this type equal.futhark?A type name consists of qualifiers (for error messages) and a  (for equality checking).futharkAThe size of an array type is a list of its dimension sizes. If I3, that dimension is of a (statically) unknown size.futhark Declaration of a dimension size.futharkyThe size of the dimension is this name, which must be in scope. In a return type, this will give rise to an assertion.futharkThe size is a constant.futharkNo dimension declaration.futhark unifyDims x y combines x and yJ to contain their maximum common information, and fails if they conflict.futharkNon-array values.futharkLow-level primitive types.futharkSome information. The dual to futharkUNo information functor. Usually used for placeholder type- or aliasing information.futharkConvenience class for deriving  instances for the AST.futhark.The number of dimensions contained in a shape.futharkstripDims n shape strips the outer n dimensions from shape , returning I3 if this would result in zero or fewer dimensions.futharkunifyShapes x y combines x and yJ to contain their maximum common information, and fails if they conflict.3O !#"$%&'()*+,     7 1$6'&.%452-!"#()*+,/0389:;<=>?@ABCJFPEGRSDHIKLMNOQTUVWXYZ[\]^_`abcdghefijklmnopqrstuvwxyz{|}~!#"pqrstuvwxmnozydghefijklabcCJFPEGRSDHIKLMNOQTUVWXYZ[\]^_`?@AB<=>7 1$6'&.%452-!"#()*+,/03     |}~{89:;None=>? b5@Qfuthark8A case (of a match expression) with no type annotations.Rfuthark+A Futhark program with no type annotations.Sfuthark'A declaration with no type annotations.Tfuthark0A function declaration with no type annotations.Ufuthark#A pattern with no type annotations.Vfuthark*A type parameter with no type annotations.Wfuthark2A module type expression with no type annotations.Xfuthark-A module expression with no type annotations.Yfuthark'An expression with no type annotations.Zfuthark"An index with no type annotations.[futhark'An identifier with no type annotations.\futhark)A type declaration with no expanded type.^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 I, representing the overloaded parameter type.ffutharkReturn 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 q.gfutharkDReturn any shape declarations in the type, with duplicates removed.hfuthark*Change the shape of a type to be just the Rank.ifuthark"Add size annotations that are all .jfuthark"Change all size annotations to be .#futhark&Change the size annotations of a type.kfuthark Return the uniqueness of a type.lfutharkunique t is r' if the type of the argument is unique.mfutharkEReturn the set of all variables mentioned in the aliasing of a type.nfutharkdiet t< returns a description of how a function parameter of type t might consume its argument.ofuthark`Convert any type to one that has rank information, no alias information, and no embedded names.pfuthark(Remove aliasing information from a type.qfuthark,Replace no aliasing with an empty alias set.rfuthark 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.sfuthark arrayOf t s uC constructs an array type. The convenience compared to using the  constructor directly is that t can itself be an array. If t is an n-dimensional array, and s is a list of length n, the resulting type is of an n+m6 dimensions. The uniqueness of the new array will be u, no matter the uniqueness of t.tfutharkstripArray 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.ufutharkLCreate a record type corresponding to a tuple with the given element types.xfuthark1Increasing field names for a tuple (starts at 1).yfutharkSort fields by their name; taking care to sort numeric fields by their numeric value. This ensures that tuples and tuple-like records match.|futhark'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.}futharkSet the uniqueness attribute of a type. If the type is a record or sum type, the uniqueness of its components will be modified.~futharkt `setAliases` als returns t , but with als/ substituted for any already present aliasing.futharkt `addAliases` f returns t5, but with any already present aliasing replaced by f applied to that aliasing.$futharkThe type of a basic value.futhark Construct a 7 with the given number of zero-information dimensions.futharkThe 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.futharklThe type of an Futhark term. The aliasing will refer to itself, if the term is a non-tuple-typed variable.futharkExtract the parameter types and return type from a type. If the type is not an arrow type, the list of parameter types is empty.futhark#The type names mentioned in a type.futhark orderZero t is r if the argument type has order 0, i.e., it is not a function type, does not contain a function type as a subcomponent, and may not be instantiated with a function type.futhark:Extract all the shape names that occur in a given pattern.futhark7Extract all the shape names that occur in a given type.futharkpatternOrderZero pat is r8 if all of the types in the given pattern have order 0.futhark*The set of identifiers bound in a pattern.futhark(The type of values bound by the pattern.futharkIThe type matched by the pattern, including shape declarations if present.futharkeWhen viewed as a function parameter, does this pattern correspond to a named parameter of some type?futharkjNames of primitive types to types. This is only valid if no shadowing is going on, but useful for tools.futharkA map of all built-ins.futharkPThe largest tag used by an intrinsic - this can be used to determine whether a / refers to an intrinsic or a user-defined name.futhark-Create a name with no qualifiers from a name.futhark8Add another qualifier (at the head) to a qualified name.futhark2Create a type name name with no qualifiers from a .futhark*The modules imported by a Futhark program.futhark-The modules imported by a single declaration.futharkFThe set of module types used in any exported (non-local) declaration.futharkExtract a leading $((name, namespace, file), remainder) from a documentation comment string. These are formatted as `name`@namespace[@file]. Let us hope that this pattern does not occur anywhere else.futhark/Find all the identifier references in a string.futharkXGiven an operator name, return the operator that determines its syntactical properties.LQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~L_`abcdeklmnfgrtsopq~}hijuvwxyz{|^][\ZYXWVUTSRQNone=>? rfutharkClass for type constructors that represent annotations. Used in the prettyprinter to either print the original AST, or the computed attribute.futharkExtract value, if any.futharkkA class for types that are variable names in the Futhark source language. This is used instead of a mere V 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 Vs instance for VNames, we in fact only define it inside the modules for the core language (as an orphan instance).futharkDepending on the environment variable FUTHARK_COMPILER_DEBUGGING, VNames are printed as either the name with an internal tag, or just the base name.OSOSNoneF vfutharkA 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.P     &None=?FPh },futharkA 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. *+,-./0129 39 None Ufuthark/Parse an entire Futhark program from the given S , using the )' as the source name for error messages.futhark+Parse an Futhark expression from the given G , using the )' as the source name for error messages.futhark1Parse a Futhark module expression from the given G , using the )' as the source name for error messages.futhark%Parse an Futhark type from the given G , using the )' as the source name for error messages.futhark'Parse any Futhark value from the given G , using the )( as the source name for error messages.futharkEParse several Futhark values (separated by anything) from the given G , using the )( as the source name for error messages.X     X     None futhark,A type-checked case (of a match expression).futhark.A known scalar type with no shape annotations.futharkA type-checked type parameter.futhark(A known type arg with shape annotations.futhark)An Futhark program with type information.futharkA type-checked specification. futharkA type-checked declaration.!futhark&A type-checked module type expression."futhark A type-checked module parameter.#futhark!A type-checked module expression.$futhark#A type-checked module type binding.%futharkA type-checked module binding.&futhark%A type binding with type information.'futhark(A type declaration with type information(futhark.An constant declaration with type information.)futhark A pattern with type information.*futhark$An expression with type information.+futharkAn index with type information.,futhark2An identifier with type- and aliasing information.OS !#"$%&'()*+,     7 1$6'&.%452-!"#()*+,/0389:;<=>?@ABCJFPEGRSDHIKLMNOQTUVWXYZ[\]^_`abcdghefijklmnopqrstuvwxyz{|}~QRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,,+*)#"!%$( &'None -futhark6Modules produces environment with this representation.5futharkType 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.7futhark2A binding from a name to its definition as a type.9futhark 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.BfutharklRepresentation of a module, which is either a plain environment, or a parametric module ("functor" in SML).Efuthark0A mapping of abstract types to their liftedness.FfutharkThe space inhabited by a name.GfutharkFunctions and values.JfutharkEA mapping from import names to imports. The ordering is significant.KfutharkbThe result of type checking some file. Can be passed to further invocations of the type checker.MfutharkAbstract types.PfutharkCCanonical 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.QfutharkJCreate an import name immediately from a file path specified by the user.Rfuthark 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.Sfuthark Create a .fut file corresponding to an P.Tfuthark7Produce a human-readable canonicalized string from an P.(-.3/012456789:;<=>?@ABCDEFHIGJKLOMNPQRST(PQRSTKLOMNJFHIG-.3/012E=>?@A456BCD789:;<NoneMP  4futhark^A mapping from type parameters to the shapes of the value to which they were initially bound.5futharkA TermValue with a I! type annotation is an intrinsic.6futhark4A shape is a tree to accomodate the case of records.ofuthark A fully evaluated Futhark value.7futhark*The monad in which evaluation takes place.wfutharkKCreate an array value; failing if that would result in an irregular array.8futhark>This is where we enforce the regularity constraint for arrays.9futharkFor matching size annotations (the actual type will have been verified by the type checker). It is assumed that previously unbound names are in binding position here.:futhark;, but with 0 as 1.<futharkqExpand type based on information that was not available at type-checking time (the structure of abstract types).{futharkPThe initial environment contains definitions of the various intrinsic functions.futhark^Execute the named function on the given arguments; will fail horribly if these are ill-typed.ijklmnopqrstuvwxyz{|}~ijklnm{|}~stuvzopqrwyxNone>M EfutharkJThe names that are bound for some types, either implicitly or explicitly.futhark)Determine the names bound for some types.futharkAs >, but returns components of a top-level tuple type piecemeal.futharkcHow many core language values are needed to represent one source language value of the given type?futhark7Convert an external primitive to an internal primitive.futharkCConvert an external primitive value to an internal primitive value.  None> ҍfuthark%A function for internalising lambdas.NoneM  =futharkDefunctionalization monad. The Reader environment tracks both the current Env as well as the set of globally defined dynamic functions. This is used to avoid unnecessarily large closure environments.>futharkDEnvironment mapping variable names to their associated static value.?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 ).AfutharkHThe constructor that is actually present, plus the others that are not.BfutharkAn expression or an extended '; (with size parameters, which AST lambdas do not support).CfutharkeReturns the defunctionalization environment restricted to the given set of variable names and types.DfutharkRun a computation in the defunctionalization monad. Returns the result of the computation, a new name source, and a list of lifted function declations.EfutharkILooks up the associated static value for a given name in the environment.FfutharkDefunctionalization of an expression. Returns the residual expression and the associated static value in the defunctionalization monad.GfutharkSame as F%, except it ignores the static value.HfutharkDefunctionalize the function argument to a SOAC by eta-expanding if necessary and then defunctionalizing the body of the introduced lambda.Ifuthark8Defunctionalize an indexing of a single array dimension.JfutharkrDefunctionalize a let-bound function, while preserving parameters that have order 0 types (i.e., non-functional).KfutharkDefunctionalize 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.Lfuthark Check if a ?P and a given application depth corresponds to a fully applied dynamic function.MfutharkConverts 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.NfutharkConverts a pattern to an environment that binds the individual names of the pattern to their corresponding types wrapped in a O static value.Pfuthark6Create an environment that binds the shape parameters.Qfuthark}Create a new top-level value declaration with the given function name, return type, list of parameters, and body expression.Rfuthark^Given a closure environment, construct a record pattern that binds the closed over variables.SfutharkzGiven 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.Tfuthark8Compute the corresponding type for a given static value.UfutharkwConstruct the type for a fully-applied dynamic function from its static value and the original types of its arguments.VfutharkMatch 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.WfutharkGiven a pattern and the static value for the defunctionalized argument, update the pattern to reflect the changes in the types.XfutharkConvert a record (or tuple) type to a record static value. This is used for "unwrapping" tuples and records that are nested in O static values.Yfuthark3Compute the set of free variables of an expression.Zfuthark2Extract 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.futharkTransform a list of top-level value bindings. May produce new lifted function definitions, which are placed in front of the resulting list of declarations.None> ^futharksFlatten a pattern. Returns a list of identifiers. The structural type of each identifier is returned separately.None [  None ' futhark$Two values differ in some way. The 1 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 O? to get a human-readable representation, and the instances of ` and a" to obtain binary representationsfutharkAn Unboxed vector.futharkA textual description of the type of a value. Follows Futhark type notation, and contains the exact dimension sizes if an array.bfuthark_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.cfuthark@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 `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.dfuthark?A prettyprinted representation of type of value produced by a .futharkMRead the test specification from the given Futhark program. Note: will call w on parse errors.efuthark[Read test specifications from the given path, which can be a file or directory containing .fut' files and further directories. Calls wN 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 wa 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 G' 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.ffutharkJThere 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.gfutharkkCompute 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 I if none should be used.;   ;   None=? i5futharkTMap 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 mhfuthark5A pairing of a lexical closure and a module function.ifutharkA non-parametric module.jfuthark^A substitution from names in the original program to names in the generated/residual program.kfuthark(A general-purpose substitution of names.66None oAfuthark,The warnings produced by the compiler. The 1 instance produces a human-readable description.ABABNone>MP {Tfuthark?Tracking breadcrumbs to give a kind of "stack trace" in errors.WfutharkA piece of information that describes what process the type checker currently performing. This is used to give better error messages.Zfuthark$The type checker runs in this monad.\futhark6Information about an error during type checking. The ? instance for this type produces a human-readable description.gfuthark$The name of the current file/import.lfutharkzExtract from a type either a function type comprising a list of parameter types and a return type, or a first-order type.ofutharkEnclose a string in the prefered quotes used in error messages. These are picked to not collide with characters permitted in identifiers.Q-.3/012456789:;<=>?@ABCDEFHIGABGINRHJQLOKMPSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxOZdefghlkm\]^_abc`WXYTUViGINRHJQLOKMPSjno-.3/012E=>?@A[456BCD789:;<pqrstuFHIGwxvNone=>? futharkbClass of types which allow for substitution of types with no annotations for type variable names.futharkA 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).futharkunifyTypes uf t2 t2 attempts to unify t1 and t2". If unification cannot happen, I> is returned, otherwise a type that combines the aliasing of t1 and t2* is returned. Uniqueness is unified with uf.futharkx `subtypeOf` y is true if x is a subtype of y (or equal to y ), meaning x is valid whenever y is.futharkx  y is true if x is not less unique than y.futharkwCheck for duplication of names inside a pattern group. Produces a description of all names used in the pattern group.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).futharkuEnsure that every shape parameter is used in positive position at least once before being used in negative position.futhark<Construct a type argument corresponding to a type parameter.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.None>M Ofuthark&A usage that caused a type constraint.futharkMapping from fresh type variables, instantiated from the type schemes of polymorphic functions, to (possibly) specific types as determined on application and the location of that application, or a partial constraint on their type.mfutharkpIs the given type variable actually the name of an abstract type or type parameter, which we cannot substitute?futharkUnifies two types.futharkIn mustHaveConstr usage c t fs , the type t must have a constructor named c that takes arguments of types ts.futharkConstruct 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.WXYiWXYiNone>M u nfutharkMapping from function name and instance list to a new function name in case the function has already been instantiated with those concrete types.ofutharkThe monomorphization monad.pfutharkMonomorphization environment mapping names of polymorphic functions to a representation of their corresponding function bindings.qfutharkMapping from record names to the variable names that contain the fields. This is used because the monomorphiser also expands all record patterns.rfuthark!The monomorphization monad reads r s and writes  ValBindings. The s in a  ValBinding can only be shape parameters.Each  Polybinding is also connected with the qX that were active when the binding was defined. This is used only in local functions.sfutharkHThis carries out record replacements in the alias information of a type.tfuthark Monomorphization of expressions.ufuthark,Transform an operator section into a lambda.vfutharkConvert a collection of (ds to a nested sequence of let-bound, monomorphic functions with the given expression at the bottom.wfutharkMonomorphize 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.xfuthark7Perform a given substitution on the types in a pattern.yfutharkFRemove 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.zfutharkReplace all named dimensions with a fresh name, and remove all constant dimensions. The point is to remove the constraints, but keep the names around. We use this for constructing the entry point parameters.{futhark[Promote to dimension type as appropriate for the original type. Also return original type.|futharkbSome operators and functions are overloaded or otherwise special - we detect and treat them here.}futharkvIs the name a value constant? If so, create the necessary function call and return the corresponding subexpressions.None4=>?MP ~futharkA data type for constructor patterns. This is used to make the code for detecting unmatched constructors cleaner, by separating the constructor-pattern cases from other cases.futharkcAn unmatched pattern. Used in in the generation of unmatched pattern warnings by the type checker.futharkThe state is a set of constraints and a counter for generating type names. This is distinct from the usual counter we use for generating unique names, as these will be user-visible.futharkType checking happens with access to this environment. The tables will be extended during type-checking as bindings come into scope.futharkMost recent first.futhark4Aliases in parameters indicate the lexical closure.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 ; directly (except in a few carefully inspected locations)!futharkWrap ; 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.futharkNCreate a new type name and insert it (unconstrained) in the substitution map.futharkEDetermine if two types are identical, ignoring uniqueness. Causes a \; if they fail to match, and otherwise returns one of them.futhark5Assumes that the two types have already been unified.futharkZReturn the shapes used in a given pattern in postive and negative position, respectively.futhark require ts e causes a \ if  expType e is not one of the types in ts. Otherwise, simply returns e.futhark%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.futharkt  d removes aliases (sets them to q) from the parts of t% that are denoted as consumed by the d 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.futharkfThis is "fixing" as in "setting them", not "correcting them". We only make very conservative fixing.futhark5The set of in-scope variables that are being aliased.futharkFind at all type variables in the given type that are covered by the constraints, and produce type parameters that close over them.cThe passed-in list of type parameters is always prepended to the produced list of type parameters.futhark?Proclaim that we have made read-only use of the given variable.futhark4Proclaim that we have written to the given variable.futharkProclaim that we have written to the given variable, and mark accesses to it and all of its aliases as invalid inside the given computation.futharkMake all bindings nonunique.futharkPerform substitutions of instantiated variables on the type annotations (including the instance lists) of an expression, or something else.NoneP Cfuthark,Refine the given type name in the given env.None> 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.A\\ANone>P #futharkHPre-typechecked imports, including a starting point for the name source.futhark'Files that should be implicitly opened.futhark?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.futharkqRead 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.JKLOMNAJKLOMNANone> '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.JKLOMNA  Safe (None + futharkiThe version of Futhark that we are using. This is equivalent to the version defined in the .cabal file. futhark/The version of Futhark that we are using, as a G    None 1t futharkhA command line option that either purely updates a configuration, or performs an IO action (and stops). futharkXGenerate a main action that parses the given command line options (while always adding ).futhark*Short-hand for 'liftIO . hPutStrLn stderr'futharkCommon definitions for -v and -h', given the list of all other options.    None ;4futhark,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> <None> <None> =>None>_ ?futhark/Extra options passed to the programs being run.futhark>Exclude those test cases that have tags we do not wish to run.None>X ?''NoneM N`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> N0101NoneSX [T futharkeA human-readable description of the representation expected or contained, usable for error messages.futharkYNothing is distinct from a empty pipeline - it means we don't even run the internaliser.futharkJIf true, prints programs as raw ASTs instead of their prettyprinted form.futhark3What to do with the program after it has been read.futharkJust print it.futhark(Run the type checker; print type errors.futharkRun this pipeline.futhark,Partially evaluate away the module language.futharkDefunctorise and monomorphise.futhark0Defunctorise, monomorphise, and defunctionalise.futharkMGet a Futhark pipeline from the configuration - an empty one if none exists.2futharkZEntry point. Non-interactive, except when reading interpreter input from standard input.22None \[futharkClosed interval, as in  System.Random.66None \::None> _futhark&The name we use for compiled programs.futharkNumerically stable meanfuthark Standard deviation of populationfutharkPopulation variancefutharkCentral moments;;None gfutharkYWe keep a mapping of the names we have actually documented, so we can generate an index.futharkjLocal module types that show up in the interface. These should be documented, but clearly marked local.futhark}A set of names that we should not generate links to, because they are uninteresting. These are for example type parameters.futharkcThe header documentation (which need not be present) can contain an abstract and further sections.>>NoneP g??None>MX ifuthark)Are we currently stopped at a breakpoint?futhark$Skip breakpoints at these locations.futharkThe currently loaded file.@@      !"#$%&'()*+,-./0123456789:;<=>?@A?@B?@C?@D?@E?@F?@G?@G?@H?@I?@JKLMNOOPQRSTUVWXYZ[\]^_`abbcdefghijklmnopqrs t u v t w x y z { | } ~                                                                                  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\][^_Z`abcdefghfijeklmnopqrstuvwxyz{|}~      !"#$%&&'()(*+,-../011234356789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     R4*  !"#$%&'()*+,-./01213456789:;<==>?@A@BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXjiYYZ[\]^_`abcdefghijklmno 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)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,W,v,w,x,y,<,?,@,A,z,{,|,},~,,,,,,,,,,,,,,,,,,,,-------------........................................///////////////////00000001111111111111111122222222222222222222222233 3 3 3 3 3333333333333333333 3!3"3#3$3%3&3'3(4)4*4+4,4-4-4.4/404142434445464748494:4;4<4=4>4?4@4A4B4C4D4E4F4G4H4I4J4K4L44M4N4O5P5Q55R556S6T6U6V6W6W6X6Y6Z6[6\6]6^6_6`6a6b6c6d6e6f6g6h66M66i6j6k6l6m6n6o66p6q6r6s6t6u6v6w6x6y6z6{6|6}6~6666777777777777777777777777777777777777777777777777788888888888888888888888888888888888888888888888888888888888888888888888888888888888899999 9 9 9 9 9 9999999999999999999 9!9"9#9$:%:&:':(:):*:+:,:-;.;/;0;1;2;3;4;5<6<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=0=v=w=x==y=z={===|===}=~=================>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>????????@@@AAAAAA@A8A1A AAAAAAAAABBBBBBCCCDDDDDDDDD D D                                 ! " # $ % & ' ( ) * + ,E -E .F /F /F 0F 1F 2F 3F 4F 5F 6F 7F 8F 9F :F ;F <F =F =F >F ?F @F AF BF CF DF EF FF GF HF IF JF KF LF MF NF OF PF QF RF SF TF UF VF WF XF YF ZF [F \F ]F ^F _F `F aF bF cF dF eF fF gF hG iG 6G jG kG lG mG nG oG oG pG qG rG sG tG tG uG vG wG xG mG yG zG {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 GGGGGG GG @G AG BG G G G G G G G G G G G G FG GG HG 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 _GGGG G G G G G G G G G G G G G G G G G G G G G G G H H H H H H H H I I J K K K K K K K K K K K K K 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 L L L L L L !L "L #L $L %L &L 'L (L )L *L +L ,L -L .L /L 0L 1L 2M 3M 3M 4M 4M 5M 6N 7O 8O 9O :P ;P <P <P =P >P ?P @P AP BP CP DP EP FQ GQ HQ IQ JQ KQ LQ MQ NQ OQ PQ QR RR SR TR UR VR WR XR YR ZR [R \R ]R ^R _R `R aR bR cR dR eR fR eR dR cR bR gR hR iR jR kRR lR mR nR oR pR qR rR sR tR uR vR wR xR yR zR {S |S }S ~T T U UU 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 U4U 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 W W W W W W W W W W W W W W W6W 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 WWW WWWW 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 X X X X X X !X "X #X $X %X &X 'X (X )X *X +X ,X -X .X /X 0X 1X 2X 3X 4X 5Y 6Y 7Y 8Y 9Y :Y ;Y <Y =Y >Z ?Z @Z AZ BZ CZ DZ E[ F[ G[ [ [ \ H] I] J] ] ] ] K] L] ] M] N] O^ P^ Q^ Q^ R^ S^ T^ 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^ {_ |_ }_ ~_ ` ` ` ` ` ` ` ` ` a a b b b b b b b b c c dd Jd d e e e e e e e f g g gggggg 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 gggg g g g g g g g g gg g g g g g g g g ggg h h h i i i i i i i i ii i i i i i i i 2i j j j j j j j j j j j jj j &j j j j j j k k k k k k k k k k k k k k k l l l l l m m m m m m m mm m!m m m m m im m m m m m m m2m$m m m m mm mm mm m m m m m m m m m m !m "m #m $m %m &m 'm (m )mmm *m *mm +m ,m!m -m%m .m /m 0m 1m 2mm 3m 4m 5m 6m 7m 8m 9m :m=m ;m <mm =m >m ?m @m Am Bm Cm Dm Em Fm Gm Hm Im Jm Km Lm Mm Nm Om Pm Qm Rm Sm Tm Um Vmsm Wm Xm Ym Zm [m \m ]m ^m _m `m am bm cm dn eooo fo go ho o io jo ko lo moo no oo oo po qo qo ro so so to uo vo vo wo xo yo zo zo {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 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 o5oo o o o o o o o o o o o o o o pp p p p p q r r r r r r r jr lr kr r r r r r r r r r r r r r r r r r r s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s is s js ls ks s s s s s s s s s s s s s s s s s s s s !s "s #s $s %s &s t 't (t )t *t +t ,t -t .t /t 0t 1u 2u 3u 3u 4u 5u 6u 7u 8u 9u 9u :u ;u <u =u >u ?u u u @u Au Bu Cu Du Eu Fu Gu Hu Iu Ju Ku u Lu Mu Nu Ou Pu Qu Ru Su Tv Uw Vw Ww Xx Yy Zz { [{ \{ ]{ ^{ _| `| a| b| c| d| e| f| g| h| i| j| k| l| m| n} o} o} p} q} r} s} t} z} z} u} v} w} x} y} z} {} |} }}$} ~} } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } 6} } } } } } } } } } }} } } } } } } } } } } } } ~ ~ ~ ~ ~ ~ ~ ~                                g   4R !         KLMNOOPQRST t t    z z u v w y z |    ~$                ! " #  $%&'( )* +  ,  - g   ./014234 !5 6789:  $ ;<=>?@ABCDEFGHIJKLMNOPQRAST@UVWX?YZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~KLMNOOPQRST t t    z z u v w y z |    ~$           r        !4"#!"$ %&''()* +,-.4/01N23456789M:PQ;<=>?@ABCDEY 'FGHIJKLMNOPQRSTUVWXYZ[\]^_`a" -$b#cdefghijjklmm5nopqrstuYvw[\dxyfgzz{||}+,~fgehj      !"#$%&'()*+,-./0123456D789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~I@    4(! E     U !"#$%&'()*+,-./0123456789:;<=>?@ABC:DEFGHIJKLLE`abcMNOP^_\Q6RSTUUVWXYZ[\]^__`aabcddefghijkllmnopqrstuuvwxyz{{|}~6      !"#$%&'()*+,-6./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTTUVWXYZ[[\]^_`abcdefghijklmnopqrsssssssstuvwxyz{ss|}~ssssss    #$'',---.68 8888888 <<3<<<<<<<<<<=======EIK K K K K @K LLLLOOOOORRRRSTTTTTU U!U"U#U$%W&X'X(X)X*X+X,Y-Y.Z/] m]0]1]2]3]4]5`6`7`8a9c0c:c;c<e=e>e?g@jAjBjCjDjEkFkGkHkIkJkKkLkMkNkOkPkQkRkSkTkUkVoWoXoYoZo[o\o]o^o_u`uaubucudvewfwgwhwiwjwkylym|n}o}p~qSTUSTUrstsuvwxyz{|}~3   tf%futhark-0.12.1-HNRY52t0ZM8IAXBklRc9fNLanguage.Futhark.CoreFuthark.Util.PrettyFuthark.Pkg.TypesFuthark.Internalise.Monad)Futhark.CodeGen.Backends.GenericC.Options2Futhark.CodeGen.Backends.GenericCSharp.Definitions2Futhark.CodeGen.Backends.GenericPython.Definitions!Futhark.CodeGen.OpenCL.Heuristics 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.AST.Attributes.Scope%Futhark.Representation.AST.Traversals,Futhark.Representation.AST.Attributes.TypeOf+Futhark.Representation.AST.Attributes.Names$Futhark.Representation.Kernels.SizesFuthark.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.Representation.Kernels.KernelExp%Futhark.Representation.Kernels.KernelFuthark.Representation.KernelsFuthark.Pass.KernelBabysitting Futhark.Pass.FirstOrderTransform)Futhark.Pass.ExtractKernels.BlockedKernel(Futhark.Pass.ExtractKernels.Distribution'Futhark.Pass.ExtractKernels.InterchangeFuthark.Optimise.UnstreamFuthark.Optimise.TileLoops-Futhark.Optimise.InPlaceLowering.LowerIntoStm Futhark.Optimise.InPlaceLoweringFuthark.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.Simplify+Futhark.Pass.ExtractKernels.DistributeNests&Futhark.Pass.ExtractKernels.IntragroupFuthark.Pass.ExtractKernels Futhark.Optimise.InliningDeadFun'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.SegScan%Futhark.CodeGen.ImpGen.Kernels.SegRed%Futhark.CodeGen.ImpGen.Kernels.SegMap(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.Terms$Language.Futhark.TypeChecker.ModulesLanguage.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.ASTImp ScalarVarLanguage.Futhark.Parser.LexerLanguage.Futhark.Parser.Parser Paths_futharkbaseGHC.IntInt8Int16Int32Int64GHC.WordWord8Word16Word32Word64*mainland-pretty-0.7-ByZMeDsLfEZHvvxHtRanx4Text.PrettyPrint.Mainland hPutDocLnhPutDocputDocLnputDocprettyPragmaLazyTextdisplayPragmaLazyTextprettyLazyTextdisplayLazyText prettyPragma prettyPragmaSdisplayPragmaS prettyCompactprettyCompactSprettySdisplayS renderCompactrendererrordocfaildoc fillbreakfillwidthnestingcolumnnestindenthangalignlisttuple enclosesepsemisepcommasep punctuatesepcatstackspreadfolddocparensIfparensbracketsbraces backquotesanglesdquotessquotesencloseflattengroup<|><+/><+> softbreaksoftlinelinesrclocemptyrparenlparenrbracketlbracketrbracelbraceranglelangledquotesquote backquotespacesspacesemiequalsdotcommacolonstarlazyText strictTextrationaldoublefloatintegerintstringcharbooltextDocRLineRPos RLazyTextRTextRStringRCharREmptyRDoc'megaparsec-7.0.5-I9zR7afDkbEDwXiCIA03I6Text.Megaparsec.ErrorerrorBundlePretty mtl-2.2.2Control.Monad.Error.Class throwError%versions-3.5.1-IHou8Rs7q5F2uirgsb5JyN 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 EncodedString UserString mapAccumLMchunkchunksdropAttakeLastdropLast mapEithermaybeNth maybeHead splitFromEndsplitAt3splitAt4focusNthunixEnvironment isEnvVarSetrunProgramWithExitCodedirectoryContents roundFloat roundDoublelgammalgammaftgammatgammaftoPOSIX 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 ErrorInt32ErrorMsgPatElemTPatElem patElemName patElemAttrSliceDimIndexDimFixDimSliceParam 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$fTraversableParam$fFunctorParam$fFoldableParam$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$fShowTypeBase $fEqTypeBase $fOrdTypeBase$fEqDiet $fOrdDiet $fShowDiet$fEqCertificates$fOrdCertificates$fShowCertificates $fShowSubExp $fEqSubExp $fOrdSubExp $fShowIdent $fOrdParam $fShowParam $fEqParam $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 shapeContexthasStaticShapegeneraliseExtTypesexistentialiseExtTypes shapeMappingshapeExtMappingint8int16int32int64float32float64 $fTyped(,)$fTypedPatElemT $fTypedParam $fTypedIdent$fTypedTypeBase$fTypedTypeBase0$fDeclTypedParam$fDeclTypedTypeBase$fSetTypePatElemT $fSetType(,)$fSetTypeTypeBase $fFixExt() $fFixExtExt $fFixExt[]$fFixExtShapeBase$fFixExtTypeBase$fDeclExtTypedTypeBase$fExtTypedTypeBase IsRetType primRetType applyRetType IsBodyType primBodyTypebodyTypeValues retTypeValues expectedTypes$fIsBodyTypeTypeBase$fIsRetTypeTypeBase AnnotationsLetAttrExpAttrBodyAttr FParamAttr LParamAttrRetType BranchTypeOpProg progFunctionsEntryPointType TypeUnsigned TypeOpaque TypeDirect EntryPointFunDeffunDefEntryPoint funDefName funDefRetType funDefParams funDefBodyLParamFParamLambdaLambdaT lambdaParams lambdaBodylambdaReturnTypeExpIfSortIfNormal 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$fEqProg $fOrdProg $fShowProg $fOrdFunDef $fShowFunDef $fEqFunDef $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 $fPrettyParam$fPrettyParam0$fPrettyParam1$fPrettyPatElemT$fPrettyPatElemT0$fPrettyPatternT$fPrettyCertificates$fPrettySubExp $fPrettyIdent$fPrettyTypeBase$fPrettyTypeBase0$fPrettyTypeBase1 $fPrettySpace$fPrettyShapeBase $fPrettyExt$fPrettyShapeBase0$fPrettyCommutativity$fPrettyNoUniqueness $fPrettyVName$fPrettyAnnot()$fPrettyAnnotParam$fPrettyAnnotPatElemT $fPrettyProg$fPrettyFunDef$fPrettyLambdaT $fPrettyExpT $fPrettyStm $fPrettyBodyT $fPrettySeq 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(,)$fScopedloreFunDef$fScopedloreStm$fScopedloreSeq$fScopedlore[]$fHasScopeloreExtendedScope$fFunctorExtendedScope$fApplicativeExtendedScope$fMonadExtendedScope$fMonadReaderExtendedScope$fShowNameInfoWalker walkOnSubExp walkOnBody walkOnVName walkOnRetTypewalkOnBranchType walkOnFParam walkOnLParamwalkOnOpMapper mapOnSubExp mapOnBody mapOnVName mapOnRetTypemapOnBranchType mapOnFParam mapOnLParammapOnOpidentityMappermapExpM mapOnExtType mapOnLoopFormmapExp mapOnTypeidentityWalkerwalkExpMTypedOpopType subExpTypemapType primOpType expExtTypeexpExtTypeSize bodyExtType$fHasScopeloreFeelBad$fApplicativeFeelBad$fFunctorFeelBad $fTypedOp()FreeAttr precomputedFreeInfreeIn'FVNamesnameIn namesFromList namesToListoneNamenamesIntersectionnamesIntersect namesSubtractmapNamesfvBindfvNamefvNamesfreeInStmsAndResfreeIn boundInBody boundByStm boundByStms boundByLambda $fPrettyNames $fMonoidNames$fSemigroupNames $fSemigroupFV $fMonoidFV$fFreeInIfAttr$fFreeInStmAux$fFreeInCertificates$fFreeInPatternT$fFreeInDimIndex$fFreeInDimChange$fFreeInLoopForm$fFreeInPatElemT $fFreeInParam$fFreeInTypeBase $fFreeInExt$fFreeInShapeBase$fFreeInSubExp $fFreeInIdent $fFreeInVName $fFreeInMaybe $fFreeInBool $fFreeInNames $fFreeInSeq $fFreeIn[] $fFreeIn(,,) $fFreeIn(,) $fFreeInInt $fFreeIn() $fFreeInFV$fFreeAttrMaybe $fFreeAttr[] $fFreeAttr(,) $fFreeAttr() $fFreeInStm $fFreeInExpT $fFreeInBodyT$fFreeInLambdaT $fEqNames $fShowNames NumThreadsCountunCount SizeClass SizeThreshold SizeGroup SizeNumGroupsSizeTileSizeLocalMemory KernelPath$fPrettySizeClass$fTraversableCount$fFoldableCount$fFunctorCount $fEqSizeClass$fOrdSizeClass$fShowSizeClass $fEqCount $fOrdCount $fShowCount $fNumCount$fIntegralExpCount $fFreeInCount $fPrettyCountPrimExpLeafExpValueExpBinOpExpCmpOpExpUnOpExp ConvOpExpFunExpconstFoldPrimExp.&&..||..<..<=..==..>..>=..&..|..^. evalPrimExp primExpTypecoerceIntPrimExptruefalse$fPrettyPrimExp$fIntegralExpPrimExp $fNumPrimExp$fFreeInPrimExp$fTraversablePrimExp$fFoldablePrimExp$fFunctorPrimExp $fEqPrimExp $fOrdPrimExp $fShowPrimExp Substitutable SubstitutesubstituteNames Substitutions$fSubstituteFV$fSubstitutePrimExp$fSubstituteDimIndex$fSubstituteDimChange$fSubstituteIdent$fSubstituteTypeBase$fSubstituteNames$fSubstituteExt$fSubstituteShapeBase$fSubstitute()$fSubstituteRank$fSubstituteCertificates$fSubstitutePatternT$fSubstituteParam$fSubstituteStmAux$fSubstitutePatElemT$fSubstituteSubExp$fSubstituteVName$fSubstituteBool$fSubstituteMaybe$fSubstitute(,,,)$fSubstitute(,,)$fSubstitute(,)$fSubstituteSeq$fSubstitute[]$fSubstituteNameInfo$fSubstituteLambdaT$fSubstituteBodyT$fSubstituteStm$fSubstituteExpT VNameSourcenewNameblankNameSource newNameSourcenewVNamenewVNameFromName$fMonoidVNameSource$fSemigroupVNameSource$fLiftVNameSource$fEqVNameSource$fOrdVNameSourceMonadFreshNames getNameSource putNameSourcemodifyNameSourcenewNameFromString 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 $fRenameNames$fRenameTypeBase$fRenameStmAux$fRenameCertificates$fRenamePatElemT$fRenamePatternT $fRenameParam$fRenameSubExp $fRenameIdent $fRenameBool $fRenameMaybe $fRename(,,) $fRename(,) $fRename[] $fRenameVName$fRenameLambdaT $fRenameExpT $fRenameStm $fRenameBodyT$fRenameFunDef$fFunctorRenameM$fApplicativeRenameM$fMonadRenameM$fMonadFreshNamesRenameM$fMonadReaderRenameM AttributesexpTypesFromPatternIsOpsafeOpcheapOpisBuiltInFunctionbuiltInFunctions funDefByName asBasicOpsafeExp subExpVars subExpVar shapeVarscommutativeLambdaentryPointSizedefAuxstmCertscertifyexpExtTypesFromPatternpatternFromParams$fIsOp() CanBeAliased OpWithAliasesremoveOpAliases addOpAliases AliasedOp opAliases consumedInOp AliasesOf aliasesOfAliased bodyAliasesconsumedInBody vnameAliases subExpAliases primOpAliases expAliases consumedInStm consumedInExpconsumedByLambdapatternAliases$fAliasesOfPatElemT$fAliasesOfNames $fAliasedOp()$fCanBeAliased()Usages UsageTablecontainswithoutlookupusedexpandkeys isConsumed isInResultisUsedDirectly allConsumedusagesusage consumedUsage inResultUsage$fMonoidUsages$fSemigroupUsages$fSubstituteUsageTable$fMonoidUsageTable$fSemigroupUsageTable $fEqUsages $fOrdUsages $fShowUsages$fEqUsageTable$fShowUsageTable usageInStm 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 runBinderT_ runBinderT' 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 eOutOfBounds eWriteArrayeBlankasIntSasIntZ foldBinOp binOpLambda cmpOpLambda fullSlicesliceAt fullSliceNum isFullSliceifCommon resultBody resultBodyM insertStmsM mapResultinstantiateShapesinstantiateShapes'removeExistentialssimpleMkLetNames $fToExpVName $fToExpSubExp Checkable checkExpLore checkBodyLorecheckFParamLorecheckLParamLorecheckLetBoundLore checkRetType matchPattern primFParammatchReturnTypematchBranchType CheckableOpcheckOpTypeM Occurences TypeError ErrorCaseUnexpectedTypeReturnTypeErrorDupDefinitionError DupParamErrorDupPatternErrorInvalidPatternErrorUnknownVariableErrorUnknownFunctionErrorParameterMismatch SlicingError BadAnnotation ReturnAliasedUniqueReturnAliased NotAnArrayPermutationErrorbadcontextmessageconsumecollectOccurences checkOpWithconsumeOnlyParamsbinding lookupVar lookupAliasesrequirerequireI checkProgcheckLambdaParams checkFun' 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 primExpToExpprimExpFromExpprimExpFromSubExpMprimExpFromSubExpreplaceInPrimExpMreplaceInPrimExpsubstituteInPrimExp$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 loopDepthbindingsavailableAtClosestLoopsimplifyMemory fromScopetoScopecastSymbolTabledeepen entryType asScalExp bindingDepth valueRangeentryStmentryLetBoundAttrentryFParamLore loopVariableelem lookupStm lookupExp lookupBasicOp lookupSubExp lookupScalExp lookupValue availableindex'enclosingLoopVars rangesRep insertFParams insertLParaminsertArrayLParaminsertChunkLParam insertLoopVar updateBounds setUpperBound setLowerBound isAtLeasthideIf hideCertified$fMonoidSymbolTable$fSemigroupSymbolTable $fIndexOp() SOACMappermapOnSOACSubExpmapOnSOACLambdamapOnSOACVNameReduceredComm redLambda redNeutralScan ScremaForm StreamFormParallel Sequential GenReduceOpgenReduceWidth genReduceDestgenReduceNeutral genReduceOpSOACStreamScatter GenReduceScrema CmpThreshold redResults singleReduce scremaTypemkIdentityLambdaisIdentityLambda composeLambdanilFn scanomapSOAC redomapSOACscanSOAC reduceSOACmapSOACisScanomapSOAC isScanSOAC isRedomapSOAC isReduceSOAC isMapSOACidentitySOACMappermapSOACMsoacType typeCheckSOACgetStreamAccumsgetStreamOrderppScrema ppGenReduce$fPrettyReduce $fPrettySOAC$fOpMetricsSOAC $fIndexOpSOAC$fRangedOpSOAC $fIsOpSOAC$fAliasedOpSOAC $fTypedOpSOAC$fCanBeWiseSOAC$fCanBeRangedSOAC$fCanBeAliasedSOAC $fRenameSOAC$fSubstituteSOAC $fFreeInSOAC$fEqGenReduceOp$fOrdGenReduceOp$fShowGenReduceOp$fEqStreamForm$fOrdStreamForm$fShowStreamForm $fEqReduce $fOrdReduce $fShowReduce$fEqScremaForm$fOrdScremaForm$fShowScremaForm$fEqSOAC $fOrdSOAC $fShowSOACnonuniqueParamsredomapToMapAndReducescanomapToMapAndScan dissectScremasequentialStreamWholeArraypartitionChunkedFoldParameters$partitionChunkedKernelFoldParameters&partitionChunkedKernelLambdaParametersIndexSubstitutionsIndexSubstitutionsubstituteIndicesSOACS$fPrettyLoreSOACS$fBinderOpsSOACS$fBindableSOACS$fCheckableSOACS$fCheckableOpSOACS$fAttributesSOACS$fAnnotationsSOACS TransformertransformFunDef transformBodytransformStmRecursively transformSOACtransformLambdaiswimirwim 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 CallGraphbuildCallGraphGroupStreamLambdagroupStreamChunkSizegroupStreamChunkOffsetgroupStreamAccParamsgroupStreamArrParamsgroupStreamLambdaBody KernelExp SplitSpaceCombine GroupReduce GroupScan GroupStreamGroupGenReduceBarrier CombineSpace cspaceScatter cspaceDims SplitOrderingSplitContiguous SplitStrided combineSpacescopeOfCombineSpacetypeCheckKernelExp$fRenameSplitOrdering$fSubstituteSplitOrdering$fFreeInSplitOrdering$fRenameCombineSpace$fSubstituteCombineSpace$fPrettyGroupStreamLambda$fScopedloreGroupStreamLambda$fRenameGroupStreamLambda$fSubstituteGroupStreamLambda$fFreeInGroupStreamLambda$fPrettyKernelExp$fOpMetricsKernelExp$fIndexOpKernelExp$fCanBeWiseKernelExp$fCanBeRangedKernelExp$fCanBeAliasedKernelExp$fRenameKernelExp$fSubstituteKernelExp$fAliasedOpKernelExp$fRangedOpKernelExp$fFreeInKernelExp$fTypedOpKernelExp$fIsOpKernelExp$fEqSplitOrdering$fOrdSplitOrdering$fShowSplitOrdering$fEqCombineSpace$fOrdCombineSpace$fShowCombineSpace $fEqKernelExp$fOrdKernelExp$fShowKernelExp$fOrdGroupStreamLambda$fShowGroupStreamLambda$fEqGroupStreamLambdaHostOpGetSize GetSizeMax CmpSizeLeSegOpOtherOp SegOpWalkerwalkOnSegOpSubExpwalkOnSegOpLambdawalkOnSegOpBodywalkOnSegOpVName SegOpMappermapOnSegOpSubExpmapOnSegOpLambdamapOnSegOpBodymapOnSegOpVNameSegMapSegRedSegScan SegGenRedSegSpacesegFlat unSegSpaceSegLevel SegThreadSegGroupSegThreadScalar segNumGroups segGroupSizesegVirtSegVirt SegNoVirt KernelResultReturns WriteReturns ConcatReturns TileReturns KernelBodykernelBodyLorekernelBodyStmskernelBodyResultSegRedOp segRedComm segRedLambda segRedNeutral segRedShapegenReduceShape segRedResultskernelResultSubExp segSpaceDimsscopeOfSegSpacesegLevelsegSpacetypeCheckSegOpidentitySegOpMapper mapSegOpMidentitySegOpWalker walkSegOpMtypeCheckHostOp$fPrettyKernelResult$fRenameKernelResult$fSubstituteKernelResult$fFreeInKernelResult$fPrettyKernelBody$fRenameKernelBody$fSubstituteKernelBody$fFreeInKernelBody$fPrettySegLevel$fPrettySegSpace $fIsOpSegOp$fIndexOpSegOp$fRangedOpSegOp $fPrettySegOp$fOpMetricsSegOp$fAliasedOpSegOp$fTypedOpSegOp$fCanBeWiseSegOp$fCanBeAliasedSegOp$fCanBeRangedSegOp $fFreeInSegOp $fRenameSegOp$fSubstituteSegOp$fOpMetricsHostOp$fPrettyHostOp$fIndexOpHostOp$fCanBeWiseHostOp$fCanBeRangedHostOp$fCanBeAliasedHostOp$fFreeInHostOp$fRangedOpHostOp$fAliasedOpHostOp$fTypedOpHostOp $fIsOpHostOp$fRenameHostOp$fSubstituteHostOp $fEqSegRedOp $fOrdSegRedOp$fShowSegRedOp$fEqKernelResult$fShowKernelResult$fOrdKernelResult $fEqSegVirt $fOrdSegVirt $fShowSegVirt $fEqSegLevel $fOrdSegLevel$fShowSegLevel $fEqSegSpace $fOrdSegSpace$fShowSegSpace $fEqSegOp $fOrdSegOp $fShowSegOp $fEqHostOp $fOrdHostOp $fShowHostOp$fEqKernelBody$fShowKernelBody$fOrdKernelBodyKernels$fPrettyLoreKernels$fBinderOpsKernels$fBindableKernels$fCheckableKernels$fCheckableOpKernels$fAttributesKernels$fAnnotationsKernelsbabysitKernelsnonlinearInMemoryfirstOrderTransform KernelInputkernelInputNamekernelInputTypekernelInputArraykernelInputIndices MkSegLevelThreadRecommendation ManyThreadsNoRecommendationgetSize segThreadsegThreadCapped mkSegSpacesegRedsegScansegMap nonSegRed streamRed streamMap segGenRed mapKernelreadKernelInputsoacsStmToKernelssoacsLambdaToKernels scopeForSOACsscopeForKernels$fEqKernelSize$fOrdKernelSize$fShowKernelSize$fShowKernelInput KernelNestNestingsNestingnestingLetBound nestingLoop LoopNesting MapNestingloopNestingPatternloopNestingCertificatesloopNestingWidthloopNestingParamsAndArrsTargetsTarget ppTargets singleTarget outerTarget innerTargetpushInnerTargetpopInnerTarget targetsScope ppLoopNesting ppNestings singleNestingpushInnerNestingletBindInInnerNesting ppKernelNestpushKernelNestingpushInnerKernelNestingremoveArraysFromNest newKernelkernelNestLoopsboundInKernelNestboundInKernelNestskernelNestWidthsconstructKernel flatKernel tryDistributetryDistributeStm$fFreeInLoopNesting$fScopedKernelsLoopNesting$fShowLoopNesting $fShowNestingBranchSeqLoopinterchangeLoopsinterchangeBranchunstream tileLoops$fMonoidPrivStms$fSemigroupPrivStms LowerUpdate DesiredUpdate updateName updateTypeupdateCertificates updateSource updateIndices updateValuelowerUpdateKernels$fFunctorDesiredUpdate$fShowDesiredUpdate$fShowLoopResultSummaryinPlaceLowering$fMonoidBottomUp$fSemigroupBottomUp$fHasScopeAliasesForwardingM$fMonadFreshNamesForwardingM$fMonadForwardingM$fApplicativeForwardingM$fFunctorForwardingM$fMonadReaderForwardingM$fMonadWriterForwardingM$fMonadStateForwardingMRuleBook BottomUpRuleBottomUpRuleOpBottomUpRuleDoLoopBottomUpRuleIfBottomUpRuleBasicOpBottomUpRuleGenericBottomUp TopDownRule TopDownRuleOpTopDownRuleDoLoop TopDownRuleIfTopDownRuleBasicOpTopDownRuleGenericTopDownSimplificationRule RuleGeneric RuleBasicOpRuleIf RuleDoLoopRuleOpRuleSimplifySkipRuleMcannotSimplifyruleBooktopDownSimplifyStmbottomUpSimplifyStm$fMonadBinderRuleM$fMonadFailRuleM $fMonoidRules$fSemigroupRules$fMonoidRuleBook$fSemigroupRuleBook$fFunctorRuleM$fApplicativeRuleM $fMonadRuleM$fMonadFreshNamesRuleM$fHasScopeRuleM$fLocalScopeRuleM$fMonadErrorRuleM VarLookupfoldClosedFormloopClosedForm standardRulesremoveUnnecessaryCopy SimplifiableSimplifiableLoreSimplifiedBody BlockPredSimpleM SimplifyOp SimpleOps mkExpAttrSmkBodyS mkLetNamesS simplifyOpSEnvenvRulesenvHoistBlockers HoistBlockers blockHoistPar blockHoistSeqblockHoistBranch getArraySizes isAllocationnoExtraHoistBlockersemptyEnvbindableSimpleOps runSimpleM subSimpleM asksEngineEnv askVtable localVtable bindLParams neverBlocksisFalseorIfisOpblockIfhasFree isNotSafe simplifyBody simplifyStms simplifyParamsimplifyLambdasimplifyLambdaSeqsimplifyLambdaNoHoisting simplifyFun$fMonadFreshNamesSimpleM$fSimplifiableCertificates$fSimplifiableDimIndex$fSimplifiableTypeBase$fSimplifiableExt$fSimplifiableShapeBase$fSimplifiableVName$fSimplifiableSubExp$fSimplifiable[]$fSimplifiableMaybe$fSimplifiableInt$fSimplifiable(,,)$fSimplifiable(,)$fLocalScopeWiseSimpleM$fHasScopeWiseSimpleM$fApplicativeSimpleM$fFunctorSimpleM$fMonadSimpleM$fMonadReaderSimpleM$fMonadStateSimpleMsimplifyPrimExpsimplifyExtPrimExp FunReturns BodyReturns ExpReturns MemReturnReturnsInBlockReturnsNewBlockMemBindArrayInMemBoundMemInfoMemPrimMemMemMemArrayExtIxFunMemOpAllocInnerExplicitMemorishExplicitMemory isStaticIxFunexistentialiseIxFunnoUniquenessReturnsbodyReturnsToExpReturns lookupMemInfo subExpMemInfolookupArraySummary extReturns expReturns sliceInfo fullyLinearixFunMatchesInnerShape scalarMemoryallScalarMemory$fPrettyLoreExplicitMemory$fAttributesExplicitMemory$fCheckableOpExplicitMemory$fIndexOpMemOp$fCanBeWiseMemOp $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$fOpReturnsExplicitMemory $fEqMemOp $fOrdMemOp $fShowMemOp $fEqMemInfo $fShowMemInfo $fOrdMemInfo $fShowMemBind$fShowMemReturnarraySizeInBytesExpexplicitAllocationsexplicitAllocationsInStms simplifiable$fBinderOpsWise$fBinderOpsExplicitMemory$fSizeSubstMemOp$fSizeSubstHostOp$fMonadFailAllocM"$fAllocatorExplicitMemoryPatAllocM$fAllocatorExplicitMemoryAllocM$fMonadBinderAllocM $fEqAllocStm $fOrdAllocStm$fShowAllocStm$fApplicativePatAllocM$fFunctorPatAllocM$fMonadPatAllocM$fHasScopePatAllocM$fMonadWriterPatAllocM$fMonadFreshNamesPatAllocM$fApplicativeAllocM$fFunctorAllocM $fMonadAllocM$fMonadFreshNamesAllocM$fHasScopeAllocM$fLocalScopeAllocM$fMonadReaderAllocM doubleBuffer'$fLocalScopeExplicitMemoryDoubleBufferM%$fHasScopeExplicitMemoryDoubleBufferM$fFunctorDoubleBufferM$fApplicativeDoubleBufferM$fMonadDoubleBufferM$fMonadReaderDoubleBufferM$fMonadFreshNamesDoubleBufferM$fShowDoubleBufferCSEInOp performCSE $fCSEInOpSOAC$fCSEInOpMemOp$fCSEInOpSegOp$fCSEInOpHostOp $fCSEInOp() simplifyProgsimplifySomethingcopyPropagateInStms simpleSOACS simplifySOACS simplifySOAC soacRules $fEqArrayOp $fOrdArrayOp $fShowArrayOp DistNestTDistAcc distTargetsdistStmsDistEnvdistNest distScopedistOnTopLevelStmsdistOnInnerMap distSegLevel KernelsStmsMapLoop mapLoopStmpostKernelsStmsaddStmsToKerneladdStmToKernel runDistNestT addKernels addKernel inNestingbodyContainsParallelismlambdaContainsParallelismincrementalFlatteningdistributeMapBodyStms distributedistributeSingleStmgenReduceKerneldetermineReduceOppermutationAndMissing distributeMap$fMonoidPostKernels$fSemigroupPostKernels$fMonoidDistRes$fSemigroupDistRes$fMonadLoggerDistNestT$fLocalScopeKernelsDistNestT$fHasScopeKernelsDistNestT$fMonadFreshNamesDistNestT$fMonadTransDistNestT$fFunctorDistNestT$fApplicativeDistNestT$fMonadDistNestT$fMonadReaderDistNestT$fMonadWriterDistNestTintraGroupParallelise $fMonoidAcc$fSemigroupAcc$fMonadLoggerBinderTextractKernels$fMonadFreshNamesDistribM$fFunctorDistribM$fApplicativeDistribM$fMonadDistribM$fHasScopeDistribM$fLocalScopeDistribM$fMonadStateDistribM$fMonadLoggerDistribMinlineAndRemoveDeadFunctionsremoveDeadFunctionssimplifyKernelssimplifyKernelOp$fSimplifiableKernelResult$fSimplifiableSegSpace$fSimplifiableSegLevel$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 kernelType attemptFusion$fShowFusedKer fuseSOACs $fShowError$fMonoidFusedRes$fSemigroupFusedRes$fHasScopeSOACSFusionGM$fMonadFreshNamesFusionGM $fEqKernName $fOrdKernName$fShowKernName$fMonadFusionGM$fApplicativeFusionGM$fFunctorFusionGM$fMonadErrorFusionGM$fMonadStateFusionGM$fMonadReaderFusionGMstandardPipelinekernelsPipelinesequentialPipelinesequentialCpuPipeline gpuPipelineBytesElementsArgExpArgMemArgExpLeafSizeOf VolatilityVolatile NonvolatileCode:>>: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 sizeToExpvarvi32 $fFreeInSize $fPrettySize$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$fEqSignedness$fShowSignedness $fEqValueDesc$fShowValueDesc$fShowExternalValue$fShowArrayContents$fEqVolatility$fOrdVolatility$fShowVolatility $fEqExpLeaf $fShowExpLeaf $fShowArg $fShowCode$fShowFunctionTsetDefaultSpacetoExp'ImpMVTableenvDefaultSpace envFunctionValueDestinationVarEntryArrayVarMemVar ScalarEntryentryScalarTypeMemEntry entryMemSpace ArrayEntryentryArrayLocationentryArrayElemType MemLocationmemLocationNamememLocationShapememLocationIxFun OperationsopsExpCompiler opsOpCompileropsStmsCompileropsCopyCompileropsAllocCompilers AllocCompiler CopyCompiler ExpCompiler StmsCompiler OpCompilerdefaultOperationsarrayDestinationsubImpM_subImpMcollectcollect'commentemit emitFunction hasFunction compileProg compileBody compileBody'compileLoopBody compileStmsdefCompileStms compileExp defCompileExpdFParamsdLParamsdPrim_dPrimdPrimV_dPrimVdScopedScopesdArrayeverythingVolatilesubExpToDimSize getVTable localVTable lookupArray lookupMemoryfullyIndexArrayfullyIndexArray' offsetArray strideArraycopycopyElementWise copyDWIMDestcopyDWIM compileAllocdimSizeToSubExptypeSizesForsWhilesCommentsIfsWhensUnlesssOp sDeclareMemsAlloc_sAllocsArraysAllocArrayPerm sAllocArray sStaticArraysWritesUpdate sLoopNest<--$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 GlobalBarrier MemFenceLocalMemFenceGlobal PrivateAlloc LocalAlloc KernelUse ScalarUse MemoryUseConstUseLocalMemoryUseKernel kernelBody kernelUseskernelNumGroupskernelGroupSize kernelName CallKernelKernelConstExp KernelConst SizeConst KernelCode getKernels atomicBinOp$fPrettyKernelConst$fPrettyKernelUse$fFreeInAtomicOp$fFreeInKernelOp$fPrettyKernelOp$fPrettyKernel$fFreeInKernel$fEqKernelConst$fOrdKernelConst$fShowKernelConst $fEqKernelUse$fShowKernelUse$fShowAtomicOp$fShowKernelOp $fShowKernel TransposeArgs TransposeTypeTransposeNormalTransposeLowWidthTransposeLowHeightTransposeSmall mapTransposemapTransposeKernel$fEqTransposeType$fOrdTransposeType$fShowTransposeType AtomicUpdateLocking lockingArraylockingIsUnlocked lockingToLocklockingToUnlocklockingMappingKernelConstantskernelGlobalThreadIdkernelLocalThreadId kernelGroupIdkernelGlobalThreadIdVarkernelLocalThreadIdVarkernelGroupIdVarkernelNumThreadskernelWaveSizekernelThreadActive InKernelGen CallKernelGenkeyWithEntryPoint atomicUpdateatomicUpdateLockingcomputeThreadChunkSizeisActive groupReduce groupScanvirtualiseGroups sKernelThread sKernelGroup sKernelSimple sReplicatesIotasCopycompileGroupResultcompileThreadResultcompileSegScan DoSegBody compileSegRedcompileSegRed' compileSegMapcompileSegGenRed 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 compileFuncompilePrimValuewriteScalarPointerWithQualsreadScalarPointerWithQualscompileExpToNamecompilePrimExp compileCode blockScope$fToExpPrimValue$fToExpFloatValue$fToExpIntValue$fToIdentVName $fToIdentName$fMonoidCompilerAcc$fSemigroupCompilerAcc$fMonadFreshNamesCompilerM$fEqHeaderSection$fOrdHeaderSection$fFunctorCompilerM$fApplicativeCompilerM$fMonadCompilerM$fMonadStateCompilerM$fMonadReaderCompilerM$fMonadWriterCompilerM kernelsToCUDAkernelsToOpenCL$fMonoidKernelRequirements$fSemigroupKernelRequirements$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 EntryOutputemptyConstructor simpleCall compileName compileDim unpackDimcompilePrimTypecompilePrimTypeExtcompilePrimToNpcompilePrimToExtNpCSProgCSConstructorDefClassConstructor CSClassDef PublicClassCSFunDef CSFunDefArgCSExceptCSStmtForEach UsingWithFixedReassign AssignTypedThrowUsing StaticFunDef PublicFunDef PrivateFunDef NamespaceConstructorDef StructDefCSArgCSIdxCSExpAddrRefOutDerefPreUnOpPostUnOpTernaryPair CallMethod CreateObject CreateArrayCreateSystemTuple AllocArray CollectionThisNullCSPrimCSIntCSUIntCSFloatBoolTByteTStringTIntPtrTCSCompArrayTTupleT SystemTupleTCSType CompositePointerT PrimitiveCustomTStaticTOutTRefTVoidTFloatTDoubleTUInt8TUInt16TUInt32TUInt64TInt8TInt16TInt32TInt64T ArgMemTypeArgOutArgRef$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 CompilerAcc 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 PatternConstr LoopFormBaseForInCaseBaseCasePat FieldBaseRecordFieldExplicitRecordFieldImplicitExpBaseLiteralIntLitFloatLitParens QualParensTupLit RecordLitAscriptLetPatLetFunNegate OpSection OpSectionLeftOpSectionRightProjectSection IndexSectionProjectLetWith RecordUpdateConstrMatchQualName qualQualsqualLeaf DimIndexBase InclusivenessDownToExclusive ToInclusive UpToExclusiveBacktickPlusMinusTimesDivideModQuotRemShiftRShiftLBandBorEqualNotEqualLessLeqGreaterGeq PipeRightPipeLeft IdentBase identSrcLocValue RecordDietFuncDiet TypeDeclBaseTypeDecl declaredType expandedType TypeArgExp TypeArgExpDimTypeArgExpTypeTypeExpTEVarTETupleTERecordTEArrayTEUniqueTEApplyTEArrowTESum StructType PatternTypeAliasingAlias AliasBound AliasFreealiasVarTypeArg TypeArgDim TypeArgTypeScalarTypeBaseTypeVarRecordSumArrowPNameNamedUnnamedTypeName typeQualstypeLeaf ShapeDeclDimDeclNamedDimConstDimAnyDimArrayDim unifyDims IsPrimValue primValue SignedValue UnsignedValueSignedUnsignedInfounInfoNoInfoShowable 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 $fOrdPName $fEqPName$fFoldableTypeArg$fFunctorTypeArg$fTraversableTypeArg$fBifoldableTypeBase$fBifunctorTypeBase$fBitraversableTypeBase$fBifoldableScalarTypeBase$fBifunctorScalarTypeBase$fBitraversableScalarTypeBase$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 $fShowPName $fEqTypeArg $fOrdTypeArg $fShowTypeArg$fEqScalarTypeBase$fOrdScalarTypeBase$fShowScalarTypeBase $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 UncheckedExpUncheckedDimIndexUncheckedIdentUncheckedTypeDeclUncheckedTypeExp UncheckedType IntrinsicIntrinsicMonoFunIntrinsicOverloadedFunIntrinsicPolyFun IntrinsicTypeIntrinsicEqualityIntrinsicOpaque nestedDimsremoveShapeAnnotationsvacuousShapeAnnotationsanyDimShapeAnnotationsaliases toStructuraltoStruct fromStruct tupleRecord isTupleRecordareTupleFieldstupleFieldNames sortFields sortConstrs isTypeParamcombineTypeShapes setAliases addAliases valueType unscopeType foldFunType unfoldFunTypetypeVars orderZeropatternDimNames typeDimNamespatternOrderZero patternTypepatternStructType patternParamnamesToPrimTypes intrinsicsmaxIntrinsicTagqualNamequalifytypeName progImports decImportsprogModuleTypesidentifierReferenceidentifierReferencesleadingOperatorAnnotunAnnotIsNamepprName prettyName$fPrettyTypeArg$fPrettyShapeDecl $fPrettyValue$fPrettyTypeParamBase$fPrettyIdentBase$fPrettyQualName$fPrettyTypeArgExp$fPrettyTypeExp$fPrettyScalarTypeBase$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 ScalarType 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 ctxImportsInterpreterError ValuePrim ValueArray ValueRecordExtOp ExtOpTrace ExtOpBreak ExtOpErrormkArray isEmptyArray fromTupletypeEnv initialCtx interpretExp interpretDecinterpretImportinterpretFunction $fPrettyShape$fShowInterpreterError$fPrettyIndexing$fMonadFailEvalM$fFunctorExtOp $fEqShape $fShowShape $fMonadEvalM$fApplicativeEvalM$fFunctorEvalM$fMonadFreeEvalM$fMonadReaderEvalM BoundInTypes boundInTypesinternaliseParamTypesinternaliseReturnTypeinternaliseEntryReturnTypeinternaliseTypeinternaliseSumTypeinternalisedTypeSizeinternalisePrimTypeinternalisePrimValue$fSemigroupBoundInTypes$fMonoidBoundInTypesInternaliseLambdainternaliseMapLambdainternaliseStreamMapLambdainternaliseFoldLambdainternaliseStreamLambdainternalisePartitionLambda transformProg$fMonoidNameSet$fSemigroupNameSet $fShowExtExp$fShowStaticVal $fFunctorDefM$fApplicativeDefM $fMonadDefM$fMonadReaderDefM$fMonadWriterDefM$fMonadFreshNamesDefM MatchPattern bindingParamsbindingLambdaParams primTypeHtmlprettyTypeNameprettyU renderNamejoinBycommaspipesMismatch ValueType Word8Value Word16Value Word32Value Word64ValueVector 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(,)$fASTMappableNonEmpty$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 $fEqWarningsMonadTypeCheckerwarnnewID bindNameMaplocalEnv checkQualName lookupMod lookupMTy lookupImport checkNamedDimMonadBreadCrumbs breadCrumbgetBreadCrumbs BreadCrumb MatchingTypesMatchingFields ImportTableunexpectedType undefinedTypefunctionIsNotValueunappliedFunctorunknownVariableError underscoreUserunTypeMaskEnv askRootEnv askImportName localTmpEnv typeError checkName bindSpacedcheckQualNameWithEnvqualifyTypeVars badOnLeftquote anySignedTypeanyUnsignedType anyIntType anyFloatType anyNumberType anyPrimTypeppSpaceintrinsicsNameMaptopLevelNameMap$fShowBreadCrumb$fMonadTypeCheckerTypeM$fMonadErrorTypeM applySubstSubst PrimSubstTypeSubsTypeSubDimSub unifyTypesU subuniqueOf checkTypeDecl checkTypeExpcheckForDuplicateNamescheckForDuplicateNamesInTypecheckShapeParamUsescheckTypeParamstypeParamToArg typeExpUsessubstituteTypes substTypesAny$fFunctorSubst$fSubstitutableTypeBase$fSubstitutableTypeBase0$fSubstitutableTypeBase1$fSubstitutableTypeBase2 $fShowTypeSub MonadUnifygetConstraintsputConstraintsmodifyConstraints newTypeVar Constraint NoConstraint ParamType Overloaded HasFieldsEquality HasConstrsUsage ConstraintsmkUsagemkUsage' lookupSubst normaliseTypeunify mustBeOneOf equalityType zeroOrderTypemustHaveConstr mustHaveField mkTypeVarName doUnification$fLocatedUsage$fLocatedConstraint$fMonadBreadCrumbsUnifyM$fMonadUnifyUnifyM$fShowConstraint $fMonadUnifyM$fFunctorUnifyM$fApplicativeUnifyM$fMonadStateUnifyM$fMonadErrorUnifyM transformDecs$fFunctorMonoM$fApplicativeMonoM $fMonadMonoM$fMonadReaderMonoM$fMonadWriterMonoM$fMonadFreshNamesMonoMinternaliseProg checkOneExp checkFunDef$fLocatedOccurence$fMonoidTermScope$fSemigroupTermScope$fMonadTypeCheckerTermTypeM$fMonadBreadCrumbsTermTypeM$fMonadUnifyTermTypeM$fMonadFailTermTypeM$fPrettyUnmatched$fOrdConstrPat $fEqConstrPat$fShowLocality$fShowValBinding$fShowTermScope$fMonadTermTypeM$fFunctorTermTypeM$fApplicativeTermTypeM$fMonadReaderTermTypeM$fMonadWriterTermTypeM$fMonadStateTermTypeM$fMonadErrorTermTypeM$fFunctorUnmatched$fShowUnmatchednewNamesForMTy refineEnv matchMTys applyFunctorcheckDec 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.ListsplitAt+process-extras-0.7.4-4UCAIBtFYwSFAL9wzGOak7System.Process.ByteStringreadProcessWithExitCodeControl.Monad.IO.ClassMonadIOmemoiseGetManifestRoughBuildList doSolveDeps#text-1.2.4.0-ACGwb19nBcsAobQX33cbHyData.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.IdentityIdentity loopExtTypeFunctor TraversableGHC.NumNumfail zeroIshExp oneIshExprenamerSubstitutionsmatcheswithoutUsminusAlgSimplifyEnvmaxSteps markInSolve scalExpRangeEitherLeft BodyWisdomControl.Monad.Trans.Writer.LazyWriter Consumption FunBindingGHC.ShowShowboundobserve expandAliasescheckAnnotationUnknownsubstituteInLMADhasContiguousPerm lmadShape lmadShapeBase sliceOneLMADreshapeCoercionreshapeOneLMAD rebaseNice makeRotIotaixfunMonotonicityRots freeVarIndexfreeVarConsumed letBoundIndexletBoundConsumed IndexArraynoUpdateBounds updateBounds' buildCGfunExpMapkernelWorkgroupskernelWorkgroupSizekernelElementsPerThreadkernelTotalElementskerneliseLambdaDistributionBodydistributionExpandTargetletBindInNestingboundInNesting VarianceTableTilingPrivStmspreludeToPostludepartitionPrelude BottomUpRules TopDownRulesRules checkResults SimpleRule TypeLookuphoistBranchInvariantcopyScratchToScratchremoveDeadBranchResultchangedprotectIfHoistedprotectLoopHoistednotWorthHoistingsimplifyResultJust getExtMaps PatAllocMAllocMaggressiveReuse allocSpaceChunkMapdimAllocationSize DoubleBuffer BufferCopycseInOp getShapeNamesremoveReplicateMappingremoveReplicateWriteremoveUnusedSOACInputremoveDeadReductionremoveDeadWritenestedParallelismworthIntraGroupworthSequentialisingdoInlineInCallerunExistentialiseMemorycopyCopyToCopyremoveIdentityCopy RebaseMap ExtractionextractKernelBodyAllocationsinputsToSubExps mapFusionOKmapWriteFusionOKfuseSOACwithKer toSeqStreamrearrangeReturnTypesrsuccoutArrinpArr infusiblekernelsKernNamesoacsbindVarbindingFamilyVar bindingFamilybindResrunFusionGatherMexpandSoacInpArr greedyFuse finaliseSOACmkFreshFusionRes getIdentArrArrayDestination Destination addArrays addFParams addLoopVarfuncallTargets defaultCopy copyArrayDWIMMemoryDestination groupLoopgroupCoverSpacesplitOp isStaticExpmakeAllMemoryGlobal scanStage1 SegRedOpSlugslugArrsslugAccs maxNumOpsintermediateArraysgroupResultArrayscomputeHistoUsagelocalMemLockUsageuintTypeToCTypeprintStmcproducttranslateKernelscompileTypecastExtcompileTypecastmodifyShapeAnnotationssuffZero scanTokensshow parseExpIncrMGHC.IOFilePath ParserMonadprog futharkType expression modExpressionanyValue anyValuesparseHappyStk envShapes TermBindingEvalMtoArraymatchValueToTypesignum'signumevalTypeDefM StaticValLambdaSVSumSVExtExp restrictEnvTorunDefM defuncExp defuncExp' defuncSoacExpdefuncDimIndex defuncLet defuncApply fullyApplied liftDynFunenvFromPatternDynamicenvFromShapeParams liftValDecbuildEnvPattern buildRetType typeFromSVdynamicFunTypematchPatternSV updatePattern svFromTypefreeVars patternVars defuncValBind DynamicFun defuncValsflattenPatternPrimValueMismatch%binary-0.8.7.0-59MeYXht9qXJlqEFJgbk7UData.Binary.Get.InternalGetData.Binary.PutPut constituentexplainMismatch genValueTypetestSpecsFromPathgetGenBS genFileSizeModModtransformNamesgetTypeisRigidLiftsMonoMRecordReplacements PolyBinding transformType transformExpdesugarBinOpSection unfoldLetFunsmonomorphizeBinding substPatternremoveTypeVariablesallDimsFreshInPatinternaliseDimExpisOverloadedFunctionlookupConstant ConstrPat Unmatched TermTypeState TermScopescopeBreadCrumbsLocality Occurence nullOccurenceseminullOccurenceexpTypeinstantiateTypeSchemeinstantiateTypeParam unifyExpTypesunifyTypeAliases patternUses returnType maskAliasesfixOverloadedTypes boundAliasescloseOverTypes consumingnoUniqueupdateExpTypes readLibrary' getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNameerrputnewCompilerConfigconfigExtraOptions excludeCasesPkgMinstallBuildListrepresentationfutharkPipelinefutharkPrintASTFutharkPipeline PrettyPrint TypeCheck Defunctorise MonomorphiseDefunctionalisegetFutharkPipeline binaryNamemeanstddevppvar centralMoment DocumentedctxVisibleMTysNoLink headerDocfutharkiBreakingfutharkiSkipBreaksfutharkiLoaded