From ad7326aaaaafb83efdfa4f6ed475fba7de5c5c61 Mon Sep 17 00:00:00 2001 From: Greg Weber Date: Fri, 21 Aug 2015 14:24:54 -0700 Subject: [PATCH] fix error from new HUnit export --- yesod-static/test/GeneratorTestUtil.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yesod-static/test/GeneratorTestUtil.hs b/yesod-static/test/GeneratorTestUtil.hs index 87f744ad..510aee0c 100644 --- a/yesod-static/test/GeneratorTestUtil.hs +++ b/yesod-static/test/GeneratorTestUtil.hs @@ -5,7 +5,7 @@ import Control.Applicative import Control.Monad (when) import Data.List (sortBy) import Language.Haskell.TH -import Test.HUnit +import Test.HUnit hiding (Location) import Yesod.EmbeddedStatic.Types import qualified Data.ByteString.Lazy as BL @@ -38,11 +38,11 @@ testOneEntry :: Maybe String -> Location -> IO BL.ByteString -> [Entry] -> ExpQ testOneEntry name loc ct [e] = testEntry name loc ct e testOneEntry _ _ _ _ = [| GenError "not exactly one entry" |] --- | Tests a list of entries +-- | Tests a list of entries testEntries :: [(Maybe String, Location, IO BL.ByteString)] -> [Entry] -> ExpQ testEntries a b | length a /= length b = [| [GenError "lengths differ"] |] testEntries a b = listE $ zipWith f a' b' - where + where a' = sortBy (\(_,l1,_) (_,l2,_) -> compare l1 l2) a b' = sortBy (\e1 e2 -> ebLocation e1 `compare` ebLocation e2) b f (name, loc, ct) e = testEntry name loc ct e