
26 Jan
2022
26 Jan
'22
8:32 a.m.
Hello Francesco,
Thanks for your response.
Francesco Ariis
The problem is with this line
Parsec.parse species "test species" eqatoms
`parse` returns an Either, so you should pattern match on its `Left` and `Right` (using `case` or the `either` function). This has to be done inside a `let` too, because parse is a pure function. Does that help?
I'll need to check exactly how to use case for this, but before I do I have this question. =Parsec.parse species "test species" "this that"= worked fine in my tests. Why has `parse` changed changed its return type when invoked as =Parsec.parse species "test species" eqatoms= That is confusing (and off putting) and makes it hard to test ones code. Thanks, Roger