summaryrefslogtreecommitdiff
path: root/src/Command.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Command.hs')
-rw-r--r--src/Command.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Command.hs b/src/Command.hs
index 1ef52ed..452be9d 100644
--- a/src/Command.hs
+++ b/src/Command.hs
@@ -99,6 +99,9 @@ tfail err = liftIO $ do
T.hPutStrLn stderr err
exitFailure
+instance MonadOutput CommandExec where
+ getOutput = CommandExec (asks ciOutput)
+
data CommandInput = CommandInput
{ ciOptions :: CommonOptions
, ciRootPath :: FilePath
@@ -148,8 +151,5 @@ cmdEvalWith :: (EvalInput -> EvalInput) -> Eval a -> CommandExec a
cmdEvalWith f ev = do
either (tfail . textEvalError) return =<< liftIO . runEval ev . f =<< getEvalInput
-getOutput :: CommandExec Output
-getOutput = CommandExec (asks ciOutput)
-
getStorageDir :: CommandExec FilePath
getStorageDir = CommandExec (asks ciStorageDir)