X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FOrphanInstances.hs;h=47db98b7dee176f73da96f3ac9e79556c53fdc0f;hp=b0bd421082eb10cb4948d1e6ebf58dafb0e3f751;hb=2bcf36a739341aaaf56d812286d57233fff81ad5;hpb=6df5f92e37d27641f53e271f043c66dd3d085bb7 diff --git a/Network/HTTP/Lucu/OrphanInstances.hs b/Network/HTTP/Lucu/OrphanInstances.hs index b0bd421..47db98b 100644 --- a/Network/HTTP/Lucu/OrphanInstances.hs +++ b/Network/HTTP/Lucu/OrphanInstances.hs @@ -12,6 +12,7 @@ module Network.HTTP.Lucu.OrphanInstances ( ) where +import Control.Applicative hiding (empty) import Data.Ascii (Ascii) import qualified Data.Ascii as A import Data.ByteString (ByteString) @@ -31,7 +32,7 @@ import Prelude hiding (last, mapM, null, reverse) import Prelude.Unicode instance Lift ByteString where - lift bs = [| Strict.pack $(litE $ stringL $ Strict.unpack bs) |] + lift bs = [| Strict.pack $(litE ∘ stringL $ Strict.unpack bs) |] instance Lift Lazy.ByteString where lift = Lazy.foldrChunks f [| Lazy.Empty |] @@ -46,14 +47,14 @@ instance (Lift s, FoldCase s) ⇒ Lift (CI s) where lift s = [| CI.mk $(lift $ CI.original s) |] instance Lift Text where - lift t = [| T.pack $(litE $ stringL $ T.unpack t) |] + lift t = [| T.pack $(litE ∘ stringL $ T.unpack t) |] instance (Lift k, Lift v, Collection c (k, v)) ⇒ Lift c where lift c | null c = [| empty |] | otherwise = [| fromList $(liftPairs (fromFoldable c)) |] where - liftPairs = listE ∘ map liftPair + liftPairs = listE ∘ (liftPair <$>) liftPair (k, v) = tupE [lift k, lift v] instance Lift UTCTime where @@ -68,5 +69,5 @@ instance Lift DiffTime where lift dt = [| fromRational ($n % $d) ∷ DiffTime |] where n, d ∷ Q Exp - n = lift $ numerator $ toRational dt - d = lift $ denominator $ toRational dt + n = lift ∘ numerator $ toRational dt + d = lift ∘ denominator $ toRational dt