on master help sign in
22 files changed+107−98
since splitsnapshots
unifiedsplit
package.yaml+1−1 roboservant.cabal+4−4 src/Roboservant/Client.hs+2−2 src/Roboservant/Direct.hs+11−12 src/Roboservant/Server.hs+2−2 src/Roboservant/Types.hs−1 src/Roboservant/Types/Breakdown.hs+2−1 src/Roboservant/Types/BuildFrom.hs+1−1 src/Roboservant/Types/Internal.hs+2−2 src/Roboservant/Types/ReifiedApi.hs+1−1 src/Roboservant/Types/ReifiedApi/Server.hs+1−1 stack.yaml+5−5 stack.yaml.lock+9−30 test/Breakdown.hs+1−1 test/Nested.hs+2−2 test/Post.hs+2−2 test/Product.hs+1−1 test/Put.hs+33 test/QueryParams.hs+3−3 test/Spec.hs+20−21 test/UnsafeIO.hs+3−3 test/Valid.hs+1−2
package.yaml+1−1
@@ -1,6 +1,6 @@
11
22name: roboservant
3−version: 0.1.0.2
3+version: 0.1.0.3
44github: "mwotton/roboservant"
55license: BSD3
66copyright: "2020 Mark Wotton, Samuel Schlesinger"
roboservant.cabal+4−4
@@ -1,13 +1,13 @@
11cabal-version: 1.12
22
3−-- This file has been generated from package.yaml by hpack version 0.33.0.
3+-- This file has been generated from package.yaml by hpack version 0.35.0.
44--
55-- see: https://github.com/sol/hpack
66--
7−-- hash: 76f10a967a70cffa900bcc3464a1fd973642332b3a86d22a19f5e3d1d8879f4d
7+-- hash: 0c0c35e1dca1d6c52e5bc61591cbd8c0da9d811b83341bbc676c5f8b93b0b20d
88
99name: roboservant
10−version: 0.1.0.2
10+version: 0.1.0.3
1111synopsis: Automatic session-aware servant testing
1212description: Please see the README on GitHub at <https://github.com/mwotton/roboservant#readme>
1313category: Web
@@ -73,7 +73,7 @@ test-suite example
7373 other-modules:
7474 Paths_roboservant
7575 hs-source-dirs:
76− ./.
76+ ./
7777 ghc-options: -Wall -fwrite-ide-info -hiedir=.hie -pgmL markdown-unlit
7878 build-tool-depends:
7979 markdown-unlit:markdown-unlit
src/Roboservant/Client.hs+2−2
@@ -8,7 +8,7 @@
88{-# LANGUAGE PolyKinds #-}
99{-# LANGUAGE ScopedTypeVariables #-}
1010{-# LANGUAGE TypeApplications #-}
11−{-# LANGUAGE TypeOperators #-}
11+
1212{-# LANGUAGE UndecidableInstances #-}
1313{-# LANGUAGE TypeFamilies #-}
1414{-# LANGUAGE FlexibleContexts #-}
@@ -97,7 +97,7 @@ instance (Typeable x, Hashable x, Breakdown x) => NormalizeFunction (ClientM x)
9797 where
9898 renderClientError :: ClientError -> InteractionError
9999 renderClientError err = case err of
100− FailureResponse _ (Response{responseStatusCode}) -> InteractionError textual (responseStatusCode == status500)
100+ FailureResponse _ Response{responseStatusCode} -> InteractionError textual (responseStatusCode == status500)
101101 _ -> InteractionError textual True
102102
103103 where textual = T.pack $ show err
src/Roboservant/Direct.hs+11−12
@@ -7,7 +7,7 @@
77{-# LANGUAGE RecordWildCards #-}
88{-# LANGUAGE ScopedTypeVariables #-}
99{-# LANGUAGE TupleSections #-}
10−{-# LANGUAGE TypeApplications #-}
10+
1111{-# LANGUAGE TypeFamilies #-}
1212{-# LANGUAGE UndecidableInstances #-}
1313
@@ -150,12 +150,12 @@ fuzz' reifiedApi Config {..} = handle (pure . Just . formatException) $ do
150150 Report
151151 (unlines [show failureType, show exception])
152152 r
153− displayDiagnostics FuzzState {..} = liftIO $ do
153+ displayDiagnostics FuzzState {..} = liftIO $
154154 logInfo $ unlines $
155− ["api endpoints covered"]
156− <> (map show . Set.toList . Set.fromList $ map apiOffset path)
157− <> ["", "types in stash"]
158− <> DM.foldrWithKey (\_ v r -> (show . NEL.length . getStashValue $ v) : r) [] (getStash stash)
155+ ["api endpoints covered"]
156+ <> (map show . Set.toList . Set.fromList $ map apiOffset path)
157+ <> ["", "types in stash"]
158+ <> DM.foldrWithKey (\_ v r -> (show . NEL.length . getStashValue $ v) : r) [] (getStash stash)
159159 -- <> (map (show . NEL.length . getStashValue ) $ DM.assocs (getStash stash))
160160 -- $ \_k v ->
161161 -- (show . NEL.length $ getStashValue v))
@@ -246,11 +246,11 @@ fuzz' reifiedApi Config {..} = handle (pure . Just . formatException) $ do
246246 if fatalError e
247247 then throw e
248248 else pure ()
249− Right (dyn :: NEL.NonEmpty (Dynamic, Int)) -> do
249+ Right (dyn :: NEL.NonEmpty (Dynamic, Int)) ->
250250 modify'
251− ( \fs@FuzzState {..} ->
252− fs {stash = addToStash (NEL.toList dyn) stash}
253− )
251+ ( \fs@FuzzState {..} ->
252+ fs {stash = addToStash (NEL.toList dyn) stash}
253+ )
254254 where
255255 argVals = V.rmap (\(_ :*: V.Identity x) -> V.Identity x) args
256256 -- argTypes = recordToList' (\(tr :*: _) -> R.SomeTypeRep tr) args
@@ -262,8 +262,7 @@ fuzz' reifiedApi Config {..} = handle (pure . Just . formatException) $ do
262262 (execute op func args)
263263 [ Handler (\(e :: SomeAsyncException) -> throw e),
264264 Handler
265− ( \(e :: SomeException) -> do
266− -- displayDiagnostics =<< get
265+ ( \(e :: SomeException) ->
267266 throw . RoboservantException ServerCrashed (Just e) =<< get
268267 )
269268 ]
src/Roboservant/Server.hs+2−2
@@ -5,7 +5,7 @@
55{-# LANGUAGE FlexibleContexts #-}
66{-# LANGUAGE GADTs #-}
77{-# LANGUAGE PolyKinds #-}
8−{-# LANGUAGE RankNTypes #-}
8+
99{-# LANGUAGE ScopedTypeVariables #-}
1010{-# LANGUAGE TypeApplications #-}
1111{-# LANGUAGE TypeFamilies #-}
@@ -27,7 +27,7 @@ fuzz :: forall api.
2727 Server api ->
2828 Config ->
2929 IO (Maybe Report)
30−fuzz s = fuzz' (reifyServer s)
30+fuzz s = fuzz' (reifyServer s)
3131 -- todo: how do we pull reifyServer out?
3232 where reifyServer :: (FlattenServer api, ToReifiedApi (Endpoints api))
3333 => Server api -> ReifiedApi
src/Roboservant/Types.hs−1
@@ -14,7 +14,6 @@ module Roboservant.Types
1414 module Roboservant.Types.ReifiedApi.Server,
1515 module Roboservant.Types.Internal,
1616 module Roboservant.Types.Config,
17− module Roboservant.Types.Orphans,
1817 )
1918where
2019
src/Roboservant/Types/Breakdown.hs+2−1
@@ -1,5 +1,6 @@
11{-# LANGUAGE AllowAmbiguousTypes #-}
22{-# LANGUAGE DataKinds #-}
3+{-# LANGUAGE FlexibleContexts #-}
34{-# LANGUAGE DerivingVia #-}
45{-# LANGUAGE FlexibleInstances #-}
56{-# LANGUAGE GADTs #-}
@@ -48,7 +49,7 @@ instance (Hashable x, Typeable x, Breakdown x) => Breakdown [x] where
4849 breakdownExtras stash = concatMap (NEL.toList . breakdown) stash
4950
5051
51−class GBreakdown (f :: k -> *) where
52+class GBreakdown (f :: k -> Type) where
5253 gBreakdownExtras :: f a -> [(Dynamic, Int)]
5354
5455instance (Hashable x, Typeable x, Generic x, GBreakdown (Rep x)) => Breakdown (Compound (x :: Type)) where
src/Roboservant/Types/BuildFrom.hs+1−1
@@ -77,7 +77,7 @@ deriving via (Atom Int) instance BuildFrom Int
7777
7878deriving via (Atom Char) instance BuildFrom Char
7979
80−class GBuildFrom (f :: k -> *) where
80+class GBuildFrom (f :: k -> Type) where
8181 gExtras :: Stash -> [([Provenance], f a)]
8282
8383instance GBuildFrom b => GBuildFrom (M1 D a b) where
src/Roboservant/Types/Internal.hs+2−2
@@ -43,11 +43,11 @@ instance Show Stash where
4343
4444-- | Can't be built up from parts, can't be broken down further.
4545newtype Atom x = Atom {unAtom :: x}
46− deriving newtype (Hashable, Typeable)
46+ deriving newtype (Hashable, Typeable,Eq)
4747
4848-- | can be broken down and built up from generic pieces
4949newtype Compound x = Compound {unCompound :: x}
50− deriving newtype (Hashable, Typeable)
50+ deriving newtype (Hashable, Typeable, Eq)
5151
5252hashedDyn :: (Hashable a, Typeable a) => a -> (Dynamic, Int)
5353hashedDyn a = (toDyn a, hash a)
src/Roboservant/Types/ReifiedApi.hs+1−1
@@ -57,7 +57,7 @@ instance Show ReifiedEndpoint where
5757
5858class ( V.RecordToList (EndpointArgs endpoint)
5959 , V.RMap (EndpointArgs endpoint)
60− ) => ToReifiedEndpoint (endpoint :: *) where
60+ ) => ToReifiedEndpoint (endpoint :: Type) where
6161 type EndpointArgs endpoint :: [Type]
6262 type EndpointRes endpoint :: Type
6363
src/Roboservant/Types/ReifiedApi/Server.hs+1−1
@@ -6,7 +6,7 @@
66{-# LANGUAGE GADTs #-}
77{-# LANGUAGE LambdaCase #-}
88{-# LANGUAGE PolyKinds #-}
9−{-# LANGUAGE RankNTypes #-}
9+
1010{-# LANGUAGE ScopedTypeVariables #-}
1111{-# LANGUAGE TypeApplications #-}
1212{-# LANGUAGE TypeFamilies #-}
stack.yaml+5−5
@@ -1,10 +1,10 @@
1−resolver: lts-17.6
1+resolver: lts-20.4
22packages:
33- .
44
55extra-deps:
6−- dependent-map-0.4.0.0@sha256:ca2b131046f4340a1c35d138c5a003fe4a5be96b14efc26291ed35fd08c62221,1657
7−- dependent-sum-0.7.1.0@sha256:5599aa89637db434431b1dd3fa7c34bc3d565ee44f0519bfbc877be1927c2531,2068
6+# - dependent-map-0.4.0.0@sha256:ca2b131046f4340a1c35d138c5a003fe4a5be96b14efc26291ed35fd08c62221,1657
7+# - dependent-sum-0.7.1.0@sha256:5599aa89637db434431b1dd3fa7c34bc3d565ee44f0519bfbc877be1927c2531,2068
88- servant-flatten-0.2@sha256:276896f7c5cdec5b8f8493f6205fded0cc602d050b58fdb09a6d7c85c3bb0837,1234
9−- constraints-extras-0.3.0.2@sha256:013b8d0392582c6ca068e226718a4fe8be8e22321cc0634f6115505bf377ad26,1853
10−- some-1.0.1@sha256:26e5bab7276f48b25ea8660d3fd1166c0f20fd497dac879a40f408e23211f93e,2055
9+# - constraints-extras-0.3.0.2@sha256:013b8d0392582c6ca068e226718a4fe8be8e22321cc0634f6115505bf377ad26,1853
10+- some-1.0.3
stack.yaml.lock+9−30
@@ -4,44 +4,23 @@
44# https://docs.haskellstack.org/en/stable/lock_files
55
66packages:
7−- completed:
8− hackage: dependent-map-0.4.0.0@sha256:ca2b131046f4340a1c35d138c5a003fe4a5be96b14efc26291ed35fd08c62221,1657
9− pantry-tree:
10− size: 551
11− sha256: 5defa30010904d2ad05a036f3eaf83793506717c93cbeb599f40db1a3632cfc5
12− original:
13− hackage: dependent-map-0.4.0.0@sha256:ca2b131046f4340a1c35d138c5a003fe4a5be96b14efc26291ed35fd08c62221,1657
14−- completed:
15− hackage: dependent-sum-0.7.1.0@sha256:5599aa89637db434431b1dd3fa7c34bc3d565ee44f0519bfbc877be1927c2531,2068
16− pantry-tree:
17− size: 290
18− sha256: 9cbfb32b5a8a782b7a1c941803fd517633cb699159b851c1d82267a9e9391b50
19− original:
20− hackage: dependent-sum-0.7.1.0@sha256:5599aa89637db434431b1dd3fa7c34bc3d565ee44f0519bfbc877be1927c2531,2068
217- completed:
228 hackage: servant-flatten-0.2@sha256:276896f7c5cdec5b8f8493f6205fded0cc602d050b58fdb09a6d7c85c3bb0837,1234
239 pantry-tree:
24− size: 325
2510 sha256: 04f12c7bef2c3f9a25d94eb9489752ed498db8e243069fe95838dbb51df1dcb3
11+ size: 325
2612 original:
2713 hackage: servant-flatten-0.2@sha256:276896f7c5cdec5b8f8493f6205fded0cc602d050b58fdb09a6d7c85c3bb0837,1234
2814- completed:
29− hackage: constraints-extras-0.3.0.2@sha256:013b8d0392582c6ca068e226718a4fe8be8e22321cc0634f6115505bf377ad26,1853
30− pantry-tree:
31− size: 594
32− sha256: 3ce1012bfb02e4d7def9df19ce80b8cd2b472c691b25b181d9960638673fecd1
33− original:
34− hackage: constraints-extras-0.3.0.2@sha256:013b8d0392582c6ca068e226718a4fe8be8e22321cc0634f6115505bf377ad26,1853
35−- completed:
36− hackage: some-1.0.1@sha256:26e5bab7276f48b25ea8660d3fd1166c0f20fd497dac879a40f408e23211f93e,2055
15+ hackage: some-1.0.3@sha256:938cec5fc0d3a08dde34cfc0acd5a0aa2e9fd489c9dbb64417f16588dfb47af0,2399
3716 pantry-tree:
38− size: 708
39− sha256: c882b6ebe8a0616f1ab3908f1620087ad5c6d8d82d1a72b99226f6487419bfe6
17+ sha256: b88dddc6b991cd570c6750f8d309a9feb76938b29a690abdabc4ababb8c7b2f8
18+ size: 709
4019 original:
41− hackage: some-1.0.1@sha256:26e5bab7276f48b25ea8660d3fd1166c0f20fd497dac879a40f408e23211f93e,2055
20+ hackage: some-1.0.3
4221snapshots:
4322- completed:
44− size: 565712
45− url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/17/6.yaml
46− sha256: 4e5e581a709c88e3fe26a9ce8bf331435729bead762fb5c190064c6c5bb1b835
47− original: lts-17.6
23+ sha256: 3770dfd79f5aed67acdcc65c4e7730adddffe6dba79ea723cfb0918356fc0f94
24+ size: 648660
25+ url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/4.yaml
26+ original: lts-20.4
test/Breakdown.hs+1−1
@@ -1,7 +1,7 @@
11{-# LANGUAGE DataKinds #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE DerivingStrategies #-}
4−{-# LANGUAGE GeneralizedNewtypeDeriving #-}
4+
55{-# LANGUAGE OverloadedStrings #-}
66{-# LANGUAGE TypeOperators #-}
77
test/Nested.hs+2−2
@@ -1,7 +1,7 @@
11{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE DeriveGeneric #-}
2+
33{-# LANGUAGE DerivingStrategies #-}
4−{-# LANGUAGE GeneralizedNewtypeDeriving #-}
4+
55{-# LANGUAGE OverloadedStrings #-}
66{-# LANGUAGE TypeOperators #-}
77
test/Post.hs+2−2
@@ -1,8 +1,8 @@
11{-# LANGUAGE DataKinds #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE DerivingStrategies #-}
4−{-# LANGUAGE GeneralizedNewtypeDeriving #-}
5−{-# LANGUAGE OverloadedStrings #-}
4+
5+
66{-# LANGUAGE TypeOperators #-}
77
88module Post where
test/Product.hs+1−1
@@ -1,7 +1,7 @@
11{-# LANGUAGE DataKinds #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE DerivingStrategies #-}
4−{-# LANGUAGE GeneralizedNewtypeDeriving #-}
4+
55{-# LANGUAGE OverloadedStrings #-}
66{-# LANGUAGE TypeOperators #-}
77
test/Put.hsnew file+33
@@ -0,0 +1,33 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE DerivingStrategies #-}
4+
5+
6+{-# LANGUAGE TypeOperators #-}
7+
8+module Put where
9+
10+import Data.Aeson
11+import Data.Hashable
12+import GHC.Generics (Generic)
13+import Servant
14+
15+type Api =
16+ Get '[JSON] Foo
17+ :<|> ReqBody '[JSON] Foo :> Put '[JSON] ()
18+ :<|> ReqBody '[JSON] Foo :> Put '[JSON] NoContent
19+
20+data Foo = Foo
21+ deriving (Eq, Show, Generic)
22+
23+instance Hashable Foo
24+
25+instance ToJSON Foo
26+
27+instance FromJSON Foo
28+
29+server :: Server Api
30+server =
31+ pure Foo
32+ :<|> const (pure ())
33+ :<|> const (pure NoContent)
test/QueryParams.hs+3−3
@@ -1,8 +1,8 @@
11{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE DeriveGeneric #-}
2+
33{-# LANGUAGE DerivingStrategies #-}
4−{-# LANGUAGE GeneralizedNewtypeDeriving #-}
5−{-# LANGUAGE OverloadedStrings #-}
4+
5+
66{-# LANGUAGE TypeOperators #-}
77
88module QueryParams where
test/Spec.hs+20−21
@@ -37,6 +37,7 @@ import Servant.Client(ClientEnv, mkClientEnv, baseUrlPort, parseBaseUrl,HasClien
3737import Network.Wai(Application)
3838import qualified Network.Wai.Handler.Warp as Warp
3939import Network.HTTP.Client (newManager, defaultManagerSettings)
40+import Control.Monad((>=>))
4041
4142main :: IO ()
4243main = hspec spec
@@ -47,15 +48,15 @@ fuzzBoth
4748 HasClient ClientM a)
4849 => String -> Server a -> R.Config -> (Maybe R.Report -> IO ()) -> Spec
4950fuzzBoth name server config condition = do
50− it (name <> " via server") $ do
51+ it (name <> " via server") $
5152 RS.fuzz @a server config >>= condition
5253
53− around (withServer (serve (Proxy :: Proxy a) server)) $ do
54+ around (withServer (serve (Proxy :: Proxy a) server)) $
5455 it (name <> " via client") $ \(clientEnv::ClientEnv) -> do
55− RC.fuzz @a clientEnv config >>= condition
56+ RC.fuzz @a clientEnv config >>= condition
5657
5758withServer :: Application -> ActionWith ClientEnv -> IO ()
58−withServer app action = Warp.testWithApplication (pure app) (\p -> genClientEnv p >>= action)
59+withServer app action = Warp.testWithApplication (pure app) (genClientEnv >=> action)
5960 where genClientEnv port = do
6061 baseUrl <- parseBaseUrl "http://localhost"
6162 manager <- newManager defaultManagerSettings
@@ -74,14 +75,14 @@ spec = do
7475 Just (R.InsufficientCoverage _) -> True
7576 _ -> False
7677 ))
77− describe "posted body" $ do
78+ describe "posted body" $
7879 fuzzBoth @Post.Api "passes a coverage check using a posted body" Post.server R.defaultConfig {R.coverageThreshold = 0.99}
79− (`shouldSatisfy` isNothing)
80+ (`shouldSatisfy` isNothing)
8081
8182
82− describe "PUTted body" $ do
83+ describe "PUTted body" $
8384 fuzzBoth @Put.Api "passes a coverage check using a posted body" Put.server R.defaultConfig {R.coverageThreshold = 0.99}
84− (`shouldSatisfy` isNothing)
85+ (`shouldSatisfy` isNothing)
8586
8687
8788 describe "seeded" $ do
@@ -90,31 +91,29 @@ spec = do
9091 (R.defaultConfig {R.seed = [(toDyn res, hash res)]})
9192 (`shouldSatisfy` isNothing)
9293
93− describe "Foo" $ do
94+ describe "Foo" $
9495 fuzzBoth @Foo.Api "finds an error in a basic app" Foo.server R.defaultConfig (`shouldSatisfy` serverFailure)
9596
96− describe "QueryParams" $ do
97+ describe "QueryParams" $
9798 fuzzBoth @QueryParams.Api "can handle query params" QueryParams.server R.defaultConfig { R.seed = [R.hashedDyn (12::Int)] }
98− (`shouldSatisfy` isNothing)
99+ (`shouldSatisfy` isNothing)
99100
100101 describe "BuildFrom" $ do
101− describe "headers (and sum types)" $ do
102+ describe "headers (and sum types)" $
102103 fuzzBoth @Headers.Api "should find a failure that's dependent on using header info" Headers.server R.defaultConfig
103− (`shouldSatisfy` serverFailure)
104− describe "product types" $ do
104+ (`shouldSatisfy` serverFailure)
105+ describe "product types" $
105106 fuzzBoth @Product.Api "should find a failure that's dependent on creating a product" Product.server
106− R.defaultConfig {R.seed = [R.hashedDyn 'a', R.hashedDyn (1 :: Int)]}
107− (`shouldSatisfy` serverFailure)
107+ R.defaultConfig {R.seed = [R.hashedDyn 'a', R.hashedDyn (1 :: Int)]}
108+ (`shouldSatisfy` serverFailure)
108109 describe "Breakdown" $ do
109110 fuzzBoth @Breakdown.ProductApi "handles products" Breakdown.productServer R.defaultConfig
110111 (`shouldSatisfy` serverFailure)
111112 fuzzBoth @Breakdown.SumApi "handles sums" Breakdown.sumServer R.defaultConfig
112113 (`shouldSatisfy` serverFailure)
113− describe "flattening" $ do
114− -- we don't actually do much here, this is just here to document the appropriate response
115− -- if you get a type error with a nested api.
114+ describe "flattening" $
116115 fuzzBoth @Nested.FlatApi "can handle nested apis" Nested.server R.defaultConfig {R.coverageThreshold = 0.99}
117− (`shouldSatisfy` isNothing)
116+ (`shouldSatisfy` isNothing)
118117
119118serverFailure :: Maybe R.Report -> Bool
120119serverFailure = \case
@@ -159,7 +158,7 @@ shouldFail =
159158 ( \i ->
160159 i
161160 { itemExample = \p a cb -> do
162− r <- (itemExample i) p a cb
161+ r <- itemExample i p a cb
163162 pure
164163 r
165164 { resultStatus = case resultStatus r of
test/UnsafeIO.hs+3−3
@@ -1,7 +1,7 @@
11{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE DeriveGeneric #-}
2+
33{-# LANGUAGE DerivingStrategies #-}
4−{-# LANGUAGE GeneralizedNewtypeDeriving #-}
4+
55{-# LANGUAGE OverloadedStrings #-}
66{-# LANGUAGE TypeOperators #-}
77
@@ -22,7 +22,7 @@ healthcheck ref = do
2222 t <- liftIO $ readIORef ref
2323 case t of
2424 0 -> pure ()
25− n -> throwError $ err500 {errBody = "observed inconsistency: " <> (BL8.pack $ show n)}
25+ n -> throwError $ err500 {errBody = "observed inconsistency: " <> BL8.pack (show n)}
2626
2727makeServer :: IO (Server UnsafeApi)
2828makeServer = do
test/Valid.hs+1−2
@@ -1,7 +1,7 @@
11{-# LANGUAGE DataKinds #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE DerivingStrategies #-}
4−{-# LANGUAGE GeneralizedNewtypeDeriving #-}
4+
55{-# LANGUAGE OverloadedStrings #-}
66{-# LANGUAGE TypeOperators #-}
77
@@ -10,7 +10,6 @@ module Valid where
1010import Data.Void
1111import GHC.Generics
1212import Servant
13−import Servant.API.Generic
1413import Servant.Server.Generic
1514
1615type Api =