Encode/Decode Natural
f-f opened this issue · 1 comments
thomashoneyman commented
Unfortunately, since Natural is outside of core / contrib we won't bring in the dependency here. If you're using automatic record decoding that's unfortunate, but if you're manually writing encoders / decoders you could decode as an int and then immediately parse as a natural -- something (hand-wavy) like thisS
myField <- note (TypeMismatch "Natural") Natural.parse =<< rec .: "natural_field"