-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Reading from Text and ByteString -- @package readable @version 0.3.1 -- | The Read type class is very useful for building data types from String -- representations. But String has high overhead, so sometimes it isn't -- suitable for applications where space usage and performance are -- important. This library provides a simpler version of Read's -- functionality for Text and ByteStrings. module Data.Readable -- | ByteString and Text reading using MonadPlus to handle parse failure. -- On error, fromText and fromBS will return mzero. You can use mplus to -- provide fallback defaults. class Readable a where fromBS = fromText <=< hushPlus . decodeUtf8' fromText :: (Readable a, MonadPlus m) => Text -> m a fromBS :: (Readable a, MonadPlus m) => ByteString -> m a instance Readable Word64 instance Readable Word32 instance Readable Word16 instance Readable Word8 instance Readable Int64 instance Readable Int32 instance Readable Int16 instance Readable Int8 instance Readable Bool instance Readable Double instance Readable Float instance Readable Integer instance Readable Int instance Readable Text instance Readable ByteString