{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wno-orphans #-}
module Data.Snowchecked.Encoding.ByteString
( module Data.Snowchecked.Encoding.Class
) where
import Data.ByteString
import Data.Snowchecked.Encoding.ByteString.Lazy ()
import Data.Snowchecked.Encoding.Class
instance IsFlake ByteString where
fromFlake :: Flake -> ByteString
fromFlake = ByteString -> ByteString
toStrict forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. IsFlake a => Flake -> a
fromFlake
{-# INLINE fromFlake #-}
parseFish :: forall (m :: * -> *).
MonadFail m =>
SnowcheckedConfig -> ByteString -> m Flakeish
parseFish SnowcheckedConfig
cfg ByteString
bs = forall a (m :: * -> *).
(IsFlake a, MonadFail m) =>
SnowcheckedConfig -> a -> m Flakeish
parseFish SnowcheckedConfig
cfg forall a b. (a -> b) -> a -> b
$ ByteString -> ByteString
fromStrict ByteString
bs
{-# INLINE parseFish #-}