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.
This commit is contained in:
parent
456b45b9b3
commit
35145202d2
33 changed files with 55 additions and 63 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue