diff options
author | Joey Hess <joey@kitenet.net> | 2011-08-25 00:28:55 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-08-25 01:27:19 -0400 |
commit | 678726c10c13481c082743808a5188d28567e2b3 (patch) | |
tree | a5052eb5b20444e10d3f5d467281ef4c0f5975d1 /Crypto.hs | |
parent | 20259c2955e408a72e0960207fc8be4cbeec2e21 (diff) |
code simplification thanks to applicative functors
Diffstat (limited to 'Crypto.hs')
-rw-r--r-- | Crypto.hs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -38,6 +38,7 @@ import System.IO import System.Posix.IO import System.Posix.Types import System.Posix.Process +import Control.Applicative import Control.Concurrent import Control.Exception (finally) import System.Exit @@ -136,7 +137,7 @@ encryptCipher (Cipher c) (KeyIds ks) = do {- Decrypting an EncryptedCipher is expensive; the Cipher should be cached. -} decryptCipher :: RemoteConfig -> EncryptedCipher -> IO Cipher decryptCipher _ (EncryptedCipher encipher _) = - return . Cipher =<< gpgPipeStrict decrypt encipher + Cipher <$> gpgPipeStrict decrypt encipher where decrypt = [ Param "--decrypt" ] |