telescope-0.3.0: Astronomical Observations (FITS, ASDF, WCS, etc)
Safe HaskellSafe-Inferred
LanguageGHC2021

Telescope.Asdf.Encoding

Synopsis

Documentation

encodeM :: (ToAsdf a, MonadIO m, MonadThrow m) => a -> m ByteString Source #

Encode a ToAsdf to a ByteString

encode :: (ToAsdf a, IOE :> es, Error AsdfError :> es) => a -> Eff es ByteString Source #

Encode a ToAsdf to a ByteString

encodeAsdf :: (IOE :> es, Error AsdfError :> es) => Asdf -> Eff es AsdfFile Source #

Encode an Asdf document to a ByteString

encodeNode :: (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 :: (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

decodeEither :: forall a m. (FromAsdf a, MonadIO m) => ByteString -> m (Either String a) Source #

Decode a ByteString to a FromAsdf

decode :: (FromAsdf a, IOE :> es, Error AsdfError :> es) => ByteString -> Eff es a Source #

Decode a ByteString to a FromAsdf

decodeFromTree :: forall a es. Error AsdfError :> es => FromAsdf a => Tree -> Eff es a Source #

Decode a Tree to a FromAsdf

parseAsdfTree :: (Error AsdfError :> es, IOE :> es) => Encoded Tree -> [Encoded Block] -> Eff es Tree Source #

Parse the asdf file parts into a Tree

decodeBlockIndex :: (Error AsdfError :> es, IOE :> es) => ByteString -> Eff es BlockIndex Source #

Decode the BlockIndex