frasertweedale / hs-jose

Haskell JOSE and JWT library
http://hackage.haskell.org/package/jose
Apache License 2.0
122 stars 46 forks source link

replace (most) occurrences of String with Text #65

Closed frasertweedale closed 5 years ago

tmcgilchrist commented 5 years ago

Hey @frasertweedale is there a general pattern you want here for getting rid of string? Replace it everywhere that is possible?

frasertweedale commented 5 years ago

Pretty much. I changed a bunch of String to Text in a commit a little while ago so I think that might have been most of the "easy" ones. Some places (i.e. parser errors) cannot be changed from String unfortunately.

frasertweedale commented 5 years ago

Having a quick glance, places using String are:

I would like to change AlgorithmMismatch and CompactDecodeError, but I will make better types for them, not merely to switch to Text. Apart from them, pretty much everything else that could be done (in a straightforward way), has been done, so I'll close this issue and open a couple others.

frasertweedale commented 5 years ago