purescript-contrib/purescript-uri

Use Record instead of `data`

Opened this issue · 4 comments

Agreed. I think this is partly why I didn't use this library in my repo's ToC program

I think this breaking change should happen in v0.16.0 as it will likely propagate far. Thoughts?

garyb commented

I'm not sure this library is that widely used, since most people probably don't care about the expanded set of capabilities it provides over string munging enough to deal with the effort of using it. 😉

It is a fair bit of work though, some choices will need making for the places where there are sum types, etc. so I think leaving it for a future update is fine though.

I'm not totally convinced that changing it to use records will fix the usability to a great degree either... it'll still be a bit of a pain to construct URIs using it, and reading parts out of them won't be much easier either since it'll still require lens use due to the sums types. In a perfect world we'd have a type-level parser so we could just put URIs in the code as type-level strings and reflect them, but I think the compile time cost of that would be prohibitive, and is quite a project to figure out too.

Ok, and yeah I agree with what you have said.

I'll leave this labeled as a breaking change, but won't associate it with any particular compiler release.