Skip to content

Commit

Permalink
Update compare and substitute intercalate with unwords
Browse files Browse the repository at this point in the history
  • Loading branch information
jetho committed May 16, 2014
1 parent fdb6b23 commit 381ae5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions yi/src/tests/Generic/TestPureBufferManipulations.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Control.Monad (filterM, forM, void, unless)
import Control.Lens ((%=))

import Data.List (sort, isSuffixOf, intercalate, isPrefixOf)
import Data.Ord (comparing)

import System.Directory
import System.FilePath
Expand Down Expand Up @@ -40,14 +41,14 @@ data OptionalSetting = WindowSize Int Int -- ^ WindowSize Width Height
deriving Eq

instance Show OptionalSetting where
show (WindowSize w h) = intercalate " " ["+WindowSize", (show w), (show h)]
show (WindowSize w h) = unwords ["+WindowSize", (show w), (show h)]

instance Eq KeymapTest where
KeymapTest n s i o e _ == KeymapTest n' s' i' o' e' _ =
n == n' && s == s' && i == i' && o == o' && e == e'

instance Ord KeymapTest where
KeymapTest n _ _ _ _ _ <= KeymapTest n' _ _ _ _ _ = n <= n'
compare = comparing ktName


data TestResult = TestPassed String
Expand Down

0 comments on commit 381ae5b

Please sign in to comment.