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 DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DerivingStrategies #-}
|
||||
{-# LANGUAGE DerivingVia #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
|
@ -154,12 +156,8 @@ Example usage:
|
|||
|
||||
```haskell
|
||||
data Foo = Foo Int Int Int
|
||||
deriving (Show, Eq, GHC.Generic)
|
||||
|
||||
instance ToJSON Foo
|
||||
|
||||
instance HasStatus Foo where
|
||||
type StatusOf Foo = 200
|
||||
deriving (Show, Eq, GHC.Generic, ToJSON)
|
||||
deriving HasStatus via WithStatus 200 Foo
|
||||
|
||||
data Bar = Bar
|
||||
deriving (Show, Eq, GHC.Generic)
|
||||
|
|
Loading…
Reference in a new issue