From e3ea039428545e185b38c5633fe3576ab32f1f8e Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 16 Jan 2025 19:22:18 -0800 Subject: Cleans excessive type annotations --- hsm-core/Hsm/Core/Fsm.hs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'hsm-core/Hsm/Core/Fsm.hs') diff --git a/hsm-core/Hsm/Core/Fsm.hs b/hsm-core/Hsm/Core/Fsm.hs index 6f9910e..d1c2f5d 100644 --- a/hsm-core/Hsm/Core/Fsm.hs +++ b/hsm-core/Hsm/Core/Fsm.hs @@ -39,23 +39,18 @@ fsm :: -> S.Stream (Eff es) o fsm = S.mapM (return . fromJust) . S.takeWhile isJust . S.mapM run where - exit :: Eff es (Maybe o) exit = do logAttention_ "No state returned, exiting FSM" return Nothing - -- - push :: FsmResult i o env sta -> Eff es (Maybe o) push (FsmResult out sta next) = do put sta put next return $ Just out - -- - run :: i -> Eff es (Maybe o) run input = localDomain "fsm" $ do FsmState name action <- get - sta <- get - env <- ask + sta <- get @sta + env <- ask @env logTrace_ $ "Entering state " <> name FsmOutput res logs <- return $ action input env sta localDomain name $ mapM_ logTup logs -- cgit v1.2.1