mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 04:01:51 -07:00
Replace liftM
and fmap
with <$>
This commit is contained in:
@@ -6,7 +6,7 @@ import Foreign.C.Types
|
||||
import Properties
|
||||
|
||||
instance Arbitrary CLong where
|
||||
arbitrary = fromIntegral `fmap` (arbitrary :: Gen Int)
|
||||
arbitrary = fromIntegral <$> (arbitrary :: Gen Int)
|
||||
instance Arbitrary RectC where
|
||||
arbitrary = do
|
||||
(x,y) <- arbitrary
|
||||
|
@@ -28,7 +28,7 @@ main = do
|
||||
guard $ f `notElem` ["Main.hs", "Common.hs", "Properties.hs"]
|
||||
let b = takeBaseName f
|
||||
nesting <- io $ newIORef 0
|
||||
decl : _ <- ListT $ (map words . lines) `fmap` readFile f
|
||||
decl : _ <- ListT $ (map words . lines) <$> readFile f
|
||||
case decl of
|
||||
"{-" -> io $ modifyIORef nesting succ
|
||||
"-}" -> io $ modifyIORef nesting pred
|
||||
@@ -37,7 +37,7 @@ main = do
|
||||
guard $ "prop_" `isPrefixOf` decl
|
||||
io $ modifyIORef imports (S.insert b)
|
||||
return (b ++ "." ++ decl)
|
||||
imports <- S.toList `fmap` readIORef imports
|
||||
imports <- S.toList <$> readIORef imports
|
||||
print $ genModule imports props
|
||||
|
||||
genModule :: [String] -> [String] -> Doc
|
||||
|
Reference in New Issue
Block a user