Skip to content
Browse files

Merge pull request #59 from alevy/master

Add trustworthy flags to renderers and HTML combinator generators
  • Loading branch information...
2 parents 3d1c66b + 24a5e7a commit d79816c3c4db048a6383e37f7f9f1845564abbe8 @jaspervdj committed Apr 20, 2012
View
4 src/Text/Blaze/Renderer/Pretty.hs
@@ -1,3 +1,7 @@
+{-# LANGUAGE CPP #-}
+#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 704)
+{-# LANGUAGE Trustworthy #-}
+#endif
-- | A renderer that produces pretty HTML, mostly meant for debugging purposes.
--
module Text.Blaze.Renderer.Pretty
View
4 src/Text/Blaze/Renderer/String.hs
@@ -1,3 +1,7 @@
+{-# LANGUAGE CPP #-}
+#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 704)
+{-# LANGUAGE Trustworthy #-}
+#endif
-- | A renderer that produces a native Haskell 'String', mostly meant for
-- debugging purposes.
--
View
4 src/Text/Blaze/Renderer/Text.hs
@@ -1,3 +1,7 @@
+{-# LANGUAGE CPP #-}
+#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 704)
+{-# LANGUAGE Trustworthy #-}
+#endif
{-# LANGUAGE OverloadedStrings #-}
-- | A renderer that produces a lazy 'L.Text' value, using the Text Builder.
--
View
4 src/Text/Blaze/Renderer/Utf8.hs
@@ -1,3 +1,7 @@
+{-# LANGUAGE CPP #-}
+#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 704)
+{-# LANGUAGE Trustworthy #-}
+#endif
{-# LANGUAGE OverloadedStrings #-}
module Text.Blaze.Renderer.Utf8
( renderHtmlBuilder
View
3 src/Util/GenerateHtmlCombinators.hs
@@ -1,6 +1,7 @@
{-# LANGUAGE CPP #-}
#define DO_NOT_EDIT (doNotEdit __FILE__ __LINE__)
+#define TRUSTWORTHY "{-# LANGUAGE CPP #-}\n#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 704)\n{-# LANGUAGE Trustworthy #-}\n#endif"
-- | Generates code for HTML tags.
--
@@ -67,6 +68,7 @@ writeHtmlVariant htmlVariant = do
-- Write the main module.
writeFile' (basePath <.> "hs") $ removeTrailingNewlines $ unlines
[ DO_NOT_EDIT
+ , TRUSTWORTHY
, "{-# LANGUAGE OverloadedStrings #-}"
, "-- | This module exports HTML combinators used to create documents."
, "--"
@@ -90,6 +92,7 @@ writeHtmlVariant htmlVariant = do
-- Write the attribute module.
writeFile' (basePath </> "Attributes.hs") $ removeTrailingNewlines $ unlines
[ DO_NOT_EDIT
+ , TRUSTWORTHY
, "-- | This module exports combinators that provide you with the"
, "-- ability to set attributes on HTML elements."
, "--"

0 comments on commit d79816c

Please sign in to comment.
Something went wrong with that request. Please try again.