@@ -146,7 +146,7 @@ instance FromFormKey a => FromFormKey (Product a) where parseFormKey = fmap Prod
146146-- | The contents of a form, not yet URL-encoded.
147147--
148148-- 'Form' can be URL-encoded with 'encodeForm' and URL-decoded with 'decodeForm'.
149−newtype Form = Form { unForm :: Map Text [Text] }
149+newtype Form = Form { unForm :: HashMap Text [Text] }
150150 deriving (Eq, Read, Generic, Monoid)
151151
152152instance Show Form where
@@ -155,8 +155,8 @@ instance Show Form where
155155
156156instance IsList Form where
157157 type Item Form = (Text, Text)
158− fromList = Form . Map.fromListWith (flip (<>)) . fmap (\(k, v) -> (k, [v]))
159− toList = concatMap (\(k, vs) -> map ((,) k) vs) . Map.toList . unForm
158+ fromList = Form . HashMap.fromListWith (flip (<>)) . fmap (\(k, v) -> (k, [v]))
159+ toList = concatMap (\(k, vs) -> map ((,) k) vs) . HashMap.toList . unForm
160160
161161-- | Convert a value into 'Form'.
162162--
@@ -216,7 +216,7 @@ instance ToHttpApiData v => ToForm (IntMap [v]) where
216216
217217-- | Convert a list of entries groupped by key into a 'Form'.
218218fromEntriesByKey :: (ToFormKey k, ToHttpApiData v) => [(k, [v])] -> Form
219−fromEntriesByKey = Form . Map.fromListWith (<>) . map (toFormKey *** map toQueryParam)
219+fromEntriesByKey = Form . HashMap.fromListWith (<>) . map (toFormKey *** map toQueryParam)
220220
221221-- | A 'Generic'-based implementation of 'toForm'.
222222-- This is used as a default implementation in 'ToForm'.
@@ -301,7 +301,7 @@ instance FromHttpApiData v => FromForm (IntMap [v]) where
301301
302302-- | Parse a 'Form' into a list of entries groupped by key.
303303toEntriesByKey :: (FromFormKey k, FromHttpApiData v) => Form -> Either Text [(k, [v])]
304−toEntriesByKey = traverse parseGroup . Map.toList . unForm
304+toEntriesByKey = traverse parseGroup . HashMap.toList . unForm
305305 where
306306 parseGroup (k, vs) = (,) <$> parseFormKey k <*> traverse parseQueryParam vs
307307
@@ -450,7 +450,7 @@ encodeAsForm = encodeForm . toForm
450450-- >>> lookupKey "name" [("name", "Oleg"), ("name", "David")]
451451-- ["Oleg","David"]
452452lookupKey :: Text -> Form -> [Text]
453−lookupKey key = concat . Map.lookup key . unForm
453+lookupKey key = concat . HashMap.lookup key . unForm
454454
455455-- | Lookup a unique value for a key.
456456-- Fail if there is zero or more than one value.