@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
12{-# LANGUAGE DefaultSignatures #-}
23{-# LANGUAGE DeriveGeneric #-}
34{-# LANGUAGE FlexibleContexts #-}
@@ -11,6 +12,10 @@
1112{-# LANGUAGE TypeOperators #-}
1213module Web.HttpApiData.Internal.FormUrlEncoded where
1314
15+#if __GLASGOW_HASKELL__ < 710
16+import Control.Applicative
17+#endif
18+
1419import Control.Arrow (first, left, second)
1520import Control.Monad.State
1621import qualified Data.ByteString.Lazy as BSL
@@ -31,8 +36,8 @@ newtype Form = Form { unForm :: M.Map T.Text T.Text }
3136
3237instance IsList Form where
3338 type Item Form = (T.Text, T.Text)
34− fromList = Form . fromList
35− toList = toList . unForm
39+ fromList = Form . M.fromList
40+ toList = M.toList . unForm
3641
3742-- | A type that can be converted to @application/x-www-form-urlencoded@
3843class ToForm a where