&
in Haskell! It's probably not idiomatic, but it is nicer than $
imo.
(a).b
is an invalid module expression? I guess its kind of weird, but i'm trying to import a parametric module and apply it simultaneously
so i have something like
a.fut:
module a (T: integer) = {
let add (a: T.t) (b: T.t): T.t = a + b
}
and then in b.fut:
module a_u8 = (import "a").a u8
(x).y
is a special expression in the term language (because x.y
is handled as a single lexeme), and I guess we just never added it similarly to the module language.
reduce_by_index
), for which Futhark has a high-quality implementation.
I am using reduce_by_index
to update cells in the neighborhoods around many cells. I am trying to generalize to allow the user to pass in the radius of the neighborhood, but I think I am stuck because I need more expressive shape types.
Right now, the radius is hardcoded to 1, so we have 9 cells in the neighborhood, and my type is
neigborhood (i: i64) (j: i64): [9](i64, i64)
I would like to write
neigborhood (i: i64) (j: i64) (radius: i64) : [(2*radius + 1)**2](i64, i64)
which is currently impossible. Is there a workaround for this? Radius would be ultimately passed in at my entry point.