{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE PolyKinds #-}
module Data.TypedEncoding.Conv.ByteString.Lazy.Char8 where
import qualified Data.ByteString.Lazy.Char8 as BL8
import qualified Data.TypedEncoding.Common.Util.TypeLits as Knds
import Data.TypedEncoding.Instances.Support
pack :: (
Knds.UnSnoc xs ~ '(,) ys y
, Superset "r-CHAR8" y
, encs ~ RemoveRs ys
, AllEncodeInto "r-CHAR8" encs
) => Enc xs c String -> Enc xs c BL8.ByteString
pack = unsafeChangePayload BL8.pack
unpack :: (
Knds.UnSnoc xs ~ '(,) ys y
, Superset "r-CHAR8" y
, encs ~ RemoveRs ys
, AllEncodeInto "r-CHAR8" encs
) => Enc xs c BL8.ByteString -> Enc xs c String
unpack = unsafeChangePayload BL8.unpack