From fc0fed4c145407fc26e8ef8c0a0ee8bbc118bd2b Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 25 Aug 2010 15:34:33 +0300 Subject: [PATCH] Removed Handler type synonym --- Yesod/Handler.hs | 8 +------- Yesod/Yesod.hs | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Yesod/Handler.hs b/Yesod/Handler.hs index a4796f76..5dcbace9 100644 --- a/Yesod/Handler.hs +++ b/Yesod/Handler.hs @@ -24,7 +24,6 @@ module Yesod.Handler ( -- * Type families Route -- * Handler monad - , Handler , GHandler -- ** Read information from handler , getYesod @@ -124,7 +123,7 @@ toMasterHandler :: (Route sub -> Route master) -> (master -> sub) -> Route sub -> GHandler sub master a - -> Handler master a + -> GHandler master master a toMasterHandler tm ts route (GHandler h) = GHandler $ withReaderT (handlerSubData tm ts route) h @@ -145,11 +144,6 @@ newtype GHandler sub master a = GHandler { unGHandler :: type Endo a = a -> a --- | A 'GHandler' limited to the case where the master and sub sites are the --- same. This is the usual case for application writing; only code written --- specifically as a subsite need been concerned with the more general variety. -type Handler yesod = GHandler yesod yesod - -- | An extension of the basic WAI 'W.Application' datatype to provide extra -- features needed by Yesod. Users should never need to use this directly, as -- the 'GHandler' monad and template haskell code should hide it away. diff --git a/Yesod/Yesod.hs b/Yesod/Yesod.hs index 70172f8c..f87ab328 100644 --- a/Yesod/Yesod.hs +++ b/Yesod/Yesod.hs @@ -72,7 +72,7 @@ import Test.HUnit hiding (Test) -- | This class is automatically instantiated when you use the template haskell -- mkYesod function. You should never need to deal with it directly. class Eq (Route y) => YesodSite y where - getSite :: Site (Route y) (Method -> Maybe (Handler y ChooseRep)) + getSite :: Site (Route y) (Method -> Maybe (GHandler y y ChooseRep)) type Method = String -- | Same as 'YesodSite', but for subsites. Once again, users should not need