reverting : removing DerivingVia extension (not compatible ghc < 8.6.1)
This commit is contained in:
parent
0743ca724d
commit
ba379287c8
1 changed files with 4 additions and 6 deletions
|
@ -10,6 +10,8 @@ handlers that respond with arbitrary open unions of types.
|
||||||
{-# LANGUAGE ConstraintKinds #-}
|
{-# LANGUAGE ConstraintKinds #-}
|
||||||
{-# LANGUAGE DataKinds #-}
|
{-# LANGUAGE DataKinds #-}
|
||||||
{-# LANGUAGE DeriveGeneric #-}
|
{-# LANGUAGE DeriveGeneric #-}
|
||||||
|
{-# LANGUAGE DerivingStrategies #-}
|
||||||
|
{-# LANGUAGE DerivingVia #-}
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||||
|
@ -154,12 +156,8 @@ Example usage:
|
||||||
|
|
||||||
```haskell
|
```haskell
|
||||||
data Foo = Foo Int Int Int
|
data Foo = Foo Int Int Int
|
||||||
deriving (Show, Eq, GHC.Generic)
|
deriving (Show, Eq, GHC.Generic, ToJSON)
|
||||||
|
deriving HasStatus via WithStatus 200 Foo
|
||||||
instance ToJSON Foo
|
|
||||||
|
|
||||||
instance HasStatus Foo where
|
|
||||||
type StatusOf Foo = 200
|
|
||||||
|
|
||||||
data Bar = Bar
|
data Bar = Bar
|
||||||
deriving (Show, Eq, GHC.Generic)
|
deriving (Show, Eq, GHC.Generic)
|
||||||
|
|
Loading…
Reference in a new issue