Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- readHDUs :: ByteString -> Either String [HeaderDataUnit]
- readPrimaryHDU :: ByteString -> Either String HeaderDataUnit
- getKeyword :: Text -> (Value -> Maybe a) -> HeaderDataUnit -> Either String a
- getHDU :: String -> Int -> [HeaderDataUnit] -> Either String HeaderDataUnit
- maybeError :: FitsError -> Maybe a -> Either String a
- eitherFail :: MonadFail m => Either String a -> m a
- data FitsError
- = ParseError ParseErr
- | MissingKey Keyword
- | InvalidKey Keyword Value
- | MissingHDU String Int
- | InvalidData String
Documentation
readHDUs :: ByteString -> Either String [HeaderDataUnit] Source #
Parse and read all HDUs in the input string
readPrimaryHDU :: ByteString -> Either String HeaderDataUnit Source #
Parse and read only the Primary HDU from the input string
getKeyword :: Text -> (Value -> Maybe a) -> HeaderDataUnit -> Either String a Source #
Look up a keyword and parse it into the expected format
getHDU :: String -> Int -> [HeaderDataUnit] -> Either String HeaderDataUnit Source #
Get the HDU at an index and fail with a readable error