diff --git a/example/src/MyLib.hs b/example/src/MyLib.hs index 0fce8f1c..4361bb01 100644 --- a/example/src/MyLib.hs +++ b/example/src/MyLib.hs @@ -38,7 +38,7 @@ foo = do return $ Foo (pack "Hello") 123 - [10..20] + [10..13] (Map.fromList [(pack "foo", 2), (pack "bar", 3), (pack "baz", 3)]) (Baz $ pack "hello") testSum @@ -49,7 +49,10 @@ fooServer = getFoo :<|> postFoo where getFoo = do fooValue <- liftIO foo - liftIO $ putStrLn "Serving:" + liftIO $ putStrLn "-----------------" + liftIO $ putStrLn "Foo:" + liftIO $ putStrLn $ show fooValue + liftIO $ putStrLn "Serving JSON:" liftIO $ Char8.putStrLn $ AP.encodePretty fooValue return fooValue diff --git a/example/src/Types.hs b/example/src/Types.hs index 02530bb0..d4bd424c 100644 --- a/example/src/Types.hs +++ b/example/src/Types.hs @@ -25,7 +25,7 @@ import Test.QuickCheck (Arbitrary (..), chooseEnum, oneof, resize, data Baz = Baz { _bazMessage :: Text } - deriving (FromJSON, Generic, ToJSON) + deriving (FromJSON, Generic, ToJSON, Show) makeLenses ''Baz @@ -66,7 +66,7 @@ data Foo = Foo , _fooTestSum :: TestSum , _fooTestData :: TestData } - deriving (FromJSON, Generic, ToJSON) + deriving (FromJSON, Generic, ToJSON, Show) makeLenses ''Foo