removing DerivingVia extension (not compatible ghc < 8.6.1)
This commit is contained in:
parent
133ed94442
commit
86eb25018e
1 changed files with 3 additions and 2 deletions
|
@ -12,7 +12,6 @@ handlers that respond with arbitrary open unions of types.
|
|||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DerivingStrategies #-}
|
||||
{-# LANGUAGE DerivingVia #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
|
@ -158,7 +157,9 @@ Example usage:
|
|||
```haskell
|
||||
data Foo = Foo Int Int Int
|
||||
deriving (Show, Eq, GHC.Generic, ToJSON)
|
||||
deriving HasStatus via WithStatus 200 Foo
|
||||
|
||||
instance HasStatus Foo where
|
||||
type StatusOf Foo = 200
|
||||
|
||||
data Bar = Bar
|
||||
deriving (Show, Eq, GHC.Generic, ToJSON)
|
||||
|
|
Loading…
Reference in a new issue