GHC 7.8 changes
This commit is contained in:
parent
f04c4c456c
commit
ad6e99d589
@ -64,8 +64,8 @@ import qualified Text.Email.Validate as Email
|
|||||||
import Data.Text.Encoding (encodeUtf8, decodeUtf8With)
|
import Data.Text.Encoding (encodeUtf8, decodeUtf8With)
|
||||||
import Data.Text.Encoding.Error (lenientDecode)
|
import Data.Text.Encoding.Error (lenientDecode)
|
||||||
import Network.URI (parseURI)
|
import Network.URI (parseURI)
|
||||||
import Database.Persist.Sql (PersistField, PersistFieldSql)
|
import Database.Persist.Sql (PersistField, PersistFieldSql (..))
|
||||||
import Database.Persist (Entity (..))
|
import Database.Persist (Entity (..), SqlType (SqlString))
|
||||||
import Text.HTML.SanitizeXSS (sanitizeBalance)
|
import Text.HTML.SanitizeXSS (sanitizeBalance)
|
||||||
import Control.Monad (when, unless)
|
import Control.Monad (when, unless)
|
||||||
import Data.Maybe (listToMaybe, fromMaybe)
|
import Data.Maybe (listToMaybe, fromMaybe)
|
||||||
@ -168,7 +168,9 @@ $newline never
|
|||||||
-- | A newtype wrapper around a 'Text' that converts newlines to HTML
|
-- | A newtype wrapper around a 'Text' that converts newlines to HTML
|
||||||
-- br-tags.
|
-- br-tags.
|
||||||
newtype Textarea = Textarea { unTextarea :: Text }
|
newtype Textarea = Textarea { unTextarea :: Text }
|
||||||
deriving (Show, Read, Eq, PersistField, PersistFieldSql, Ord)
|
deriving (Show, Read, Eq, PersistField, Ord)
|
||||||
|
instance PersistFieldSql Textarea where
|
||||||
|
sqlType _ = SqlString
|
||||||
instance ToHtml Textarea where
|
instance ToHtml Textarea where
|
||||||
toHtml =
|
toHtml =
|
||||||
unsafeByteString
|
unsafeByteString
|
||||||
|
|||||||
@ -62,6 +62,7 @@ library
|
|||||||
other-modules: Yesod.EmbeddedStatic.Internal
|
other-modules: Yesod.EmbeddedStatic.Internal
|
||||||
|
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
extensions: TemplateHaskell
|
||||||
|
|
||||||
test-suite tests
|
test-suite tests
|
||||||
hs-source-dirs: ., test
|
hs-source-dirs: ., test
|
||||||
@ -105,6 +106,7 @@ test-suite tests
|
|||||||
, unordered-containers
|
, unordered-containers
|
||||||
|
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
extensions: TemplateHaskell
|
||||||
|
|
||||||
source-repository head
|
source-repository head
|
||||||
type: git
|
type: git
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user