git.iko.soy/typeable/servant
on master help sign in
removing DerivingVia extension (not compatible ghc < 8.6.1)
86eb250akhesacaro
doc/cookbook/uverb/UVerb.lhs+3−2
@@ -12,7 +12,6 @@ handlers that respond with arbitrary open unions of types.
12{-# LANGUAGE DeriveAnyClass #-}
12{-# LANGUAGE DeriveAnyClass #-}
13{-# LANGUAGE DeriveGeneric #-}
13{-# LANGUAGE DeriveGeneric #-}
14{-# LANGUAGE DerivingStrategies #-}
14{-# LANGUAGE DerivingStrategies #-}
15−{-# LANGUAGE DerivingVia #-}
16{-# LANGUAGE FlexibleContexts #-}
15{-# LANGUAGE FlexibleContexts #-}
17{-# LANGUAGE FlexibleInstances #-}
16{-# LANGUAGE FlexibleInstances #-}
18{-# LANGUAGE GeneralizedNewtypeDeriving #-}
17{-# LANGUAGE GeneralizedNewtypeDeriving #-}
@@ -158,7 +157,9 @@ Example usage:
158```haskell
157```haskell
159data Foo = Foo Int Int Int
158data Foo = Foo Int Int Int
160 deriving (Show, Eq, GHC.Generic, ToJSON)
159 deriving (Show, Eq, GHC.Generic, ToJSON)
161− deriving HasStatus via WithStatus 200 Foo
160+
161+instance HasStatus Foo where
162+ type StatusOf Foo = 200
162
163
163data Bar = Bar
164data Bar = Bar
164 deriving (Show, Eq, GHC.Generic, ToJSON)
165 deriving (Show, Eq, GHC.Generic, ToJSON)