Skip to content

Commit

Permalink
remove constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Dec 24, 2024
1 parent f7fb989 commit cc16661
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/Commands/Dev/Anoma/Client.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ import Commands.Base
import Data.Foldable.Extra qualified as E
import Juvix.Prelude.Posix

isClientRunning :: (Members '[Files, EmbedIO, Error SimpleError, Logger] r) => ClientConfig -> Sem r Bool
isClientRunning :: (Members '[Files, EmbedIO, Error SimpleError] r) => ClientConfig -> Sem r Bool
isClientRunning c =
runAnomaWithClient
(c ^. clientConfigHost)
(catchError @SimpleError (anomaListMethods >> return True) (\_ _ -> return False))

checkClientRunning :: (Members '[Logger, Files, EmbedIO, Error SimpleError] r) => Sem r (Maybe ClientConfig)
checkClientRunning :: (Members '[Files, EmbedIO, Error SimpleError] r) => Sem r (Maybe ClientConfig)
checkClientRunning = do
mconfig <- readConfig
E.findM isClientRunning mconfig

getClientConfig ::
(Members '[Logger, Files, EmbedIO, Error SimpleError] r) =>
(Members '[Files, EmbedIO, Error SimpleError] r) =>
Sem r ClientConfig
getClientConfig = fromMaybeM (throw @SimpleError "The Anoma client is not running") checkClientRunning

Expand Down
2 changes: 1 addition & 1 deletion app/Commands/Dev/Anoma/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ parseAnomaCommand =
runInfo =
info
(AnomaCommandPrintConfig <$> parsePrintConfigOptions)
(progDesc "Prints the yaml configuration to stdout")
(progDesc "Prints the yaml configuration of the Anoma client to stdout")

commandStart :: Mod CommandFields AnomaCommand
commandStart = command "start" runInfo
Expand Down

0 comments on commit cc16661

Please sign in to comment.