diff --git a/doc/cookbook/uverb/UVerb.lhs b/doc/cookbook/uverb/UVerb.lhs index e5e9bc07..d281a383 100644 --- a/doc/cookbook/uverb/UVerb.lhs +++ b/doc/cookbook/uverb/UVerb.lhs @@ -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)