summaryrefslogtreecommitdiff
path: root/Command/Whereis.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-07-20 15:22:55 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-07-20 15:23:43 -0400
commit258a3356e6461e0164441bb3a3e202cb9ef889e6 (patch)
treef198f34aaedeffb1af624f918a214527b066175a /Command/Whereis.hs
parente97cd57e1ac72d5a240852704ebaf92716fcad94 (diff)
--branch, stage 2
Show branch:file that is being operated on. I had to make ActionItem a type and not a type class because withKeyOptions' passed two different types of values when using the type class, and I could not get the type checker to accept that.
Diffstat (limited to 'Command/Whereis.hs')
-rw-r--r--Command/Whereis.hs13
1 files changed, 6 insertions, 7 deletions
diff --git a/Command/Whereis.hs b/Command/Whereis.hs
index 5b913cf45..b91c31ca1 100644
--- a/Command/Whereis.hs
+++ b/Command/Whereis.hs
@@ -47,14 +47,13 @@ seek o = do
(whereisFiles o)
start :: M.Map UUID Remote -> FilePath -> Key -> CommandStart
-start remotemap file key = start' remotemap key (Just file)
-
-startKeys :: M.Map UUID Remote -> Key -> CommandStart
-startKeys remotemap key = start' remotemap key Nothing
+start remotemap file key = startKeys remotemap key (mkActionItem afile)
+ where
+ afile = Just file
-start' :: M.Map UUID Remote -> Key -> AssociatedFile -> CommandStart
-start' remotemap key afile = do
- showStart' "whereis" key afile
+startKeys :: M.Map UUID Remote -> Key -> ActionItem -> CommandStart
+startKeys remotemap key ai = do
+ showStart' "whereis" key ai
next $ perform remotemap key
perform :: M.Map UUID Remote -> Key -> CommandPerform