I've started porting my next function from TypeScript to Roc.
I was trying to start with an empty stub that has roughly the right type signature:
interface Layout
exposes [getNextRow]
imports []
getNextRow = \items, galleryWidth, targetRowHeight, currentRowItems, width, removedItems, headings ->
[]
expect getNextRow [], 10, 20, [], 0, [], [] == []
Running roc test
results in this error:
$ roc test
thread 'main' panicked at crates/reporting/src/error/parse.rs:700:14:
not yet implemented: unhandled parse error: Pattern(NotAPattern(@220), @220)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Does anyone know what this means?
I’d assume that was caused by the commas in the line with expect. Roc has commas in parameters (function definition), but not in arguments (function call).
Try to remove them and probably wrap the whole expression after expect
starting from getNextRow
till the end of the line (but it might be unnecessary)
Oh yes that was it thank you!
Last updated: Jul 06 2025 at 12:14 UTC