Skip to content

Conversation

joneshf
Copy link
Member

@joneshf joneshf commented Sep 25, 2017

I wanted to use this library with purerl, but the use of FFI meant I'd have to maintain a fork. However, it turned out that all of the FFI logic could be done in PS, and I wouldn't have to maintain a fork!

When writing the tests for Data.URI.Common.match1From, it seemed odd to me that it only matched at the exact index given rather than anything after that index. After converting the code, this seems like a bug. The first thing that happens is that the global flag is added to the regex. That seems like the intent is to match anything after the given index.

The other possibility is that adding the global flag was the bug and this function could use a better name. I don't have any suggestions for a better name though.

In any case, it'd be great if the move away from using the FFI could be incorporated in this repo rather than my fork.

Feel free to squash this upon merge.

@CLAassistant
Copy link

CLAassistant commented Sep 25, 2017

CLA assistant check
All committers have signed the CLA.

@garyb
Copy link
Member

garyb commented Sep 25, 2017

Thanks! I'm not really sure why I used the FFI for this, probably laziness. I think it should have been "anything after that index" - thanks for figuring it out and adding the tests!

@garyb garyb merged commit 30f87da into purescript-contrib:master Sep 25, 2017
@joneshf joneshf deleted the remove-ffi branch September 25, 2017 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants