summaryrefslogtreecommitdiff
path: root/Command/Add.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-09-15 16:50:49 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-09-15 16:50:49 -0400
commit35145202d2e463569989b710ab5b87f6d9a8fdc1 (patch)
treef418c4c52bd19e5cd7c850526d9bf4a105391776 /Command/Add.hs
parent456b45b9b3982d9440a43ec014635dee15066f0e (diff)
remove command type definitions
These were a mistake, they make the type signatures harder to read and less flexible. The CommandSeek, CommandStart, CommandPerform, and CommandCleanup types were a good idea, but composing them with the parameters expected is going too far.
Diffstat (limited to 'Command/Add.hs')
-rw-r--r--Command/Add.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Command/Add.hs b/Command/Add.hs
index f6dfd2da4..c6ab4d0ad 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -38,14 +38,14 @@ seek = [withFilesNotInGit start, withFilesUnlocked start]
{- The add subcommand annexes a file, storing it in a backend, and then
- moving it into the annex directory and setting up the symlink pointing
- to its content. -}
-start :: CommandStartBackendFile
-start pair@(file, _) = notAnnexed file $ do
+start :: BackendFile -> CommandStart
+start p@(file, _) = notAnnexed file $ do
s <- liftIO $ getSymbolicLinkStatus file
if isSymbolicLink s || not (isRegularFile s)
then stop
else do
showStart "add" file
- next $ perform pair
+ next $ perform p
perform :: BackendFile -> CommandPerform
perform (file, backend) = do