Hi all,

I have noticed that in both Data.Binary and Data.Text (which is still
experimental, but still), the "decode" functions can be undefined
(i.e. bottom) if they encounter malformed input.

What is the preferred way to use these functions in a safe way? For
example, if one writes data to a disk using Data.Binary and wants to
read it back in at a later date, how can one ensure that it is valid
so that Data.Binary does not hit an error? Or do you just have to
catch the exception in the IO Monad?

Alex
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to