diff options
| author | Omni Worker <bot@omni.agent> | 2025-11-21 05:28:47 -0500 |
|---|---|---|
| committer | Omni Worker <bot@omni.agent> | 2025-11-21 05:28:47 -0500 |
| commit | 87d20671b9206187eb2a60a05a3987876c1785d6 (patch) | |
| tree | 62537259e2ffa0fcbc4ec24fa46bdb60eba55a83 /Omni/Agent.hs | |
| parent | ea334ab17a75683ceb8b844d8ec011b342b199c9 (diff) | |
Fix lint issue
Diffstat (limited to 'Omni/Agent.hs')
| -rw-r--r-- | Omni/Agent.hs | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/Omni/Agent.hs b/Omni/Agent.hs index 7a31d40..af785eb 100644 --- a/Omni/Agent.hs +++ b/Omni/Agent.hs @@ -1,6 +1,6 @@ +{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} -- : out agent @@ -9,9 +9,9 @@ module Omni.Agent where import Alpha import qualified Data.Text as Text -import qualified Omni.Cli as Cli import qualified Omni.Agent.Core as Core import qualified Omni.Agent.Worker as Worker +import qualified Omni.Cli as Cli import qualified Omni.Test as Test main :: IO () @@ -20,14 +20,15 @@ main = Cli.main plan plan :: Cli.Plan () plan = Cli.Plan - { Cli.help = help - , Cli.move = move - , Cli.test = test - , Cli.tidy = \_ -> pure () + { Cli.help = help, + Cli.move = move, + Cli.test = test, + Cli.tidy = \_ -> pure () } help :: Cli.Docopt -help = [Cli.docopt| +help = + [Cli.docopt| agent Usage: @@ -43,18 +44,20 @@ Options: move :: Cli.Arguments -> IO () move args | args `Cli.has` Cli.command "start" = do - name <- Cli.getArg args (Cli.argument "name") |> \case - Just n -> pure (Text.pack n) - Nothing -> panic "Name required" + name <- + Cli.getArg args (Cli.argument "name") |> \case + Just n -> pure (Text.pack n) + Nothing -> panic "Name required" let path = Cli.getArgWithDefault args "." (Cli.longOption "path") - - let worker = Core.Worker - { Core.workerName = name - , Core.workerPid = Nothing - , Core.workerStatus = Core.Idle - , Core.workerPath = path - } - + + let worker = + Core.Worker + { Core.workerName = name, + Core.workerPid = Nothing, + Core.workerStatus = Core.Idle, + Core.workerPath = path + } + Worker.start worker | otherwise = putStrLn (Cli.usage help) |
