Oscar Spencer

Results 135 issues of Oscar Spencer

Nope! It's not possible, so I'll add an "Impossible" marker to it. We can maybe make the types a little better here in the future to avoid having a case...

At the WebAssembly level, Grain "any" types are i32s but this block needs to return an i64 like the others. We got around this before by this being a `call_indirect`—we...

When matching on constants, we essentially compile something like `match (...) { 'a' => ..., 'b' => ..., ... }` into an `if` chain of `if (val == 'a') {...

enhancement
compiler

The `curry` operator takes a function of multiple arguments and transforms it into a single argument function that returns another function that takes more arguments, one at a time. For...

compiler

Maybe? The plan is for only `malloc.gr` and `gc.gr` to use runtime mode, so it might not be necessary. But it's not really just a problem for boxes; it's for...

Right now, we check that unsafe types are not used with functions in Pervasives like `print`, but we should make the typechecker disallow them from typechecking with any generic type...

From Discord: `primitive coerceFloat32ToNumber: Float32 -> Number = "@magic"`

`String.byteLength` naively returns the byte length as a Grain simple number, which is capped at 2^31.

bug

This would make Option and Result a part of the language rather than a part of the standard library. This adds opportunities for things like optional arguments, and the ability...

Statements like `let rec ones = [1, ...ones]` should be allowed. This expression should result a list containing a head of the element `1`, and a tail of that same...

enhancement
low-priority
compiler