-}
headersP ∷ Parser Headers
{-# INLINEABLE headersP #-}
-headersP = do xs ← P.many $ try header
+headersP = do xs ← P.many header
crlf
return $ toHeaders xs
where
Left err → error ("unparsable MIME Type: " ⧺ C8.unpack bs ⧺ ": " ⧺ err)
mimeTypeP ∷ Parser MIMEType
-mimeTypeP = try $
- do maj ← A.toCIAscii <$> token
+mimeTypeP = do maj ← A.toCIAscii <$> token
_ ← char '/'
min ← A.toCIAscii <$> token
params ← P.many paramP
])
contDispoP ∷ Parser ContDispo
-contDispoP = try $
- do dispoType ← A.toCIAscii <$> token
+contDispoP = do dispoType ← A.toCIAscii <$> token
params ← many paramP
return $ ContDispo dispoType params
where