diff options
-rw-r--r-- | Command/Unused.hs | 7 | ||||
-rw-r--r-- | Crypto.hs | 2 | ||||
-rw-r--r-- | Git/LsFiles.hs | 2 | ||||
-rw-r--r-- | Logs/Transitions.hs | 2 | ||||
-rw-r--r-- | Utility/Gpg.hs | 2 | ||||
-rw-r--r-- | Utility/Monad.hs | 10 |
6 files changed, 7 insertions, 18 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs index e6c8e225c..d49cda54b 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -293,10 +293,9 @@ withKeysReferencedInGitRef a ref = do forM_ ts $ tKey lookAtWorkingTree >=> maybe noop a liftIO $ void clean where - tKey True = Backend.lookupFile . DiffTree.file >=*> - fmap fst - tKey False = catFile ref . DiffTree.file >=*> - fileKey . takeFileName . encodeW8 . L.unpack + tKey True = fmap fst <$$> Backend.lookupFile . DiffTree.file + tKey False = fileKey . takeFileName . encodeW8 . L.unpack <$$> + catFile ref . DiffTree.file {- Looks in the specified directory for bad/tmp keys, and returns a list - of those that might still have value, or might be stale and removable. @@ -102,7 +102,7 @@ updateEncryptedCipher newkeys encipher@(EncryptedCipher _ variant (KeyIds ks)) = cipher <- decryptCipher encipher encryptCipher cipher variant $ KeyIds ks' where - listKeyIds = mapM (Gpg.findPubKeys >=*> keyIds) >=*> concat + listKeyIds = concat <$$> mapM (keyIds <$$> Gpg.findPubKeys) describeCipher :: StorableCipher -> String describeCipher (SharedCipher _) = "shared cipher" diff --git a/Git/LsFiles.hs b/Git/LsFiles.hs index 8a5d4bd6a..d58fe162b 100644 --- a/Git/LsFiles.hs +++ b/Git/LsFiles.hs @@ -103,7 +103,7 @@ stagedDetails' ps l repo = do where (metadata, file) = separate (== '\t') s (mode, rest) = separate (== ' ') metadata - readmode = headMaybe . readOct >=*> fst + readmode = fst <$$> headMaybe . readOct {- Returns a list of the files in the specified locations that are staged - for commit, and whose type has changed. -} diff --git a/Logs/Transitions.hs b/Logs/Transitions.hs index 6e5dc0dc9..64e9d3344 100644 --- a/Logs/Transitions.hs +++ b/Logs/Transitions.hs @@ -71,7 +71,7 @@ parseTransitionLine s = TransitionLine <$> pdate ds <*> readish ts ws = words s ts = Prelude.head ws ds = unwords $ Prelude.tail ws - pdate = parseTime defaultTimeLocale "%s%Qs" >=*> utcTimeToPOSIXSeconds + pdate = utcTimeToPOSIXSeconds <$$> parseTime defaultTimeLocale "%s%Qs" combineTransitions :: [Transitions] -> Transitions combineTransitions = S.unions diff --git a/Utility/Gpg.hs b/Utility/Gpg.hs index f9b3d55e8..a2baa74dc 100644 --- a/Utility/Gpg.hs +++ b/Utility/Gpg.hs @@ -369,7 +369,7 @@ checkGpgPackets keys str = do (Just (KeyIds ks), ls, []) -> do -- Find the master key associated with the -- encryption subkey. - ks' <- concat <$> mapM (findPubKeys >=*> keyIds) + ks' <- concat <$> mapM (keyIds <$$> findPubKeys) [ k | k:"keyid":_ <- map (reverse . words) ls ] return $ sort (nub ks) == sort (nub ks') _ -> return False diff --git a/Utility/Monad.hs b/Utility/Monad.hs index 4f5a6d244..1ba43c5f8 100644 --- a/Utility/Monad.hs +++ b/Utility/Monad.hs @@ -53,16 +53,6 @@ ma <&&> mb = ifM ma ( mb , return False ) infixr 3 <&&> infixr 2 <||> -{- Left-to-right Kleisli composition with a pure left/right hand side. -} -(*>=>) :: Monad m => (a -> b) -> (b -> m c) -> (a -> m c) -f *>=> g = return . f >=> g - -(>=*>) :: Monad m => (a -> m b) -> (b -> c) -> (a -> m c) -f >=*> g = f >=> return . g - -{- Same fixity as >=> and <=< -} -infixr 1 *>=>, >=*> - {- Runs an action, passing its value to an observer before returning it. -} observe :: Monad m => (a -> m b) -> m a -> m a observe observer a = do |