on develop help sign in
Switch to automatic instance from DeriveFunctor
commit169e41f9bab7623c2d32d021305d1a4f76b32525 authorDoug Beardsley <mightybyte@gmail.com> dateThu 7 Jul 2016, 16:00 (10 years ago) parentadb7742
1 file changed+3−9
src/Reflex/Dom/Xhr.hs+3−9
src/Reflex/Dom/Xhr.hs+3−9
@@ -1,4 +1,4 @@
1−{-# LANGUAGE TemplateHaskell, GADTs, DeriveDataTypeable, FlexibleContexts, OverloadedStrings #-}
1+{-# LANGUAGE TemplateHaskell, GADTs, DeriveDataTypeable, DeriveFunctor, FlexibleContexts, OverloadedStrings #-}
22module Reflex.Dom.Xhr
33 ( XMLHttpRequest
44 , XhrRequest(..)
@@ -80,7 +80,7 @@ data XhrRequest a
8080 , _xhrRequest_url :: Text
8181 , _xhrRequest_config :: XhrRequestConfig a
8282 }
83− deriving (Show, Read, Eq, Ord, Typeable)
83+ deriving (Show, Read, Eq, Ord, Typeable, Functor)
8484
8585data XhrRequestConfig a
8686 = XhrRequestConfig { _xhrRequestConfig_headers :: Map Text Text
@@ -89,7 +89,7 @@ data XhrRequestConfig a
8989 , _xhrRequestConfig_responseType :: Maybe XhrResponseType
9090 , _xhrRequestConfig_sendData :: a
9191 }
92− deriving (Show, Read, Eq, Ord, Typeable)
92+ deriving (Show, Read, Eq, Ord, Typeable, Functor)
9393
9494data XhrResponse
9595 = XhrResponse { _xhrResponse_status :: Word
@@ -262,9 +262,3 @@ liftM concat $ mapM makeLenses
262262 , ''XhrResponse
263263 ]
264264
265−instance Functor XhrRequest where
266− fmap f = over xhrRequest_config (fmap f)
267−
268−instance Functor XhrRequestConfig where
269− fmap f = over xhrRequestConfig_sendData f
270−