String -> Text

This commit is contained in:
Michael Snoyman 2011-04-16 20:17:56 +03:00
parent b31335f4da
commit ca4eb9cb90
3 changed files with 4 additions and 7 deletions

View File

@ -65,7 +65,6 @@ import Control.Arrow ((&&&))
import Data.List (group, sort) import Data.List (group, sort)
import Data.Monoid (mempty) import Data.Monoid (mempty)
import Data.Text (Text) import Data.Text (Text)
import Text.Blaze (toHtml)
#if __GLASGOW_HASKELL__ >= 700 #if __GLASGOW_HASKELL__ >= 700
#define HAMLET hamlet #define HAMLET hamlet

View File

@ -55,7 +55,6 @@ import Control.Monad (join)
import Data.Text (Text, pack) import Data.Text (Text, pack)
import qualified Data.Text as T import qualified Data.Text as T
import Prelude hiding ((++)) import Prelude hiding ((++))
import Data.Monoid (Monoid (mappend))
(++) :: Monoid a => a -> a -> a (++) :: Monoid a => a -> a -> a
(++) = mappend (++) = mappend

View File

@ -63,9 +63,8 @@ import Text.Hamlet
import Data.Monoid import Data.Monoid
import Control.Monad (join) import Control.Monad (join)
import Data.Maybe (fromMaybe, isNothing) import Data.Maybe (fromMaybe, isNothing)
import Data.Text (Text, pack, unpack) import Data.Text (Text, unpack)
import qualified Data.Text as T import qualified Data.Text as T
import Text.Blaze (toHtml)
#if __GLASGOW_HASKELL__ >= 700 #if __GLASGOW_HASKELL__ >= 700
#define HAMLET hamlet #define HAMLET hamlet
@ -170,7 +169,7 @@ maybeHtmlField :: (IsForm f, FormType f ~ Maybe Html)
maybeHtmlField = optionalFieldHelper htmlFieldProfile maybeHtmlField = optionalFieldHelper htmlFieldProfile
selectField :: (Eq x, IsForm f, FormType f ~ x) selectField :: (Eq x, IsForm f, FormType f ~ x)
=> [(x, String)] => [(x, Text)]
-> FormFieldSettings -> FormFieldSettings
-> Maybe x -> Maybe x
-> f -> f
@ -406,7 +405,7 @@ fileWidget theId name isReq = [HAMLET|
|] |]
radioField :: (Eq x, IsForm f, FormType f ~ x) radioField :: (Eq x, IsForm f, FormType f ~ x)
=> [(x, String)] => [(x, Text)]
-> FormFieldSettings -> FormFieldSettings
-> Maybe x -> Maybe x
-> f -> f
@ -452,7 +451,7 @@ radioField pairs ffs initial = toForm $ do
maybeRadioField maybeRadioField
:: (Eq x, IsForm f, FormType f ~ Maybe x) :: (Eq x, IsForm f, FormType f ~ Maybe x)
=> [(x, String)] => [(x, Text)]
-> FormFieldSettings -> FormFieldSettings
-> Maybe (FormType f) -> Maybe (FormType f)
-> f -> f