Safe Haskell | None |
---|---|
Language | GHC2021 |
Synopsis
- encodeM :: (ToAsdf a, MonadIO m, MonadThrow m) => a -> m ByteString
- encode :: forall a (es :: [Effect]). (ToAsdf a, IOE :> es, Error AsdfError :> es) => a -> Eff es ByteString
- encodeAsdf :: forall (es :: [Effect]). (IOE :> es, Error AsdfError :> es) => Asdf -> Eff es AsdfFile
- encodeNode :: forall (es :: [Effect]). (IOE :> es, Error AsdfError :> es) => Node -> Eff es (ByteString, [BlockData])
- encodeStream :: forall (es :: [Effect]). (IOE :> es, Error AsdfError :> es) => ConduitT () Event (Eff (State Anchors ': (State [BlockData] ': (Resource ': es)))) () -> Eff es (ByteString, [BlockData])
- decodeM :: (FromAsdf a, MonadIO m, MonadThrow m) => ByteString -> m a
- decodeEither :: (FromAsdf a, MonadIO m) => ByteString -> m (Either String a)
- decode :: forall a (es :: [Effect]). (FromAsdf a, IOE :> es, Error AsdfError :> es) => ByteString -> Eff es a
- decodeFromTree :: forall a (es :: [Effect]). (Error AsdfError :> es, FromAsdf a) => Tree -> Eff es a
- parseAsdfTree :: forall (es :: [Effect]). (Error AsdfError :> es, IOE :> es) => Encoded Tree -> [Encoded Block] -> Eff es Tree
- streamAsdfFile :: forall (es :: [Effect]). (Error AsdfError :> es, IOE :> es) => Encoded Tree -> [Encoded Block] -> Eff es (Object, Anchors)
- decodeBlock :: forall (es :: [Effect]). Error AsdfError :> es => Encoded Block -> Eff es BlockData
- decodeBlockIndex :: forall (es :: [Effect]). (Error AsdfError :> es, IOE :> es) => ByteString -> Eff es BlockIndex
- runYamlError :: forall (es :: [Effect]) a. Error AsdfError :> es => Eff (Error YamlError ': es) a -> Eff es a
- runParseError :: forall (es :: [Effect]) a. Error AsdfError :> es => Eff (Error ParseError ': es) a -> Eff es a
Documentation
encodeM :: (ToAsdf a, MonadIO m, MonadThrow m) => a -> m ByteString Source #
Encode a ToAsdf
to a ByteString
encode :: forall a (es :: [Effect]). (ToAsdf a, IOE :> es, Error AsdfError :> es) => a -> Eff es ByteString Source #
Encode a ToAsdf
to a ByteString
encodeAsdf :: forall (es :: [Effect]). (IOE :> es, Error AsdfError :> es) => Asdf -> Eff es AsdfFile Source #
Encode an Asdf
document to a ByteString
encodeNode :: forall (es :: [Effect]). (IOE :> es, Error AsdfError :> es) => Node -> Eff es (ByteString, [BlockData]) Source #
Low-level encoding of a node to a Yaml tree, without required headers, etc
encodeStream :: forall (es :: [Effect]). (IOE :> es, Error AsdfError :> es) => ConduitT () Event (Eff (State Anchors ': (State [BlockData] ': (Resource ': es)))) () -> Eff es (ByteString, [BlockData]) Source #
Create a stream of yaml events
decodeM :: (FromAsdf a, MonadIO m, MonadThrow m) => ByteString -> m a Source #
Decode a ByteString
to a FromAsdf
decodeEither :: (FromAsdf a, MonadIO m) => ByteString -> m (Either String a) Source #
Decode a ByteString
to a FromAsdf
decode :: forall a (es :: [Effect]). (FromAsdf a, IOE :> es, Error AsdfError :> es) => ByteString -> Eff es a Source #
Decode a ByteString
to a FromAsdf
decodeFromTree :: forall a (es :: [Effect]). (Error AsdfError :> es, FromAsdf a) => Tree -> Eff es a Source #
parseAsdfTree :: forall (es :: [Effect]). (Error AsdfError :> es, IOE :> es) => Encoded Tree -> [Encoded Block] -> Eff es Tree Source #
Parse the asdf file parts into a Tree
streamAsdfFile :: forall (es :: [Effect]). (Error AsdfError :> es, IOE :> es) => Encoded Tree -> [Encoded Block] -> Eff es (Object, Anchors) Source #
decodeBlock :: forall (es :: [Effect]). Error AsdfError :> es => Encoded Block -> Eff es BlockData Source #
decodeBlockIndex :: forall (es :: [Effect]). (Error AsdfError :> es, IOE :> es) => ByteString -> Eff es BlockIndex Source #
Decode the BlockIndex