[commit: packages/xhtml] master: Fix compiler warnings (e4206c4)

git at git.haskell.org git at git.haskell.org
Sat Jun 17 20:55:37 UTC 2017


Repository : ssh://git@git.haskell.org/xhtml

On branch  : master
Link       : http://git.haskell.org/packages/xhtml.git/commitdiff/e4206c4879a590c688fab6a5272aac5d48a45b8b

>---------------------------------------------------------------

commit e4206c4879a590c688fab6a5272aac5d48a45b8b
Author: Erik de Castro Lopo <erikd at mega-nerd.com>
Date:   Sat Jul 30 18:24:24 2016 +1000

    Fix compiler warnings
    
    Tested with ghc 7.8.4, 7.10.3 and 8.0.1.


>---------------------------------------------------------------

e4206c4879a590c688fab6a5272aac5d48a45b8b
 Text/XHtml/Internals.hs | 34 ++++++++++++++++++----------------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/Text/XHtml/Internals.hs b/Text/XHtml/Internals.hs
index 083f19a..86f031e 100644
--- a/Text/XHtml/Internals.hs
+++ b/Text/XHtml/Internals.hs
@@ -20,7 +20,9 @@
 module Text.XHtml.Internals where
 
 import Data.Char
+#if __GLASGOW_HASKELL__ <= 708
 import Data.Monoid
+#endif
 
 infixr 2 +++  -- combining Html
 infixr 7 <<   -- nesting Html
@@ -318,10 +320,10 @@ prettyHtml' (HtmlTag
 
 -- | Show a start tag
 renderTag :: Bool       -- ^ 'True' if the empty tag shorthand should be used
-	  -> String     -- ^ Tag name
-	  -> [HtmlAttr] -- ^ Attributes
-	  -> String     -- ^ Whitespace to add after attributes
-	  -> ShowS
+          -> String     -- ^ Tag name
+          -> [HtmlAttr] -- ^ Attributes
+          -> String     -- ^ Whitespace to add after attributes
+          -> ShowS
 renderTag empty name attrs nl r
       = "<" ++ name ++ shownAttrs ++ nl ++ close ++ r
   where
@@ -335,8 +337,8 @@ renderTag empty name attrs nl r
 
 -- | Show an end tag
 renderEndTag :: String -- ^ Tag name
-	     -> String -- ^ Whitespace to add after tag name
-	     -> ShowS
+             -> String -- ^ Whitespace to add after tag name
+             -> ShowS
 renderEndTag name nl r = "</" ++ name ++ nl ++ ">" ++ r
 
 
@@ -344,17 +346,17 @@ renderEndTag name nl r = "</" ++ name ++ nl ++ ">" ++ r
 --   short-hand.
 validHtmlITags :: [String]
 validHtmlITags = [
-		  "area",
-		  "base",
-		  "basefont",
-		  "br",
+                  "area",
+                  "base",
+                  "basefont",
+                  "br",
                   "col",
                   "frame",
-		  "hr",
-		  "img",
-		  "input",
+                  "hr",
+                  "img",
+                  "input",
                   "isindex",
                   "link",
-		  "meta",
-		  "param"
-		 ]
+                  "meta",
+                  "param"
+                 ]



More information about the ghc-commits mailing list