]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/MIMEParams.hs
auto-derive Collection / Indexed
[Lucu.git] / Network / HTTP / Lucu / MIMEParams.hs
index 183a4c07bd9475106a4475ffe64c1b7ddbc91ee8..36982139ce257433018b4530f5f9058352c041a6 100644 (file)
@@ -11,7 +11,7 @@
   , UnicodeSyntax
   #-}
 {-# OPTIONS_GHC -ddump-splices #-} -- FIXME
--- GHC 7.0.3 gives us a false warning.
+-- THINKME: GHC 7.0.3 gives us a false warning.
 {-# OPTIONS_GHC -fno-warn-missing-methods #-}
 -- |Parsing and printing MIME parameter values
 -- (<http://tools.ietf.org/html/rfc2231>).
@@ -59,22 +59,10 @@ newtype MIMEParams
 
 C.derive [d| instance Unfoldable MIMEParams (CIAscii, Text)
              instance Foldable   MIMEParams (CIAscii, Text)
+             instance Collection MIMEParams (CIAscii, Text)
+             instance Indexed    MIMEParams  CIAscii  Text
            |]
 
--- FIXME: auto-derive
-instance Collection MIMEParams (CIAscii, Text) where
-    {-# INLINE filter #-}
-    filter f (MIMEParams m) = MIMEParams $ filter f m
-
--- FIXME: auto-derive
-instance Indexed MIMEParams CIAscii Text where
-    {-# INLINE index #-}
-    index k (MIMEParams m) = index k m
-    {-# INLINE adjust #-}
-    adjust f k (MIMEParams m) = MIMEParams $ adjust f k m
-    {-# INLINE inDomain #-}
-    inDomain k (MIMEParams m) = inDomain k m
-
 -- FIXME: auto-derive
 instance Map MIMEParams CIAscii Text where
     {-# INLINE lookup #-}