From 1bc30deee7d8d7c2a0d4e9d3a4b684ba0955da68 Mon Sep 17 00:00:00 2001 From: Mark Wotton Date: Thu, 15 Jun 2017 13:30:58 -0400 Subject: [PATCH] import Control.Applicative for 7.8.4 --- yesod-test/Yesod/Test/TransversingCSS.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/yesod-test/Yesod/Test/TransversingCSS.hs b/yesod-test/Yesod/Test/TransversingCSS.hs index 806fb285..7ef7b6fc 100644 --- a/yesod-test/Yesod/Test/TransversingCSS.hs +++ b/yesod-test/Yesod/Test/TransversingCSS.hs @@ -42,6 +42,7 @@ where import Yesod.Test.CssQuery import qualified Data.Text as T +import qualified Control.Applicative import Text.XML import Text.XML.Cursor import qualified Data.ByteString.Lazy as L @@ -59,7 +60,7 @@ type HtmlLBS = L.ByteString -- * Right: List of matching Html fragments. findBySelector :: HtmlLBS -> Query -> Either String [String] findBySelector html query = - map (renderHtml . toHtml . node) <$> findCursorsBySelector html query + map (renderHtml . toHtml . node) Control.Applicative.<$> findCursorsBySelector html query -- | Perform a css 'Query' on 'Html'. Returns Either -- @@ -69,7 +70,7 @@ findBySelector html query = findCursorsBySelector :: HtmlLBS -> Query -> Either String [Cursor] findCursorsBySelector html query = runQuery (fromDocument $ HD.parseLBS html) - <$> parseQuery query + Control.Applicative.<$> parseQuery query -- | Perform a css 'Query' on 'Html'. Returns Either -- @@ -80,7 +81,7 @@ findCursorsBySelector html query = -- @since 1.5.7 findAttributeBySelector :: HtmlLBS -> Query -> T.Text -> Either String [[T.Text]] findAttributeBySelector html query attr = - map (laxAttribute attr) <$> findCursorsBySelector html query + map (laxAttribute attr) Control.Applicative.<$> findCursorsBySelector html query -- Run a compiled query on Html, returning a list of matching Html fragments.