X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FRFC2231.hs;h=ee929ad8d0660eb023782be5a4a6b806dbf82434;hb=9668dc27a02b59d7bfb1e9e40af3d2619700ad69;hp=9856f474eb94281b8280fc9110780fe43643a278;hpb=a19fa7dbe9bfcd75db8b42e113fabcf97e40d8bd;p=Lucu.git diff --git a/Network/HTTP/Lucu/RFC2231.hs b/Network/HTTP/Lucu/RFC2231.hs index 9856f47..ee929ad 100644 --- a/Network/HTTP/Lucu/RFC2231.hs +++ b/Network/HTTP/Lucu/RFC2231.hs @@ -5,9 +5,11 @@ , ScopedTypeVariables , UnicodeSyntax #-} --- |Provide facilities to encode/decode MIME parameter values in +-- |Provide functionalities to encode/decode MIME parameter values in -- character sets other than US-ASCII. See: --- http://www.faqs.org/rfcs/rfc2231.html +-- +-- +-- You usually don't have to use this module directly. module Network.HTTP.Lucu.RFC2231 ( printParams , paramsP @@ -42,6 +44,7 @@ import Prelude hiding (concat, mapM, takeWhile) import Prelude.Unicode import System.IO.Unsafe +-- |Convert parameter values to an 'AsciiBuilder'. printParams ∷ Map CIAscii Text → AsciiBuilder printParams params | M.null params = (∅) @@ -112,6 +115,7 @@ section ∷ ExtendedParam → Integer section (InitialEncodedParam {..}) = 0 section ep = epSection ep +-- |'Parser' for parameter values. paramsP ∷ Parser (Map CIAscii Text) paramsP = decodeParams =≪ P.many (try paramP)