From 12d099d7e2323ab1d2e06a0f9317814e4050c498 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 22 Nov 2025 18:15:19 -0500 Subject: fix: fix compilation and lint errors Amp-Thread-ID: https://ampcode.com/threads/T-ca3b086b-5a85-422a-b13d-256784c04221 Co-authored-by: Amp --- Omni/Agent/Core.hs | 1 - Omni/Agent/Log.hs | 15 +++++++-------- Omni/Agent/Worker.hs | 1 - 3 files changed, 7 insertions(+), 10 deletions(-) (limited to 'Omni') diff --git a/Omni/Agent/Core.hs b/Omni/Agent/Core.hs index 2d09e39..a2594d6 100644 --- a/Omni/Agent/Core.hs +++ b/Omni/Agent/Core.hs @@ -1,7 +1,6 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} --- : out omni-agent-core module Omni.Agent.Core where import Alpha diff --git a/Omni/Agent/Log.hs b/Omni/Agent/Log.hs index 07770d0..c78dc4b 100644 --- a/Omni/Agent/Log.hs +++ b/Omni/Agent/Log.hs @@ -2,10 +2,11 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE NoImplicitPrelude #-} --- : out omni-agent-log +-- | Status of the agent for the UI module Omni.Agent.Log where import Alpha +import Control.Applicative ((<$>), (<*>)) import Data.Aeson ((.:), (.:?)) import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy as BL @@ -133,17 +134,15 @@ data LogEntry = LogEntry instance Aeson.FromJSON LogEntry where parseJSON = Aeson.withObject "LogEntry" <| \v -> - LogEntry - v - .:? "threadId" + .:? "threadId" <*> v - .:? "credits" + .:? "credits" <*> v - .:? "totalCredits" + .:? "totalCredits" <*> v - .:? "timestamp" + .:? "timestamp" -- | Parse a log line and update status processLogLine :: Text -> IO () diff --git a/Omni/Agent/Worker.hs b/Omni/Agent/Worker.hs index 9f9e3bb..a29feb4 100644 --- a/Omni/Agent/Worker.hs +++ b/Omni/Agent/Worker.hs @@ -1,7 +1,6 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} --- : out omni-agent-worker module Omni.Agent.Worker where import Alpha -- cgit v1.2.3