Safe Haskell | None |
---|---|
Language | GHC2021 |
Synopsis
- renderDataArray :: ByteString -> ByteString
- renderData :: ByteString -> BuilderBlock
- renderImageHeader :: Header -> DataArray -> Checksum -> BuilderBlock
- renderPrimaryHeader :: Header -> DataArray -> Checksum -> BuilderBlock
- renderDatasum :: Checksum -> BuilderBlock
- renderEnd :: BuilderBlock
- renderDataKeywords :: BitPix -> Axes 'Column -> BuilderBlock
- renderOtherKeywords :: Header -> BuilderBlock
- fillBlock :: (Int -> BuilderBlock) -> BuilderBlock -> BuilderBlock
- renderKeywordLine :: Text -> Value -> Maybe Text -> BuilderBlock
- renderKeywordValue :: Text -> Value -> BuilderBlock
- renderKeyword :: Text -> BuilderBlock
- renderComment :: Int -> Text -> BuilderBlock
- renderValue :: Value -> BuilderBlock
- data BuilderBlock = BuilderBlock {}
- builderBlock :: Int -> Builder -> BuilderBlock
- runRender :: BuilderBlock -> ByteString
- justify :: Int -> BuilderBlock -> BuilderBlock
- pad :: Int -> BuilderBlock -> BuilderBlock
- spaces :: Int -> BuilderBlock
- zeros :: Int -> BuilderBlock
- padding :: Builder -> Int -> BuilderBlock
- string :: String -> BuilderBlock
Documentation
renderData :: ByteString -> BuilderBlock Source #
renderImageHeader :: Header -> DataArray -> Checksum -> BuilderBlock Source #
renderPrimaryHeader :: Header -> DataArray -> Checksum -> BuilderBlock Source #
renderDatasum :: Checksum -> BuilderBlock Source #
renderDataKeywords :: BitPix -> Axes 'Column -> BuilderBlock Source #
Render required keywords for a data array
renderOtherKeywords :: Header -> BuilderBlock Source #
Header
contains all other keywords. Filter out any that match system keywords so they aren't rendered twice
fillBlock :: (Int -> BuilderBlock) -> BuilderBlock -> BuilderBlock Source #
Fill out the header or data block to the nearest 2880 bytes
renderKeywordLine :: Text -> Value -> Maybe Text -> BuilderBlock Source #
renderKeywordValue :: Text -> Value -> BuilderBlock Source #
renderKeyword :: Text -> BuilderBlock Source #
renderComment :: Int -> Text -> BuilderBlock Source #
renderValue :: Value -> BuilderBlock Source #
data BuilderBlock Source #
A builder that keeps track of its length so we can pad and justify things
Instances
IsString BuilderBlock Source # | |
Defined in Telescope.Fits.Encoding.Render fromString :: String -> BuilderBlock # | |
Monoid BuilderBlock Source # | |
Defined in Telescope.Fits.Encoding.Render mempty :: BuilderBlock # mappend :: BuilderBlock -> BuilderBlock -> BuilderBlock # mconcat :: [BuilderBlock] -> BuilderBlock # | |
Semigroup BuilderBlock Source # | |
Defined in Telescope.Fits.Encoding.Render (<>) :: BuilderBlock -> BuilderBlock -> BuilderBlock # sconcat :: NonEmpty BuilderBlock -> BuilderBlock # stimes :: Integral b => b -> BuilderBlock -> BuilderBlock # |
builderBlock :: Int -> Builder -> BuilderBlock Source #
Smart constructor, don't allow negative lengths
runRender :: BuilderBlock -> ByteString Source #
Execute a BuilderBlock and create a bytestring
justify :: Int -> BuilderBlock -> BuilderBlock Source #
pad :: Int -> BuilderBlock -> BuilderBlock Source #
spaces :: Int -> BuilderBlock Source #
zeros :: Int -> BuilderBlock Source #
string :: String -> BuilderBlock Source #