@@ -10,6 +10,8 @@ handlers that respond with arbitrary open unions of types.
10{-# LANGUAGE ConstraintKinds #-}
10{-# LANGUAGE ConstraintKinds #-}
11{-# LANGUAGE DataKinds #-}
11{-# LANGUAGE DataKinds #-}
12{-# LANGUAGE DeriveGeneric #-}
12{-# LANGUAGE DeriveGeneric #-}
13+{-# LANGUAGE DerivingStrategies #-}
14+{-# LANGUAGE DerivingVia #-}
13{-# LANGUAGE FlexibleContexts #-}
15{-# LANGUAGE FlexibleContexts #-}
14{-# LANGUAGE FlexibleInstances #-}
16{-# LANGUAGE FlexibleInstances #-}
15{-# LANGUAGE GeneralizedNewtypeDeriving #-}
17{-# LANGUAGE GeneralizedNewtypeDeriving #-}
@@ -154,12 +156,8 @@ Example usage:
155```haskell
157```haskell
156data Foo = Foo Int Int Int
158data Foo = Foo Int Int Int
157− deriving (Show, Eq, GHC.Generic)
159+ deriving (Show, Eq, GHC.Generic, ToJSON)
158−
160+ deriving HasStatus via WithStatus 200 Foo
161−instance HasStatus Foo where
162− type StatusOf Foo = 200
164data Bar = Bar
162data Bar = Bar
165 deriving (Show, Eq, GHC.Generic)
163 deriving (Show, Eq, GHC.Generic)