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.Error (lenientDecode)
|
||||
import Network.URI (parseURI)
|
||||
import Database.Persist.Sql (PersistField, PersistFieldSql)
|
||||
import Database.Persist (Entity (..))
|
||||
import Database.Persist.Sql (PersistField, PersistFieldSql (..))
|
||||
import Database.Persist (Entity (..), SqlType (SqlString))
|
||||
import Text.HTML.SanitizeXSS (sanitizeBalance)
|
||||
import Control.Monad (when, unless)
|
||||
import Data.Maybe (listToMaybe, fromMaybe)
|
||||
@ -168,7 +168,9 @@ $newline never
|
||||
-- | A newtype wrapper around a 'Text' that converts newlines to HTML
|
||||
-- br-tags.
|
||||
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
|
||||
toHtml =
|
||||
unsafeByteString
|
||||
|
||||
@ -62,6 +62,7 @@ library
|
||||
other-modules: Yesod.EmbeddedStatic.Internal
|
||||
|
||||
ghc-options: -Wall
|
||||
extensions: TemplateHaskell
|
||||
|
||||
test-suite tests
|
||||
hs-source-dirs: ., test
|
||||
@ -105,6 +106,7 @@ test-suite tests
|
||||
, unordered-containers
|
||||
|
||||
ghc-options: -Wall
|
||||
extensions: TemplateHaskell
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
|
||||
Loading…
Reference in New Issue
Block a user