refactor some boilerplate
This commit is contained in:
parent
b400984ddf
commit
56bc3e95ca
31 changed files with 93 additions and 86 deletions
|
@ -26,7 +26,7 @@ seek = [withTempFile start]
|
|||
start :: CommandStartString
|
||||
start file = do
|
||||
showStart "setkey" file
|
||||
return $ Just $ perform file
|
||||
next $ perform file
|
||||
|
||||
perform :: FilePath -> CommandPerform
|
||||
perform file = do
|
||||
|
@ -40,7 +40,7 @@ perform file = do
|
|||
boolSystem "mv" [File file, File dest]
|
||||
else return True
|
||||
if ok
|
||||
then return $ Just $ cleanup
|
||||
then next cleanup
|
||||
else error "mv failed!"
|
||||
|
||||
cleanup :: CommandCleanup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue