code:
From 8e78a25ce0cc19e52d063f66bd4cd316462393d4 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Thu, 6 Mar 2014 23:27:06 +0000
Subject: [PATCH] disable th

---
 monad-logger.cabal | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/monad-logger.cabal b/monad-logger.cabal
index b0aa271..cd56c0f 100644
--- a/monad-logger.cabal
+++ b/monad-logger.cabal
@@ -14,8 +14,8 @@ cabal-version:       >=1.8

 flag template_haskell {
       Description: Enable Template Haskell support
-      Default:     True
-      Manual:      True
+      Default:     False
+      Manual:      False
 }

 library
--
1.9.0


code:
From 4b958f97bffdeedc0c946d5fdc9749d2cc566fcc Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Thu, 26 Dec 2013 15:54:37 -0400
Subject: [PATCH] stub out

---
 persistent-template.cabal |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/persistent-template.cabal b/persistent-template.cabal
index c4aee68..7905278 100644
--- a/persistent-template.cabal
+++ b/persistent-template.cabal
@@ -24,7 +24,7 @@ library
                    , aeson
                    , monad-logger
                    , unordered-containers
-    exposed-modules: Database.Persist.TH
+    exposed-modules:
     ghc-options:     -Wall
     if impl(ghc >= 7.4)
        cpp-options: -DGHC_7_4
--
1.7.10.4

repo_name: kakafarm/git

license: unknown


code:
From efd18199fa245e51e6137036062ded8b0b26f78c Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Tue, 17 Dec 2013 18:08:22 +0000
Subject: [PATCH] disable TH

---
 Database/Persist/Sql/Raw.hs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Database/Persist/Sql/Raw.hs b/Database/Persist/Sql/Raw.hs
index 73189dd..d432790 100644
--- a/Database/Persist/Sql/Raw.hs
+++ b/Database/Persist/Sql/Raw.hs
@@ -11,7 +11,7 @@ import Data.IORef (writeIORef, readIORef, newIORef)
 import Control.Exception (throwIO)
 import Control.Monad (when, liftM)
 import Data.Text (Text, pack)
-import Control.Monad.Logger (logDebugS)
+--import Control.Monad.Logger (logDebugS)
 import Data.Int (Int64)
 import Control.Monad.Trans.Class (lift)
 import qualified Data.Text as T
@@ -22,7 +22,6 @@ rawQuery :: (MonadSqlPersist m, MonadResource m)
          -> [PersistValue]
          -> Source m [PersistValue]
 rawQuery sql vals = do
-    lift $ $logDebugS (pack "SQL") $ pack $ show sql ++ " " ++ show vals
     conn <- lift askSqlConn
     bracketP
         (getStmtConn conn sql)
@@ -34,7 +33,6 @@ rawExecute x y = liftM (const ()) $ rawExecuteCount x y

 rawExecuteCount :: MonadSqlPersist m => Text -> [PersistValue] -> m Int64
 rawExecuteCount sql vals = do
-    $logDebugS (pack "SQL") $ pack $ show sql ++ " " ++ show vals
     stmt <- getStmt sql
     res <- liftIO $ stmtExecute stmt vals
     liftIO $ stmtReset stmt
--
1.8.5.1


code:
From 7e85a025349877565a70c375ef55508f215eaaf8 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Wed, 21 May 2014 04:23:49 +0000
Subject: [PATCH] remove TH

---
 process-conduit.cabal | 1 -
 1 file changed, 1 deletion(-)

diff --git a/process-conduit.cabal b/process-conduit.cabal
index e6988e0..a2e03e0 100644
--- a/process-conduit.cabal
+++ b/process-conduit.cabal
@@ -24,7 +24,6 @@ source-repository head

 library
   exposed-modules:     Data.Conduit.Process
-                       System.Process.QQ

   build-depends:       base             == 4.*
                      , template-haskell >= 2.4
--
2.0.0.rc2


code:
From 392602f5ff14c0b5a801397d075ddcbcd890aa83 Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kitenet.net>
Date: Thu, 18 Apr 2013 17:50:59 -0400
Subject: [PATCH] fix cross build

---
 src/Data/Profunctor/Unsafe.hs | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/Data/Profunctor/Unsafe.hs b/src/Data/Profunctor/Unsafe.hs
index 025c7c4..0249274 100644
--- a/src/Data/Profunctor/Unsafe.hs
+++ b/src/Data/Profunctor/Unsafe.hs
@@ -40,9 +40,6 @@ import Data.Tagged
 import Prelude hiding (id,(.),sequence)
 import Unsafe.Coerce

-{-# ANN module "Hlint: ignore Redundant lambda" #-}
-{-# ANN module "Hlint: ignore Collapse lambdas" #-}
-
 infixr 9 #.
 infixl 8 .#

--
1.8.2.rc3


code:
From c0f5dcfd6ba7a05bb84b6adc4664c8dde109e6ac Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Fri, 7 Mar 2014 04:30:22 +0000
Subject: [PATCH] remove TH

---
 fast/Data/Reflection.hs | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/fast/Data/Reflection.hs b/fast/Data/Reflection.hs
index ca57d35..d3f8356 100644
--- a/fast/Data/Reflection.hs
+++ b/fast/Data/Reflection.hs
@@ -59,7 +59,7 @@ module Data.Reflection
     , Given(..)
     , give
     -- * Template Haskell reflection
-    , int, nat
+    --, int, nat
     -- * Useful compile time naturals
     , Z, D, SD, PD
     ) where
@@ -161,6 +161,7 @@ instance Reifies n Int => Reifies (PD n) Int where
 -- instead of @$(int 3)@. Sometimes the two will produce the same
 -- representation (if compiled without the @-DUSE_TYPE_LITS@ preprocessor
 -- directive).
+{-
 int :: Int -> TypeQ
 int n = case quotRem n 2 of
   (0, 0) -> conT ''Z
@@ -176,7 +177,7 @@ nat :: Int -> TypeQ
 nat n
   | n >= 0 = int n
   | otherwise = error "nat: negative"
-
+-}
 #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL < 704
 instance Show (Q a)
 instance Eq (Q a)
@@ -195,6 +196,7 @@ instance Fractional a => Fractional (Q a) where
   recip = fmap recip
   fromRational = return . fromRational

+{-
 -- | This permits the use of $(5) as a type splice.
 instance Num Type where
 #ifdef USE_TYPE_LITS
@@ -254,7 +256,7 @@ instance Num Exp where
   abs = onProxyType1 abs
   signum = onProxyType1 signum
   fromInteger n = ConE 'Proxy `SigE` (ConT ''Proxy `AppT` fromInteger n)
-
+-}
 #ifdef USE_TYPE_LITS
 addProxy :: Proxy a -> Proxy b -> Proxy (a + b)
 addProxy _ _ = Proxy
--
1.9.0


code:
From 6de4e75bfbfccb8aedcbf3ee75e5d544f1eeeca5 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Thu, 3 Jul 2014 21:48:14 +0000
Subject: [PATCH] remove TH

---
 Text/Cassius.hs          |   23 ------
 Text/Coffee.hs           |   56 ++-------------
 Text/Css.hs              |  151 ---------------------------------------
 Text/CssCommon.hs        |    4 --
 Text/Hamlet.hs           |   86 +++++++---------------
 Text/Hamlet/Parse.hs     |    3 +-
 Text/Julius.hs           |   67 +++--------------
 Text/Lucius.hs           |   46 +-----------
 Text/Roy.hs              |   51 ++-----------
 Text/Shakespeare.hs      |   70 +++---------------
 Text/Shakespeare/Base.hs |   28 --------
 Text/Shakespeare/I18N.hs |  178 ++--------------------------------------------
 Text/Shakespeare/Text.hs |  125 +++-----------------------------
 shakespeare.cabal        |    3 +-
 14 files changed, 78 insertions(+), 813 deletions(-)

diff --git a/Text/Cassius.hs b/Text/Cassius.hs
index 91fc90f..c515807 100644
--- a/Text/Cassius.hs
+++ b/Text/Cassius.hs
@@ -13,10 +13,6 @@ module Text.Cassius
     , renderCss
     , renderCssUrl
       -- * Parsing
-    , cassius
-    , cassiusFile
-    , cassiusFileDebug
-    , cassiusFileReload
       -- * ToCss instances
       -- ** Color
     , Color (..)
@@ -27,11 +23,8 @@ module Text.Cassius
     , AbsoluteUnit (..)
     , AbsoluteSize (..)
     , absoluteSize
-    , EmSize (..)
-    , ExSize (..)
     , PercentageSize (..)
     , percentageSize
-    , PixelSize (..)
       -- * Internal
     , cassiusUsedIdentifiers
     ) where
@@ -43,25 +36,9 @@ import Language.Haskell.TH.Quote (QuasiQuoter (..))
 import Language.Haskell.TH.Syntax
 import qualified Data.Text.Lazy as TL
 import Text.CssCommon
-import Text.Lucius (lucius)
 import qualified Text.Lucius
 import Text.IndentToBrace (i2b)

-cassius :: QuasiQuoter
-cassius = QuasiQuoter { quoteExp = quoteExp lucius . i2b }
-
-cassiusFile :: FilePath -> Q Exp
-cassiusFile fp = do
-#ifdef GHC_7_4
-    qAddDependentFile fp
-#endif
-    contents <- fmap TL.unpack $ qRunIO $ readUtf8File fp
-    quoteExp cassius contents
-
-cassiusFileDebug, cassiusFileReload :: FilePath -> Q Exp
-cassiusFileDebug = cssFileDebug True [|Text.Lucius.parseTopLevels|] Text.Lucius.parseTopLevels
-cassiusFileReload = cassiusFileDebug
-
 -- | Determine which identifiers are used by the given template, useful for
 -- creating systems like yesod devel.
 cassiusUsedIdentifiers :: String -> [(Deref, VarType)]
diff --git a/Text/Coffee.hs b/Text/Coffee.hs
index 488c81b..61db85b 100644
--- a/Text/Coffee.hs
+++ b/Text/Coffee.hs
@@ -51,13 +51,13 @@ module Text.Coffee
       -- ** Template-Reading Functions
       -- | These QuasiQuoter and Template Haskell methods return values of
       -- type @'JavascriptUrl' url@. See the Yesod book for details.
-      coffee
-    , coffeeFile
-    , coffeeFileReload
-    , coffeeFileDebug
+    --  coffee
+    --, coffeeFile
+    --, coffeeFileReload
+    --, coffeeFileDebug

 #ifdef TEST_EXPORT
-    , coffeeSettings
+    --, coffeeSettings
 #endif
     ) where

@@ -65,49 +65,3 @@ import Language.Haskell.TH.Quote (QuasiQuoter (..))
 import Language.Haskell.TH.Syntax
 import Text.Shakespeare
 import Text.Julius
-
-coffeeSettings :: Q ShakespeareSettings
-coffeeSettings = do
-  jsettings <- javascriptSettings
-  return $ jsettings { varChar = '%'
-  , preConversion = Just PreConvert {
-      preConvert = ReadProcess "coffee" ["-spb"]
-    , preEscapeIgnoreBalanced = "'\"`"     -- don't insert backtacks for variable already inside strings or backticks.
-    , preEscapeIgnoreLine = "#"            -- ignore commented lines
-    , wrapInsertion = Just WrapInsertion {
-        wrapInsertionIndent = Just "  "
-      , wrapInsertionStartBegin = "("
-      , wrapInsertionSeparator = ", "
-      , wrapInsertionStartClose = ") =>"
-      , wrapInsertionEnd = ""
-      , wrapInsertionAddParens = False
-      }
-    }
-  }
-
--- | Read inline, quasiquoted CoffeeScript.
-coffee :: QuasiQuoter
-coffee = QuasiQuoter { quoteExp = \s -> do
-    rs <- coffeeSettings
-    quoteExp (shakespeare rs) s
-    }
-
--- | Read in a CoffeeScript template file. This function reads the file once, at
--- compile time.
-coffeeFile :: FilePath -> Q Exp
-coffeeFile fp = do
-    rs <- coffeeSettings
-    shakespeareFile rs fp
-
--- | Read in a CoffeeScript template file. This impure function uses
--- unsafePerformIO to re-read the file on every call, allowing for rapid
--- iteration.
-coffeeFileReload :: FilePath -> Q Exp
-coffeeFileReload fp = do
-    rs <- coffeeSettings
-    shakespeareFileReload rs fp
-
--- | Deprecated synonym for 'coffeeFileReload'
-coffeeFileDebug :: FilePath -> Q Exp
-coffeeFileDebug = coffeeFileReload
-{-# DEPRECATED coffeeFileDebug "Please use coffeeFileReload instead." #-}
diff --git a/Text/Css.hs b/Text/Css.hs
index 75dc549..20c206c 100644
--- a/Text/Css.hs
+++ b/Text/Css.hs
@@ -166,22 +166,6 @@ cssUsedIdentifiers toi2b parseBlocks s' =
         (scope, rest') = go rest
     go' (Attr k v) = k ++ v

-cssFileDebug :: Bool -- ^ perform the indent-to-brace conversion
-             -> Q Exp
-             -> Parser [TopLevel Unresolved]
-             -> FilePath
-             -> Q Exp
-cssFileDebug toi2b parseBlocks' parseBlocks fp = do
-    s <- fmap TL.unpack $ qRunIO $ readUtf8File fp
-#ifdef GHC_7_4
-    qAddDependentFile fp
-#endif
-    let vs = cssUsedIdentifiers toi2b parseBlocks s
-    c <- mapM vtToExp vs
-    cr <- [|cssRuntime toi2b|]
-    parseBlocks'' <- parseBlocks'
-    return $ cr `AppE` parseBlocks'' `AppE` (LitE $ StringL fp) `AppE` ListE c
-
 combineSelectors :: HasLeadingSpace
                  -> [Contents]
                  -> [Contents]
@@ -287,18 +271,6 @@ cssRuntime toi2b parseBlocks fp cd render' = unsafePerformIO $ do

     addScope scope = map (DerefIdent . Ident *** CDPlain . fromString) scope ++ cd

-vtToExp :: (Deref, VarType) -> Q Exp
-vtToExp (d, vt) = do
-    d' <- lift d
-    c' <- c vt
-    return $ TupE [d', c' `AppE` derefToExp [] d]
-  where
-    c :: VarType -> Q Exp
-    c VTPlain = [|CDPlain . toCss|]
-    c VTUrl = [|CDUrl|]
-    c VTUrlParam = [|CDUrlParam|]
-    c VTMixin = [|CDMixin|]
-
 getVars :: Monad m => [(String, String)] -> Content -> m [(Deref, VarType)]
 getVars _ ContentRaw{} = return []
 getVars scope (ContentVar d) =
@@ -342,111 +314,8 @@ compressBlock (Block x y blocks mixins) =
     cc (ContentRaw a:ContentRaw b:c) = cc $ ContentRaw (a ++ b) : c
     cc (a:b) = a : cc b

-blockToMixin :: Name
-             -> Scope
-             -> Block Unresolved
-             -> Q Exp
-blockToMixin r scope (Block _sel props subblocks mixins) =
-    [|Mixin
-        { mixinAttrs    = concat
-                        $ $(listE $ map go props)
-                        : map mixinAttrs $mixinsE
-        -- FIXME too many complications to implement sublocks for now...
-        , mixinBlocks   = [] -- foldr (.) id $(listE $ map subGo subblocks) []
-        }|]
-      {-
-      . foldr (.) id $(listE $ map subGo subblocks)
-      . (concatMap mixinBlocks $mixinsE ++)
-    |]
-    -}
-  where
-    mixinsE = return $ ListE $ map (derefToExp []) mixins
-    go (Attr x y) = conE 'Attr
-        `appE` (contentsToBuilder r scope x)
-        `appE` (contentsToBuilder r scope y)
-    subGo (Block sel' b c d) = blockToCss r scope $ Block sel' b c d
-
-blockToCss :: Name
-           -> Scope
-           -> Block Unresolved
-           -> Q Exp
-blockToCss r scope (Block sel props subblocks mixins) =
-    [|((Block
-        { blockSelector = $(selectorToBuilder r scope sel)
-        , blockAttrs    = concat
-                        $ $(listE $ map go props)
-                        : map mixinAttrs $mixinsE
-        , blockBlocks   = ()
-        , blockMixins   = ()
-        } :: Block Resolved):)
-      . foldr (.) id $(listE $ map subGo subblocks)
-      . (concatMap mixinBlocks $mixinsE ++)
-    |]
-  where
-    mixinsE = return $ ListE $ map (derefToExp []) mixins
-    go (Attr x y) = conE 'Attr
-        `appE` (contentsToBuilder r scope x)
-        `appE` (contentsToBuilder r scope y)
-    subGo (hls, Block sel' b c d) =
-        blockToCss r scope $ Block sel'' b c d
-      where
-        sel'' = combineSelectors hls sel sel'
-
-selectorToBuilder :: Name -> Scope -> [Contents] -> Q Exp
-selectorToBuilder r scope sels =
-    contentsToBuilder r scope $ intercalate [ContentRaw ","] sels
-
-contentsToBuilder :: Name -> Scope -> [Content] -> Q Exp
-contentsToBuilder r scope contents =
-    appE [|mconcat|] $ listE $ map (contentToBuilder r scope) contents
-
-contentToBuilder :: Name -> Scope -> Content -> Q Exp
-contentToBuilder _ _ (ContentRaw x) =
-    [|fromText . pack|] `appE` litE (StringL x)
-contentToBuilder _ scope (ContentVar d) =
-    case d of
-        DerefIdent (Ident s)
-            | Just val <- lookup s scope -> [|fromText . pack|] `appE` litE (StringL val)
-        _ -> [|toCss|] `appE` return (derefToExp [] d)
-contentToBuilder r _ (ContentUrl u) =
-    [|fromText|] `appE`
-        (varE r `appE` return (derefToExp [] u) `appE` listE [])
-contentToBuilder r _ (ContentUrlParam u) =
-    [|fromText|] `appE`
-        ([|uncurry|] `appE` varE r `appE` return (derefToExp [] u))
-contentToBuilder _ _ ContentMixin{} = error "contentToBuilder on ContentMixin"
-
 type Scope = [(String, String)]

-topLevelsToCassius :: [TopLevel Unresolved]
-                   -> Q Exp
-topLevelsToCassius a = do
-    r <- newName "_render"
-    lamE [varP r] $ appE [|CssNoWhitespace . foldr ($) []|] $ fmap ListE $ go r [] a
-  where
-    go _ _ [] = return []
-    go r scope (TopBlock b:rest) = do
-        e <- [|(++) $ map TopBlock ($(blockToCss r scope b) [])|]
-        es <- go r scope rest
-        return $ e : es
-    go r scope (TopAtBlock name s b:rest) = do
-        let s' = contentsToBuilder r scope s
-        e <- [|(:) $ TopAtBlock $(lift name) $(s') $(blocksToCassius r scope b)|]
-        es <- go r scope rest
-        return $ e : es
-    go r scope (TopAtDecl dec cs:rest) = do
-        e <- [|(:) $ TopAtDecl $(lift dec) $(contentsToBuilder r scope cs)|]
-        es <- go r scope rest
-        return $ e : es
-    go r scope (TopVar k v:rest) = go r ((k, v) : scope) rest
-
-blocksToCassius :: Name
-                -> Scope
-                -> [Block Unresolved]
-                -> Q Exp
-blocksToCassius r scope a = do
-    appE [|foldr ($) []|] $ listE $ map (blockToCss r scope) a
-
 renderCss :: Css -> TL.Text
 renderCss css =
     toLazyText $ mconcat $ map go tops
@@ -515,23 +384,3 @@ renderBlock haveWhiteSpace indent (Block sel attrs () ())
         | haveWhiteSpace = fromString ";\n"
         | otherwise = singleton ';'

-instance Lift Mixin where
-    lift (Mixin a b) = [|Mixin a b|]
-instance Lift (Attr Unresolved) where
-    lift (Attr k v) = [|Attr k v :: Attr Unresolved |]
-instance Lift (Attr Resolved) where
-    lift (Attr k v) = [|Attr $(liftBuilder k) $(liftBuilder v) :: Attr Resolved |]
-
-liftBuilder :: Builder -> Q Exp
-liftBuilder b = [|fromText $ pack $(lift $ TL.unpack $ toLazyText b)|]
-
-instance Lift Content where
-    lift (ContentRaw s) = [|ContentRaw s|]
-    lift (ContentVar d) = [|ContentVar d|]
-    lift (ContentUrl d) = [|ContentUrl d|]
-    lift (ContentUrlParam d) = [|ContentUrlParam d|]
-    lift (ContentMixin m) = [|ContentMixin m|]
-instance Lift (Block Unresolved) where
-    lift (Block a b c d) = [|Block a b c d|]
-instance Lift (Block Resolved) where
-    lift (Block a b () ()) = [|Block $(liftBuilder a) b () ()|]
diff --git a/Text/CssCommon.hs b/Text/CssCommon.hs
index 719e0a8..8c40e8c 100644
--- a/Text/CssCommon.hs
+++ b/Text/CssCommon.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE CPP #-}
@@ -156,6 +155,3 @@ showSize :: Rational -> String -> String
 showSize value' unit = printf "%f" value ++ unit
   where value = fromRational value' :: Double

-mkSizeType "EmSize" "em"
-mkSizeType "ExSize" "ex"
-mkSizeType "PixelSize" "px"
diff --git a/Text/Hamlet.hs b/Text/Hamlet.hs
index 39c1528..6321cd3 100644
--- a/Text/Hamlet.hs
+++ b/Text/Hamlet.hs
@@ -11,36 +11,36 @@
 module Text.Hamlet
     ( -- * Plain HTML
       Html
-    , shamlet
-    , shamletFile
-    , xshamlet
-    , xshamletFile
+    --, shamlet
+    --, shamletFile
+    --, xshamlet
+    --, xshamletFile
       -- * Hamlet
     , HtmlUrl
-    , hamlet
-    , hamletFile
-    , hamletFileReload
-    , ihamletFileReload
-    , xhamlet
-    , xhamletFile
+    --, hamlet
+    --, hamletFile
+    --, hamletFileReload
+    --, ihamletFileReload
+    --, xhamlet
+    --, xhamletFile
       -- * I18N Hamlet
     , HtmlUrlI18n
-    , ihamlet
-    , ihamletFile
+    --, ihamlet
+    --, ihamletFile
       -- * Type classes
     , ToAttributes (..)
       -- * Internal, for making more
     , HamletSettings (..)
     , NewlineStyle (..)
-    , hamletWithSettings
-    , hamletFileWithSettings
+    --, hamletWithSettings
+    --, hamletFileWithSettings
     , defaultHamletSettings
     , xhtmlHamletSettings
-    , Env (..)
-    , HamletRules (..)
-    , hamletRules
-    , ihamletRules
-    , htmlRules
+    --, Env (..)
+    --, HamletRules (..)
+    --, hamletRules
+    --, ihamletRules
+    --, htmlRules
     , CloseStyle (..)
       -- * Used by generated code
     , condH
@@ -110,47 +110,9 @@ type HtmlUrl url = Render url -> Html
 -- | A function generating an 'Html' given a message translator and a URL rendering function.
 type HtmlUrlI18n msg url = Translate msg -> Render url -> Html

-docsToExp :: Env -> HamletRules -> Scope -> [Doc] -> Q Exp
-docsToExp env hr scope docs = do
-    exps <- mapM (docToExp env hr scope) docs
-    case exps of
-        [] -> [|return ()|]
-        [x] -> return x
-        _ -> return $ DoE $ map NoBindS exps
-
 unIdent :: Ident -> String
 unIdent (Ident s) = s

-bindingPattern :: Binding -> Q (Pat, [(Ident, Exp)])
-bindingPattern (BindAs i@(Ident s) b) = do
-    name <- newName s
-    (pattern, scope) <- bindingPattern b
-    return (AsP name pattern, (i, VarE name):scope)
-bindingPattern (BindVar i@(Ident s))
-    | all isDigit s = do
-        return (LitP $ IntegerL $ read s, [])
-    | otherwise = do
-        name <- newName s
-        return (VarP name, [(i, VarE name)])
-bindingPattern (BindTuple is) = do
-    (patterns, scopes) <- fmap unzip $ mapM bindingPattern is
-    return (TupP patterns, concat scopes)
-bindingPattern (BindList is) = do
-    (patterns, scopes) <- fmap unzip $ mapM bindingPattern is
-    return (ListP patterns, concat scopes)
-bindingPattern (BindConstr con is) = do
-    (patterns, scopes) <- fmap unzip $ mapM bindingPattern is
-    return (ConP (mkConName con) patterns, concat scopes)
-bindingPattern (BindRecord con fields wild) = do
-    let f (Ident field,b) =
-           do (p,s) <- bindingPattern b
-              return ((mkName field,p),s)
-    (patterns, scopes) <- fmap unzip $ mapM f fields
-    (patterns1, scopes1) <- if wild
-       then bindWildFields con $ map fst fields
-       else return ([],[])
-    return (RecP (mkConName con) (patterns++patterns1), concat scopes ++ scopes1)
-
 mkConName :: DataConstr -> Name
 mkConName = mkName . conToStr

@@ -158,6 +120,7 @@ conToStr :: DataConstr -> String
 conToStr (DCUnqualified (Ident x)) = x
 conToStr (DCQualified (Module xs) (Ident x)) = intercalate "." $ xs ++ [x]

+{-
 -- Wildcards bind all of the unbound fields to variables whose name
 -- matches the field name.
 --
@@ -296,10 +259,12 @@ hamlet = hamletWithSettings hamletRules defaultHamletSettings

 xhamlet :: QuasiQuoter
 xhamlet = hamletWithSettings hamletRules xhtmlHamletSettings
+-}

 asHtmlUrl :: HtmlUrl url -> HtmlUrl url
 asHtmlUrl = id

+{-
 hamletRules :: Q HamletRules
 hamletRules = do
     i <- [|id|]
@@ -360,6 +325,7 @@ hamletFromString :: Q HamletRules -> HamletSettings -> String -> Q Exp
 hamletFromString qhr set s = do
     hr <- qhr
     hrWithEnv hr $ \env -> docsToExp env hr [] $ docFromString set s
+-}

 docFromString :: HamletSettings -> String -> [Doc]
 docFromString set s =
@@ -367,6 +333,7 @@ docFromString set s =
         Error s' -> error s'
         Ok (_, d) -> d

+{-
 hamletFileWithSettings :: Q HamletRules -> HamletSettings -> FilePath -> Q Exp
 hamletFileWithSettings qhr set fp = do
 #ifdef GHC_7_4
@@ -408,6 +375,7 @@ strToExp s@(c:_)
     | isUpper c = ConE $ mkName s
     | otherwise = VarE $ mkName s
 strToExp "" = error "strToExp on empty string"
+-}

 -- | Checks for truth in the left value in each pair in the first argument. If
 -- a true exists, then the corresponding right action is performed. Only the
@@ -460,7 +428,7 @@ hamletUsedIdentifiers settings =
 data HamletRuntimeRules = HamletRuntimeRules {
                             hrrI18n :: Bool
                           }
-
+{-
 hamletFileReloadWithSettings :: HamletRuntimeRules
                              -> HamletSettings -> FilePath -> Q Exp
 hamletFileReloadWithSettings hrr settings fp = do
@@ -487,7 +455,7 @@ hamletFileReloadWithSettings hrr settings fp = do
             c VTUrlParam = [|EUrlParam|]
             c VTMixin = [|\r -> EMixin $ \c -> r c|]
             c VTMsg = [|EMsg|]
-
+-}
 -- move to Shakespeare.Base?
 readFileUtf8 :: FilePath -> IO String
 readFileUtf8 fp = fmap TL.unpack $ readUtf8File fp
diff --git a/Text/Hamlet/Parse.hs b/Text/Hamlet/Parse.hs
index b7e2954..1f14946 100644
--- a/Text/Hamlet/Parse.hs
+++ b/Text/Hamlet/Parse.hs
@@ -616,6 +616,7 @@ data NewlineStyle = NoNewlines -- ^ never add newlines
                   | DefaultNewlineStyle
     deriving Show

+{-
 instance Lift NewlineStyle where
     lift NoNewlines = [|NoNewlines|]
     lift NewlinesText = [|NewlinesText|]
@@ -627,7 +628,7 @@ instance Lift (String -> CloseStyle) where

 instance Lift HamletSettings where
     lift (HamletSettings a b c d) = [|HamletSettings $(lift a) $(lift b) $(lift c) $(lift d)|]
-
+-}

 htmlEmptyTags :: Set String
 htmlEmptyTags = Set.fromAscList
diff --git a/Text/Julius.hs b/Text/Julius.hs
index ec30690..5b5a075 100644
--- a/Text/Julius.hs
+++ b/Text/Julius.hs
@@ -14,17 +14,17 @@ module Text.Julius
       -- ** Template-Reading Functions
       -- | These QuasiQuoter and Template Haskell methods return values of
       -- type @'JavascriptUrl' url@. See the Yesod book for details.
-      js
-    , julius
-    , juliusFile
-    , jsFile
-    , juliusFileDebug
-    , jsFileDebug
-    , juliusFileReload
-    , jsFileReload
+    -- js
+    -- julius
+    -- juliusFile
+    -- jsFile
+    --, juliusFileDebug
+    --, jsFileDebug
+    --, juliusFileReload
+    --, jsFileReload

       -- * Datatypes
-    , JavascriptUrl
+      JavascriptUrl
     , Javascript (..)
     , RawJavascript (..)

@@ -37,9 +37,9 @@ module Text.Julius
     , renderJavascriptUrl

       -- ** internal, used by 'Text.Coffee'
-    , javascriptSettings
+    --, javascriptSettings
       -- ** internal
-    , juliusUsedIdentifiers
+    --, juliusUsedIdentifiers
     , asJavascriptUrl
     ) where

@@ -102,48 +102,3 @@ instance RawJS TL.Text where rawJS = RawJavascript . fromLazyText
 instance RawJS Builder where rawJS = RawJavascript
 instance RawJS Bool where rawJS = RawJavascript . unJavascript . toJavascript

-javascriptSettings :: Q ShakespeareSettings
-javascriptSettings = do
-  toJExp <- [|toJavascript|]
-  wrapExp <- [|Javascript|]
-  unWrapExp <- [|unJavascript|]
-  asJavascriptUrl' <- [|asJavascriptUrl|]
-  return $ defaultShakespeareSettings { toBuilder = toJExp
-  , wrap = wrapExp
-  , unwrap = unWrapExp
-  , modifyFinalValue = Just asJavascriptUrl'
-  }
-
-js, julius :: QuasiQuoter
-js = QuasiQuoter { quoteExp = \s -> do
-    rs <- javascriptSettings
-    quoteExp (shakespeare rs) s
-    }
-
-julius = js
-
-jsFile, juliusFile :: FilePath -> Q Exp
-jsFile fp = do
-    rs <- javascriptSettings
-    shakespeareFile rs fp
-
-juliusFile = jsFile
-
-
-jsFileReload, juliusFileReload :: FilePath -> Q Exp
-jsFileReload fp = do
-    rs <- javascriptSettings
-    shakespeareFileReload rs fp
-
-juliusFileReload = jsFileReload
-
-jsFileDebug, juliusFileDebug :: FilePath -> Q Exp
-juliusFileDebug = jsFileReload
-{-# DEPRECATED juliusFileDebug "Please use juliusFileReload instead." #-}
-jsFileDebug = jsFileReload
-{-# DEPRECATED jsFileDebug "Please use jsFileReload instead." #-}
-
--- | Determine which identifiers are used by the given template, useful for
--- creating systems like yesod devel.
-juliusUsedIdentifiers :: String -> [(Deref, VarType)]
-juliusUsedIdentifiers = shakespeareUsedIdentifiers defaultShakespeareSettings
diff --git a/Text/Lucius.hs b/Text/Lucius.hs
index 346883d..f38492b 100644
--- a/Text/Lucius.hs
+++ b/Text/Lucius.hs
@@ -8,13 +8,9 @@
 {-# OPTIONS_GHC -fno-warn-missing-fields #-}
 module Text.Lucius
     ( -- * Parsing
-      lucius
-    , luciusFile
-    , luciusFileDebug
-    , luciusFileReload
       -- ** Mixins
-    , luciusMixin
-    , Mixin
+    -- luciusMixin
+      Mixin
       -- ** Runtime
     , luciusRT
     , luciusRT'
@@ -40,11 +36,8 @@ module Text.Lucius
     , AbsoluteUnit (..)
     , AbsoluteSize (..)
     , absoluteSize
-    , EmSize (..)
-    , ExSize (..)
     , PercentageSize (..)
     , percentageSize
-    , PixelSize (..)
       -- * Internal
     , parseTopLevels
     , luciusUsedIdentifiers
@@ -67,18 +60,6 @@ import Data.List (isSuffixOf)
 import Control.Arrow (second)
 import Text.Shakespeare (VarType)

--- |
---
--- >>> renderCss ([lucius|foo{bar:baz}|] undefined)
--- "foo{bar:baz}"
-lucius :: QuasiQuoter
-lucius = QuasiQuoter { quoteExp = luciusFromString }
-
-luciusFromString :: String -> Q Exp
-luciusFromString s =
-    topLevelsToCassius
-  $ either (error . show) id $ parse parseTopLevels s s
-
 whiteSpace :: Parser ()
 whiteSpace = many whiteSpace1 >> return ()

@@ -218,17 +199,6 @@ parseComment = do
     _ <- manyTill anyChar $ try $ string "*/"
     return $ ContentRaw ""

-luciusFile :: FilePath -> Q Exp
-luciusFile fp = do
-#ifdef GHC_7_4
-    qAddDependentFile fp
-#endif
-    contents <- fmap TL.unpack $ qRunIO $ readUtf8File fp
-    luciusFromString contents
-
-luciusFileDebug, luciusFileReload :: FilePath -> Q Exp
-luciusFileDebug = cssFileDebug False [|parseTopLevels|] parseTopLevels
-luciusFileReload = luciusFileDebug

 parseTopLevels :: Parser [TopLevel Unresolved]
 parseTopLevels =
@@ -377,15 +347,3 @@ luciusRTMinified tl scope = either Left (Right . renderCss . CssNoWhitespace) $
 -- creating systems like yesod devel.
 luciusUsedIdentifiers :: String -> [(Deref, VarType)]
 luciusUsedIdentifiers = cssUsedIdentifiers False parseTopLevels
-
-luciusMixin :: QuasiQuoter
-luciusMixin = QuasiQuoter { quoteExp = luciusMixinFromString }
-
-luciusMixinFromString :: String -> Q Exp
-luciusMixinFromString s' = do
-    r <- newName "_render"
-    case fmap compressBlock $ parse parseBlock s s of
-        Left e -> error $ show e
-        Right block -> blockToMixin r [] block
-  where
-    s = concat ["mixin{", s', "}"]
diff --git a/Text/Roy.hs b/Text/Roy.hs
index 6e5e246..9ab0dbc 100644
--- a/Text/Roy.hs
+++ b/Text/Roy.hs
@@ -39,12 +39,12 @@ module Text.Roy
       -- ** Template-Reading Functions
       -- | These QuasiQuoter and Template Haskell methods return values of
       -- type @'JavascriptUrl' url@. See the Yesod book for details.
-      roy
-    , royFile
-    , royFileReload
+    --  roy
+    --, royFile
+    --, royFileReload

 #ifdef TEST_EXPORT
-    , roySettings
+    --, roySettings
 #endif
     ) where

@@ -53,46 +53,3 @@ import Language.Haskell.TH.Syntax
 import Text.Shakespeare
 import Text.Julius

--- | The Roy language compiles down to Javascript.
--- We do this compilation once at compile time to avoid needing to do it during the request.
--- We call this a preConversion because other shakespeare modules like Lucius use Haskell to compile during the request instead rather than a system call.
-roySettings :: Q ShakespeareSettings
-roySettings = do
-  jsettings <- javascriptSettings
-  return $ jsettings { varChar = '#'
-  , preConversion = Just PreConvert {
-      preConvert = ReadProcess "roy" ["--stdio", "--browser"]
-    , preEscapeIgnoreBalanced = "'\""
-    , preEscapeIgnoreLine = "//"
-    , wrapInsertion = Just WrapInsertion {
-        wrapInsertionIndent = Just "  "
-      , wrapInsertionStartBegin = "(\\"
-      , wrapInsertionSeparator = " "
-      , wrapInsertionStartClose = " ->\n"
-      , wrapInsertionEnd = ")"
-      , wrapInsertionAddParens = True
-      }
-    }
-  }
-
--- | Read inline, quasiquoted Roy.
-roy :: QuasiQuoter
-roy = QuasiQuoter { quoteExp = \s -> do
-    rs <- roySettings
-    quoteExp (shakespeare rs) s
-    }
-
--- | Read in a Roy template file. This function reads the file once, at
--- compile time.
-royFile :: FilePath -> Q Exp
-royFile fp = do
-    rs <- roySettings
-    shakespeareFile rs fp
-
--- | Read in a Roy template file. This impure function uses
--- unsafePerformIO to re-read the file on every call, allowing for rapid
--- iteration.
-royFileReload :: FilePath -> Q Exp
-royFileReload fp = do
-    rs <- roySettings
-    shakespeareFileReload rs fp
diff --git a/Text/Shakespeare.hs b/Text/Shakespeare.hs
index 67d7dde..a510215 100644
--- a/Text/Shakespeare.hs
+++ b/Text/Shakespeare.hs
@@ -15,12 +15,12 @@ module Text.Shakespeare
     , WrapInsertion (..)
     , PreConversion (..)
     , defaultShakespeareSettings
-    , shakespeare
-    , shakespeareFile
-    , shakespeareFileReload
+    -- , shakespeare
+    -- , shakespeareFile
+    -- , shakespeareFileReload
     -- * low-level
-    , shakespeareFromString
-    , shakespeareUsedIdentifiers
+    -- , shakespeareFromString
+    -- , shakespeareUsedIdentifiers
     , RenderUrl
     , VarType (..)
     , Deref
@@ -153,38 +153,6 @@ defaultShakespeareSettings = ShakespeareSettings {
   , modifyFinalValue = Nothing
 }

-instance Lift PreConvert where
-    lift (PreConvert convert ignore comment wrapInsertion) =
-        [|PreConvert $(lift convert) $(lift ignore) $(lift comment) $(lift wrapInsertion)|]
-
-instance Lift WrapInsertion where
-    lift (WrapInsertion indent sb sep sc e wp) =
-        [|WrapInsertion $(lift indent) $(lift sb) $(lift sep) $(lift sc) $(lift e) $(lift wp)|]
-
-instance Lift PreConversion where
-    lift (ReadProcess command args) =
-        [|ReadProcess $(lift command) $(lift args)|]
-    lift Id = [|Id|]
-
-instance Lift ShakespeareSettings where
-    lift (ShakespeareSettings x1 x2 x3 x4 x5 x6 x7 x8 x9) =
-        [|ShakespeareSettings
-            $(lift x1) $(lift x2) $(lift x3)
-            $(liftExp x4) $(liftExp x5) $(liftExp x6) $(lift x7) $(lift x8) $(liftMExp x9)|]
-      where
-        liftExp (VarE n) = [|VarE $(liftName n)|]
-        liftExp (ConE n) = [|ConE $(liftName n)|]
-        liftExp _ = error "liftExp only supports VarE and ConE"
-        liftMExp Nothing = [|Nothing|]
-        liftMExp (Just e) = [|Just|] `appE` liftExp e
-        liftName (Name (OccName a) b) = [|Name (OccName $(lift a)) $(liftFlavour b)|]
-        liftFlavour NameS = [|NameS|]
-        liftFlavour (NameQ (ModName a)) = [|NameQ (ModName $(lift a))|]
-        liftFlavour (NameU _) = error "liftFlavour NameU" -- [|NameU $(lift $ fromIntegral a)|]
-        liftFlavour (NameL _) = error "liftFlavour NameL" -- [|NameU $(lift $ fromIntegral a)|]
-        liftFlavour (NameG ns (PkgName p) (ModName m)) = [|NameG $(liftNS ns) (PkgName $(lift p)) (ModName $(lift m))|]
-        liftNS VarName = [|VarName|]
-        liftNS DataName = [|DataName|]

 type QueryParameters = [(TS.Text, TS.Text)]
 type RenderUrl url = (url -> QueryParameters -> TS.Text)
@@ -348,6 +316,7 @@ pack' = TS.pack
 {-# NOINLINE pack' #-}
 #endif

+{-
 contentsToShakespeare :: ShakespeareSettings -> [Content] -> Q Exp
 contentsToShakespeare rs a = do
     r <- newName "_render"
@@ -399,16 +368,19 @@ shakespeareFile r fp =
     qAddDependentFile fp >>
 #endif
         readFileQ fp >>= shakespeareFromString r
+-}

 data VarType = VTPlain | VTUrl | VTUrlParam | VTMixin
     deriving (Show, Eq, Ord, Enum, Bounded, Typeable, Data, Generic)

+{-
 getVars :: Content -> [(Deref, VarType)]
 getVars ContentRaw{} = []
 getVars (ContentVar d) = [(d, VTPlain)]
 getVars (ContentUrl d) = [(d, VTUrl)]
 getVars (ContentUrlParam d) = [(d, VTUrlParam)]
 getVars (ContentMix d) = [(d, VTMixin)]
+-}

 data VarExp url = EPlain Builder
                 | EUrl url
@@ -417,8 +389,10 @@ data VarExp url = EPlain Builder

 -- | Determine which identifiers are used by the given template, useful for
 -- creating systems like yesod devel.
+{-
 shakespeareUsedIdentifiers :: ShakespeareSettings -> String -> [(Deref, VarType)]
 shakespeareUsedIdentifiers settings = concatMap getVars . contentFromString settings
+-}

 type MTime = UTCTime

@@ -435,28 +409,6 @@ insertReloadMap :: FilePath -> (MTime, [Content]) -> IO [Content]
 insertReloadMap fp (mt, content) = atomicModifyIORef reloadMapRef
   (\reloadMap -> (M.insert fp (mt, content) reloadMap, content))

-shakespeareFileReload :: ShakespeareSettings -> FilePath -> Q Exp
-shakespeareFileReload settings fp = do
-    str <- readFileQ fp
-    s <- qRunIO $ preFilter (Just fp) settings str
-    let b = shakespeareUsedIdentifiers settings s
-    c <- mapM vtToExp b
-    rt <- [|shakespeareRuntime settings fp|]
-    wrap' <- [|\x -> $(return $ wrap settings) . x|]
-    return $ wrap' `AppE` (rt `AppE` ListE c)
-  where
-    vtToExp :: (Deref, VarType) -> Q Exp
-    vtToExp (d, vt) = do
-        d' <- lift d
-        c' <- c vt
-        return $ TupE [d', c' `AppE` derefToExp [] d]
-      where
-        c :: VarType -> Q Exp
-        c VTPlain = [|EPlain . $(return $
-          InfixE (Just $ unwrap settings) (VarE '(.)) (Just $ toBuilder settings))|]
-        c VTUrl = [|EUrl|]
-        c VTUrlParam = [|EUrlParam|]
-        c VTMixin = [|\x -> EMixin $ \r -> $(return $ unwrap settings) $ x r|]

diff --git a/Text/Shakespeare/Base.hs b/Text/Shakespeare/Base.hs
index a0e983c..23b4692 100644
--- a/Text/Shakespeare/Base.hs
+++ b/Text/Shakespeare/Base.hs
@@ -52,34 +52,6 @@ data Deref = DerefModulesIdent [String] Ident
            | DerefTuple [Deref]
     deriving (Show, Eq, Read, Data, Typeable, Ord)

-instance Lift Ident where
-    lift (Ident s) = [|Ident|] `appE` lift s
-instance Lift Deref where
-    lift (DerefModulesIdent v s) = do
-        dl <- [|DerefModulesIdent|]
-        v' <- lift v
-        s' <- lift s
-        return $ dl `AppE` v' `AppE` s'
-    lift (DerefIdent s) = do
-        dl <- [|DerefIdent|]
-        s' <- lift s
-        return $ dl `AppE` s'
-    lift (DerefBranch x y) = do
-        x' <- lift x
-        y' <- lift y
-        db <- [|DerefBranch|]
-        return $ db `AppE` x' `AppE` y'
-    lift (DerefIntegral i) = [|DerefIntegral|] `appE` lift i
-    lift (DerefRational r) = do
-        n <- lift $ numerator r
-        d <- lift $ denominator r
-        per <- [|(%) :: Int -> Int -> Ratio Int|]
-        dr <- [|DerefRational|]
-        return $ dr `AppE` InfixE (Just n) per (Just d)
-    lift (DerefString s) = [|DerefString|] `appE` lift s
-    lift (DerefList x) = [|DerefList $(lift x)|]
-    lift (DerefTuple x) = [|DerefTuple $(lift x)|]
-
 derefParens, derefCurlyBrackets :: UserParser a Deref
 derefParens        = between (char '(') (char ')') parseDeref
 derefCurlyBrackets = between (char '{') (char '}') parseDeref
diff --git a/Text/Shakespeare/I18N.hs b/Text/Shakespeare/I18N.hs
index a39a614..753cba7 100644
--- a/Text/Shakespeare/I18N.hs
+++ b/Text/Shakespeare/I18N.hs
@@ -52,10 +52,10 @@
 --
 -- You can also adapt those instructions for use with other systems.
 module Text.Shakespeare.I18N
-    ( mkMessage
-    , mkMessageFor
-    , mkMessageVariant
-    , RenderMessage (..)
+    --( mkMessage
+    --, mkMessageFor
+    ---, mkMessageVariant
+    ( RenderMessage (..)
     , ToMessage (..)
     , SomeMessage (..)
     , Lang
@@ -106,143 +106,6 @@ instance RenderMessage master Text where
 -- | an RFC1766 / ISO 639-1 language code (eg, @fr@, @en-GB@, etc).
 type Lang = Text

--- |generate translations from translation files
---
--- This function will:
---
---  1. look in the supplied subdirectory for files ending in @.msg@
---
---  2. generate a type based on the constructors found
---
---  3. create a 'RenderMessage' instance
---
-mkMessage :: String   -- ^ base name to use for translation type
-          -> FilePath -- ^ subdirectory which contains the translation files
-          -> Lang     -- ^ default translation language
-          -> Q [Dec]
-mkMessage dt folder lang =
-    mkMessageCommon True "Msg" "Message" dt dt folder lang
-
-
--- | create 'RenderMessage' instance for an existing data-type
-mkMessageFor :: String     -- ^ master translation data type
-             -> String     -- ^ existing type to add translations for
-             -> FilePath   -- ^ path to translation folder
-             -> Lang       -- ^ default language
-             -> Q [Dec]
-mkMessageFor master dt folder lang = mkMessageCommon False "" "" master dt folder lang
-
--- | create an additional set of translations for a type created by `mkMessage`
-mkMessageVariant :: String     -- ^ master translation data type
-                 -> String     -- ^ existing type to add translations for
-                 -> FilePath   -- ^ path to translation folder
-                 -> Lang       -- ^ default language
-                 -> Q [Dec]
-mkMessageVariant master dt folder lang = mkMessageCommon False "Msg" "Message" master dt folder lang
-
--- |used by 'mkMessage' and 'mkMessageFor' to generate a 'RenderMessage' and possibly a message data type
-mkMessageCommon :: Bool      -- ^ generate a new datatype from the constructors found in the .msg files
-                -> String    -- ^ string to append to constructor names
-                -> String    -- ^ string to append to datatype name
-                -> String    -- ^ base name of master datatype
-                -> String    -- ^ base name of translation datatype
-                -> FilePath  -- ^ path to translation folder
-                -> Lang      -- ^ default lang
-                -> Q [Dec]
-mkMessageCommon genType prefix postfix master dt folder lang = do
-    files <- qRunIO $ getDirectoryContents folder
-    (_files', contents) <- qRunIO $ fmap (unzip . catMaybes) $ mapM (loadLang folder) files
-#ifdef GHC_7_4
-    mapM_ qAddDependentFile _files'
-#endif
-    sdef <-
-        case lookup lang contents of
-            Nothing -> error $ "Did not find main language file: " ++ unpack lang
-            Just def -> toSDefs def
-    mapM_ (checkDef sdef) $ map snd contents
-    let mname = mkName $ dt ++ postfix
-    c1 <- fmap concat $ mapM (toClauses prefix dt) contents
-    c2 <- mapM (sToClause prefix dt) sdef
-    c3 <- defClause
-    return $
-     ( if genType
-       then ((DataD [] mname [] (map (toCon dt) sdef) []) :)
-       else id)
-        [ InstanceD
-            []
-            (ConT ''RenderMessage `AppT` (ConT $ mkName master) `AppT` ConT mname)
-            [ FunD (mkName "renderMessage") $ c1 ++ c2 ++ [c3]
-            ]
-        ]
-
-toClauses :: String -> String -> (Lang, [Def]) -> Q [Clause]
-toClauses prefix dt (lang, defs) =
-    mapM go defs
-  where
-    go def = do
-        a <- newName "lang"
-        (pat, bod) <- mkBody dt (prefix ++ constr def) (map fst $ vars def) (content def)
-        guard <- fmap NormalG [|$(return $ VarE a) == pack $(lift $ unpack lang)|]
-        return $ Clause
-            [WildP, ConP (mkName ":") [VarP a, WildP], pat]
-            (GuardedB [(guard, bod)])
-            []
-
-mkBody :: String -- ^ datatype
-       -> String -- ^ constructor
-       -> [String] -- ^ variable names
-       -> [Content]
-       -> Q (Pat, Exp)
-mkBody dt cs vs ct = do
-    vp <- mapM go vs
-    let pat = RecP (mkName cs) (map (varName dt *** VarP) vp)
-    let ct' = map (fixVars vp) ct
-    pack' <- [|Data.Text.pack|]
-    tomsg <- [|toMessage|]
-    let ct'' = map (toH pack' tomsg) ct'
-    mapp <- [|mappend|]
-    let app a b = InfixE (Just a) mapp (Just b)
-    e <-
-        case ct'' of
-            [] -> [|mempty|]
-            [x] -> return x
-            (x:xs) -> return $ foldl' app x xs
-    return (pat, e)
-  where
-    toH pack' _ (Raw s) = pack' `AppE` SigE (LitE (StringL s)) (ConT ''String)
-    toH _ tomsg (Var d) = tomsg `AppE` derefToExp [] d
-    go x = do
-        let y = mkName $ '_' : x
-        return (x, y)
-    fixVars vp (Var d) = Var $ fixDeref vp d
-    fixVars _ (Raw s) = Raw s
-    fixDeref vp (DerefIdent (Ident i)) = DerefIdent $ Ident $ fixIdent vp i
-    fixDeref vp (DerefBranch a b) = DerefBranch (fixDeref vp a) (fixDeref vp b)
-    fixDeref _ d = d
-    fixIdent vp i =
-        case lookup i vp of
-            Nothing -> i
-            Just y -> nameBase y
-
-sToClause :: String -> String -> SDef -> Q Clause
-sToClause prefix dt sdef = do
-    (pat, bod) <- mkBody dt (prefix ++ sconstr sdef) (map fst $ svars sdef) (scontent sdef)
-    return $ Clause
-        [WildP, ConP (mkName "[]") [], pat]
-        (NormalB bod)
-        []
-
-defClause :: Q Clause
-defClause = do
-    a <- newName "sub"
-    c <- newName "langs"
-    d <- newName "msg"
-    rm <- [|renderMessage|]
-    return $ Clause
-        [VarP a, ConP (mkName ":") [WildP, VarP c], VarP d]
-        (NormalB $ rm `AppE` VarE a `AppE` VarE c `AppE` VarE d)
-        []
-
 toCon :: String -> SDef -> Con
 toCon dt (SDef c vs _) =
     RecC (mkName $ "Msg" ++ c) $ map go vs
@@ -258,39 +121,6 @@ varName a y =
     upper (x:xs) = toUpper x : xs
     upper [] = []

-checkDef :: [SDef] -> [Def] -> Q ()
-checkDef x y =
-    go (sortBy (comparing sconstr) x) (sortBy (comparing constr) y)
-  where
-    go _ [] = return ()
-    go [] (b:_) = error $ "Extra message constructor: " ++ constr b
-    go (a:as) (b:bs)
-        | sconstr a < constr b = go as (b:bs)
-        | sconstr a > constr b = error $ "Extra message constructor: " ++ constr b
-        | otherwise = do
-            go' (svars a) (vars b)
-            go as bs
-    go' ((an, at):as) ((bn, mbt):bs)
-        | an /= bn = error "Mismatched variable names"
-        | otherwise =
-            case mbt of
-                Nothing -> go' as bs
-                Just bt
-                    | at == bt -> go' as bs
-                    | otherwise -> error "Mismatched variable types"
-    go' [] [] = return ()
-    go' _ _ = error "Mistmached variable count"
-
-toSDefs :: [Def] -> Q [SDef]
-toSDefs = mapM toSDef
-
-toSDef :: Def -> Q SDef
-toSDef d = do
-    vars' <- mapM go $ vars d
-    return $ SDef (constr d) vars' (content d)
-  where
-    go (a, Just b) = return (a, b)
-    go (a, Nothing) = error $ "Main language missing type for " ++ show (constr d, a)

 data SDef = SDef
     { sconstr :: String
diff --git a/Text/Shakespeare/Text.hs b/Text/Shakespeare/Text.hs
index 6865a5a..e25a8be 100644
--- a/Text/Shakespeare/Text.hs
+++ b/Text/Shakespeare/Text.hs
@@ -7,18 +7,18 @@ module Text.Shakespeare.Text
     ( TextUrl
     , ToText (..)
     , renderTextUrl
-    , stext
-    , text
-    , textFile
-    , textFileDebug
-    , textFileReload
-    , st -- | strict text
-    , lt -- | lazy text, same as stext :)
+    --, stext
+    --, text
+    --, textFile
+    --, textFileDebug
+    --, textFileReload
+    --, st -- | strict text
+    --, lt -- | lazy text, same as stext :)
     -- * Yesod code generation
-    , codegen
-    , codegenSt
-    , codegenFile
-    , codegenFileReload
+    --, codegen
+    --, codegenSt
+    --, codegenFile
+    --, codegenFileReload
     ) where

 import Language.Haskell.TH.Quote (QuasiQuoter (..))
@@ -45,106 +45,3 @@ instance ToText Int32 where toText = toText . show
 instance ToText Int64 where toText = toText . show
 instance ToText Int   where toText = toText . show

-settings :: Q ShakespeareSettings
-settings = do
-  toTExp <- [|toText|]
-  wrapExp <- [|id|]
-  unWrapExp <- [|id|]
-  return $ defaultShakespeareSettings { toBuilder = toTExp
-  , wrap = wrapExp
-  , unwrap = unWrapExp
-  }
-
-
-stext, lt, st, text :: QuasiQuoter
-stext =
-  QuasiQuoter { quoteExp = \s -> do
-    rs <- settings
-    render <- [|toLazyText|]
-    rendered <- shakespeareFromString rs { justVarInterpolation = True } s
-    return (render `AppE` rendered)
-    }
-lt = stext
-
-st =
-  QuasiQuoter { quoteExp = \s -> do
-    rs <- settings
-    render <- [|TL.toStrict . toLazyText|]
-    rendered <- shakespeareFromString rs { justVarInterpolation = True } s
-    return (render `AppE` rendered)
-    }
-
-text = QuasiQuoter { quoteExp = \s -> do
-    rs <- settings
-    quoteExp (shakespeare rs) $ filter (/='\r') s
-    }
-
-
-textFile :: FilePath -> Q Exp
-textFile fp = do
-    rs <- settings
-    shakespeareFile rs fp
-
-
-textFileDebug :: FilePath -> Q Exp
-textFileDebug = textFileReload
-{-# DEPRECATED textFileDebug "Please use textFileReload instead" #-}
-
-textFileReload :: FilePath -> Q Exp
-textFileReload fp = do
-    rs <- settings
-    shakespeareFileReload rs fp
-
--- | codegen is designed for generating Yesod code, including templates
--- So it uses different interpolation characters that won't clash with templates.
-codegenSettings :: Q ShakespeareSettings
-codegenSettings = do
-  toTExp <- [|toText|]
-  wrapExp <- [|id|]
-  unWrapExp <- [|id|]
-  return $ defaultShakespeareSettings { toBuilder = toTExp
-  , wrap = wrapExp
-  , unwrap = unWrapExp
-  , varChar = '~'
-  , urlChar = '*'
-  , intChar = '&'
-  , justVarInterpolation = True -- always!
-  }
-
--- | codegen is designed for generating Yesod code, including templates
--- So it uses different interpolation characters that won't clash with templates.
--- You can use the normal text quasiquoters to generate code
-codegen :: QuasiQuoter
-codegen =
-  QuasiQuoter { quoteExp = \s -> do
-    rs <- codegenSettings
-    render <- [|toLazyText|]
-    rendered <- shakespeareFromString rs { justVarInterpolation = True } s
-    return (render `AppE` rendered)
-    }
-
--- | Generates strict Text
--- codegen is designed for generating Yesod code, including templates
--- So it uses different interpolation characters that won't clash with templates.
-codegenSt :: QuasiQuoter
-codegenSt =
-  QuasiQuoter { quoteExp = \s -> do
-    rs <- codegenSettings
-    render <- [|TL.toStrict . toLazyText|]
-    rendered <- shakespeareFromString rs { justVarInterpolation = True } s
-    return (render `AppE` rendered)
-    }
-
-codegenFileReload :: FilePath -> Q Exp
-codegenFileReload fp = do
-    rs <- codegenSettings
-    render <- [|TL.toStrict . toLazyText|]
-    rendered <- shakespeareFileReload rs{ justVarInterpolation = True } fp
-    return (render `AppE` rendered)
-
-codegenFile :: FilePath -> Q Exp
-codegenFile fp = do
-    rs <- codegenSettings
-    render <- [|TL.toStrict . toLazyText|]
-    rendered <- shakespeareFile rs{ justVarInterpolation = True } fp
-    return (render `AppE` rendered)
diff --git a/shakespeare.cabal b/shakespeare.cabal
index 05b985e..dd8762a 100644
--- a/shakespeare.cabal
+++ b/shakespeare.cabal
@@ -61,10 +61,9 @@ library
                      Text.Lucius
                      Text.Cassius
                      Text.Shakespeare.Base
+                     Text.Css
                      Text.Shakespeare
-                     Text.TypeScript
     other-modules:   Text.Hamlet.Parse
-                     Text.Css
                      Text.MkSizeType
                      Text.IndentToBrace
                      Text.CssCommon
--
1.7.10.4


code:
From 3a04b41ffce4e4e87b0fedd3a1e3434a3f06cc76 Mon Sep 17 00:00:00 2001
From: foo <foo@bar>
Date: Sun, 22 Sep 2013 00:18:12 +0000
Subject: [PATCH] hardcode little endian

This is the same as building with a cabal flag.

---
 c_impl/optimized/skein_port.h |    1 +
 1 file changed, 1 insertion(+)

diff --git a/c_impl/optimized/skein_port.h b/c_impl/optimized/skein_port.h
index a2d0fc2..6929bb0 100644
--- a/c_impl/optimized/skein_port.h
+++ b/c_impl/optimized/skein_port.h
@@ -45,6 +45,7 @@ typedef uint64_t        u64b_t;             /* 64-bit unsigned integer */
  * platform-specific code instead (e.g., for big-endian CPUs).
  *
  */
+#define SKEIN_NEED_SWAP  (0)
 #ifndef SKEIN_NEED_SWAP /* compile-time "override" for endianness? */

 #include "brg_endian.h"                     /* get endianness selection */
--
1.7.10.4


code:
From b0a79f4f98188ba5d43b7e3912b36d34d099ab65 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Fri, 18 Oct 2013 23:20:35 +0000
Subject: [PATCH] cross build

---
 Data/Vector/Fusion/Stream/Monadic.hs |    1 -
 1 file changed, 1 deletion(-)

diff --git a/Data/Vector/Fusion/Stream/Monadic.hs b/Data/Vector/Fusion/Stream/Monadic.hs
index 51fec75..b089b3d 100644
--- a/Data/Vector/Fusion/Stream/Monadic.hs
+++ b/Data/Vector/Fusion/Stream/Monadic.hs
@@ -101,7 +101,6 @@ import GHC.Exts ( SpecConstrAnnotation(..) )

 data SPEC = SPEC | SPEC2
 #if __GLASGOW_HASKELL__ >= 700
-{-# ANN type SPEC ForceSpecConstr #-}
 #endif

 emptyStream :: String
--
1.7.10.4


code:
From 3aef808eee43c973ae1fbf6e8769d89b7f0d355b Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Tue, 10 Jun 2014 14:47:42 +0000
Subject: [PATCH] deal with TH

Export modules referenced by it.

Should not need these icons in git-annex, so not worth using the Evil
Splicer.
---
 Network/Wai/Application/Static.hs | 4 ----
 WaiAppStatic/Storage/Embedded.hs  | 8 ++++----
 wai-app-static.cabal              | 4 +---
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/Network/Wai/Application/Static.hs b/Network/Wai/Application/Static.hs
index db2b835..b2c1aec 100644
--- a/Network/Wai/Application/Static.hs
+++ b/Network/Wai/Application/Static.hs
@@ -33,8 +33,6 @@ import Control.Monad.IO.Class (liftIO)

 import Blaze.ByteString.Builder (toByteString)

-import Data.FileEmbed (embedFile)
-
 import Data.Text (Text)
 import qualified Data.Text as T

@@ -198,8 +196,6 @@ staticAppPieces _ _ req sendResponse
         H.status405
         [("Content-Type", "text/plain")]
         "Only GET is supported"
-staticAppPieces _ [".hidden", "folder.png"] _ sendResponse = sendResponse $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/folder.png")]
-staticAppPieces _ [".hidden", "haskell.png"] _ sendResponse = sendResponse $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/haskell.png")]
 staticAppPieces ss rawPieces req sendResponse = liftIO $ do
     case toPieces rawPieces of
         Just pieces -> checkPieces ss pieces req >>= response
diff --git a/WaiAppStatic/Storage/Embedded.hs b/WaiAppStatic/Storage/Embedded.hs
index daa6e50..9873d4e 100644
--- a/WaiAppStatic/Storage/Embedded.hs
+++ b/WaiAppStatic/Storage/Embedded.hs
@@ -3,10 +3,10 @@ module WaiAppStatic.Storage.Embedded(
       embeddedSettings

     -- * Template Haskell
-    , Etag
-    , EmbeddableEntry(..)
-    , mkSettings
+    --, Etag
+    --, EmbeddableEntry(..)
+    --, mkSettings
     ) where

 import WaiAppStatic.Storage.Embedded.Runtime
-import WaiAppStatic.Storage.Embedded.TH
+--import WaiAppStatic.Storage.Embedded.TH
diff --git a/wai-app-static.cabal b/wai-app-static.cabal
index ef6f898..9a59d71 100644
--- a/wai-app-static.cabal
+++ b/wai-app-static.cabal
@@ -33,7 +33,6 @@ library
                    , containers                >= 0.2
                    , time                      >= 1.1.4
                    , old-locale                >= 1.0.0.2
-                   , file-embed                >= 0.0.3.1
                    , text                      >= 0.7
                    , blaze-builder             >= 0.2.1.4
                    , base64-bytestring         >= 0.1
@@ -61,9 +60,8 @@ library
                      WaiAppStatic.Listing
                      WaiAppStatic.Types
                      WaiAppStatic.CmdLine
-    other-modules:   Util
                      WaiAppStatic.Storage.Embedded.Runtime
-                     WaiAppStatic.Storage.Embedded.TH
+    other-modules:   Util
     ghc-options:     -Wall
     extensions:     CPP

--
2.0.0


code:
From b53713fbb4f3bb6bdd25b07afcaed4940b32dfa8 Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kitenet.net>
Date: Wed, 18 Dec 2013 03:32:44 +0000
Subject: [PATCH] remove TH

---
 Text/Hamlet/XML.hs | 81 +-----------------------------------------------------
 1 file changed, 1 insertion(+), 80 deletions(-)

diff --git a/Text/Hamlet/XML.hs b/Text/Hamlet/XML.hs
index f587410..4e830bd 100644
--- a/Text/Hamlet/XML.hs
+++ b/Text/Hamlet/XML.hs
@@ -1,9 +1,7 @@
 {-# LANGUAGE TemplateHaskell #-}
 {-# OPTIONS_GHC -fno-warn-missing-fields #-}
 module Text.Hamlet.XML
-    ( xml
-    , xmlFile
-    ) where
+    () where

 import Language.Haskell.TH.Syntax
 import Language.Haskell.TH.Quote
@@ -19,80 +17,3 @@ import qualified Data.Foldable as F
 import Data.Maybe (fromMaybe)
 import qualified Data.Map as Map

-xml :: QuasiQuoter
-xml = QuasiQuoter { quoteExp = strToExp }
-
-xmlFile :: FilePath -> Q Exp
-xmlFile = strToExp . TL.unpack <=< qRunIO . readUtf8File
-
-strToExp :: String -> Q Exp
-strToExp s =
-    case parseDoc s of
-        Error e -> error e
-        Ok x -> docsToExp [] x
-
-docsToExp :: Scope -> [Doc] -> Q Exp
-docsToExp scope docs = [| concat $(fmap ListE $ mapM (docToExp scope) docs) |]
-
-docToExp :: Scope -> Doc -> Q Exp
-docToExp scope (DocTag name attrs cs) =
-    [| [ X.NodeElement (X.Element ($(liftName name)) $(mkAttrs scope attrs) $(docsToExp scope cs))
-       ] |]
-docToExp _ (DocContent (ContentRaw s)) = [| [ X.NodeContent (pack $(lift s)) ] |]
-docToExp scope (DocContent (ContentVar d)) = [| [ X.NodeContent $(return $ derefToExp scope d) ] |]
-docToExp scope (DocContent (ContentEmbed d)) = return $ derefToExp scope d
-docToExp scope (DocForall deref ident@(Ident ident') inside) = do
-    let list' = derefToExp scope deref
-    name <- newName ident'
-    let scope' = (ident, VarE name) : scope
-    inside' <- docsToExp scope' inside
-    let lam = LamE [VarP name] inside'
-    [| F.concatMap $(return lam) $(return list') |]
-docToExp scope (DocWith [] inside) = docsToExp scope inside
-docToExp scope (DocWith ((deref, ident@(Ident name)):dis) inside) = do
-    let deref' = derefToExp scope deref
-    name' <- newName name
-    let scope' = (ident, VarE name') : scope
-    inside' <- docToExp scope' (DocWith dis inside)
-    let lam = LamE [VarP name'] inside'
-    return $ lam `AppE` deref'
-docToExp scope (DocMaybe deref ident@(Ident name) just nothing) = do
-    let deref' = derefToExp scope deref
-    name' <- newName name
-    let scope' = (ident, VarE name') : scope
-    inside' <- docsToExp scope' just
-    let inside'' = LamE [VarP name'] inside'
-    nothing' <-
-        case nothing of
-            Nothing -> [| [] |]
-            Just n -> docsToExp scope n
-    [| maybe $(return nothing') $(return inside'') $(return deref') |]
-docToExp scope (DocCond conds final) = do
-    unit <- [| () |]
-    body <- fmap GuardedB $ mapM go $ conds ++ [(DerefIdent $ Ident "otherwise", fromMaybe [] final)]
-    return $ CaseE unit [Match (TupP []) body []]
-  where
-    go (deref, inside) = do
-        inside' <- docsToExp scope inside
-        return (NormalG $ derefToExp scope deref, inside')
-
-mkAttrs :: Scope -> [(Maybe Deref, String, [Content])] -> Q Exp
-mkAttrs _ [] = [| Map.empty |]
-mkAttrs scope ((mderef, name, value):rest) = do
-    rest' <- mkAttrs scope rest
-    this <- [| Map.insert $(liftName name) (T.concat $(fmap ListE $ mapM go value)) |]
-    let with = [| $(return this) $(return rest') |]
-    case mderef of
-        Nothing -> with
-        Just deref -> [| if $(return $ derefToExp scope deref) then $(with) else $(return rest') |]
-  where
-    go (ContentRaw s) = [| pack $(lift s) |]
-    go (ContentVar d) = return $ derefToExp scope d
-    go ContentEmbed{} = error "Cannot use embed interpolation in attribute value"
-
-liftName :: String -> Q Exp
-liftName s = do
-    X.Name local mns _ <- return $ fromString s
-    case mns of
-        Nothing -> [| X.Name (pack $(lift $ unpack local)) Nothing Nothing |]
-        Just ns -> [| X.Name (pack $(lift $ unpack local)) (Just $ pack $(lift $ unpack ns)) Nothing |]
--
1.8.5.1


code:
From 583575461dc58b76c6c7e14d429f73182d49ef81 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Tue, 10 Jun 2014 20:29:51 +0000
Subject: [PATCH] don't really build

---
 yesod-auth.cabal | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/yesod-auth.cabal b/yesod-auth.cabal
index 906c08b..b4bc841 100644
--- a/yesod-auth.cabal
+++ b/yesod-auth.cabal
@@ -65,17 +65,6 @@ library
                    , conduit-extra
                    , attoparsec-conduit

-    exposed-modules: Yesod.Auth
-                     Yesod.Auth.BrowserId
-                     Yesod.Auth.Dummy
-                     Yesod.Auth.Email
-                     Yesod.Auth.OpenId
-                     Yesod.Auth.Rpxnow
-                     Yesod.Auth.Message
-                     Yesod.Auth.GoogleEmail
-                     Yesod.Auth.GoogleEmail2
-    other-modules:   Yesod.Auth.Routes
-                     Yesod.PasswordStore
     ghc-options:     -Wall

 source-repository head
--
2.0.0


code:
From 9feb37d13dc8449dc4445db83485780caee4b7ff Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Tue, 10 Jun 2014 17:44:52 +0000
Subject: [PATCH] expand and remove TH

---
 Yesod/Core.hs              |  30 +++---
 Yesod/Core/Class/Yesod.hs  | 257 ++++++++++++++++++++++++++++++---------------
 Yesod/Core/Dispatch.hs     |  38 ++-----
 Yesod/Core/Handler.hs      |  25 ++---
 Yesod/Core/Internal/Run.hs |   8 +-
 Yesod/Core/Internal/TH.hs  | 111 --------------------
 Yesod/Core/Types.hs        |   3 +-
 Yesod/Core/Widget.hs       |  32 +-----
 8 files changed, 215 insertions(+), 289 deletions(-)

diff --git a/Yesod/Core.hs b/Yesod/Core.hs
index 9b29317..7c0792d 100644
--- a/Yesod/Core.hs
+++ b/Yesod/Core.hs
@@ -31,16 +31,16 @@ module Yesod.Core
     , unauthorizedI
       -- * Logging
     , LogLevel (..)
-    , logDebug
-    , logInfo
-    , logWarn
-    , logError
-    , logOther
-    , logDebugS
-    , logInfoS
-    , logWarnS
-    , logErrorS
-    , logOtherS
+    --, logDebug
+    --, logInfo
+    --, logWarn
+    --, logError
+    --, logOther
+    --, logDebugS
+    --, logInfoS
+    --, logWarnS
+    --, logErrorS
+    --, logOtherS
       -- * Sessions
     , SessionBackend (..)
     , customizeSessionCookies
@@ -87,17 +87,15 @@ module Yesod.Core
     , readIntegral
       -- * Shakespeare
       -- ** Hamlet
-    , hamlet
-    , shamlet
-    , xhamlet
+    --, hamlet
+    -- , shamlet
+    --, xhamlet
     , HtmlUrl
       -- ** Julius
-    , julius
+    --, julius
     , JavascriptUrl
     , renderJavascriptUrl
       -- ** Cassius/Lucius
-    , cassius
-    , lucius
     , CssUrl
     , renderCssUrl
     ) where
diff --git a/Yesod/Core/Class/Yesod.hs b/Yesod/Core/Class/Yesod.hs
index 140600b..75daabc 100644
--- a/Yesod/Core/Class/Yesod.hs
+++ b/Yesod/Core/Class/Yesod.hs
@@ -5,18 +5,22 @@
 {-# LANGUAGE CPP               #-}
 module Yesod.Core.Class.Yesod where

-import           Control.Monad.Logger               (logErrorS)
+--import           Control.Monad.Logger               (logErrorS)
 import           Yesod.Core.Content
 import           Yesod.Core.Handler

 import           Yesod.Routes.Class
+import qualified Text.Blaze.Internal
+import qualified Control.Monad.Logger
+import qualified Text.Hamlet
+import qualified Data.Foldable

 import           Blaze.ByteString.Builder           (Builder)
 import           Blaze.ByteString.Builder.Char.Utf8 (fromText)
 import           Control.Arrow                      ((***), second)
 import           Control.Monad                      (forM, when, void)
 import           Control.Monad.IO.Class             (MonadIO (liftIO))
-import           Control.Monad.Logger               (LogLevel (LevelInfo, LevelOther),
+import           Control.Monad.Logger               (Loc, LogLevel (LevelInfo, LevelOther),
                                                      LogSource)
 import qualified Data.ByteString.Char8              as S8
 import qualified Data.ByteString.Lazy               as L
@@ -33,7 +37,6 @@ import qualified Data.Text.Encoding.Error           as TEE
 import           Data.Text.Lazy.Builder             (toLazyText)
 import           Data.Text.Lazy.Encoding            (encodeUtf8)
 import           Data.Word                          (Word64)
-import           Language.Haskell.TH.Syntax         (Loc (..))
 import           Network.HTTP.Types                 (encodePath)
 import qualified Network.Wai                        as W
 import           Data.Default                       (def)
@@ -94,18 +97,27 @@ class RenderRoute site => Yesod site where
     defaultLayout w = do
         p <- widgetToPageContent w
         mmsg <- getMessage
-        giveUrlRenderer [hamlet|
-            $newline never
-            $doctype 5
-
-
-                    <title>#{pageTitle p}
-                    ^{pageHead p}
-
-                    $maybe msg <- mmsg
-
#{msg}
-                    ^{pageBody p}
-            |]
+        giveUrlRenderer  $         \ _render_aHra
+          -> do { id
+                    ((Text.Blaze.Internal.preEscapedText . T.pack)
+                       "<!DOCTYPE html>\n<title>");
+                  id (TBH.toHtml (pageTitle p));
+                  id ((Text.Blaze.Internal.preEscapedText . T.pack) "</title>");
+                  Text.Hamlet.asHtmlUrl (pageHead p) _render_aHra;
+                  id ((Text.Blaze.Internal.preEscapedText . T.pack) "");
+                  Text.Hamlet.maybeH
+                    mmsg
+                    (\ msg_aHrb
+                       -> do { id
+                                 ((Text.Blaze.Internal.preEscapedText . T.pack)
+                                    "
");
+                               id (TBH.toHtml msg_aHrb);
+                               id ((Text.Blaze.Internal.preEscapedText . T.pack) "
") })
+                    Nothing;
+                  Text.Hamlet.asHtmlUrl (pageBody p) _render_aHra;
+                  id
+                    ((Text.Blaze.Internal.preEscapedText . T.pack) "") }
+

     -- | Override the rendering function for a particular URL. One use case for
     -- this is to offload static hosting to a different domain name to avoid
@@ -374,45 +386,103 @@ widgetToPageContent w = do
     -- modernizr should be at the end of the  http://www.modernizr.com/docs/#installing
     -- the asynchronous loader means your page doesn't have to wait for all the js to load
     let (mcomplete, asyncScripts) = asyncHelper render scripts jscript jsLoc
-        regularScriptLoad = [hamlet|
-            $newline never
-            $forall s <- scripts
-                ^{mkScriptTag s}
-            $maybe j <- jscript
-                $maybe s <- jsLoc
-                    ") })
+                            (Just
+                               (do { id
+                                       ((Text.Blaze.Internal.preEscapedText . T.pack) "") })))
+                    Nothing }
+
+
+        headAll =         \ _render_aHsW
+          -> do { Text.Hamlet.asHtmlUrl head' _render_aHsW;
+                  Data.Foldable.mapM_
+                    (\ s_aHsX -> Text.Hamlet.asHtmlUrl (mkLinkTag s_aHsX) _render_aHsW)
+                    stylesheets;
+                  Data.Foldable.mapM_
+                    (\ s_aHsY
+                       -> do { Text.Hamlet.maybeH
+                                 (right (snd s_aHsY))
+                                 (\ t_aHsZ
+                                    -> Text.Hamlet.maybeH
+                                         (fst s_aHsY)
+                                         (\ media_aHt0
+                                            -> do { id
+                                                      ((Text.Blaze.Internal.preEscapedText . T.pack)
+                                                         "<link rel=\"stylesheet\" media=\"");
+                                                    id (TBH.toHtml media_aHt0);
+                                                    id
+                                                      ((Text.Blaze.Internal.preEscapedText . T.pack)
+                                                         "\" href=\"");
+                                                    id (TBH.toHtml t_aHsZ);
+                                                    id
+                                                      ((Text.Blaze.Internal.preEscapedText . T.pack)
+                                                         "\">") })
+                                         (Just
+                                            (do { id
+                                                    ((Text.Blaze.Internal.preEscapedText . T.pack)
+                                                       "<link rel=\"stylesheet\" href=\"");
+                                                  id (TBH.toHtml t_aHsZ);
+                                                  id
+                                                    ((Text.Blaze.Internal.preEscapedText . T.pack)
+                                                       "\">") })))
+                                 Nothing;
+                               Text.Hamlet.maybeH
+                                 (left (snd s_aHsY))
+                                 (\ content_aHt1
+                                    -> Text.Hamlet.maybeH
+                                         (fst s_aHsY)
+                                         (\ media_aHt2
+                                            -> do { id
+                                                      ((Text.Blaze.Internal.preEscapedText . T.pack)
+                                                         "") })
+                                         (Just
+                                            (do { id
+                                                    ((Text.Blaze.Internal.preEscapedText . T.pack)
+                                                       "") })))
+                                 Nothing })
+                    css;
+                  case jsLoader master of {
+                    BottomOfBody -> return ()
+                    ; BottomOfHeadAsync asyncJsLoader_aHt3
+                      -> Text.Hamlet.asHtmlUrl
+                           (asyncJsLoader_aHt3 asyncScripts mcomplete) _render_aHsW
+                    ; BottomOfHeadBlocking
+                      -> Text.Hamlet.asHtmlUrl regularScriptLoad _render_aHsW } }
+
+    let bodyScript =     \ _render_aHt8 -> do { Text.Hamlet.asHtmlUrl body _render_aHt8;
+              Text.Hamlet.asHtmlUrl regularScriptLoad _render_aHt8 }
+

     return $ PageContent title headAll $
         case jsLoader master of
@@ -442,10 +512,13 @@ defaultErrorHandler NotFound = selectRep $ do
         r <- waiRequest
         let path' = TE.decodeUtf8With TEE.lenientDecode $ W.rawPathInfo r
         setTitle "Not Found"
-        toWidget [hamlet|
-
Not Found
-
#{path'}
-        |]
+        toWidget  $         \ _render_aHte
+          -> do { id
+                    ((Text.Blaze.Internal.preEscapedText . T.pack)
+                       "
Not Found
\n
");
+                  id (TBH.toHtml path');
+                  id ((Text.Blaze.Internal.preEscapedText . T.pack) "
") }
+
     provideRep $ return $ object ["message" .= ("Not Found" :: Text)]

 -- For API requests.
@@ -455,10 +528,11 @@ defaultErrorHandler NotFound = selectRep $ do
 defaultErrorHandler NotAuthenticated = selectRep $ do
     provideRep $ defaultLayout $ do
         setTitle "Not logged in"
-        toWidget [hamlet|
-
Not logged in
-
Set the authRoute and the user will be redirected there.
-        |]
+        toWidget  $         \ _render_aHti
+          -> id
+               ((Text.Blaze.Internal.preEscapedText . T.pack)
+                  "
Not logged in
\n
Set the authRoute and the user will be redirected there.
")
+

     provideRep $ do
         -- 401 *MUST* include a WWW-Authenticate header
@@ -480,10 +554,13 @@ defaultErrorHandler NotAuthenticated = selectRep $ do
 defaultErrorHandler (PermissionDenied msg) = selectRep $ do
     provideRep $ defaultLayout $ do
         setTitle "Permission Denied"
-        toWidget [hamlet|
-
Permission denied
-
#{msg}
-        |]
+        toWidget  $         \ _render_aHtq
+          -> do { id
+                    ((Text.Blaze.Internal.preEscapedText . T.pack)
+                       "
Permission denied
\n
");
+                  id (TBH.toHtml msg);
+                  id ((Text.Blaze.Internal.preEscapedText . T.pack) "
") }
+
     provideRep $
         return $ object $ [
           "message" .= ("Permission Denied. " <> msg)
@@ -492,30 +569,42 @@ defaultErrorHandler (PermissionDenied msg) = selectRep $ do
 defaultErrorHandler (InvalidArgs ia) = selectRep $ do
     provideRep $ defaultLayout $ do
         setTitle "Invalid Arguments"
-        toWidget [hamlet|
-
Invalid Arguments
-

-                $forall msg <- ia
-
#{msg}
-        |]
+        toWidget  $         \ _render_aHtv
+          -> do { id
+                    ((Text.Blaze.Internal.preEscapedText . T.pack)
+                       "
Invalid Arguments
\n
");
+                  Data.Foldable.mapM_
+                    (\ msg_aHtw
+                       -> do { id ((Text.Blaze.Internal.preEscapedText . T.pack) "
");
+                               id (TBH.toHtml msg_aHtw);
+                               id ((Text.Blaze.Internal.preEscapedText . T.pack) "
") })
+                    ia;
+                  id ((Text.Blaze.Internal.preEscapedText . T.pack) "
") }
+
     provideRep $ return $ object ["message" .= ("Invalid Arguments" :: Text), "errors" .= ia]
 defaultErrorHandler (InternalError e) = do
-    $logErrorS "yesod-core" e
     selectRep $ do
         provideRep $ defaultLayout $ do
             setTitle "Internal Server Error"
-            toWidget [hamlet|
-
Internal Server Error
-
#{e}
-            |]
+            toWidget  $             \ _render_aHtC
+              -> do { id
+                        ((Text.Blaze.Internal.preEscapedText . T.pack)
+                           "
Internal Server Error
\n
");
+                      id (TBH.toHtml e);
+                      id ((Text.Blaze.Internal.preEscapedText . T.pack) "
") }
+
         provideRep $ return $ object ["message" .= ("Internal Server Error" :: Text), "error" .= e]
 defaultErrorHandler (BadMethod m) = selectRep $ do
     provideRep $ defaultLayout $ do
         setTitle"Bad Method"
-        toWidget [hamlet|
-
Method Not Supported
-
Method #{S8.unpack m} not supported
-        |]
+        toWidget  $         \ _render_aHtH
+          -> do { id
+                    ((Text.Blaze.Internal.preEscapedText . T.pack)
+                       "
Method Not Supported
\n
Method ");
+                  id (TBH.toHtml (S8.unpack m));
+                  id
+                    ((Text.Blaze.Internal.preEscapedText . T.pack)
+                       " not supported
") }
     provideRep $ return $ object ["message" .= ("Bad method" :: Text), "method" .= TE.decodeUtf8With TEE.lenientDecode m]

 asyncHelper :: (url -> [x] -> Text)
@@ -682,8 +771,4 @@ loadClientSession key getCachedDate sessionName req = load
 -- turn the TH Loc loaction information into a human readable string
 -- leaving out the loc_end parameter
 fileLocationToString :: Loc -> String
-fileLocationToString loc = (loc_package loc) ++ ':' : (loc_module loc) ++
-  ' ' : (loc_filename loc) ++ ':' : (line loc) ++ ':' : (char loc)
-  where
-    line = show . fst . loc_start
-    char = show . snd . loc_start
+fileLocationToString loc = "unknown"
diff --git a/Yesod/Core/Dispatch.hs b/Yesod/Core/Dispatch.hs
index e0d1f0e..cc23fdd 100644
--- a/Yesod/Core/Dispatch.hs
+++ b/Yesod/Core/Dispatch.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE FlexibleInstances #-}
@@ -6,18 +5,18 @@
 {-# LANGUAGE CPP #-}
 module Yesod.Core.Dispatch
     ( -- * Quasi-quoted routing
-      parseRoutes
-    , parseRoutesNoCheck
-    , parseRoutesFile
-    , parseRoutesFileNoCheck
-    , mkYesod
+    --  parseRoutes
+    --, parseRoutesNoCheck
+    --, parseRoutesFile
+    --, parseRoutesFileNoCheck
+    --, mkYesod
       -- ** More fine-grained
-    , mkYesodData
-    , mkYesodSubData
-    , mkYesodDispatch
-    , mkYesodSubDispatch
+    --, mkYesodData
+    --, mkYesodSubData
+    --, mkYesodDispatch
+    --, mkYesodSubDispatch
       -- ** Path pieces
-    , PathPiece (..)
+      PathPiece (..)
     , PathMultiPiece (..)
     , Texts
       -- * Convert to WAI
@@ -135,13 +134,6 @@ toWaiAppLogger logger site = do
                 , yreSite = site
                 , yreSessionBackend = sb
                 }
-    messageLoggerSource
-        site
-        logger
-        $(qLocation >>= liftLoc)
-        "yesod-core"
-        LevelInfo
-        (toLogStr ("Application launched" :: S.ByteString))
     middleware <- mkDefaultMiddlewares logger
     return $ middleware $ toWaiAppYre yre

@@ -170,14 +162,7 @@ warp port site = do
                 ]
             -}
             , Network.Wai.Handler.Warp.settingsOnException = const $ \e ->
-                when (shouldLog' e) $
-                messageLoggerSource
-                    site
-                    logger
-                    $(qLocation >>= liftLoc)
-                    "yesod-core"
-                    LevelError
-                    (toLogStr $ "Exception from Warp: " ++ show e)
+                when (shouldLog' e) $ error (show e)
             }
   where
     shouldLog' =
@@ -211,7 +196,6 @@ defaultMiddlewaresNoLogging = acceptOverride . autohead . gzip def . methodOverr
 -- | Deprecated synonym for 'warp'.
 warpDebug :: YesodDispatch site => Int -> site -> IO ()
 warpDebug = warp
-{-# DEPRECATED warpDebug "Please use warp instead" #-}

 -- | Runs your application using default middlewares (i.e., via 'toWaiApp'). It
 -- reads port information from the PORT environment variable, as used by tools
diff --git a/Yesod/Core/Handler.hs b/Yesod/Core/Handler.hs
index 2e5d7cb..83f93bf 100644
--- a/Yesod/Core/Handler.hs
+++ b/Yesod/Core/Handler.hs
@@ -172,7 +172,7 @@ import           Data.Text.Encoding            (decodeUtf8With, encodeUtf8)
 import           Data.Text.Encoding.Error      (lenientDecode)
 import qualified Data.Text.Lazy                as TL
 import qualified Text.Blaze.Html.Renderer.Text as RenderText
-import           Text.Hamlet                   (Html, HtmlUrl, hamlet)
+import           Text.Hamlet                   (Html, HtmlUrl)

 import qualified Data.ByteString               as S
 import qualified Data.ByteString.Lazy          as L
@@ -201,6 +201,7 @@ import Control.Exception (throwIO)
 import Blaze.ByteString.Builder (Builder)
 import Safe (headMay)
 import Data.CaseInsensitive (CI)
+import qualified Text.Blaze.Internal
 import qualified Data.Conduit.List as CL
 import Control.Monad (unless)
 import           Control.Monad.Trans.Resource  (MonadResource, InternalState, runResourceT, withInternalState, getInternalState, liftResourceT, resourceForkIO
@@ -847,19 +848,15 @@ redirectToPost :: (MonadHandler m, RedirectUrl (HandlerSite m) url)
                -> m a
 redirectToPost url = do
     urlText <- toTextUrl url
-    giveUrlRenderer [hamlet|
-$newline never
-$doctype 5
-
-
-
-        <title>Redirecting...
-
-        <form id="form" method="post" action=#{urlText}>
-
-
Javascript has been disabled; please click on the button below to be redirected.
-            <input type="submit" value="Continue">
-|] >>= sendResponse
+    giveUrlRenderer  $     \ _render_awps
+      -> do { id
+                ((Text.Blaze.Internal.preEscapedText . T.pack)
+                   "<!DOCTYPE html>\n<title>Redirecting...</title><form id=\"form\" method=\"post\" action=\"");
+              id (toHtml urlText);
+              id
+                ((Text.Blaze.Internal.preEscapedText . T.pack)
+                   "\">
Javascript has been disabled; please click on the button below to be redirected.
<input type=\"submit\" value=\"Continue\"></form>") }
+ >>= sendResponse

 -- | Wraps the 'Content' generated by 'hamletToContent' in a 'RepHtml'.
 hamletToRepHtml :: MonadHandler m => HtmlUrl (Route (HandlerSite m)) -> m Html
diff --git a/Yesod/Core/Internal/Run.hs b/Yesod/Core/Internal/Run.hs
index 09b4609..e1ef568 100644
--- a/Yesod/Core/Internal/Run.hs
+++ b/Yesod/Core/Internal/Run.hs
@@ -16,8 +16,8 @@ import           Control.Exception.Lifted     (catch)
 import           Control.Monad                (mplus)
 import           Control.Monad.IO.Class       (MonadIO)
 import           Control.Monad.IO.Class       (liftIO)
-import           Control.Monad.Logger         (LogLevel (LevelError), LogSource,
-                                               liftLoc)
+import           Control.Monad.Logger         (Loc, LogLevel (LevelError), LogSource,
+                                               )
 import           Control.Monad.Trans.Resource (runResourceT, withInternalState, runInternalState, createInternalState, closeInternalState)
 import qualified Data.ByteString              as S
 import qualified Data.ByteString.Char8        as S8
@@ -31,7 +31,7 @@ import qualified Data.Text                    as T
 import           Data.Text.Encoding           (encodeUtf8)
 import           Data.Text.Encoding           (decodeUtf8With)
 import           Data.Text.Encoding.Error     (lenientDecode)
-import           Language.Haskell.TH.Syntax   (Loc, qLocation)
+import           Language.Haskell.TH.Syntax   (qLocation)
 import qualified Network.HTTP.Types           as H
 import           Network.Wai
 #if MIN_VERSION_wai(2, 0, 0)
@@ -157,8 +157,6 @@ safeEh :: (Loc -> LogSource -> LogLevel -> LogStr -> IO ())
        -> ErrorResponse
        -> YesodApp
 safeEh log' er req = do
-    liftIO $ log' $(qLocation >>= liftLoc) "yesod-core" LevelError
-           $ toLogStr $ "Error handler errored out: " ++ show er
     return $ YRPlain
         H.status500
         []
diff --git a/Yesod/Core/Internal/TH.hs b/Yesod/Core/Internal/TH.hs
index 7e84c1c..a273c29 100644
--- a/Yesod/Core/Internal/TH.hs
+++ b/Yesod/Core/Internal/TH.hs
@@ -23,114 +23,3 @@ import Yesod.Core.Content
 import Yesod.Core.Class.Dispatch
 import Yesod.Core.Internal.Run

--- | Generates URL datatype and site function for the given 'Resource's. This
--- is used for creating sites, /not/ subsites. See 'mkYesodSub' for the latter.
--- Use 'parseRoutes' to create the 'Resource's.
-mkYesod :: String -- ^ name of the argument datatype
-        -> [ResourceTree String]
-        -> Q [Dec]
-mkYesod name = fmap (uncurry (++)) . mkYesodGeneral name [] False
-
--- | Sometimes, you will want to declare your routes in one file and define
--- your handlers elsewhere. For example, this is the only way to break up a
--- monolithic file into smaller parts. Use this function, paired with
--- 'mkYesodDispatch', to do just that.
-mkYesodData :: String -> [ResourceTree String] -> Q [Dec]
-mkYesodData name res = mkYesodDataGeneral name False res
-
-mkYesodSubData :: String -> [ResourceTree String] -> Q [Dec]
-mkYesodSubData name res = mkYesodDataGeneral name True res
-
-mkYesodDataGeneral :: String -> Bool -> [ResourceTree String] -> Q [Dec]
-mkYesodDataGeneral name isSub res = do
-    let (name':rest) = words name
-    fmap fst $ mkYesodGeneral name' rest isSub res
-
--- | See 'mkYesodData'.
-mkYesodDispatch :: String -> [ResourceTree String] -> Q [Dec]
-mkYesodDispatch name = fmap snd . mkYesodGeneral name [] False
-
--- | Get the Handler and Widget type synonyms for the given site.
-masterTypeSyns :: Type -> [Dec]
-masterTypeSyns site =
-    [ TySynD (mkName "Handler") []
-      $ ConT ''HandlerT `AppT` site `AppT` ConT ''IO
-    , TySynD (mkName "Widget")  []
-      $ ConT ''WidgetT `AppT` site `AppT` ConT ''IO `AppT` ConT ''()
-    ]
-
-mkYesodGeneral :: String                   -- ^ foundation type
-               -> [String]                 -- ^ arguments for the type
-               -> Bool                     -- ^ it this a subsite
-               -> [ResourceTree String]
-               -> Q([Dec],[Dec])
-mkYesodGeneral name args isSub resS = do
-    renderRouteDec <- mkRenderRouteInstance site res
-    routeAttrsDec  <- mkRouteAttrsInstance site res
-    dispatchDec    <- mkDispatchInstance site res
-    parse <- mkParseRouteInstance site res
-    let rname = mkName $ "resources" ++ name
-    eres <- lift resS
-    let resourcesDec =
-            [ SigD rname $ ListT `AppT` (ConT ''ResourceTree `AppT` ConT ''String)
-            , FunD rname [Clause [] (NormalB eres) []]
-            ]
-    let dataDec = concat
-            [ [parse]
-            , renderRouteDec
-            , [routeAttrsDec]
-            , resourcesDec
-            , if isSub then [] else masterTypeSyns site
-            ]
-    return (dataDec, dispatchDec)
-  where site    = foldl' AppT (ConT $ mkName name) (map (VarT . mkName) args)
-        res     = map (fmap parseType) resS
-
-mkMDS :: Q Exp -> MkDispatchSettings
-mkMDS rh = MkDispatchSettings
-    { mdsRunHandler = rh
-    , mdsSubDispatcher =
-        [|\parentRunner getSub toParent env -> yesodSubDispatch
-                                 YesodSubRunnerEnv
-                                    { ysreParentRunner = parentRunner
-                                    , ysreGetSub = getSub
-                                    , ysreToParentRoute = toParent
-                                    , ysreParentEnv = env
-                                    }
-                              |]
-    , mdsGetPathInfo = [|W.pathInfo|]
-    , mdsSetPathInfo = [|\p r -> r { W.pathInfo = p }|]
-    , mdsMethod = [|W.requestMethod|]
-    , mds404 = [|notFound >> return ()|]
-    , mds405 = [|badMethod >> return ()|]
-    , mdsGetHandler = defaultGetHandler
-    }
-
--- | If the generation of @'YesodDispatch'@ instance require finer
--- control of the types, contexts etc. using this combinator. You will
--- hardly need this generality. However, in certain situations, like
--- when writing library/plugin for yesod, this combinator becomes
--- handy.
-mkDispatchInstance :: Type                -- ^ The master site type
-                   -> [ResourceTree a]    -- ^ The resource
-                   -> DecsQ
-mkDispatchInstance master res = do
-    clause' <- mkDispatchClause (mkMDS [|yesodRunner|]) res
-    let thisDispatch = FunD 'yesodDispatch [clause']
-    return [InstanceD [] yDispatch [thisDispatch]]
-  where
-    yDispatch = ConT ''YesodDispatch `AppT` master
-
-mkYesodSubDispatch :: [ResourceTree a] -> Q Exp
-mkYesodSubDispatch res = do
-    clause' <- mkDispatchClause (mkMDS [|subHelper . fmap toTypedContent|]) res
-    inner <- newName "inner"
-    let innerFun = FunD inner [clause']
-    helper <- newName "helper"
-    let fun = FunD helper
-                [ Clause
-                    []
-                    (NormalB $ VarE inner)
-                    [innerFun]
-                ]
-    return $ LetE [fun] (VarE helper)
diff --git a/Yesod/Core/Types.hs b/Yesod/Core/Types.hs
index 7e3fd0d..994d322 100644
--- a/Yesod/Core/Types.hs
+++ b/Yesod/Core/Types.hs
@@ -21,6 +21,7 @@ import           Control.Monad.Catch                (MonadCatch (..))
 import           Control.Monad.Catch                (MonadMask (..))
 #endif
 import           Control.Monad.IO.Class             (MonadIO (liftIO))
+import qualified Control.Monad.Logger
 import           Control.Monad.Logger               (LogLevel, LogSource,
                                                      MonadLogger (..))
 import           Control.Monad.Trans.Control        (MonadBaseControl (..))
@@ -187,7 +188,7 @@ data RunHandlerEnv site = RunHandlerEnv
     , rheRoute    :: !(Maybe (Route site))
     , rheSite     :: !site
     , rheUpload   :: !(RequestBodyLength -> FileUpload)
-    , rheLog      :: !(Loc -> LogSource -> LogLevel -> LogStr -> IO ())
+    , rheLog      :: !(Control.Monad.Logger.Loc -> LogSource -> LogLevel -> LogStr -> IO ())
     , rheOnError  :: !(ErrorResponse -> YesodApp)
       -- ^ How to respond when an error is thrown internally.
       --
diff --git a/Yesod/Core/Widget.hs b/Yesod/Core/Widget.hs
index 481199e..8489fbe 100644
--- a/Yesod/Core/Widget.hs
+++ b/Yesod/Core/Widget.hs
@@ -16,8 +16,8 @@ module Yesod.Core.Widget
       WidgetT
     , PageContent (..)
       -- * Special Hamlet quasiquoter/TH for Widgets
-    , whamlet
-    , whamletFile
+    --, whamlet
+    --, whamletFile
     , ihamletToRepHtml
     , ihamletToHtml
       -- * Convert to Widget
@@ -46,7 +46,7 @@ module Yesod.Core.Widget
     , widgetToParentWidget
     , handlerToWidget
       -- * Internal
-    , whamletFileWithSettings
+    --, whamletFileWithSettings
     , asWidgetT
     ) where

@@ -207,35 +207,9 @@ addScriptRemote = flip addScriptRemoteAttrs []
 addScriptRemoteAttrs :: MonadWidget m => Text -> [(Text, Text)] -> m ()
 addScriptRemoteAttrs x y = tell $ GWData mempty mempty (toUnique $ Script (Remote x) y) mempty mempty mempty mempty

-whamlet :: QuasiQuoter
-whamlet = NP.hamletWithSettings rules NP.defaultHamletSettings
-
-whamletFile :: FilePath -> Q Exp
-whamletFile = NP.hamletFileWithSettings rules NP.defaultHamletSettings
-
-whamletFileWithSettings :: NP.HamletSettings -> FilePath -> Q Exp
-whamletFileWithSettings = NP.hamletFileWithSettings rules
-
 asWidgetT :: WidgetT site m () -> WidgetT site m ()
 asWidgetT = id

-rules :: Q NP.HamletRules
-rules = do
-    ah <- [|asWidgetT . toWidget|]
-    let helper qg f = do
-            x <- newName "urender"
-            e <- f $ VarE x
-            let e' = LamE [VarP x] e
-            g <- qg
-            bind <- [|(>>=)|]
-            return $ InfixE (Just g) bind (Just e')
-    let ur f = do
-            let env = NP.Env
-                    (Just $ helper [|getUrlRenderParams|])
-                    (Just $ helper [|liftM (toHtml .) getMessageRender|])
-            f env
-    return $ NP.HamletRules ah ur $ \_ b -> return $ ah `AppE` b
-
 -- | Wraps the 'Content' generated by 'hamletToContent' in a 'RepHtml'.
 ihamletToRepHtml :: (MonadHandler m, RenderMessage (HandlerSite m) message)
                  => HtmlUrlI18n message (Route (HandlerSite m))
--
2.0.0