purescript-contrib / purescript-affjax

An asynchronous AJAX library built using Aff.
Apache License 2.0
121 stars 78 forks source link

Added Show instance to ResponseFormatError #137

Closed reactormonk closed 3 years ago

reactormonk commented 5 years ago

Makes dealing with it in tests a bit easier

CLAassistant commented 5 years ago

CLA assistant check
All committers have signed the CLA.

garyb commented 5 years ago

Thanks, but this doesn't fit the informal law that show should print an expression that would construct the value, so I'd rather do it as that instead, if we're going to add the instance.

reactormonk commented 5 years ago

Can't really do that with Foreign though?

thomashoneyman commented 3 years ago

I'm going to close this as we don't generally use Show except for when the printed expression constructs the same value, which is not the case here (and isn't really possible with Foreign). However, I understand that the Show instance is useful when using a test library that requires the instance to show debugging output; if you'd still like to add the instance, we should create a new issue and discuss a proposal there. Sorry for the delayed response, @reactormonk, and thank you for the PR!