-- * Credentials storage: ~/.authinfo (ex-hsauthinfo) -- TODO:
gettok ∷ (Monad p, P.TokenParsing p) ⇒ Bool → String → p a → p a
gettok lastp key val = do
  P.string key
  (P.skipSome $ P.oneOf " \t") P.<?> "non-breaking whitespace"
  ret ← val
  (if lastp then P.skipMany else P.skipSome) $ P.oneOf " \t"
  pure ret

readAuthIn
gettok ∷ (Monad p, P.TokenParsing p) ⇒ Bool → String → p a → p a
gettok lastp key val = do
  P.string key
  (P.skipSome $ P.oneOf " \t") P.<?> "non-breaking whitespace"
  ret ← val
  (if lastp then P.skipMany else P.skipSome) $ P.oneOf " \t"
  pure ret
gettok lastp key val = do
  P.string key
  (P.skipSome $ P.oneOf " \t") P.<?> "non-breaking whitespace"
  ret ← val
  (if lastp then P.skipMany else P.skipSome) $ P.oneOf " \t"
  pure ret