From ca4eb9cb90c84ada5b0549ad41c0756e626cc31c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sat, 16 Apr 2011 20:17:56 +0300 Subject: [PATCH] String -> Text --- Yesod/Form.hs | 1 - Yesod/Form/Core.hs | 1 - Yesod/Form/Fields.hs | 9 ++++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Yesod/Form.hs b/Yesod/Form.hs index 237ddeb1..fb19cf94 100644 --- a/Yesod/Form.hs +++ b/Yesod/Form.hs @@ -65,7 +65,6 @@ import Control.Arrow ((&&&)) import Data.List (group, sort) import Data.Monoid (mempty) import Data.Text (Text) -import Text.Blaze (toHtml) #if __GLASGOW_HASKELL__ >= 700 #define HAMLET hamlet diff --git a/Yesod/Form/Core.hs b/Yesod/Form/Core.hs index 9b08fff9..ec3a3bcc 100644 --- a/Yesod/Form/Core.hs +++ b/Yesod/Form/Core.hs @@ -55,7 +55,6 @@ import Control.Monad (join) import Data.Text (Text, pack) import qualified Data.Text as T import Prelude hiding ((++)) -import Data.Monoid (Monoid (mappend)) (++) :: Monoid a => a -> a -> a (++) = mappend diff --git a/Yesod/Form/Fields.hs b/Yesod/Form/Fields.hs index ccf8bfef..faf63846 100644 --- a/Yesod/Form/Fields.hs +++ b/Yesod/Form/Fields.hs @@ -63,9 +63,8 @@ import Text.Hamlet import Data.Monoid import Control.Monad (join) import Data.Maybe (fromMaybe, isNothing) -import Data.Text (Text, pack, unpack) +import Data.Text (Text, unpack) import qualified Data.Text as T -import Text.Blaze (toHtml) #if __GLASGOW_HASKELL__ >= 700 #define HAMLET hamlet @@ -170,7 +169,7 @@ maybeHtmlField :: (IsForm f, FormType f ~ Maybe Html) maybeHtmlField = optionalFieldHelper htmlFieldProfile selectField :: (Eq x, IsForm f, FormType f ~ x) - => [(x, String)] + => [(x, Text)] -> FormFieldSettings -> Maybe x -> f @@ -406,7 +405,7 @@ fileWidget theId name isReq = [HAMLET| |] radioField :: (Eq x, IsForm f, FormType f ~ x) - => [(x, String)] + => [(x, Text)] -> FormFieldSettings -> Maybe x -> f @@ -452,7 +451,7 @@ radioField pairs ffs initial = toForm $ do maybeRadioField :: (Eq x, IsForm f, FormType f ~ Maybe x) - => [(x, String)] + => [(x, Text)] -> FormFieldSettings -> Maybe (FormType f) -> f