Closed andrewthad closed 1 year ago
What do you intend to replace it with?
I guess the other option is to expect someone copying and pasting the output to use OverloadedLists
.
Yes, I had the OverloadedLists
syntax in mind. This is what vector
and text
do (well, text
assumes OverloadedStrings
) and the result is nicer for the user. I have unit tests in the http-interchange
library that uses Show
and pretty-show
to create an expected output. Here is one of them:
Response
{ statusLine =
StatusLine
{ versionMajor = 1
, versionMinor = 1
, statusCode = 400
, statusReason = "Bad Request"
}
, headers =
fromListN
2
[ Header { name = "Content-Type" , value = "application/json" }
, Header { name = "Content-Length" , value = "100" }
]
}
The way headers
is rendered is needlessly tedious. If we change the Show
instance, then it becomes more useful in this context.
SGTM
I just noticed that
fromListN
is used in theShow
instance forSmallArray
. I'd like to get rid of this everywhere.