Merge pull request #1514 from pythonissam/isstring-textarea-instance
Make Textarea derive IsString
This commit is contained in:
commit
f21140ecf0
@ -1,3 +1,7 @@
|
|||||||
|
## 1.6.3
|
||||||
|
|
||||||
|
* Changed `Textarea` to derive `IsString` [#1514](https://github.com/yesodweb/yesod/pull/1514)
|
||||||
|
|
||||||
## 1.6.2
|
## 1.6.2
|
||||||
|
|
||||||
* Move `addClass` from private/undocumented in `Yesod.Form.Bootstrap3` to `Yesod.Form.Functions` [#1510](https://github.com/yesodweb/yesod/pull/1510)
|
* Move `addClass` from private/undocumented in `Yesod.Form.Bootstrap3` to `Yesod.Form.Functions` [#1510](https://github.com/yesodweb/yesod/pull/1510)
|
||||||
|
|||||||
@ -106,6 +106,8 @@ import Data.Attoparsec.Text (Parser, char, string, digit, skipSpace, endOfInput,
|
|||||||
|
|
||||||
import Yesod.Persist.Core
|
import Yesod.Persist.Core
|
||||||
|
|
||||||
|
import Data.String (IsString)
|
||||||
|
|
||||||
#if !MIN_VERSION_base(4,8,0)
|
#if !MIN_VERSION_base(4,8,0)
|
||||||
import Data.Monoid
|
import Data.Monoid
|
||||||
#endif
|
#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 @\<br>@ tags).
|
-- If this text is then placed verbatim into HTML, the lines won't be separated, thus the need for replacing with @\<br>@ tags).
|
||||||
-- If you don't need this functionality, simply use 'unTextarea' to access the raw text.
|
-- If you don't need this functionality, simply use 'unTextarea' to access the raw text.
|
||||||
newtype Textarea = Textarea { unTextarea :: 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
|
instance PersistFieldSql Textarea where
|
||||||
sqlType _ = SqlString
|
sqlType _ = SqlString
|
||||||
instance ToHtml Textarea where
|
instance ToHtml Textarea where
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-form
|
name: yesod-form
|
||||||
version: 1.6.2
|
version: 1.6.3
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user