From 9c8abb761f138434fe8bb12f9aaf16936fb39b1c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 15 Oct 2014 11:49:13 -0400 Subject: [PATCH] revert reversion This reverts commit 7bfc4a544271269a22422b9884c80384820bc8eb. Android build is going to have consistent versions again. --- Assistant/WebApp/Bootstrap3.hs | 24 ------------------------ Assistant/WebApp/Form.hs | 6 +++++- Command/Map.hs | 4 ++-- Command/Trust.hs | 4 ++-- Utility/Yesod.hs | 4 ++++ 5 files changed, 13 insertions(+), 29 deletions(-) diff --git a/Assistant/WebApp/Bootstrap3.hs b/Assistant/WebApp/Bootstrap3.hs index 795778a8d4..3fa20fc4dd 100644 --- a/Assistant/WebApp/Bootstrap3.hs +++ b/Assistant/WebApp/Bootstrap3.hs @@ -1,7 +1,6 @@ {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE CPP #-} -- | Helper functions for creating forms when using Bootstrap v3. -- This is a copy of the Yesod.Form.Bootstrap3 module that has been slightly -- modified to be compatible with Yesod 1.0.1 @@ -149,20 +148,13 @@ data BootstrapFormLayout = -- > ^{bootstrapSubmit MsgSubmit} -- -- Since: yesod-form 1.3.8 -#if MIN_VERSION_yesod(1,2,0) -renderBootstrap3 :: Monad m => BootstrapFormLayout -> FormRender m a -#else renderBootstrap3 :: BootstrapFormLayout -> FormRender sub master a -#endif renderBootstrap3 formLayout aform fragment = do (res, views') <- aFormToForm aform let views = views' [] has (Just _) = True has Nothing = False widget = [whamlet| -#if MIN_VERSION_yesod(1,2,0) - $newline never -#endif #{fragment} $forall view <- views
@@ -193,11 +185,7 @@ renderBootstrap3 formLayout aform fragment = do nequals a b = a /= b -- work around older hamlet versions not liking /= -- | (Internal) Render a help widget for tooltips and errors. -#if MIN_VERSION_yesod(1,2,0) -helpWidget :: FieldView site -> WidgetT site IO () -#else helpWidget :: FieldView sub master -> GWidget sub master () -#endif helpWidget view = [whamlet| $maybe tt <- fvTooltip view #{tt} @@ -242,13 +230,7 @@ instance IsString msg => IsString (BootstrapSubmit msg) where -- layout. -- -- Since: yesod-form 1.3.8 -#if MIN_VERSION_yesod(1,2,0) -bootstrapSubmit - :: (RenderMessage site msg, HandlerSite m ~ site, MonadHandler m) - => BootstrapSubmit msg -> AForm m () -#else bootstrapSubmit :: (RenderMessage master msg) => BootstrapSubmit msg -> AForm sub master () -#endif bootstrapSubmit = formToAForm . liftM (second return) . mbootstrapSubmit @@ -257,13 +239,7 @@ bootstrapSubmit = formToAForm . liftM (second return) . mbootstrapSubmit -- anyway. -- -- Since: yesod-form 1.3.8 -#if MIN_VERSION_yesod(1,2,0) -mbootstrapSubmit - :: (RenderMessage site msg, HandlerSite m ~ site, MonadHandler m) - => BootstrapSubmit msg -> MForm m (FormResult (), FieldView site) -#else mbootstrapSubmit :: (RenderMessage master msg) => BootstrapSubmit msg -> MForm sub master (FormResult (), FieldView sub master) -#endif mbootstrapSubmit (BootstrapSubmit msg classes attrs) = let res = FormSuccess () widget = [whamlet|