telescope-0.2.0: Astronomical Observations (FITS, ASDF, WCS, etc)
Safe HaskellNone
LanguageGHC2021

Telescope.Asdf.Encoding

Synopsis

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

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 #

Decode a Tree to a FromAsdf

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

runYamlError :: forall (es :: [Effect]) a. Error AsdfError :> es => Eff (Error YamlError ': es) a -> Eff es a Source #

runParseError :: forall (es :: [Effect]) a. Error AsdfError :> es => Eff (Error ParseError ': es) a -> Eff es a Source #