Closed nim442 closed 2 years ago
See [UNS-1056](https://linear.app/unsplash/issue/UNS-1056/before-zipping-convert-emojis-to-unicode) for context. This should be handled via linting, like [UNS-1168](https://linear.app/unsplash/issue/UNS-1168/icu-messages-disallow-nesting-function-inside-function).
If it's any help I think that test failure isn't a regression, it's just that it needs altering to call that lint rule directly.
We're testing that the interpolation rule stops iterating by placing an error value after the second interpolation (which works because Haskell is lazy). With your new rule added to lint
that error value is being read, as you'd expect.
@samhh Do you think creating our own show instances to format the lintingError ADT is a bad idea? I feel like it's a bit unidiomatic? Because if someone is playing around in repl, they will get shown the custom show instance and may not know what the actual ADT is?
@nim442 Yeah I think you're right. We could replace it with a plain a -> Text
function.
Looking good! I guess the only thing to wait for now is clarification on exactly which characters to disallow more narrowly than isAscii
.
On that note, I suspect we could create our own alternative function without the need for an external library: the implementation of isAscii
looks straightforward.
Where did we get to with this?
I am checking for emoji in the text part of Interpolation but I don't think I need to do it there
My formatter is not formatting with stylish-haskell for some reason. Will fix formatting once I figure out what's wrong