module Binrep.Type.Text
( AsText
, Encode(..), encode, encodeToRep
, Decode(..)
, module Binrep.Type.Text.Encoding.Utf8
, module Binrep.Type.Text.Encoding.Ascii
, module Binrep.Type.Text.Encoding.Utf16
, module Binrep.Type.Text.Encoding.Utf32
, module Binrep.Type.Text.Encoding.ShiftJis
) where
import Binrep.Type.Text.Internal
import Rerefined
import Binrep.Type.Text.Encoding.Utf8
import Binrep.Type.Text.Encoding.Ascii
import Binrep.Type.Text.Encoding.Utf16
import Binrep.Type.Text.Encoding.Utf32
import Binrep.Type.Text.Encoding.ShiftJis
encode :: forall enc. Encode enc => AsText enc -> Bytes
encode :: forall {k} (enc :: k). Encode enc => AsText enc -> Bytes
encode = forall (enc :: k). Encode enc => Text -> Bytes
forall {k} (enc :: k). Encode enc => Text -> Bytes
encode' @enc (Text -> Bytes) -> (AsText enc -> Text) -> AsText enc -> Bytes
forall b c a. (b -> c) -> (a -> b) -> a -> c
. AsText enc -> Text
forall {k} (p :: k) a. Refined p a -> a
unrefine
encodeToRep
:: forall rep enc
. (Encode enc, Refine rep Bytes)
=> AsText enc
-> Either RefineFailure (Refined rep Bytes)
encodeToRep :: forall {k} {k} (rep :: k) (enc :: k).
(Encode enc, Refine rep Bytes) =>
AsText enc -> Either RefineFailure (Refined rep Bytes)
encodeToRep = Bytes -> Either RefineFailure (Refined rep Bytes)
forall {k} (p :: k) a.
Refine p a =>
a -> Either RefineFailure (Refined p a)
refine (Bytes -> Either RefineFailure (Refined rep Bytes))
-> (AsText enc -> Bytes)
-> AsText enc
-> Either RefineFailure (Refined rep Bytes)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. AsText enc -> Bytes
forall {k} (enc :: k). Encode enc => AsText enc -> Bytes
encode