@@ -9,9 +9,7 @@ handlers that respond with arbitrary open unions of types.
9
9
`` `haskell
10
10
{-# LANGUAGE ConstraintKinds #-}
11
11
{-# LANGUAGE DataKinds #-}
12
- {-# LANGUAGE DeriveAnyClass #-}
13
12
{-# LANGUAGE DeriveGeneric #-}
14
- {-# LANGUAGE DerivingStrategies #-}
15
13
{-# LANGUAGE FlexibleContexts #-}
16
14
{-# LANGUAGE FlexibleInstances #-}
17
15
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
@@ -133,7 +131,7 @@ Since `UVerb` (probably) will mostly be used for error-like responses, it may be
133
131
134
132
`` `haskell
135
133
newtype UVerbT xs m a = UVerbT { unUVerbT :: ExceptT (Union xs) m a }
136
- deriving newtype (Functor, Applicative, Monad, MonadTrans)
134
+ deriving (Functor, Applicative, Monad, MonadTrans)
137
135
138
136
-- | Deliberately hide 'ExceptT' s 'MonadError' instance to be able to use
139
137
-- underlying monad's instance.
@@ -156,13 +154,17 @@ Example usage:
156
154
157
155
```haskell
158
156
data Foo = Foo Int Int Int
159
- deriving (Show, Eq, GHC.Generic, ToJSON)
157
+ deriving (Show, Eq, GHC.Generic)
158
+
159
+ instance ToJSON Foo
160
160
161
161
instance HasStatus Foo where
162
162
type StatusOf Foo = 200
163
163
164
164
data Bar = Bar
165
- deriving (Show, Eq, GHC.Generic, ToJSON)
165
+ deriving (Show, Eq, GHC.Generic)
166
+
167
+ instance ToJSON Bar
166
168
167
169
h :: Handler (Union '[Foo, WithStatus 400 Bar])
168
170
h = runUVerbT $ do
0 commit comments