Closed bneijt closed 7 years ago
Sorry for the delay. This looks great, thanks! I'll make a release now.
Shipped!
Sorry to have to say this, but it seems the code I pushed is broken because Text seems to be represented as an array of characters. The code I presented won't work and a workaround is:
ffi "%2.join(\"\").split(%1)"
Which might even be why the original author did not follow the Data.Text type signature.
Is there a good way to add unit tests to this kind of thing?
I think you can just add these tests to the normal unit tests and then run the fay-tests executable.
But Text
is represented as js strings, it's why the type exists. There may be some type conversion bugs lurking around that's causing this issue, I'm trying to recall the details....
Data.Text.splitOn uses Text -> Text -> [Text], with Text as a first argument.
Follow that implementation.