module Telescope.Fits.Header
( Header (..)
, Value (..)
, keyword
, addComment
, FromHeader (..)
, FromKeyword (..)
, ToHeader (..)
, ToKeyword (..)
, parseKeyword
, lookupKeyword
, findKeyword
, isKeyword
, HeaderFor (..)
, LogicalConstant (..)
, getKeywords
, HeaderRecord (..)
, KeywordRecord (..)
) where
import Data.Fits hiding (isKeyword, lookup)
import Data.Text (Text)
import Telescope.Fits.Header.Class
import Telescope.Fits.Header.Keyword (findKeyword, isKeyword, lookupKeyword)
import Prelude hiding (lookup)
keyword :: Text -> Value -> Maybe Text -> HeaderRecord
keyword :: Text -> Value -> Maybe Text -> HeaderRecord
keyword Text
k Value
v Maybe Text
mc = KeywordRecord -> HeaderRecord
Keyword (KeywordRecord -> HeaderRecord) -> KeywordRecord -> HeaderRecord
forall a b. (a -> b) -> a -> b
$ Text -> Value -> Maybe Text -> KeywordRecord
KeywordRecord Text
k Value
v Maybe Text
mc
addComment :: Text -> KeywordRecord -> KeywordRecord
Text
c KeywordRecord
kr = KeywordRecord
kr{_comment = Just c}