summaryrefslogtreecommitdiff
path: root/standalone/android/haskell-patches
diff options
context:
space:
mode:
Diffstat (limited to 'standalone/android/haskell-patches')
-rw-r--r--standalone/android/haskell-patches/lens_various-hacking-to-cross-build.patch385
-rw-r--r--standalone/android/haskell-patches/persistent-template_stub-out.patch25
-rw-r--r--standalone/android/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch32
-rw-r--r--standalone/android/haskell-patches/profunctors_3.3-0001-fix-cross-build.patch26
-rw-r--r--standalone/android/haskell-patches/shakespeare-css_1.0.2_0001-remove-TH.patch148
-rw-r--r--standalone/android/haskell-patches/shakespeare-css_1.0.2_0002-expose-modules-used-by-TH.patch26
-rw-r--r--standalone/android/haskell-patches/shakespeare_1.0.3_0001-export-symbol-used-by-TH-splices.patch26
-rw-r--r--standalone/android/haskell-patches/wai-app-static_deal-with-TH.patch54
-rw-r--r--standalone/android/haskell-patches/yesod-auth_don-t-really-build.patch34
-rw-r--r--standalone/android/haskell-patches/yesod-core_expand_TH.patch411
-rw-r--r--standalone/android/haskell-patches/yesod-form_spliced-TH.patch1783
-rw-r--r--standalone/android/haskell-patches/yesod-persistent_do-not-really-build.patch26
-rw-r--r--standalone/android/haskell-patches/yesod-routes_export-module-referenced-by-TH-splices.patch29
-rw-r--r--standalone/android/haskell-patches/yesod_001_hacked-up-for-Android.patch74
-rw-r--r--standalone/android/haskell-patches/yesod_002_hack-around-missing-symbols.patch41
15 files changed, 0 insertions, 3120 deletions
diff --git a/standalone/android/haskell-patches/lens_various-hacking-to-cross-build.patch b/standalone/android/haskell-patches/lens_various-hacking-to-cross-build.patch
deleted file mode 100644
index 274efc71e..000000000
--- a/standalone/android/haskell-patches/lens_various-hacking-to-cross-build.patch
+++ /dev/null
@@ -1,385 +0,0 @@
-From 41706061810410cc38f602ccc9a4c9560502251f Mon Sep 17 00:00:00 2001
-From: dummy <dummy@example.com>
-Date: Sat, 19 Oct 2013 01:44:52 +0000
-Subject: [PATCH] hackity
-
----
- lens.cabal | 12 +-----------
- src/Control/Exception/Lens.hs | 2 +-
- src/Control/Lens.hs | 6 +++---
- src/Control/Lens/Equality.hs | 4 ++--
- src/Control/Lens/Fold.hs | 6 +++---
- src/Control/Lens/Internal.hs | 2 +-
- src/Control/Lens/Internal/Exception.hs | 26 +-------------------------
- src/Control/Lens/Internal/Instances.hs | 14 --------------
- src/Control/Lens/Internal/Zipper.hs | 2 +-
- src/Control/Lens/Iso.hs | 2 --
- src/Control/Lens/Lens.hs | 2 +-
- src/Control/Lens/Operators.hs | 2 +-
- src/Control/Lens/Plated.hs | 2 +-
- src/Control/Lens/Prism.hs | 2 --
- src/Control/Lens/Setter.hs | 2 --
- src/Control/Lens/TH.hs | 2 +-
- src/Data/Data/Lens.hs | 6 +++---
- 17 files changed, 20 insertions(+), 74 deletions(-)
-
-diff --git a/lens.cabal b/lens.cabal
-index b25adf4..3e5c30c 100644
---- a/lens.cabal
-+++ b/lens.cabal
-@@ -10,7 +10,7 @@ stability: provisional
- homepage: http://github.com/ekmett/lens/
- bug-reports: http://github.com/ekmett/lens/issues
- copyright: Copyright (C) 2012-2013 Edward A. Kmett
--build-type: Custom
-+build-type: Simple
- tested-with: GHC == 7.6.3
- synopsis: Lenses, Folds and Traversals
- description:
-@@ -235,14 +235,12 @@ library
- Control.Lens.Review
- Control.Lens.Setter
- Control.Lens.Simple
-- Control.Lens.TH
- Control.Lens.Traversal
- Control.Lens.Tuple
- Control.Lens.Type
- Control.Lens.Wrapped
- Control.Lens.Zipper
- Control.Lens.Zoom
-- Control.Monad.Error.Lens
- Control.Parallel.Strategies.Lens
- Control.Seq.Lens
- Data.Array.Lens
-@@ -266,12 +264,8 @@ library
- Data.Typeable.Lens
- Data.Vector.Lens
- Data.Vector.Generic.Lens
-- Generics.Deriving.Lens
-- GHC.Generics.Lens
- System.Exit.Lens
- System.FilePath.Lens
-- System.IO.Error.Lens
-- Language.Haskell.TH.Lens
- Numeric.Lens
-
- if flag(safe)
-@@ -370,7 +364,6 @@ test-suite doctests
- deepseq,
- doctest >= 0.9.1,
- filepath,
-- generic-deriving,
- mtl,
- nats,
- parallel,
-@@ -396,7 +389,6 @@ benchmark plated
- comonad,
- criterion,
- deepseq,
-- generic-deriving,
- lens,
- transformers
-
-@@ -431,7 +423,6 @@ benchmark unsafe
- comonads-fd,
- criterion,
- deepseq,
-- generic-deriving,
- lens,
- transformers
-
-@@ -448,6 +439,5 @@ benchmark zipper
- comonads-fd,
- criterion,
- deepseq,
-- generic-deriving,
- lens,
- transformers
-diff --git a/src/Control/Exception/Lens.hs b/src/Control/Exception/Lens.hs
-index 0619335..c97ad9b 100644
---- a/src/Control/Exception/Lens.hs
-+++ b/src/Control/Exception/Lens.hs
-@@ -112,7 +112,7 @@ import Prelude
- , Maybe(..), Either(..), Functor(..), String, IO
- )
-
--{-# ANN module "HLint: ignore Use Control.Exception.catch" #-}
-+
-
- -- $setup
- -- >>> :set -XNoOverloadedStrings
-diff --git a/src/Control/Lens.hs b/src/Control/Lens.hs
-index 242c3c1..2ab9cdb 100644
---- a/src/Control/Lens.hs
-+++ b/src/Control/Lens.hs
-@@ -59,7 +59,7 @@ module Control.Lens
- , module Control.Lens.Review
- , module Control.Lens.Setter
- , module Control.Lens.Simple
--#ifndef DISABLE_TEMPLATE_HASKELL
-+#if 0
- , module Control.Lens.TH
- #endif
- , module Control.Lens.Traversal
-@@ -89,7 +89,7 @@ import Control.Lens.Reified
- import Control.Lens.Review
- import Control.Lens.Setter
- import Control.Lens.Simple
--#ifndef DISABLE_TEMPLATE_HASKELL
-+#if 0
- import Control.Lens.TH
- #endif
- import Control.Lens.Traversal
-@@ -99,4 +99,4 @@ import Control.Lens.Wrapped
- import Control.Lens.Zipper
- import Control.Lens.Zoom
-
--{-# ANN module "HLint: ignore Use import/export shortcut" #-}
-+
-diff --git a/src/Control/Lens/Equality.hs b/src/Control/Lens/Equality.hs
-index 982c2d7..3a3fe1a 100644
---- a/src/Control/Lens/Equality.hs
-+++ b/src/Control/Lens/Equality.hs
-@@ -28,8 +28,8 @@ module Control.Lens.Equality
- import Control.Lens.Internal.Setter
- import Control.Lens.Type
-
--{-# ANN module "HLint: ignore Use id" #-}
--{-# ANN module "HLint: ignore Eta reduce" #-}
-+
-+
-
- -- $setup
- -- >>> import Control.Lens
-diff --git a/src/Control/Lens/Fold.hs b/src/Control/Lens/Fold.hs
-index 32a4073..cc7da1e 100644
---- a/src/Control/Lens/Fold.hs
-+++ b/src/Control/Lens/Fold.hs
-@@ -163,9 +163,9 @@ import Data.Traversable
- -- >>> let g :: Expr -> Expr; g = Debug.SimpleReflect.Vars.g
- -- >>> let timingOut :: NFData a => a -> IO a; timingOut = fmap (fromMaybe (error "timeout")) . timeout (5*10^6) . evaluate . force
-
--{-# ANN module "HLint: ignore Eta reduce" #-}
--{-# ANN module "HLint: ignore Use camelCase" #-}
--{-# ANN module "HLint: ignore Use curry" #-}
-+
-+
-+
-
- infixl 8 ^.., ^?, ^?!, ^@.., ^@?, ^@?!
-
-diff --git a/src/Control/Lens/Internal.hs b/src/Control/Lens/Internal.hs
-index 295662e..539642d 100644
---- a/src/Control/Lens/Internal.hs
-+++ b/src/Control/Lens/Internal.hs
-@@ -43,4 +43,4 @@ import Control.Lens.Internal.Review
- import Control.Lens.Internal.Setter
- import Control.Lens.Internal.Zoom
-
--{-# ANN module "HLint: ignore Use import/export shortcut" #-}
-+
-diff --git a/src/Control/Lens/Internal/Exception.hs b/src/Control/Lens/Internal/Exception.hs
-index 387203e..8bea89b 100644
---- a/src/Control/Lens/Internal/Exception.hs
-+++ b/src/Control/Lens/Internal/Exception.hs
-@@ -36,6 +36,7 @@ import Data.Monoid
- import Data.Proxy
- import Data.Reflection
- import Data.Typeable
-+import Data.Typeable
- import System.IO.Unsafe
-
- ------------------------------------------------------------------------------
-@@ -128,18 +129,6 @@ class Handleable e (m :: * -> *) (h :: * -> *) | h -> e m where
- handler_ l = handler l . const
- {-# INLINE handler_ #-}
-
--instance Handleable SomeException IO Exception.Handler where
-- handler = handlerIO
--
--instance Handleable SomeException m (CatchIO.Handler m) where
-- handler = handlerCatchIO
--
--handlerIO :: forall a r. Getting (First a) SomeException a -> (a -> IO r) -> Exception.Handler r
--handlerIO l f = reify (preview l) $ \ (_ :: Proxy s) -> Exception.Handler (\(Handling a :: Handling a s IO) -> f a)
--
--handlerCatchIO :: forall m a r. Getting (First a) SomeException a -> (a -> m r) -> CatchIO.Handler m r
--handlerCatchIO l f = reify (preview l) $ \ (_ :: Proxy s) -> CatchIO.Handler (\(Handling a :: Handling a s m) -> f a)
--
- ------------------------------------------------------------------------------
- -- Helpers
- ------------------------------------------------------------------------------
-@@ -159,21 +148,8 @@ supply = unsafePerformIO $ newIORef 0
- -- | This permits the construction of an \"impossible\" 'Control.Exception.Handler' that matches only if some function does.
- newtype Handling a s (m :: * -> *) = Handling a
-
---- the m parameter exists simply to break the Typeable1 pattern, so we can provide this without overlap.
---- here we simply generate a fresh TypeRep so we'll fail to compare as equal to any other TypeRep.
--instance Typeable (Handling a s m) where
-- typeOf _ = unsafePerformIO $ do
-- i <- atomicModifyIORef supply $ \a -> let a' = a + 1 in a' `seq` (a', a)
-- return $ mkTyConApp (mkTyCon3 "lens" "Control.Lens.Internal.Exception" ("Handling" ++ show i)) []
-- {-# INLINE typeOf #-}
--
- -- The @Handling@ wrapper is uninteresting, and should never be thrown, so you won't get much benefit here.
- instance Show (Handling a s m) where
- showsPrec d _ = showParen (d > 10) $ showString "Handling ..."
- {-# INLINE showsPrec #-}
-
--instance Reifies s (SomeException -> Maybe a) => Exception (Handling a s m) where
-- toException _ = SomeException HandlingException
-- {-# INLINE toException #-}
-- fromException = fmap Handling . reflect (Proxy :: Proxy s)
-- {-# INLINE fromException #-}
-diff --git a/src/Control/Lens/Internal/Instances.hs b/src/Control/Lens/Internal/Instances.hs
-index 6783f33..17715ce 100644
---- a/src/Control/Lens/Internal/Instances.hs
-+++ b/src/Control/Lens/Internal/Instances.hs
-@@ -24,26 +24,12 @@ import Data.Traversable
- -- Orphan Instances
- -------------------------------------------------------------------------------
-
--instance Foldable ((,) b) where
-- foldMap f (_, a) = f a
--
- instance Foldable1 ((,) b) where
- foldMap1 f (_, a) = f a
-
--instance Traversable ((,) b) where
-- traverse f (b, a) = (,) b <$> f a
--
- instance Traversable1 ((,) b) where
- traverse1 f (b, a) = (,) b <$> f a
-
--instance Foldable (Either a) where
-- foldMap _ (Left _) = mempty
-- foldMap f (Right a) = f a
--
--instance Traversable (Either a) where
-- traverse _ (Left b) = pure (Left b)
-- traverse f (Right a) = Right <$> f a
--
- instance Foldable (Const m) where
- foldMap _ _ = mempty
-
-diff --git a/src/Control/Lens/Internal/Zipper.hs b/src/Control/Lens/Internal/Zipper.hs
-index 95875b7..76060be 100644
---- a/src/Control/Lens/Internal/Zipper.hs
-+++ b/src/Control/Lens/Internal/Zipper.hs
-@@ -53,7 +53,7 @@ import Data.Profunctor.Unsafe
- -- >>> import Control.Lens
- -- >>> import Data.Char
-
--{-# ANN module "HLint: ignore Use foldl" #-}
-+
-
- ------------------------------------------------------------------------------
- -- * Jacket
-diff --git a/src/Control/Lens/Iso.hs b/src/Control/Lens/Iso.hs
-index 1152af4..80c3175 100644
---- a/src/Control/Lens/Iso.hs
-+++ b/src/Control/Lens/Iso.hs
-@@ -82,8 +82,6 @@ import Data.Maybe
- import Data.Profunctor
- import Data.Profunctor.Unsafe
-
--{-# ANN module "HLint: ignore Use on" #-}
--
- -- $setup
- -- >>> :set -XNoOverloadedStrings
- -- >>> import Control.Lens
-diff --git a/src/Control/Lens/Lens.hs b/src/Control/Lens/Lens.hs
-index b26cc06..6f84943 100644
---- a/src/Control/Lens/Lens.hs
-+++ b/src/Control/Lens/Lens.hs
-@@ -126,7 +126,7 @@ import Data.Profunctor.Rep
- import Data.Profunctor.Unsafe
- import Data.Void
-
--{-# ANN module "HLint: ignore Use ***" #-}
-+
-
- -- $setup
- -- >>> :set -XNoOverloadedStrings
-diff --git a/src/Control/Lens/Operators.hs b/src/Control/Lens/Operators.hs
-index 11868e0..475c945 100644
---- a/src/Control/Lens/Operators.hs
-+++ b/src/Control/Lens/Operators.hs
-@@ -108,4 +108,4 @@ import Control.Lens.Review
- import Control.Lens.Setter
- import Control.Lens.Zipper
-
--{-# ANN module "HLint: ignore Use import/export shortcut" #-}
-+
-diff --git a/src/Control/Lens/Plated.hs b/src/Control/Lens/Plated.hs
-index a8c4d20..cef574e 100644
---- a/src/Control/Lens/Plated.hs
-+++ b/src/Control/Lens/Plated.hs
-@@ -95,7 +95,7 @@ import Data.Data.Lens
- import Data.Monoid
- import Data.Tree
-
--{-# ANN module "HLint: ignore Reduce duplication" #-}
-+
-
- -- | A 'Plated' type is one where we know how to extract its immediate self-similar children.
- --
-diff --git a/src/Control/Lens/Prism.hs b/src/Control/Lens/Prism.hs
-index 45b5cfe..88c7ff9 100644
---- a/src/Control/Lens/Prism.hs
-+++ b/src/Control/Lens/Prism.hs
-@@ -53,8 +53,6 @@ import Unsafe.Coerce
- import Data.Profunctor.Unsafe
- #endif
-
--{-# ANN module "HLint: ignore Use camelCase" #-}
--
- -- $setup
- -- >>> :set -XNoOverloadedStrings
- -- >>> import Control.Lens
-diff --git a/src/Control/Lens/Setter.hs b/src/Control/Lens/Setter.hs
-index 2acbfa6..4a12c6b 100644
---- a/src/Control/Lens/Setter.hs
-+++ b/src/Control/Lens/Setter.hs
-@@ -87,8 +87,6 @@ import Data.Profunctor
- import Data.Profunctor.Rep
- import Data.Profunctor.Unsafe
-
--{-# ANN module "HLint: ignore Avoid lambda" #-}
--
- -- $setup
- -- >>> import Control.Lens
- -- >>> import Control.Monad.State
-diff --git a/src/Control/Lens/TH.hs b/src/Control/Lens/TH.hs
-index a05eb07..49218b5 100644
---- a/src/Control/Lens/TH.hs
-+++ b/src/Control/Lens/TH.hs
-@@ -87,7 +87,7 @@ import Language.Haskell.TH
- import Language.Haskell.TH.Syntax
- import Language.Haskell.TH.Lens
-
--{-# ANN module "HLint: ignore Use foldl" #-}
-+
-
- -- | Flags for 'Lens' construction
- data LensFlag
-diff --git a/src/Data/Data/Lens.hs b/src/Data/Data/Lens.hs
-index cf1e7c9..b39dacf 100644
---- a/src/Data/Data/Lens.hs
-+++ b/src/Data/Data/Lens.hs
-@@ -65,9 +65,9 @@ import Data.Monoid
- import GHC.Exts (realWorld#)
- #endif
-
--{-# ANN module "HLint: ignore Eta reduce" #-}
--{-# ANN module "HLint: ignore Use foldl" #-}
--{-# ANN module "HLint: ignore Reduce duplication" #-}
-+
-+
-+
-
- -- $setup
- -- >>> :set -XNoOverloadedStrings
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/persistent-template_stub-out.patch b/standalone/android/haskell-patches/persistent-template_stub-out.patch
deleted file mode 100644
index 6b7b62bd4..000000000
--- a/standalone/android/haskell-patches/persistent-template_stub-out.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 0b9df0de3aa45918a2a9226a2da6be4680276419 Mon Sep 17 00:00:00 2001
-From: foo <foo@bar>
-Date: Sun, 22 Sep 2013 03:31:55 +0000
-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 8216ce7..f23234b 100644
---- a/persistent-template.cabal
-+++ b/persistent-template.cabal
-@@ -23,7 +23,7 @@ library
- , containers
- , aeson
- , monad-logger
-- exposed-modules: Database.Persist.TH
-+ exposed-modules:
- ghc-options: -Wall
- if impl(ghc >= 7.4)
- cpp-options: -DGHC_7_4
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch b/standalone/android/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch
deleted file mode 100644
index 300975b83..000000000
--- a/standalone/android/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 760fa2c5044ae38bee8114ff84c625ac59f35c6f Mon Sep 17 00:00:00 2001
-From: foo <foo@bar>
-Date: Sun, 22 Sep 2013 00:03:55 +0000
-Subject: [PATCH] disable TH
-
----
- Database/Persist/Sql/Raw.hs | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/Database/Persist/Sql/Raw.hs b/Database/Persist/Sql/Raw.hs
-index 73189dd..6efebea 100644
---- a/Database/Persist/Sql/Raw.hs
-+++ b/Database/Persist/Sql/Raw.hs
-@@ -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.7.10.4
-
diff --git a/standalone/android/haskell-patches/profunctors_3.3-0001-fix-cross-build.patch b/standalone/android/haskell-patches/profunctors_3.3-0001-fix-cross-build.patch
deleted file mode 100644
index 45397f3e5..000000000
--- a/standalone/android/haskell-patches/profunctors_3.3-0001-fix-cross-build.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-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
-
diff --git a/standalone/android/haskell-patches/shakespeare-css_1.0.2_0001-remove-TH.patch b/standalone/android/haskell-patches/shakespeare-css_1.0.2_0001-remove-TH.patch
deleted file mode 100644
index 1c82eaead..000000000
--- a/standalone/android/haskell-patches/shakespeare-css_1.0.2_0001-remove-TH.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From 05d0b6e6d2f84cd8ff53b8ee3e42021fa02fe8e4 Mon Sep 17 00:00:00 2001
-From: foo <foo@bar>
-Date: Sat, 21 Sep 2013 23:21:52 +0000
-Subject: [PATCH] remove TH
-
----
- Text/Cassius.hs | 23 -----------------------
- Text/CssCommon.hs | 4 ----
- Text/Lucius.hs | 30 +-----------------------------
- 3 files changed, 1 insertion(+), 56 deletions(-)
-
-diff --git a/Text/Cassius.hs b/Text/Cassius.hs
-index ce05374..ae56b0a 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
-@@ -42,25 +35,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/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/Lucius.hs b/Text/Lucius.hs
-index 89328bd..0a1cf5e 100644
---- a/Text/Lucius.hs
-+++ b/Text/Lucius.hs
-@@ -8,12 +8,8 @@
- {-# OPTIONS_GHC -fno-warn-missing-fields #-}
- module Text.Lucius
- ( -- * Parsing
-- lucius
-- , luciusFile
-- , luciusFileDebug
-- , luciusFileReload
- -- ** Mixins
-- , luciusMixin
-+ luciusMixin
- , Mixin
- -- ** Runtime
- , luciusRT
-@@ -40,11 +36,8 @@ module Text.Lucius
- , AbsoluteUnit (..)
- , AbsoluteSize (..)
- , absoluteSize
-- , EmSize (..)
-- , ExSize (..)
- , PercentageSize (..)
- , percentageSize
-- , PixelSize (..)
- -- * Internal
- , parseTopLevels
- , luciusUsedIdentifiers
-@@ -66,18 +59,6 @@ import Data.Monoid (mconcat)
- import Data.List (isSuffixOf)
- import Control.Arrow (second)
-
---- |
----
---- >>> 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 ()
-
-@@ -217,15 +198,6 @@ parseComment = do
- _ <- manyTill anyChar $ try $ string "*/"
- return $ ContentRaw ""
-
--luciusFile :: FilePath -> Q Exp
--luciusFile fp = do
-- 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 =
- go id
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/shakespeare-css_1.0.2_0002-expose-modules-used-by-TH.patch b/standalone/android/haskell-patches/shakespeare-css_1.0.2_0002-expose-modules-used-by-TH.patch
deleted file mode 100644
index 5bf57d527..000000000
--- a/standalone/android/haskell-patches/shakespeare-css_1.0.2_0002-expose-modules-used-by-TH.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 23e96f0d948e7a26febf1745a4c373faf579c8ee Mon Sep 17 00:00:00 2001
-From: Joey Hess <joey@kitenet.net>
-Date: Mon, 15 Apr 2013 16:32:31 -0400
-Subject: [PATCH] expose modules used by TH
-
----
- shakespeare-css.cabal | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/shakespeare-css.cabal b/shakespeare-css.cabal
-index de2497b..468353a 100644
---- a/shakespeare-css.cabal
-+++ b/shakespeare-css.cabal
-@@ -39,8 +39,8 @@ library
-
- exposed-modules: Text.Cassius
- Text.Lucius
-- other-modules: Text.MkSizeType
- Text.Css
-+ other-modules: Text.MkSizeType
- Text.IndentToBrace
- Text.CssCommon
- ghc-options: -Wall
---
-1.8.2.rc3
-
diff --git a/standalone/android/haskell-patches/shakespeare_1.0.3_0001-export-symbol-used-by-TH-splices.patch b/standalone/android/haskell-patches/shakespeare_1.0.3_0001-export-symbol-used-by-TH-splices.patch
deleted file mode 100644
index 51443b5d4..000000000
--- a/standalone/android/haskell-patches/shakespeare_1.0.3_0001-export-symbol-used-by-TH-splices.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 4a75a2f0d77168aa3115b991284a5120484e18f0 Mon Sep 17 00:00:00 2001
-From: foo <foo@bar>
-Date: Sun, 22 Sep 2013 04:59:21 +0000
-Subject: [PATCH] TH exports
-
----
- Text/Shakespeare.hs | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/Text/Shakespeare.hs b/Text/Shakespeare.hs
-index 9eb06a2..1290ab1 100644
---- a/Text/Shakespeare.hs
-+++ b/Text/Shakespeare.hs
-@@ -23,6 +23,9 @@ module Text.Shakespeare
- , Deref
- , Parser
-
-+ -- used by TH
-+ , pack'
-+
- #ifdef TEST_EXPORT
- , preFilter
- #endif
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/wai-app-static_deal-with-TH.patch b/standalone/android/haskell-patches/wai-app-static_deal-with-TH.patch
deleted file mode 100644
index d9860f922..000000000
--- a/standalone/android/haskell-patches/wai-app-static_deal-with-TH.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 432a8fc47bb11cf8fd0a832e033cfb94a6332dbe Mon Sep 17 00:00:00 2001
-From: foo <foo@bar>
-Date: Sun, 22 Sep 2013 07:29:39 +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 ----
- wai-app-static.cabal | 2 +-
- 2 files changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/Network/Wai/Application/Static.hs b/Network/Wai/Application/Static.hs
-index 3f07391..75709b7 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
- H.status405
- [("Content-Type", "text/plain")]
- "Only GET is supported"
--staticAppPieces _ [".hidden", "folder.png"] _ = return $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/folder.png")]
--staticAppPieces _ [".hidden", "haskell.png"] _ = return $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/haskell.png")]
- staticAppPieces ss rawPieces req = liftIO $ do
- case toPieces rawPieces of
- Just pieces -> checkPieces ss pieces req >>= response
-diff --git a/wai-app-static.cabal b/wai-app-static.cabal
-index ec22813..e944caa 100644
---- a/wai-app-static.cabal
-+++ b/wai-app-static.cabal
-@@ -56,9 +56,9 @@ library
- WaiAppStatic.Storage.Embedded
- WaiAppStatic.Listing
- WaiAppStatic.Types
-- other-modules: Util
- WaiAppStatic.Storage.Embedded.Runtime
- WaiAppStatic.Storage.Embedded.TH
-+ other-modules: Util
- ghc-options: -Wall
- extensions: CPP
-
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/yesod-auth_don-t-really-build.patch b/standalone/android/haskell-patches/yesod-auth_don-t-really-build.patch
deleted file mode 100644
index 7016e001c..000000000
--- a/standalone/android/haskell-patches/yesod-auth_don-t-really-build.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 3eb7b0a42099721dc19363ac41319efeed4ac5f9 Mon Sep 17 00:00:00 2001
-From: foo <foo@bar>
-Date: Sun, 22 Sep 2013 05:19:53 +0000
-Subject: [PATCH] don't really build
-
----
- yesod-auth.cabal | 11 +----------
- 1 file changed, 1 insertion(+), 10 deletions(-)
-
-diff --git a/yesod-auth.cabal b/yesod-auth.cabal
-index 591ced5..11217be 100644
---- a/yesod-auth.cabal
-+++ b/yesod-auth.cabal
-@@ -52,16 +52,7 @@ library
- , safe
- , time
-
-- exposed-modules: Yesod.Auth
-- Yesod.Auth.BrowserId
-- Yesod.Auth.Dummy
-- Yesod.Auth.Email
-- Yesod.Auth.OpenId
-- Yesod.Auth.Rpxnow
-- Yesod.Auth.HashDB
-- Yesod.Auth.Message
-- Yesod.Auth.GoogleEmail
-- other-modules: Yesod.Auth.Routes
-+ exposed-modules:
- ghc-options: -Wall
-
- source-repository head
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/yesod-core_expand_TH.patch b/standalone/android/haskell-patches/yesod-core_expand_TH.patch
deleted file mode 100644
index 1687ff0e4..000000000
--- a/standalone/android/haskell-patches/yesod-core_expand_TH.patch
+++ /dev/null
@@ -1,411 +0,0 @@
-From 7583457fb410d07f480a2aa7d6c2f174324b3592 Mon Sep 17 00:00:00 2001
-From: dummy <dummy@example.com>
-Date: Sat, 19 Oct 2013 02:03:18 +0000
-Subject: [PATCH] hackity
-
----
- Yesod/Core.hs | 2 -
- Yesod/Core/Class/Yesod.hs | 247 ++++++++++++++++++++++++++++++--------------
- Yesod/Core/Dispatch.hs | 7 --
- Yesod/Core/Handler.hs | 24 ++---
- Yesod/Core/Internal/Run.hs | 2 -
- 5 files changed, 179 insertions(+), 103 deletions(-)
-
-diff --git a/Yesod/Core.hs b/Yesod/Core.hs
-index 12e59d5..f1ff21c 100644
---- a/Yesod/Core.hs
-+++ b/Yesod/Core.hs
-@@ -94,8 +94,6 @@ module Yesod.Core
- , JavascriptUrl
- , renderJavascriptUrl
- -- ** Cassius/Lucius
-- , cassius
-- , lucius
- , CssUrl
- , renderCssUrl
- ) where
-diff --git a/Yesod/Core/Class/Yesod.hs b/Yesod/Core/Class/Yesod.hs
-index cf02a1a..3f1e88e 100644
---- a/Yesod/Core/Class/Yesod.hs
-+++ b/Yesod/Core/Class/Yesod.hs
-@@ -9,6 +9,10 @@ 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)
-@@ -87,18 +91,27 @@ class RenderRoute site => Yesod site where
- defaultLayout w = do
- p <- widgetToPageContent w
- mmsg <- getMessage
-- giveUrlRenderer [hamlet|
-- $newline never
-- $doctype 5
-- <html>
-- <head>
-- <title>#{pageTitle p}
-- ^{pageHead p}
-- <body>
-- $maybe msg <- mmsg
-- <p .message>#{msg}
-- ^{pageBody p}
-- |]
-+ giveUrlRenderer $ \ _render_aHra
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "<!DOCTYPE html>\n<html><head><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) "</head><body>");
-+ Text.Hamlet.maybeH
-+ mmsg
-+ (\ msg_aHrb
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "<p class=\"message\">");
-+ id (TBH.toHtml msg_aHrb);
-+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</p>") })
-+ Nothing;
-+ Text.Hamlet.asHtmlUrl (pageBody p) _render_aHra;
-+ id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack) "</body></html>") }
-+
-
- -- | 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
-@@ -356,45 +369,103 @@ widgetToPageContent w = do
- -- modernizr should be at the end of the <head> 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
-- <script src="#{s}">
-- $nothing
-- <script>^{jelper j}
-- |]
--
-- headAll = [hamlet|
-- $newline never
-- \^{head'}
-- $forall s <- stylesheets
-- ^{mkLinkTag s}
-- $forall s <- css
-- $maybe t <- right $ snd s
-- $maybe media <- fst s
-- <link rel=stylesheet media=#{media} href=#{t}>
-- $nothing
-- <link rel=stylesheet href=#{t}>
-- $maybe content <- left $ snd s
-- $maybe media <- fst s
-- <style media=#{media}>#{content}
-- $nothing
-- <style>#{content}
-- $case jsLoader master
-- $of BottomOfBody
-- $of BottomOfHeadAsync asyncJsLoader
-- ^{asyncJsLoader asyncScripts mcomplete}
-- $of BottomOfHeadBlocking
-- ^{regularScriptLoad}
-- |]
-- let bodyScript = [hamlet|
-- $newline never
-- ^{body}
-- ^{regularScriptLoad}
-- |]
-+ regularScriptLoad = \ _render_aHsO
-+ -> do { Data.Foldable.mapM_
-+ (\ s_aHsP
-+ -> Text.Hamlet.asHtmlUrl (mkScriptTag s_aHsP) _render_aHsO)
-+ scripts;
-+ Text.Hamlet.maybeH
-+ jscript
-+ (\ j_aHsQ
-+ -> Text.Hamlet.maybeH
-+ jsLoc
-+ (\ s_aHsR
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "<script src=\"");
-+ id (TBH.toHtml s_aHsR);
-+ id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "\"></script>") })
-+ (Just
-+ (do { id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack) "<script>");
-+ Text.Hamlet.asHtmlUrl (jelper j_aHsQ) _render_aHsO;
-+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</script>") })))
-+ 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)
-+ "<style media=\"");
-+ id (TBH.toHtml media_aHt2);
-+ id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "\">");
-+ id (TBH.toHtml content_aHt1);
-+ id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "</style>") })
-+ (Just
-+ (do { id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "<style>");
-+ id (TBH.toHtml content_aHt1);
-+ id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "</style>") })))
-+ 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
-@@ -424,10 +495,13 @@ defaultErrorHandler NotFound = selectRep $ do
- r <- waiRequest
- let path' = TE.decodeUtf8With TEE.lenientDecode $ W.rawPathInfo r
- setTitle "Not Found"
-- toWidget [hamlet|
-- <h1>Not Found
-- <p>#{path'}
-- |]
-+ toWidget $ \ _render_aHte
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "<h1>Not Found</h1>\n<p>");
-+ id (TBH.toHtml path');
-+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</p>") }
-+
- provideRep $ return $ object ["message" .= ("Not Found" :: Text)]
-
- -- For API requests.
-@@ -437,10 +511,11 @@ defaultErrorHandler NotFound = selectRep $ do
- defaultErrorHandler NotAuthenticated = selectRep $ do
- provideRep $ defaultLayout $ do
- setTitle "Not logged in"
-- toWidget [hamlet|
-- <h1>Not logged in
-- <p style="display:none;">Set the authRoute and the user will be redirected there.
-- |]
-+ toWidget $ \ _render_aHti
-+ -> id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "<h1>Not logged in</h1>\n<p style=\"none;\">Set the authRoute and the user will be redirected there.</p>")
-+
-
- provideRep $ do
- -- 401 *MUST* include a WWW-Authenticate header
-@@ -462,10 +537,13 @@ defaultErrorHandler NotAuthenticated = selectRep $ do
- defaultErrorHandler (PermissionDenied msg) = selectRep $ do
- provideRep $ defaultLayout $ do
- setTitle "Permission Denied"
-- toWidget [hamlet|
-- <h1>Permission denied
-- <p>#{msg}
-- |]
-+ toWidget $ \ _render_aHtq
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "<h1>Permission denied</h1>\n<p>");
-+ id (TBH.toHtml msg);
-+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</p>") }
-+
- provideRep $
- return $ object $ [
- "message" .= ("Permission Denied. " <> msg)
-@@ -474,30 +552,43 @@ defaultErrorHandler (PermissionDenied msg) = selectRep $ do
- defaultErrorHandler (InvalidArgs ia) = selectRep $ do
- provideRep $ defaultLayout $ do
- setTitle "Invalid Arguments"
-- toWidget [hamlet|
-- <h1>Invalid Arguments
-- <ul>
-- $forall msg <- ia
-- <li>#{msg}
-- |]
-+ toWidget $ \ _render_aHtv
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "<h1>Invalid Arguments</h1>\n<ul>");
-+ Data.Foldable.mapM_
-+ (\ msg_aHtw
-+ -> do { id ((Text.Blaze.Internal.preEscapedText . T.pack) "<li>");
-+ id (TBH.toHtml msg_aHtw);
-+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</li>") })
-+ ia;
-+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</ul>") }
-+
- 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|
-- <h1>Internal Server Error
-- <pre>#{e}
-- |]
-+ toWidget $ \ _render_aHtC
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "<h1>Internal Server Error</h1>\n<pre>");
-+ id (TBH.toHtml e);
-+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</pre>") }
-+
- provideRep $ return $ object ["message" .= ("Internal Server Error" :: Text), "error" .= e]
- defaultErrorHandler (BadMethod m) = selectRep $ do
- provideRep $ defaultLayout $ do
- setTitle"Bad Method"
-- toWidget [hamlet|
-- <h1>Method Not Supported
-- <p>Method <code>#{S8.unpack m}</code> not supported
-- |]
-+ toWidget $ \ _render_aHtH
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "<h1>Method Not Supported</h1>\n<p>Method <code>");
-+ id (TBH.toHtml (S8.unpack m));
-+ id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "</code> not supported</p>") }
-+
- provideRep $ return $ object ["message" .= ("Bad method" :: Text), "method" .= m]
-
- asyncHelper :: (url -> [x] -> Text)
-diff --git a/Yesod/Core/Dispatch.hs b/Yesod/Core/Dispatch.hs
-index 335a15c..4ca05da 100644
---- a/Yesod/Core/Dispatch.hs
-+++ b/Yesod/Core/Dispatch.hs
-@@ -123,13 +123,6 @@ toWaiApp 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
-
-diff --git a/Yesod/Core/Handler.hs b/Yesod/Core/Handler.hs
-index f3b1799..d819b04 100644
---- a/Yesod/Core/Handler.hs
-+++ b/Yesod/Core/Handler.hs
-@@ -152,7 +152,7 @@ import qualified Control.Monad.Trans.Writer as Writer
-
- import Control.Monad.IO.Class (MonadIO, liftIO)
- import Control.Monad.Trans.Resource (MonadResource, liftResourceT)
--
-+import qualified Text.Blaze.Internal
- import qualified Network.HTTP.Types as H
- import qualified Network.Wai as W
- import Control.Monad.Trans.Class (lift)
-@@ -710,19 +710,15 @@ redirectToPost :: (MonadHandler m, RedirectUrl (HandlerSite m) url)
- -> m a
- redirectToPost url = do
- urlText <- toTextUrl url
-- giveUrlRenderer [hamlet|
--$newline never
--$doctype 5
--
--<html>
-- <head>
-- <title>Redirecting...
-- <body onload="document.getElementById('form').submit()">
-- <form id="form" method="post" action=#{urlText}>
-- <noscript>
-- <p>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<html><head><title>Redirecting...</title></head><body onload=\"document.getElementById('form').submit()\"><form id=\"form\" method=\"post\" action=\"");
-+ id (toHtml urlText);
-+ id
-+ ((Text.Blaze.Internal.preEscapedText . T.pack)
-+ "\"><noscript><p>Javascript has been disabled; please click on the button below to be redirected.</p></noscript><input type=\"submit\" value=\"Continue\"></form></body></html>") }
-+ >>= 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 35f1d3f..8b92e99 100644
---- a/Yesod/Core/Internal/Run.hs
-+++ b/Yesod/Core/Internal/Run.hs
-@@ -122,8 +122,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
- []
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/yesod-form_spliced-TH.patch b/standalone/android/haskell-patches/yesod-form_spliced-TH.patch
deleted file mode 100644
index 486d2aaee..000000000
--- a/standalone/android/haskell-patches/yesod-form_spliced-TH.patch
+++ /dev/null
@@ -1,1783 +0,0 @@
-From f645acc0efbfcba7715cd2b6734f0e9df98f7020 Mon Sep 17 00:00:00 2001
-From: dummy <dummy@example.com>
-Date: Mon, 11 Nov 2013 01:26:56 +0000
-Subject: [PATCH] update
-
----
- Yesod/Form/Fields.hs | 771 +++++++++++++++++++++++++++++++++++------------
- Yesod/Form/Functions.hs | 237 ++++++++++++---
- Yesod/Form/Jquery.hs | 125 ++++++--
- Yesod/Form/MassInput.hs | 233 +++++++++++---
- Yesod/Form/Nic.hs | 61 +++-
- yesod-form.cabal | 1 +
- 6 files changed, 1122 insertions(+), 306 deletions(-)
-
-diff --git a/Yesod/Form/Fields.hs b/Yesod/Form/Fields.hs
-index 0689859..1e9d49b 100644
---- a/Yesod/Form/Fields.hs
-+++ b/Yesod/Form/Fields.hs
-@@ -1,4 +1,3 @@
--{-# LANGUAGE QuasiQuotes #-}
- {-# LANGUAGE TypeFamilies #-}
- {-# LANGUAGE OverloadedStrings #-}
- {-# LANGUAGE GeneralizedNewtypeDeriving #-}
-@@ -36,15 +35,11 @@ module Yesod.Form.Fields
- , selectFieldList
- , radioField
- , radioFieldList
-- , checkboxesFieldList
-- , checkboxesField
- , multiSelectField
- , multiSelectFieldList
- , Option (..)
- , OptionList (..)
- , mkOptionList
-- , optionsPersist
-- , optionsPersistKey
- , optionsPairs
- , optionsEnum
- ) where
-@@ -70,6 +65,15 @@ import Text.HTML.SanitizeXSS (sanitizeBalance)
- import Control.Monad (when, unless)
- import Data.Maybe (listToMaybe, fromMaybe)
-
-+import qualified Text.Blaze as Text.Blaze.Internal
-+import qualified Text.Blaze.Internal
-+import qualified Text.Hamlet
-+import qualified Yesod.Core.Widget
-+import qualified Text.Css
-+import qualified Data.Monoid
-+import qualified Data.Foldable
-+import qualified Control.Monad
-+
- import qualified Blaze.ByteString.Builder.Html.Utf8 as B
- import Blaze.ByteString.Builder (writeByteString, toLazyByteString)
- import Blaze.ByteString.Builder.Internal.Write (fromWriteList)
-@@ -82,14 +86,12 @@ import Data.Text (Text, unpack, pack)
- import qualified Data.Text.Read
-
- import qualified Data.Map as Map
--import Yesod.Persist (selectList, runDB, Filter, SelectOpt, Key, YesodPersist, PersistEntity, PersistQuery, YesodDB)
- import Control.Arrow ((&&&))
-
- import Control.Applicative ((<$>), (<|>))
-
- import Data.Attoparsec.Text (Parser, char, string, digit, skipSpace, endOfInput, parseOnly)
-
--import Yesod.Persist.Core
-
- defaultFormMessage :: FormMessage -> Text
- defaultFormMessage = englishFormMessage
-@@ -102,10 +104,24 @@ intField = Field
- Right (a, "") -> Right a
- _ -> Left $ MsgInvalidInteger s
-
-- , fieldView = \theId name attrs val isReq -> toWidget [hamlet|
--$newline never
--<input id="#{theId}" name="#{name}" *{attrs} type="number" :isReq:required="" value="#{showVal val}">
--|]
-+ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_arOn
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\"");
-+ id (toHtml theId);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ id (toHtml name);
-+ id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"number\"");
-+ Text.Hamlet.condH
-+ [(isReq,
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))]
-+ Nothing;
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\"");
-+ id (toHtml (showVal val));
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- , fieldEnctype = UrlEncoded
- }
- where
-@@ -119,10 +135,24 @@ doubleField = Field
- Right (a, "") -> Right a
- _ -> Left $ MsgInvalidNumber s
-
-- , fieldView = \theId name attrs val isReq -> toWidget [hamlet|
--$newline never
--<input id="#{theId}" name="#{name}" *{attrs} type="text" :isReq:required="" value="#{showVal val}">
--|]
-+ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_arOz
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\"");
-+ id (toHtml theId);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ id (toHtml name);
-+ id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"text\"");
-+ Text.Hamlet.condH
-+ [(isReq,
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))]
-+ Nothing;
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\"");
-+ id (toHtml (showVal val));
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- , fieldEnctype = UrlEncoded
- }
- where showVal = either id (pack . show)
-@@ -130,10 +160,24 @@ $newline never
- dayField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Day
- dayField = Field
- { fieldParse = parseHelper $ parseDate . unpack
-- , fieldView = \theId name attrs val isReq -> toWidget [hamlet|
--$newline never
--<input id="#{theId}" name="#{name}" *{attrs} type="date" :isReq:required="" value="#{showVal val}">
--|]
-+ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_arOJ
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\"");
-+ id (toHtml theId);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ id (toHtml name);
-+ id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"date\"");
-+ Text.Hamlet.condH
-+ [(isReq,
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))]
-+ Nothing;
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\"");
-+ id (toHtml (showVal val));
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- , fieldEnctype = UrlEncoded
- }
- where showVal = either id (pack . show)
-@@ -141,10 +185,23 @@ $newline never
- timeField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m TimeOfDay
- timeField = Field
- { fieldParse = parseHelper parseTime
-- , fieldView = \theId name attrs val isReq -> toWidget [hamlet|
--$newline never
--<input id="#{theId}" name="#{name}" *{attrs} :isReq:required="" value="#{showVal val}">
--|]
-+ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_arOW
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\"");
-+ id (toHtml theId);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ id (toHtml name);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ Text.Hamlet.condH
-+ [(isReq,
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))]
-+ Nothing;
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\"");
-+ id (toHtml (showVal val));
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- , fieldEnctype = UrlEncoded
- }
- where
-@@ -157,10 +214,18 @@ $newline never
- htmlField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Html
- htmlField = Field
- { fieldParse = parseHelper $ Right . preEscapedText . sanitizeBalance
-- , fieldView = \theId name attrs val _isReq -> toWidget [hamlet|
--$newline never
--<textarea id="#{theId}" name="#{name}" *{attrs}>#{showVal val}
--|]
-+ , fieldView = \theId name attrs val _isReq -> toWidget $ \ _render_arP6
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<textarea id=\"");
-+ id (toHtml theId);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ id (toHtml name);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) ">");
-+ id (toHtml (showVal val));
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "</textarea>") }
-+
- , fieldEnctype = UrlEncoded
- }
- where showVal = either id (pack . renderHtml)
-@@ -169,8 +234,6 @@ $newline never
- -- br-tags.
- newtype Textarea = Textarea { unTextarea :: Text }
- deriving (Show, Read, Eq, PersistField, Ord)
--instance PersistFieldSql Textarea where
-- sqlType _ = SqlString
- instance ToHtml Textarea where
- toHtml =
- unsafeByteString
-@@ -188,10 +251,18 @@ instance ToHtml Textarea where
- textareaField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Textarea
- textareaField = Field
- { fieldParse = parseHelper $ Right . Textarea
-- , fieldView = \theId name attrs val _isReq -> toWidget [hamlet|
--$newline never
--<textarea id="#{theId}" name="#{name}" *{attrs}>#{either id unTextarea val}
--|]
-+ , fieldView = \theId name attrs val _isReq -> toWidget $ \ _render_arPf
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<textarea id=\"");
-+ id (toHtml theId);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ id (toHtml name);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) ">");
-+ id (toHtml (either id unTextarea val));
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "</textarea>") }
-+
- , fieldEnctype = UrlEncoded
- }
-
-@@ -199,10 +270,19 @@ hiddenField :: (Monad m, PathPiece p, RenderMessage (HandlerSite m) FormMessage)
- => Field m p
- hiddenField = Field
- { fieldParse = parseHelper $ maybe (Left MsgValueRequired) Right . fromPathPiece
-- , fieldView = \theId name attrs val _isReq -> toWidget [hamlet|
--$newline never
--<input type="hidden" id="#{theId}" name="#{name}" *{attrs} value="#{either id toPathPiece val}">
--|]
-+ , fieldView = \theId name attrs val _isReq -> toWidget $ \ _render_arPo
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<input type=\"hidden\" id=\"");
-+ id (toHtml theId);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ id (toHtml name);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\" value=\"");
-+ id (toHtml (either id toPathPiece val));
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- , fieldEnctype = UrlEncoded
- }
-
-@@ -210,20 +290,55 @@ textField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Tex
- textField = Field
- { fieldParse = parseHelper $ Right
- , fieldView = \theId name attrs val isReq ->
-- [whamlet|
--$newline never
--<input id="#{theId}" name="#{name}" *{attrs} type="text" :isReq:required value="#{either id id val}">
--|]
-+ do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml name);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"text\"");
-+ Text.Hamlet.condH
-+ [(isReq,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " required"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " value=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (toHtml (either id id val));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- , fieldEnctype = UrlEncoded
- }
-
- passwordField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Text
- passwordField = Field
- { fieldParse = parseHelper $ Right
-- , fieldView = \theId name attrs val isReq -> toWidget [hamlet|
--$newline never
--<input id="#{theId}" name="#{name}" *{attrs} type="password" :isReq:required="" value="#{either id id val}">
--|]
-+ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_arPF
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\"");
-+ id (toHtml theId);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ id (toHtml name);
-+ id
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "\" type=\"password\"");
-+ Text.Hamlet.condH
-+ [(isReq,
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))]
-+ Nothing;
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\"");
-+ id (toHtml (either id id val));
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- , fieldEnctype = UrlEncoded
- }
-
-@@ -295,10 +410,24 @@ emailField = Field
- case Email.canonicalizeEmail $ encodeUtf8 s of
- Just e -> Right $ decodeUtf8With lenientDecode e
- Nothing -> Left $ MsgInvalidEmail s
-- , fieldView = \theId name attrs val isReq -> toWidget [hamlet|
--$newline never
--<input id="#{theId}" name="#{name}" *{attrs} type="email" :isReq:required="" value="#{either id id val}">
--|]
-+ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_arQe
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\"");
-+ id (toHtml theId);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ id (toHtml name);
-+ id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"email\"");
-+ Text.Hamlet.condH
-+ [(isReq,
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))]
-+ Nothing;
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\"");
-+ id (toHtml (either id id val));
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- , fieldEnctype = UrlEncoded
- }
-
-@@ -307,20 +436,78 @@ searchField :: Monad m => RenderMessage (HandlerSite m) FormMessage => AutoFocus
- searchField autoFocus = Field
- { fieldParse = parseHelper Right
- , fieldView = \theId name attrs val isReq -> do
-- [whamlet|\
--$newline never
--<input id="#{theId}" name="#{name}" *{attrs} type="search" :isReq:required="" :autoFocus:autofocus="" value="#{either id id val}">
--|]
-+ do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml name);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"search\"");
-+ Text.Hamlet.condH
-+ [(isReq,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))]
-+ Nothing;
-+ Text.Hamlet.condH
-+ [(autoFocus,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " autofocus=\"\""))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " value=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (toHtml (either id id val));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- when autoFocus $ do
- -- we want this javascript to be placed immediately after the field
-- [whamlet|
--$newline never
--<script>if (!('autofocus' in document.createElement('input'))) {document.getElementById('#{theId}').focus();}
--|]
-- toWidget [cassius|
-- ##{theId}
-- -webkit-appearance: textfield
-- |]
-+ do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<script>if (!('autofocus' in document.createElement('input'))) {document.getElementById('");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "').focus();}</script>") }
-+
-+ toWidget $ \ _render_arQv
-+ -> (Text.Css.CssNoWhitespace
-+ . (foldr ($) []))
-+ [((++)
-+ $ (map
-+ Text.Css.TopBlock
-+ (((Text.Css.Block
-+ {Text.Css.blockSelector = Data.Monoid.mconcat
-+ [(Text.Css.fromText
-+ . Text.Css.pack)
-+ "#",
-+ toCss theId],
-+ Text.Css.blockAttrs = (concat
-+ $ ([Text.Css.Attr
-+ (Data.Monoid.mconcat
-+ [(Text.Css.fromText
-+ . Text.Css.pack)
-+ "-webkit-appearance"])
-+ (Data.Monoid.mconcat
-+ [(Text.Css.fromText
-+ . Text.Css.pack)
-+ "textfield"])]
-+ :
-+ (map
-+ Text.Css.mixinAttrs
-+ []))),
-+ Text.Css.blockBlocks = (),
-+ Text.Css.blockMixins = ()}
-+ :)
-+ . ((foldr (.) id [])
-+ . (concatMap Text.Css.mixinBlocks [] ++)))
-+ [])))]
-+
- , fieldEnctype = UrlEncoded
- }
-
-@@ -331,7 +518,30 @@ urlField = Field
- Nothing -> Left $ MsgInvalidUrl s
- Just _ -> Right s
- , fieldView = \theId name attrs val isReq ->
-- [whamlet|<input ##{theId} name=#{name} *{attrs} type=url :isReq:required value=#{either id id val}>|]
-+ do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml name);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"url\"");
-+ Text.Hamlet.condH
-+ [(isReq,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " required"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " value=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (toHtml (either id id val));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- , fieldEnctype = UrlEncoded
- }
-
-@@ -344,18 +554,56 @@ selectField :: (Eq a, RenderMessage site FormMessage)
- => HandlerT site IO (OptionList a)
- -> Field (HandlerT site IO) a
- selectField = selectFieldHelper
-- (\theId name attrs inside -> [whamlet|
--$newline never
--<select ##{theId} name=#{name} *{attrs}>^{inside}
--|]) -- outside
-- (\_theId _name isSel -> [whamlet|
--$newline never
--<option value=none :isSel:selected>_{MsgSelectNone}
--|]) -- onOpt
-- (\_theId _name _attrs value isSel text -> [whamlet|
--$newline never
--<option value=#{value} :isSel:selected>#{text}
--|]) -- inside
-+ (\theId name attrs inside -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<select id=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml name);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) ">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) inside;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</select>") })
-+ -- outside
-+ (\_theId _name isSel -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<option value=\"none\"");
-+ Text.Hamlet.condH
-+ [(isSel,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " selected"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) ">");
-+ ((Control.Monad.liftM (toHtml .) getMessageRender)
-+ >>=
-+ (\ urender_arQS
-+ -> (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (urender_arQS MsgSelectNone)));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</option>") })
-+ -- onOpt
-+ (\_theId _name _attrs value isSel text -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<option value=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml value);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ Text.Hamlet.condH
-+ [(isSel,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " selected"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) ">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml text);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</option>") })
-+ -- inside
-
- multiSelectFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg)
- => [(msg, a)]
-@@ -378,11 +626,48 @@ multiSelectField ioptlist =
- view theId name attrs val isReq = do
- opts <- fmap olOptions $ handlerToWidget ioptlist
- let selOpts = map (id &&& (optselected val)) opts
-- [whamlet|
-- <select ##{theId} name=#{name} :isReq:required multiple *{attrs}>
-- $forall (opt, optsel) <- selOpts
-- <option value=#{optionExternalValue opt} :optsel:selected>#{optionDisplay opt}
-- |]
-+ do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<select id=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml name);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ Text.Hamlet.condH
-+ [(isReq,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " required"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " multiple");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) ">");
-+ Data.Foldable.mapM_
-+ (\ (opt_arRl, optsel_arRm)
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<option value=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (toHtml (optionExternalValue opt_arRl));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ Text.Hamlet.condH
-+ [(optsel_arRm,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " selected"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) ">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (toHtml (optionDisplay opt_arRl));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</option>") })
-+ selOpts;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</select>") }
-+
- where
- optselected (Left _) _ = False
- optselected (Right vals) opt = (optionInternalValue opt) `elem` vals
-@@ -392,67 +677,172 @@ radioFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg)
- -> Field (HandlerT site IO) a
- radioFieldList = radioField . optionsPairs
-
--checkboxesFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg) => [(msg, a)]
-- -> Field (HandlerT site IO) [a]
--checkboxesFieldList = checkboxesField . optionsPairs
--
--checkboxesField :: (Eq a, RenderMessage site FormMessage)
-- => HandlerT site IO (OptionList a)
-- -> Field (HandlerT site IO) [a]
--checkboxesField ioptlist = (multiSelectField ioptlist)
-- { fieldView =
-- \theId name attrs val isReq -> do
-- opts <- fmap olOptions $ handlerToWidget ioptlist
-- let optselected (Left _) _ = False
-- optselected (Right vals) opt = (optionInternalValue opt) `elem` vals
-- [whamlet|
-- <span ##{theId}>
-- $forall opt <- opts
-- <label>
-- <input type=checkbox name=#{name} value=#{optionExternalValue opt} *{attrs} :optselected val opt:checked>
-- #{optionDisplay opt}
-- |]
-- }
-
- radioField :: (Eq a, RenderMessage site FormMessage)
- => HandlerT site IO (OptionList a)
- -> Field (HandlerT site IO) a
- radioField = selectFieldHelper
-- (\theId _name _attrs inside -> [whamlet|
--$newline never
--<div ##{theId}>^{inside}
--|])
-- (\theId name isSel -> [whamlet|
--$newline never
--<label .radio for=#{theId}-none>
-- <div>
-- <input id=#{theId}-none type=radio name=#{name} value=none :isSel:checked>
-- _{MsgSelectNone}
--|])
-- (\theId name attrs value isSel text -> [whamlet|
--$newline never
--<label .radio for=#{theId}-#{value}>
-- <div>
-- <input id=#{theId}-#{value} type=radio name=#{name} value=#{value} :isSel:checked *{attrs}>
-- \#{text}
--|])
-+ (\theId _name _attrs inside -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<div id=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) inside;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</div>") })
-+
-+ (\theId name isSel -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<label class=\"radio\" for=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "-none\"><div><input id=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "-none\" type=\"radio\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml name);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" value=\"none\"");
-+ Text.Hamlet.condH
-+ [(isSel,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " checked"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) ">");
-+ ((Control.Monad.liftM (toHtml .) getMessageRender)
-+ >>=
-+ (\ urender_arRA
-+ -> (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (urender_arRA MsgSelectNone)));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</div></label>") })
-+
-+ (\theId name attrs value isSel text -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<label class=\"radio\" for=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "-");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml value);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "\"><div><input id=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "-");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml value);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "\" type=\"radio\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml name);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" value=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml value);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ Text.Hamlet.condH
-+ [(isSel,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " checked"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) ">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml text);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</div></label>") })
-+
-
- boolField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Bool
- boolField = Field
- { fieldParse = \e _ -> return $ boolParser e
-- , fieldView = \theId name attrs val isReq -> [whamlet|
--$newline never
-- $if not isReq
-- <input id=#{theId}-none *{attrs} type=radio name=#{name} value=none checked>
-- <label for=#{theId}-none>_{MsgSelectNone}
-+ , fieldView = \theId name attrs val isReq -> do { Text.Hamlet.condH
-+ [(not isReq,
-+ do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "-none\" type=\"radio\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml name);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "\" value=\"none\" checked");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "><label for=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "-none\">");
-+ ((Control.Monad.liftM (toHtml .) getMessageRender)
-+ >>=
-+ (\ urender_arRX
-+ -> (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (urender_arRX MsgSelectNone)));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</label>") })]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "-yes\" type=\"radio\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml name);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" value=\"yes\"");
-+ Text.Hamlet.condH
-+ [(showVal id val,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " checked"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "><label for=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "-yes\">");
-+ ((Control.Monad.liftM (toHtml .) getMessageRender)
-+ >>=
-+ (\ urender_arRY
-+ -> (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (urender_arRY MsgBoolYes)));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "</label><input id=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "-no\" type=\"radio\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml name);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" value=\"no\"");
-+ Text.Hamlet.condH
-+ [(showVal not val,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " checked"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "><label for=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "-no\">");
-+ ((Control.Monad.liftM (toHtml .) getMessageRender)
-+ >>=
-+ (\ urender_arRZ
-+ -> (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (urender_arRZ MsgBoolNo)));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</label>") }
-
--
--<input id=#{theId}-yes *{attrs} type=radio name=#{name} value=yes :showVal id val:checked>
--<label for=#{theId}-yes>_{MsgBoolYes}
--
--<input id=#{theId}-no *{attrs} type=radio name=#{name} value=no :showVal not val:checked>
--<label for=#{theId}-no>_{MsgBoolNo}
--|]
- , fieldEnctype = UrlEncoded
- }
- where
-@@ -478,10 +868,25 @@ $newline never
- checkBoxField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Bool
- checkBoxField = Field
- { fieldParse = \e _ -> return $ checkBoxParser e
-- , fieldView = \theId name attrs val _ -> [whamlet|
--$newline never
--<input id=#{theId} *{attrs} type=checkbox name=#{name} value=yes :showVal id val:checked>
--|]
-+ , fieldView = \theId name attrs val _ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml theId);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "\" type=\"checkbox\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml name);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" value=\"yes\"");
-+ Text.Hamlet.condH
-+ [(showVal id val,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " checked"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- , fieldEnctype = UrlEncoded
- }
-
-@@ -525,49 +930,7 @@ optionsPairs opts = do
- optionsEnum :: (MonadHandler m, Show a, Enum a, Bounded a) => m (OptionList a)
- optionsEnum = optionsPairs $ map (\x -> (pack $ show x, x)) [minBound..maxBound]
-
--optionsPersist :: ( YesodPersist site, PersistEntity a
-- , PersistQuery (YesodDB site)
-- , PathPiece (Key a)
-- , PersistEntityBackend a ~ PersistMonadBackend (YesodDB site)
-- , RenderMessage site msg
-- )
-- => [Filter a]
-- -> [SelectOpt a]
-- -> (a -> msg)
-- -> HandlerT site IO (OptionList (Entity a))
--optionsPersist filts ords toDisplay = fmap mkOptionList $ do
-- mr <- getMessageRender
-- pairs <- runDB $ selectList filts ords
-- return $ map (\(Entity key value) -> Option
-- { optionDisplay = mr (toDisplay value)
-- , optionInternalValue = Entity key value
-- , optionExternalValue = toPathPiece key
-- }) pairs
--
---- | An alternative to 'optionsPersist' which returns just the @Key@ instead of
---- the entire @Entity@.
----
---- Since 1.3.2
--optionsPersistKey
-- :: (YesodPersist site
-- , PersistEntity a
-- , PersistQuery (YesodPersistBackend site (HandlerT site IO))
-- , PathPiece (Key a)
-- , RenderMessage site msg
-- , PersistEntityBackend a ~ PersistMonadBackend (YesodDB site))
-- => [Filter a]
-- -> [SelectOpt a]
-- -> (a -> msg)
-- -> HandlerT site IO (OptionList (Key a))
--
--optionsPersistKey filts ords toDisplay = fmap mkOptionList $ do
-- mr <- getMessageRender
-- pairs <- runDB $ selectList filts ords
-- return $ map (\(Entity key value) -> Option
-- { optionDisplay = mr (toDisplay value)
-- , optionInternalValue = key
-- , optionExternalValue = toPathPiece key
-- }) pairs
-+
-
- selectFieldHelper
- :: (Eq a, RenderMessage site FormMessage)
-@@ -611,9 +974,21 @@ fileField = Field
- case files of
- [] -> Right Nothing
- file:_ -> Right $ Just file
-- , fieldView = \id' name attrs _ isReq -> toWidget [hamlet|
-- <input id=#{id'} name=#{name} *{attrs} type=file :isReq:required>
-- |]
-+ , fieldView = \id' name attrs _ isReq -> toWidget $ \ _render_arSN
-+ -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\"");
-+ id (toHtml id');
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ id (toHtml name);
-+ id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"file\"");
-+ Text.Hamlet.condH
-+ [(isReq,
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " required"))]
-+ Nothing;
-+ id ((Text.Hamlet.attrsToHtml . toAttributes) attrs);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- , fieldEnctype = Multipart
- }
-
-@@ -640,10 +1015,20 @@ fileAFormReq fs = AForm $ \(site, langs) menvs ints -> do
- { fvLabel = toHtml $ renderMessage site langs $ fsLabel fs
- , fvTooltip = fmap (toHtml . renderMessage site langs) $ fsTooltip fs
- , fvId = id'
-- , fvInput = [whamlet|
--$newline never
--<input type=file name=#{name} ##{id'} *{fsAttrs fs}>
--|]
-+ , fvInput = do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<input type=\"file\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml name);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" id=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml id');
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Hamlet.attrsToHtml . toAttributes) (fsAttrs fs));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- , fvErrors = errs
- , fvRequired = True
- }
-@@ -672,10 +1057,20 @@ fileAFormOpt fs = AForm $ \(master, langs) menvs ints -> do
- { fvLabel = toHtml $ renderMessage master langs $ fsLabel fs
- , fvTooltip = fmap (toHtml . renderMessage master langs) $ fsTooltip fs
- , fvId = id'
-- , fvInput = [whamlet|
--$newline never
--<input type=file name=#{name} ##{id'} *{fsAttrs fs}>
--|]
-+ , fvInput = do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<input type=\"file\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml name);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" id=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml id');
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Hamlet.attrsToHtml . toAttributes) (fsAttrs fs));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- , fvErrors = errs
- , fvRequired = False
- }
-diff --git a/Yesod/Form/Functions.hs b/Yesod/Form/Functions.hs
-index 8a36710..c375ae0 100644
---- a/Yesod/Form/Functions.hs
-+++ b/Yesod/Form/Functions.hs
-@@ -59,6 +59,10 @@ import Data.Maybe (listToMaybe, fromMaybe)
- import qualified Data.Map as Map
- import qualified Data.Text.Encoding as TE
- import Control.Arrow (first)
-+import qualified Text.Blaze.Internal
-+import qualified Yesod.Core.Widget
-+import qualified Data.Foldable
-+import qualified Text.Hamlet
-
- -- | Get a unique identifier.
- newFormIdent :: Monad m => MForm m Text
-@@ -210,7 +214,14 @@ postHelper form env = do
- let token =
- case reqToken req of
- Nothing -> mempty
-- Just n -> [shamlet|<input type=hidden name=#{tokenKey} value=#{n}>|]
-+ Just n -> do { id
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<input type=\"hidden\" name=\"");
-+ id (toHtml tokenKey);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\" value=\"");
-+ id (toHtml n);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\">") }
-+
- m <- getYesod
- langs <- languages
- ((res, xml), enctype) <- runFormGeneric (form token) m langs env
-@@ -279,7 +290,12 @@ getHelper :: MonadHandler m
- -> Maybe (Env, FileEnv)
- -> m (a, Enctype)
- getHelper form env = do
-- let fragment = [shamlet|<input type=hidden name=#{getKey}>|]
-+ let fragment = do { id
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<input type=\"hidden\" name=\"");
-+ id (toHtml getKey);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\">") }
-+
- langs <- languages
- m <- getYesod
- runFormGeneric (form fragment) m langs env
-@@ -293,19 +309,66 @@ renderTable, renderDivs, renderDivsNoLabels :: Monad m => FormRender m a
- renderTable aform fragment = do
- (res, views') <- aFormToForm aform
- let views = views' []
-- let widget = [whamlet|
--$newline never
--\#{fragment}
--$forall view <- views
-- <tr :fvRequired view:.required :not $ fvRequired view:.optional>
-- <td>
-- <label for=#{fvId view}>#{fvLabel view}
-- $maybe tt <- fvTooltip view
-- <div .tooltip>#{tt}
-- <td>^{fvInput view}
-- $maybe err <- fvErrors view
-- <td .errors>#{err}
--|]
-+ let widget = do { (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml fragment);
-+ Data.Foldable.mapM_
-+ (\ view_aagq
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<tr");
-+ Text.Hamlet.condH
-+ [(or [fvRequired view_aagq, not (fvRequired view_aagq)],
-+ do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " class=\"");
-+ Text.Hamlet.condH
-+ [(fvRequired view_aagq,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "required "))]
-+ Nothing;
-+ Text.Hamlet.condH
-+ [(not (fvRequired view_aagq),
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "optional"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\"") })]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "><td><label for=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml (fvId view_aagq));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (toHtml (fvLabel view_aagq));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</label>");
-+ Text.Hamlet.maybeH
-+ (fvTooltip view_aagq)
-+ (\ tt_aagr
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<div class=\"tooltip\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml tt_aagr);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</div>") })
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</td><td>");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (fvInput view_aagq);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</td>");
-+ Text.Hamlet.maybeH
-+ (fvErrors view_aagq)
-+ (\ err_aags
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<td class=\"errors\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml err_aags);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</td>") })
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</tr>") })
-+ views }
-+
- return (res, widget)
-
- -- | render a field inside a div
-@@ -318,19 +381,67 @@ renderDivsMaybeLabels :: Monad m => Bool -> FormRender m a
- renderDivsMaybeLabels withLabels aform fragment = do
- (res, views') <- aFormToForm aform
- let views = views' []
-- let widget = [whamlet|
--$newline never
--\#{fragment}
--$forall view <- views
-- <div :fvRequired view:.required :not $ fvRequired view:.optional>
-- $if withLabels
-- <label for=#{fvId view}>#{fvLabel view}
-- $maybe tt <- fvTooltip view
-- <div .tooltip>#{tt}
-- ^{fvInput view}
-- $maybe err <- fvErrors view
-- <div .errors>#{err}
--|]
-+ let widget = do { (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml fragment);
-+ Data.Foldable.mapM_
-+ (\ view_aagE
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<div");
-+ Text.Hamlet.condH
-+ [(or [fvRequired view_aagE, not (fvRequired view_aagE)],
-+ do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) " class=\"");
-+ Text.Hamlet.condH
-+ [(fvRequired view_aagE,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "required "))]
-+ Nothing;
-+ Text.Hamlet.condH
-+ [(not (fvRequired view_aagE),
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "optional"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\"") })]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) ">");
-+ Text.Hamlet.condH
-+ [(withLabels,
-+ do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<label for=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml (fvId view_aagE));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (toHtml (fvLabel view_aagE));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</label>") })]
-+ Nothing;
-+ Text.Hamlet.maybeH
-+ (fvTooltip view_aagE)
-+ (\ tt_aagF
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<div class=\"tooltip\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml tt_aagF);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</div>") })
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (fvInput view_aagE);
-+ Text.Hamlet.maybeH
-+ (fvErrors view_aagE)
-+ (\ err_aagG
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<div class=\"errors\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml err_aagG);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</div>") })
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</div>") })
-+ views }
-+
- return (res, widget)
-
- -- | Render a form using Bootstrap-friendly shamlet syntax.
-@@ -354,19 +465,63 @@ renderBootstrap aform fragment = do
- let views = views' []
- has (Just _) = True
- has Nothing = False
-- let widget = [whamlet|
-- $newline never
-- \#{fragment}
-- $forall view <- views
-- <div .control-group .clearfix :fvRequired view:.required :not $ fvRequired view:.optional :has $ fvErrors view:.error>
-- <label .control-label for=#{fvId view}>#{fvLabel view}
-- <div .controls .input>
-- ^{fvInput view}
-- $maybe tt <- fvTooltip view
-- <span .help-block>#{tt}
-- $maybe err <- fvErrors view
-- <span .help-block>#{err}
-- |]
-+ let widget = do { (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml fragment);
-+ Data.Foldable.mapM_
-+ (\ view_aagR
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<div class=\"control-group clearfix ");
-+ Text.Hamlet.condH
-+ [(fvRequired view_aagR,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "required "))]
-+ Nothing;
-+ Text.Hamlet.condH
-+ [(not (fvRequired view_aagR),
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "optional "))]
-+ Nothing;
-+ Text.Hamlet.condH
-+ [(has (fvErrors view_aagR),
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "error"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "\"><label class=\"control-label\" for=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml (fvId view_aagR));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (toHtml (fvLabel view_aagR));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "</label><div class=\"controls input\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (fvInput view_aagR);
-+ Text.Hamlet.maybeH
-+ (fvTooltip view_aagR)
-+ (\ tt_aagS
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<span class=\"help-block\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml tt_aagS);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</span>") })
-+ Nothing;
-+ Text.Hamlet.maybeH
-+ (fvErrors view_aagR)
-+ (\ err_aagT
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<span class=\"help-block\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml err_aagT);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</span>") })
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . pack) "</div></div>") })
-+ views }
-+
- return (res, widget)
-
- check :: (Monad m, RenderMessage (HandlerSite m) msg)
-diff --git a/Yesod/Form/Jquery.hs b/Yesod/Form/Jquery.hs
-index 2c4ae25..4362188 100644
---- a/Yesod/Form/Jquery.hs
-+++ b/Yesod/Form/Jquery.hs
-@@ -12,6 +12,18 @@ module Yesod.Form.Jquery
- , Default (..)
- ) where
-
-+import qualified Text.Blaze as Text.Blaze.Internal
-+import qualified Text.Blaze.Internal
-+import qualified Text.Hamlet
-+import qualified Yesod.Core.Widget
-+import qualified Text.Css
-+import qualified Data.Monoid
-+import qualified Data.Foldable
-+import qualified Control.Monad
-+import qualified Text.Julius
-+import qualified Data.Text.Lazy.Builder
-+import qualified Text.Shakespeare
-+
- import Yesod.Core
- import Yesod.Form
- import Data.Time (Day)
-@@ -60,27 +72,59 @@ jqueryDayField jds = Field
- . readMay
- . unpack
- , fieldView = \theId name attrs val isReq -> do
-- toWidget [shamlet|
--$newline never
--<input id="#{theId}" name="#{name}" *{attrs} type="date" :isReq:required="" value="#{showVal val}">
--|]
-+ toWidget $ do { id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "<input id=\"");
-+ id (toHtml theId);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ id (toHtml name);
-+ id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"date\"");
-+ Text.Hamlet.condH
-+ [(isReq,
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))]
-+ Nothing;
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\"");
-+ id (toHtml (showVal val));
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ id ((Text.Hamlet.attrsToHtml . Text.Hamlet.toAttributes) attrs);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- addScript' urlJqueryJs
- addScript' urlJqueryUiJs
- addStylesheet' urlJqueryUiCss
-- toWidget [julius|
--$(function(){
-- var i = document.getElementById("#{rawJS theId}");
-- if (i.type != "date") {
-- $(i).datepicker({
-- dateFormat:'yy-mm-dd',
-- changeMonth:#{jsBool $ jdsChangeMonth jds},
-- changeYear:#{jsBool $ jdsChangeYear jds},
-- numberOfMonths:#{rawJS $ mos $ jdsNumberOfMonths jds},
-- yearRange:#{toJSON $ jdsYearRange jds}
-- });
-- }
--});
--|]
-+ toWidget $ Text.Julius.asJavascriptUrl
-+ (\ _render_a1lYC
-+ -> mconcat
-+ [Text.Julius.Javascript
-+ ((Data.Text.Lazy.Builder.fromText
-+ . Text.Shakespeare.pack')
-+ "\n$(function(){\n var i = document.getElementById(\""),
-+ Text.Julius.toJavascript (rawJS theId),
-+ Text.Julius.Javascript
-+ ((Data.Text.Lazy.Builder.fromText
-+ . Text.Shakespeare.pack')
-+ "\");\n if (i.type != \"date\") {\n $(i).datepicker({\n dateFormat:'yy-mm-dd',\n changeMonth:"),
-+ Text.Julius.toJavascript (jsBool (jdsChangeMonth jds)),
-+ Text.Julius.Javascript
-+ ((Data.Text.Lazy.Builder.fromText
-+ . Text.Shakespeare.pack')
-+ ",\n changeYear:"),
-+ Text.Julius.toJavascript (jsBool (jdsChangeYear jds)),
-+ Text.Julius.Javascript
-+ ((Data.Text.Lazy.Builder.fromText
-+ . Text.Shakespeare.pack')
-+ ",\n numberOfMonths:"),
-+ Text.Julius.toJavascript (rawJS (mos (jdsNumberOfMonths jds))),
-+ Text.Julius.Javascript
-+ ((Data.Text.Lazy.Builder.fromText
-+ . Text.Shakespeare.pack')
-+ ",\n yearRange:"),
-+ Text.Julius.toJavascript (toJSON (jdsYearRange jds)),
-+ Text.Julius.Javascript
-+ ((Data.Text.Lazy.Builder.fromText
-+ . Text.Shakespeare.pack')
-+ "\n });\n }\n});")])
-+
- , fieldEnctype = UrlEncoded
- }
- where
-@@ -101,16 +145,47 @@ jqueryAutocompleteField :: (RenderMessage site FormMessage, YesodJquery site)
- jqueryAutocompleteField src = Field
- { fieldParse = parseHelper $ Right
- , fieldView = \theId name attrs val isReq -> do
-- toWidget [shamlet|
--$newline never
--<input id="#{theId}" name="#{name}" *{attrs} type="text" :isReq:required="" value="#{either id id val}" .autocomplete>
--|]
-+ toWidget $ do { id
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<input class=\"autocomplete\" id=\"");
-+ id (toHtml theId);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ id (toHtml name);
-+ id
-+ ((Text.Blaze.Internal.preEscapedText . pack) "\" type=\"text\"");
-+ Text.Hamlet.condH
-+ [(isReq,
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " required=\"\""))]
-+ Nothing;
-+ id ((Text.Blaze.Internal.preEscapedText . pack) " value=\"");
-+ id (toHtml (either id id val));
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ id ((Text.Hamlet.attrsToHtml . Text.Hamlet.toAttributes) attrs);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) ">") }
-+
- addScript' urlJqueryJs
- addScript' urlJqueryUiJs
- addStylesheet' urlJqueryUiCss
-- toWidget [julius|
--$(function(){$("##{rawJS theId}").autocomplete({source:"@{src}",minLength:2})});
--|]
-+ toWidget $ Text.Julius.asJavascriptUrl
-+ (\ _render_a1lYP
-+ -> mconcat
-+ [Text.Julius.Javascript
-+ ((Data.Text.Lazy.Builder.fromText
-+ . Text.Shakespeare.pack')
-+ "\n$(function(){$(\"#"),
-+ Text.Julius.toJavascript (rawJS theId),
-+ Text.Julius.Javascript
-+ ((Data.Text.Lazy.Builder.fromText
-+ . Text.Shakespeare.pack')
-+ "\").autocomplete({source:\""),
-+ Text.Julius.Javascript
-+ (Data.Text.Lazy.Builder.fromText
-+ (_render_a1lYP src [])),
-+ Text.Julius.Javascript
-+ ((Data.Text.Lazy.Builder.fromText
-+ . Text.Shakespeare.pack')
-+ "\",minLength:2})});")])
-+
- , fieldEnctype = UrlEncoded
- }
-
-diff --git a/Yesod/Form/MassInput.hs b/Yesod/Form/MassInput.hs
-index 332eb66..5015e7b 100644
---- a/Yesod/Form/MassInput.hs
-+++ b/Yesod/Form/MassInput.hs
-@@ -9,6 +9,16 @@ module Yesod.Form.MassInput
- , massTable
- ) where
-
-+import qualified Data.Text
-+import qualified Text.Blaze as Text.Blaze.Internal
-+import qualified Text.Blaze.Internal
-+import qualified Text.Hamlet
-+import qualified Yesod.Core.Widget
-+import qualified Text.Css
-+import qualified Data.Monoid
-+import qualified Data.Foldable
-+import qualified Control.Monad
-+
- import Yesod.Form.Types
- import Yesod.Form.Functions
- import Yesod.Form.Fields (boolField)
-@@ -70,16 +80,28 @@ inputList label fixXml single mdef = formToAForm $ do
- { fvLabel = label
- , fvTooltip = Nothing
- , fvId = theId
-- , fvInput = [whamlet|
--$newline never
--^{fixXml views}
--<p>
-- $forall xml <- xmls
-- ^{xml}
-- <input .count type=hidden name=#{countName} value=#{count}>
-- <input type=checkbox name=#{addName}>
-- Add another row
--|]
-+ , fvInput = do { (Yesod.Core.Widget.asWidgetT . toWidget) (fixXml views);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "<p>");
-+ Data.Foldable.mapM_
-+ (\ xml_aUS3 -> (Yesod.Core.Widget.asWidgetT . toWidget) xml_aUS3)
-+ xmls;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "<input class=\"count\" type=\"hidden\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml countName);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "\" value=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml count);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "\"><input type=\"checkbox\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml addName);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "\">Add another row</p>") }
-+
- , fvErrors = Nothing
- , fvRequired = False
- }])
-@@ -92,10 +114,14 @@ withDelete af = do
- deleteName <- newFormIdent
- (menv, _, _) <- ask
- res <- case menv >>= Map.lookup deleteName . fst of
-- Just ("yes":_) -> return $ Left [whamlet|
--$newline never
--<input type=hidden name=#{deleteName} value=yes>
--|]
-+ Just ("yes":_) -> return $ Left $ do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "<input type=\"hidden\" name=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml deleteName);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "\" value=\"yes\">") }
-+
- _ -> do
- (_, xml2) <- aFormToForm $ areq boolField FieldSettings
- { fsLabel = SomeMessage MsgDelete
-@@ -121,32 +147,155 @@ fixme eithers =
- massDivs, massTable
- :: [[FieldView site]]
- -> WidgetT site IO ()
--massDivs viewss = [whamlet|
--$newline never
--$forall views <- viewss
-- <fieldset>
-- $forall view <- views
-- <div :fvRequired view:.required :not $ fvRequired view:.optional>
-- <label for=#{fvId view}>#{fvLabel view}
-- $maybe tt <- fvTooltip view
-- <div .tooltip>#{tt}
-- ^{fvInput view}
-- $maybe err <- fvErrors view
-- <div .errors>#{err}
--|]
-+massDivs viewss = Data.Foldable.mapM_
-+ (\ views_aUSm
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "<fieldset>");
-+ Data.Foldable.mapM_
-+ (\ view_aUSn
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "<div");
-+ Text.Hamlet.condH
-+ [(or [fvRequired view_aUSn, not (fvRequired view_aUSn)],
-+ do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ " class=\"");
-+ Text.Hamlet.condH
-+ [(fvRequired view_aUSn,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "required "))]
-+ Nothing;
-+ Text.Hamlet.condH
-+ [(not (fvRequired view_aUSn),
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "optional"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "\"") })]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "><label for=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml (fvId view_aUSn));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (toHtml (fvLabel view_aUSn));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "</label>");
-+ Text.Hamlet.maybeH
-+ (fvTooltip view_aUSn)
-+ (\ tt_aUSo
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "<div class=\"tooltip\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (toHtml tt_aUSo);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "</div>") })
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (fvInput view_aUSn);
-+ Text.Hamlet.maybeH
-+ (fvErrors view_aUSn)
-+ (\ err_aUSp
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "<div class=\"errors\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (toHtml err_aUSp);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "</div>") })
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "</div>") })
-+ views_aUSm;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "</fieldset>") })
-+ viewss
-+
-+
-+massTable viewss = Data.Foldable.mapM_
-+ (\ views_aUSu
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "<fieldset><table>");
-+ Data.Foldable.mapM_
-+ (\ view_aUSv
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "<tr");
-+ Text.Hamlet.condH
-+ [(or [fvRequired view_aUSv, not (fvRequired view_aUSv)],
-+ do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ " class=\"");
-+ Text.Hamlet.condH
-+ [(fvRequired view_aUSv,
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "required "))]
-+ Nothing;
-+ Text.Hamlet.condH
-+ [(not (fvRequired view_aUSv),
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "optional"))]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "\"") })]
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "><td><label for=\"");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (toHtml (fvId view_aUSv));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (toHtml (fvLabel view_aUSv));
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "</label>");
-+ Text.Hamlet.maybeH
-+ (fvTooltip view_aUSv)
-+ (\ tt_aUSw
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "<div class=\"tooltip\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (toHtml tt_aUSw);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "</div>") })
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "</td><td>");
-+ (Yesod.Core.Widget.asWidgetT . toWidget) (fvInput view_aUSv);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "</td>");
-+ Text.Hamlet.maybeH
-+ (fvErrors view_aUSv)
-+ (\ err_aUSx
-+ -> do { (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "<td class=\"errors\">");
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ (toHtml err_aUSx);
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "</td>") })
-+ Nothing;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack) "</tr>") })
-+ views_aUSu;
-+ (Yesod.Core.Widget.asWidgetT . toWidget)
-+ ((Text.Blaze.Internal.preEscapedText . Data.Text.pack)
-+ "</table></fieldset>") })
-+ viewss
-
--massTable viewss = [whamlet|
--$newline never
--$forall views <- viewss
-- <fieldset>
-- <table>
-- $forall view <- views
-- <tr :fvRequired view:.required :not $ fvRequired view:.optional>
-- <td>
-- <label for=#{fvId view}>#{fvLabel view}
-- $maybe tt <- fvTooltip view
-- <div .tooltip>#{tt}
-- <td>^{fvInput view}
-- $maybe err <- fvErrors view
-- <td .errors>#{err}
--|]
-diff --git a/Yesod/Form/Nic.hs b/Yesod/Form/Nic.hs
-index 2862678..7b49b1a 100644
---- a/Yesod/Form/Nic.hs
-+++ b/Yesod/Form/Nic.hs
-@@ -9,6 +9,19 @@ module Yesod.Form.Nic
- , nicHtmlField
- ) where
-
-+import qualified Text.Blaze as Text.Blaze.Internal
-+import qualified Text.Blaze.Internal
-+import qualified Text.Hamlet
-+import qualified Yesod.Core.Widget
-+import qualified Text.Css
-+import qualified Data.Monoid
-+import qualified Data.Foldable
-+import qualified Control.Monad
-+import qualified Text.Julius
-+import qualified Data.Text.Lazy.Builder
-+import qualified Text.Shakespeare
-+
-+
- import Yesod.Core
- import Yesod.Form
- import Text.HTML.SanitizeXSS (sanitizeBalance)
-@@ -27,20 +40,48 @@ nicHtmlField :: YesodNic site => Field (HandlerT site IO) Html
- nicHtmlField = Field
- { fieldParse = \e _ -> return . Right . fmap (preEscapedToMarkup . sanitizeBalance) . listToMaybe $ e
- , fieldView = \theId name attrs val _isReq -> do
-- toWidget [shamlet|
--$newline never
-- <textarea id="#{theId}" *{attrs} name="#{name}" .html>#{showVal val}
--|]
-+ toWidget $ do { id
-+ ((Text.Blaze.Internal.preEscapedText . pack)
-+ "<textarea class=\"html\" id=\"");
-+ id (toHtml theId);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\" name=\"");
-+ id (toHtml name);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "\"");
-+ id ((Text.Hamlet.attrsToHtml . Text.Hamlet.toAttributes) attrs);
-+ id ((Text.Blaze.Internal.preEscapedText . pack) ">");
-+ id (toHtml (showVal val));
-+ id ((Text.Blaze.Internal.preEscapedText . pack) "</textarea>") }
-+
- addScript' urlNicEdit
- master <- getYesod
- toWidget $
- case jsLoader master of
-- BottomOfHeadBlocking -> [julius|
--bkLib.onDomLoaded(function(){new nicEditor({fullPanel:true}).panelInstance("#{rawJS theId}")});
--|]
-- _ -> [julius|
--(function(){new nicEditor({fullPanel:true}).panelInstance("#{rawJS theId}")})();
--|]
-+ BottomOfHeadBlocking -> Text.Julius.asJavascriptUrl
-+ (\ _render_a1qhO
-+ -> Data.Monoid.mconcat
-+ [Text.Julius.Javascript
-+ ((Data.Text.Lazy.Builder.fromText
-+ . Text.Shakespeare.pack')
-+ "\nbkLib.onDomLoaded(function(){new nicEditor({true}).panelInstance(\""),
-+ Text.Julius.toJavascript (rawJS theId),
-+ Text.Julius.Javascript
-+ ((Data.Text.Lazy.Builder.fromText
-+ . Text.Shakespeare.pack')
-+ "\")});")])
-+
-+ _ -> Text.Julius.asJavascriptUrl
-+ (\ _render_a1qhS
-+ -> Data.Monoid.mconcat
-+ [Text.Julius.Javascript
-+ ((Data.Text.Lazy.Builder.fromText
-+ . Text.Shakespeare.pack')
-+ "\n(function(){new nicEditor({true}).panelInstance(\""),
-+ Text.Julius.toJavascript (rawJS theId),
-+ Text.Julius.Javascript
-+ ((Data.Text.Lazy.Builder.fromText
-+ . Text.Shakespeare.pack')
-+ "\")})();")])
-+
- , fieldEnctype = UrlEncoded
- }
- where
-diff --git a/yesod-form.cabal b/yesod-form.cabal
-index 39fa680..88ed066 100644
---- a/yesod-form.cabal
-+++ b/yesod-form.cabal
-@@ -19,6 +19,7 @@ library
- , time >= 1.1.4
- , hamlet >= 1.1 && < 1.2
- , shakespeare-css >= 1.0 && < 1.1
-+ , shakespeare
- , shakespeare-js >= 1.0.2 && < 1.3
- , persistent >= 1.2 && < 1.3
- , template-haskell
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/yesod-persistent_do-not-really-build.patch b/standalone/android/haskell-patches/yesod-persistent_do-not-really-build.patch
deleted file mode 100644
index ecccf75ac..000000000
--- a/standalone/android/haskell-patches/yesod-persistent_do-not-really-build.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 03819615edb1c5f7414768dae84234d6791bd758 Mon Sep 17 00:00:00 2001
-From: foo <foo@bar>
-Date: Sun, 22 Sep 2013 04:11:46 +0000
-Subject: [PATCH] do not really build
-
----
- yesod-persistent.cabal | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/yesod-persistent.cabal b/yesod-persistent.cabal
-index 98c2146..11960cf 100644
---- a/yesod-persistent.cabal
-+++ b/yesod-persistent.cabal
-@@ -23,8 +23,7 @@ library
- , lifted-base
- , pool-conduit
- , resourcet
-- exposed-modules: Yesod.Persist
-- Yesod.Persist.Core
-+ exposed-modules:
- ghc-options: -Wall
-
- test-suite test
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/yesod-routes_export-module-referenced-by-TH-splices.patch b/standalone/android/haskell-patches/yesod-routes_export-module-referenced-by-TH-splices.patch
deleted file mode 100644
index e20e3c7f1..000000000
--- a/standalone/android/haskell-patches/yesod-routes_export-module-referenced-by-TH-splices.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From f6bfe8e01d8fe6d129ad3819070aa17934094a0a Mon Sep 17 00:00:00 2001
-From: foo <foo@bar>
-Date: Sun, 22 Sep 2013 06:24:09 +0000
-Subject: [PATCH] export module referenced by TH splices
-
----
- yesod-routes.cabal | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/yesod-routes.cabal b/yesod-routes.cabal
-index 0b245f2..a97582a 100644
---- a/yesod-routes.cabal
-+++ b/yesod-routes.cabal
-@@ -27,11 +27,11 @@ library
- Yesod.Routes.Class
- Yesod.Routes.Parse
- Yesod.Routes.Overlap
-+ Yesod.Routes.TH.Types
- other-modules: Yesod.Routes.TH.Dispatch
- Yesod.Routes.TH.RenderRoute
- Yesod.Routes.TH.ParseRoute
- Yesod.Routes.TH.RouteAttrs
-- Yesod.Routes.TH.Types
- ghc-options: -Wall
-
- test-suite runtests
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/yesod_001_hacked-up-for-Android.patch b/standalone/android/haskell-patches/yesod_001_hacked-up-for-Android.patch
deleted file mode 100644
index 23ba50d33..000000000
--- a/standalone/android/haskell-patches/yesod_001_hacked-up-for-Android.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 8bf7c428a42b984f63f435bb34f22743202ae449 Mon Sep 17 00:00:00 2001
-From: foo <foo@bar>
-Date: Sun, 22 Sep 2013 05:24:19 +0000
-Subject: [PATCH] hacked up for Android
-
----
- Yesod.hs | 2 --
- Yesod/Default/Util.hs | 17 -----------------
- 2 files changed, 19 deletions(-)
-
-diff --git a/Yesod.hs b/Yesod.hs
-index b367144..3050bf5 100644
---- a/Yesod.hs
-+++ b/Yesod.hs
-@@ -5,9 +5,7 @@ module Yesod
- ( -- * Re-exports from yesod-core
- module Yesod.Core
- , module Yesod.Form
-- , module Yesod.Persist
- ) where
-
- import Yesod.Core
- import Yesod.Form
--import Yesod.Persist
-diff --git a/Yesod/Default/Util.hs b/Yesod/Default/Util.hs
-index a10358e..c5a4e58 100644
---- a/Yesod/Default/Util.hs
-+++ b/Yesod/Default/Util.hs
-@@ -8,7 +8,6 @@ module Yesod.Default.Util
- , widgetFileNoReload
- , widgetFileReload
- , TemplateLanguage (..)
-- , defaultTemplateLanguages
- , WidgetFileSettings
- , wfsLanguages
- , wfsHamletSettings
-@@ -20,9 +19,6 @@ import Yesod.Core -- purposely using complete import so that Haddock will see ad
- import Control.Monad (when, unless)
- import System.Directory (doesFileExist, createDirectoryIfMissing)
- import Language.Haskell.TH.Syntax
--import Text.Lucius (luciusFile, luciusFileReload)
--import Text.Julius (juliusFile, juliusFileReload)
--import Text.Cassius (cassiusFile, cassiusFileReload)
- import Text.Hamlet (HamletSettings, defaultHamletSettings)
- import Data.Maybe (catMaybes)
- import Data.Default (Default (def))
-@@ -69,24 +65,11 @@ data TemplateLanguage = TemplateLanguage
- , tlReload :: FilePath -> Q Exp
- }
-
--defaultTemplateLanguages :: HamletSettings -> [TemplateLanguage]
--defaultTemplateLanguages hset =
-- [ TemplateLanguage False "hamlet" whamletFile' whamletFile'
-- , TemplateLanguage True "cassius" cassiusFile cassiusFileReload
-- , TemplateLanguage True "julius" juliusFile juliusFileReload
-- , TemplateLanguage True "lucius" luciusFile luciusFileReload
-- ]
-- where
-- whamletFile' = whamletFileWithSettings hset
--
- data WidgetFileSettings = WidgetFileSettings
- { wfsLanguages :: HamletSettings -> [TemplateLanguage]
- , wfsHamletSettings :: HamletSettings
- }
-
--instance Default WidgetFileSettings where
-- def = WidgetFileSettings defaultTemplateLanguages defaultHamletSettings
--
- widgetFileNoReload :: WidgetFileSettings -> FilePath -> Q Exp
- widgetFileNoReload wfs x = combine "widgetFileNoReload" x False $ wfsLanguages wfs $ wfsHamletSettings wfs
-
---
-1.7.10.4
-
diff --git a/standalone/android/haskell-patches/yesod_002_hack-around-missing-symbols.patch b/standalone/android/haskell-patches/yesod_002_hack-around-missing-symbols.patch
deleted file mode 100644
index eaad739e5..000000000
--- a/standalone/android/haskell-patches/yesod_002_hack-around-missing-symbols.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 7e815b11f242d6836f9615439e32f9937bf2feaf Mon Sep 17 00:00:00 2001
-From: foo <foo@bar>
-Date: Sun, 22 Sep 2013 13:59:34 +0000
-Subject: [PATCH] hack around missing symbols
-
----
- Yesod.hs | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/Yesod.hs b/Yesod.hs
-index 3050bf5..fbe309c 100644
---- a/Yesod.hs
-+++ b/Yesod.hs
-@@ -5,7 +5,24 @@ module Yesod
- ( -- * Re-exports from yesod-core
- module Yesod.Core
- , module Yesod.Form
-+ , insertBy
-+ , replace
-+ , deleteBy
-+ , delete
-+ , insert
-+ , Key
- ) where
-
- import Yesod.Core
- import Yesod.Form
-+
-+-- These symbols are usually imported from persistent,
-+-- But it is not built on Android. Still export them
-+-- just so that hiding them will work.
-+data Key = DummyKey
-+insertBy = undefined
-+replace = undefined
-+deleteBy = undefined
-+delete = undefined
-+insert = undefined
-+
---
-1.7.10.4
-