Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
defaultYesodInstanceExcept Source #
:: Q Exp | How to go from the wrapped site to the base site. If the instance is for a type of the form 't site', then this should be an expression of type 't site -> site'. This operation is necessary to use some of the default implementations. |
-> Q [Dec] | The partial defaultYesodInstanceExcept [| myLowerer |] [d| instance (Yesod site) => Yesod (MyWrapper site) where yesodMiddleware = ... -- insert some middleware -- But everything else should be defined in the default way |] This declaration will include the custom definition for
|
-> Q [Dec] |
Fills in an instance for the Yesod
class for a SiteTrans
wrapper with
implementations which just invoke the base class, *except* for those implementations
which are defined on the instance itself.
This is useful for SiteTrans
implementations that want to modify some of
the Yesod
behaviour of the site, but mostly want to delegate behaviour to
the base site. Instead of writing out a whole Yesod
instance, you can just
override the class methods that you need. The rest will be filled in with
working implementations that do what you expect.