diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2026-07-05 22:57:49 +0200 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2026-07-09 19:45:40 +0200 |
| commit | 0b3b675bfc9e78ee563d526f17184e317a962ae8 (patch) | |
| tree | d88a9a768338435cdcc4d316902b3dba30dbb397 /src/Command.hs | |
| parent | 439481ad37868c732fa68fc31b65c581d0dcd7fa (diff) | |
Diffstat (limited to 'src/Command.hs')
| -rw-r--r-- | src/Command.hs | 6 |
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) |