Closed haf closed 9 years ago
Both tryParse and tryDeserialize could sanely return Choice rather than Option, I agree. At this point, the only reason I hadn't was sticking to what seems to be an F# convention around try* functions returning options, but I think this is a case where it's perfectly reasonable to ignore that convention in favour of a more useful outcome. I'll change this when I get home later on.
So, Chiron 3.0.0 is out! And tryParse and tryDeserialize now return Choice<,> rather than Option<>. Hopefully a useful change!
Very nice ;)
Wouldn't it be a good idea to type it all in Choice<,> instead of Option<>? That way your can pass errors on outside the Json monad.