Hoogle Search

Within LTS Haskell 24.2 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. decodeUtf8 :: ByteString -> Text

    yesod-auth-oauth2 Yesod.Auth.OAuth2.Prelude

    Decode a ByteString containing UTF-8 encoded text that is known to be valid. If the input contains any invalid UTF-8 data, an exception will be thrown that cannot be caught in pure code. For more control over the handling of invalid data, use decodeUtf8' or decodeUtf8With. This is a partial function: it checks that input is a well-formed UTF-8 sequence and copies buffer or throws an error otherwise.

  2. decodeUtf8 :: Utf8 textual binary => binary -> textual

    classy-prelude-yesod ClassyPrelude.Yesod

    Note that this function is required to be pure. In the case of a decoding error, Unicode replacement characters must be used.

  3. decodeUtf8 :: MonadUnliftIO m => InputStream ByteString -> m (InputStream Text)

    unliftio-streams UnliftIO.Streams.Text

    No documentation available.

  4. class DecodeUtf8 t

    brick Brick.Widgets.Edit

    Values that can be constructed by decoding bytestrings in UTF-8 encoding.

  5. decodeUtf8' :: ByteString -> Either UnicodeException Text

    text Data.Text.Encoding

    Decode a ByteString containing UTF-8 encoded text. If the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.

  6. decodeUtf8Chunk :: ByteString -> (StrictTextBuilder, ByteString, Maybe Utf8State)

    text Data.Text.Encoding

    Decode a chunk of UTF-8 text. To be continued with decodeUtf8More. See decodeUtf8More for details on the result.

    Properties

    decodeUtf8Chunk = decodeUtf8More startUtf8State
    
    Given:
    decodeUtf8Chunk chunk = (builder, rest, ms)
    
    builder is a prefix and rest is a suffix of chunk.
    encodeUtf8 (strictBuilderToText builder) <> rest = chunk
    

  7. decodeUtf8Lenient :: ByteString -> Text

    text Data.Text.Encoding

    Decode a ByteString containing UTF-8 encoded text. Any invalid input bytes will be replaced with the Unicode replacement character U+FFFD.

  8. decodeUtf8More :: Utf8State -> ByteString -> (StrictTextBuilder, ByteString, Maybe Utf8State)

    text Data.Text.Encoding

    Decode another chunk in an ongoing UTF-8 stream. Returns a triple:

    1. A StrictBuilder for the decoded chunk of text. You can accumulate chunks with (<>) or output them with toText.
    2. The undecoded remainder of the given chunk, for diagnosing errors and resuming (presumably after skipping some bytes).
    3. Just the new state, or Nothing if an invalid byte was encountered (it will be within the first 4 bytes of the undecoded remainder).

    Properties

    Given:
    (pre, suf, ms) = decodeUtf8More s chunk
    
    1. If the output pre is nonempty (alternatively, if length chunk > length suf)
      s2b pre `append` suf
      = p2b s `append` chunk 
      where
      s2b = encodeUtf8
      . toText p2b = partUtf8ToByteString 
    2. If the output pre is empty (alternatively, if length chunk = length suf)
      suf = chunk
    3. Decoding chunks separately is equivalent to decoding their concatenation.Given:
      (pre1, suf1, Just s1) = decodeUtf8More
      s chunk1 (pre2, suf2, ms2) = decodeUtf8More s1 chunk2 (pre3,
      suf3, ms3) = decodeUtf8More s (chunk1 `B.append` chunk2)
      
      we have:
      s2b (pre1 <> pre2) = s2b pre3 ms2 =
      ms3 

  9. decodeUtf8With :: OnDecodeError -> ByteString -> Text

    text Data.Text.Encoding

    Decode a ByteString containing UTF-8 encoded text. Surrogate code points in replacement character returned by OnDecodeError will be automatically remapped to the replacement char U+FFFD.

  10. decodeUtf8Chunk :: ByteString -> (StrictTextBuilder, ByteString, Maybe Utf8State)

    text Data.Text.Internal.Encoding

    Decode a chunk of UTF-8 text. To be continued with decodeUtf8More. See decodeUtf8More for details on the result.

    Properties

    decodeUtf8Chunk = decodeUtf8More startUtf8State
    
    Given:
    decodeUtf8Chunk chunk = (builder, rest, ms)
    
    builder is a prefix and rest is a suffix of chunk.
    encodeUtf8 (strictBuilderToText builder) <> rest = chunk
    

Page 3 of many | Previous | Next