iand675 / text-lens-encoding

Isomorphisms for converting between text and bytestrings
MIT License
0 stars 0 forks source link

Prisms instead of Isos #1

Open mithrandi opened 8 years ago

mithrandi commented 8 years ago

What about using Prisms instead of Isos so that decoding can fail? (instead of getting error) I could try work up a patch if you'd be interested.

iand675 commented 8 years ago

I would accept additions functions for each of the existing Isos, but will not change the types of the existing implementations from Isos to Prisms. For example, if you added _utf8 and so forth to the existing Encodable type class, that would be fine.