Skip to content

Commit 86eb250

Browse files
akhesaCaroGaël Deest
authored andcommitted
removing DerivingVia extension (not compatible ghc < 8.6.1)
1 parent 133ed94 commit 86eb250

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/cookbook/uverb/UVerb.lhs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ handlers that respond with arbitrary open unions of types.
1212
{-# LANGUAGE DeriveAnyClass #-}
1313
{-# LANGUAGE DeriveGeneric #-}
1414
{-# LANGUAGE DerivingStrategies #-}
15-
{-# LANGUAGE DerivingVia #-}
1615
{-# LANGUAGE FlexibleContexts #-}
1716
{-# LANGUAGE FlexibleInstances #-}
1817
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
@@ -158,7 +157,9 @@ Example usage:
158157
```haskell
159158
data Foo = Foo Int Int Int
160159
deriving (Show, Eq, GHC.Generic, ToJSON)
161-
deriving HasStatus via WithStatus 200 Foo
160+
161+
instance HasStatus Foo where
162+
type StatusOf Foo = 200
162163
163164
data Bar = Bar
164165
deriving (Show, Eq, GHC.Generic, ToJSON)

0 commit comments

Comments
 (0)