{-# LANGUAGE RankNTypes #-}
module Data.Binary.Serialise.CBOR.Read
( module X
, deserialiseFromBytes
) where
import Codec.CBOR.Read as X hiding (deserialiseFromBytes)
import qualified Codec.CBOR.Read as Read
import Codec.CBOR.Decoding (Decoder)
import qualified Data.ByteString.Lazy as LBS
deserialiseFromBytes :: (forall s. Decoder s a)
-> LBS.ByteString
-> Either Read.DeserialiseFailure a
deserialiseFromBytes :: forall a.
(forall s. Decoder s a)
-> ByteString -> Either DeserialiseFailure a
deserialiseFromBytes forall s. Decoder s a
f = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. (a, b) -> b
snd forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a.
(forall s. Decoder s a)
-> ByteString -> Either DeserialiseFailure (ByteString, a)
Read.deserialiseFromBytes forall s. Decoder s a
f