Replace liftM and fmap with <$>

This commit is contained in:
slotThe
2019-10-08 10:27:53 +02:00
parent f3024e6779
commit 53b57eba14
43 changed files with 95 additions and 95 deletions

View File

@@ -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

View File

@@ -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