From f59cd4349c974c8ab7907b4852f5dc86ce4daeed Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Sat, 12 Oct 2024 16:29:05 +0200 Subject: add doc tests --- cli/app/Main.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cli/app') diff --git a/cli/app/Main.hs b/cli/app/Main.hs index eaabd0a..ef7a8ad 100644 --- a/cli/app/Main.hs +++ b/cli/app/Main.hs @@ -18,6 +18,7 @@ import Options.Applicative qualified as O import Text.ParserCombinators.ReadP qualified as R import Text.ParserCombinators.ReadPrec qualified as R import Text.Read (Read (..)) +import Debug.Trace data Args = Args { cmd :: Cmd @@ -96,18 +97,18 @@ main = { cmd = CollectionCmd cmd } -> case cmd of CollectionAdd (Collection cn) -> do - print + LB.putStr . J.encodePretty =<< ACMS.API.REST.Collection.create cn =<< J.throwDecode =<< LB.getContents CollectionView CollectionItem {collection = Collection cn, itemFileName} -> - print + LB.putStr . J.encodePretty =<< ACMS.API.REST.Collection.read cn itemFileName CollectionDelete CollectionItem {collection = Collection cn, itemFileName} -> - print + LB.putStr . J.encodePretty =<< ACMS.API.REST.Collection.delete cn itemFileName CollectionEdit CollectionItem {collection = Collection cn, itemFileName} -> - print + LB.putStr . J.encodePretty =<< ACMS.API.REST.Collection.update cn itemFileName =<< J.throwDecode =<< LB.getContents -- cgit v1.2.3