reverting : removing DerivingVia extension (not compatible ghc < 8.6.1)

This commit is contained in:
akhesaCaro 2021-03-23 14:09:49 +01:00
parent 0743ca724d
commit ba379287c8

View file

@ -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)