From 67d215d2f22c3b8588b0d0f1482ee51fbf9f7f8f Mon Sep 17 00:00:00 2001 From: pythonissam Date: Sun, 3 Jun 2018 08:18:31 +0000 Subject: [PATCH 1/3] Make Textarea derive IsString --- yesod-form/Yesod/Form/Fields.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yesod-form/Yesod/Form/Fields.hs b/yesod-form/Yesod/Form/Fields.hs index a79d75cb..d64776ff 100644 --- a/yesod-form/Yesod/Form/Fields.hs +++ b/yesod-form/Yesod/Form/Fields.hs @@ -106,6 +106,8 @@ import Data.Attoparsec.Text (Parser, char, string, digit, skipSpace, endOfInput, import Yesod.Persist.Core +import Data.String (IsString) + #if !MIN_VERSION_base(4,8,0) import Data.Monoid #endif @@ -217,7 +219,7 @@ $newline never -- If this text is then placed verbatim into HTML, the lines won't be separated, thus the need for replacing with @\
@ tags). -- If you don't need this functionality, simply use 'unTextarea' to access the raw text. newtype Textarea = Textarea { unTextarea :: Text } - deriving (Show, Read, Eq, PersistField, Ord, ToJSON, FromJSON) + deriving (Show, Read, Eq, PersistField, Ord, ToJSON, FromJSON, IsString) instance PersistFieldSql Textarea where sqlType _ = SqlString instance ToHtml Textarea where From b101276dcbbe07b728e8629444a6a2eaeba17afc Mon Sep 17 00:00:00 2001 From: pythonissam Date: Sun, 3 Jun 2018 08:22:09 +0000 Subject: [PATCH 2/3] version bump --- yesod-form/yesod-form.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yesod-form/yesod-form.cabal b/yesod-form/yesod-form.cabal index f3e2fa51..d6953929 100644 --- a/yesod-form/yesod-form.cabal +++ b/yesod-form/yesod-form.cabal @@ -1,5 +1,5 @@ name: yesod-form -version: 1.6.2 +version: 1.6.3 license: MIT license-file: LICENSE author: Michael Snoyman From 22197d12157c2e40b2ed472cf60a33133236c42d Mon Sep 17 00:00:00 2001 From: pythonissam Date: Sun, 3 Jun 2018 08:27:57 +0000 Subject: [PATCH 3/3] Update ChangeLog --- yesod-form/ChangeLog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yesod-form/ChangeLog.md b/yesod-form/ChangeLog.md index 1251b945..af0f887b 100644 --- a/yesod-form/ChangeLog.md +++ b/yesod-form/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.6.3 + +* Changed `Textarea` to derive `IsString` [#1514](https://github.com/yesodweb/yesod/pull/1514) + ## 1.6.2 * Move `addClass` from private/undocumented in `Yesod.Form.Bootstrap3` to `Yesod.Form.Functions` [#1510](https://github.com/yesodweb/yesod/pull/1510)