ribosome-host-0.9.9.9: Neovim plugin host for Polysemy
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ribosome.Host.Class.Msgpack.Util

Description

Utilities for writing messagepack codec instances.

Synopsis

Documentation

pattern MsgpackString :: String -> Object Source #

Extract a String from an Object.

byteStringField :: Typeable a => (ByteString -> Either FieldError a) -> Object -> Either FieldError a Source #

Call the continuation if the Object contains a ByteString, or an error otherwise.

readField :: forall a. Read a => Typeable a => String -> Either FieldError a Source #

Decode a ByteString field using Read.

integralField :: forall a. Read a => Integral a => Typeable a => Object -> Either FieldError a Source #

Decode a numeric or string field using Integral or Read.

decodeIntegral :: forall a. Read a => Integral a => Typeable a => Object -> Either DecodeError a Source #

Decode a numeric or string type using Integral or Read.

fractionalField :: Read a => Typeable a => Fractional a => Object -> Either FieldError a Source #

Decode a numeric or string field using Fractional or Read.

decodeFractional :: forall a. Read a => Fractional a => Typeable a => Object -> Either DecodeError a Source #

Decode a numeric or string type using Fractional or Read.