File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ handlers that respond with arbitrary open unions of types.
10
10
{-# LANGUAGE ConstraintKinds #-}
11
11
{-# LANGUAGE DataKinds #-}
12
12
{-# LANGUAGE DeriveGeneric #-}
13
+ {-# LANGUAGE DerivingStrategies #-}
14
+ {-# LANGUAGE DerivingVia #-}
13
15
{-# LANGUAGE FlexibleContexts #-}
14
16
{-# LANGUAGE FlexibleInstances #-}
15
17
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
@@ -154,12 +156,8 @@ Example usage:
154
156
155
157
```haskell
156
158
data Foo = Foo Int Int Int
157
- deriving (Show, Eq, GHC.Generic)
158
-
159
- instance ToJSON Foo
160
-
161
- instance HasStatus Foo where
162
- type StatusOf Foo = 200
159
+ deriving (Show, Eq, GHC.Generic, ToJSON)
160
+ deriving HasStatus via WithStatus 200 Foo
163
161
164
162
data Bar = Bar
165
163
deriving (Show, Eq, GHC.Generic)
You can’t perform that action at this time.
0 commit comments