blaze-markup 0.5.1.7 → 0.5.2.0
raw patch · 2 files changed
+43/−1 lines, 2 files
Files
- blaze-markup.cabal +1/−1
- src/Text/Blaze.hs +42/−0
blaze-markup.cabal view
@@ -1,5 +1,5 @@ Name: blaze-markup-Version: 0.5.1.7+Version: 0.5.2.0 Homepage: http://jaspervdj.be/blaze Bug-Reports: http://github.com/jaspervdj/blaze-markup/issues License: BSD3
src/Text/Blaze.hs view
@@ -66,6 +66,8 @@ ) where import Data.Monoid (mconcat)+import Data.Int (Int32, Int64)+import Data.Word (Word, Word32, Word64) import Data.Text (Text) import qualified Data.Text.Lazy as LT@@ -115,6 +117,14 @@ toMarkup = string . show {-# INLINE toMarkup #-} +instance ToMarkup Int32 where+ toMarkup = string . show+ {-# INLINE toMarkup #-}++instance ToMarkup Int64 where+ toMarkup = string . show+ {-# INLINE toMarkup #-}+ instance ToMarkup Char where toMarkup = string . return {-# INLINE toMarkup #-}@@ -135,6 +145,18 @@ toMarkup = string . show {-# INLINE toMarkup #-} +instance ToMarkup Word where+ toMarkup = string . show+ {-# INLINE toMarkup #-}++instance ToMarkup Word32 where+ toMarkup = string . show+ {-# INLINE toMarkup #-}++instance ToMarkup Word64 where+ toMarkup = string . show+ {-# INLINE toMarkup #-}+ -- | Class allowing us to use a single function for attribute values -- class ToValue a where@@ -174,6 +196,14 @@ toValue = stringValue . show {-# INLINE toValue #-} +instance ToValue Int32 where+ toValue = stringValue . show+ {-# INLINE toValue #-}++instance ToValue Int64 where+ toValue = stringValue . show+ {-# INLINE toValue #-}+ instance ToValue Char where toValue = stringValue . return {-# INLINE toValue #-}@@ -191,5 +221,17 @@ {-# INLINE toValue #-} instance ToValue Double where+ toValue = stringValue . show+ {-# INLINE toValue #-}++instance ToValue Word where+ toValue = stringValue . show+ {-# INLINE toValue #-}++instance ToValue Word32 where+ toValue = stringValue . show+ {-# INLINE toValue #-}++instance ToValue Word64 where toValue = stringValue . show {-# INLINE toValue #-}