Safe Haskell | None |
---|---|
Language | Haskell2010 |
Helpers for associating example values with all the types we use in our APIs. This allows us to write tests that will warn us when the encoding of our types change, potentially in backwards-incompatible ways.
Documentation
class HasExamples t where Source #
A helper type class that provides us example values of particular types.
The IsApi
typeclass below will demand we define an instance of this type
class for each type used in a request or response body.
Instances
HasExamples () Source # | |
HasExamples NoContent Source # | |
HasExamples Int Source # | |
HasExamples Text Source # | |
HasExamples a => HasExamples (Maybe a :: Type) Source # | |
HasExamples a => HasExamples (List a :: Type) Source # | |
HasExamples a => HasExamples ((a, List a) :: Type) Source # | |
(HasExamples a, HasExamples b) => HasExamples ((a, b) :: Type) Source # | |
(HasExamples a, HasExamples b) => HasExamples (Dict a b :: Type) Source # | |
(HasExamples a, HasExamples b, HasExamples c) => HasExamples ((a, b, c) :: Type) Source # | |
Example values of a type.