X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FMIMEParams.hs;h=9c39236679feea13cabaaa94edd346684be9a810;hp=bfde1c932e3156e4db53456994c15943f3b8e9e4;hb=0d8f718f4c7babafab9ab11e78b58823b7682522;hpb=8cd9d79234344199a1644f661684bde3ed5e440b diff --git a/Network/HTTP/Lucu/MIMEParams.hs b/Network/HTTP/Lucu/MIMEParams.hs index bfde1c9..9c39236 100644 --- a/Network/HTTP/Lucu/MIMEParams.hs +++ b/Network/HTTP/Lucu/MIMEParams.hs @@ -1,5 +1,6 @@ {-# LANGUAGE - DeriveDataTypeable + CPP + , DeriveDataTypeable , DoAndIfThenElse , GeneralizedNewtypeDeriving , OverloadedStrings @@ -61,8 +62,11 @@ instance Lift MIMEParams where -- |Convert MIME parameter values to an 'AsciiBuilder'. printMIMEParams ∷ MIMEParams → AsciiBuilder {-# INLINEABLE printMIMEParams #-} +#if MIN_VERSION_containers(0, 4, 1) +printMIMEParams (MIMEParams m) = M.foldlWithKey' f (∅) m +#else printMIMEParams (MIMEParams m) = M.foldlWithKey f (∅) m - -- THINKME: Use foldlWithKey' for newer Data.Map +#endif where f ∷ AsciiBuilder → CIAscii → Text → AsciiBuilder {-# INLINE f #-}