Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Some cleanup work, style & test fixes

  • Loading branch information...
commit 84b41608c65fa4a3aed942b6e3cc9b3be26c3c1a 1 parent c1ed308
@jaspervdj authored
View
2  .ghci
@@ -1 +1 @@
-:set -ibenchmarks -itests -iutil -ilib/binary-0.5.0.2/src -idoc/examples
+:set -ibenchmarks -isrc -itests
View
18 blaze-html.cabal
@@ -1,5 +1,5 @@
Name: blaze-html
-Version: 0.4.4.0
+Version: 0.5.0.0
Homepage: http://jaspervdj.be/blaze
Bug-Reports: http://github.com/jaspervdj/blaze-html/issues
License: BSD3
@@ -46,9 +46,9 @@ Library
Build-depends:
base >= 4 && < 5,
blaze-builder >= 0.2 && < 0.4,
- blaze-markup >= 0.1 && < 0.2,
- text >= 0.10 && < 0.12,
- bytestring >= 0.9 && < 0.10
+ blaze-markup >= 0.5 && < 0.6,
+ bytestring >= 0.9 && < 0.10,
+ text >= 0.10 && < 0.12
Test-suite blaze-html-tests
Type: exitcode-stdio-1.0
@@ -57,9 +57,8 @@ Test-suite blaze-html-tests
Ghc-options: -Wall
Other-modules:
- Text.Blaze.Tests
- Text.Blaze.Tests.Cases
- Text.Blaze.Tests.Util
+ Text.Blaze.Html.Tests
+ Text.Blaze.Html.Tests.Util
Util.Tests
Build-depends:
@@ -72,8 +71,9 @@ Test-suite blaze-html-tests
-- Copied from regular dependencies...
base >= 4 && < 5,
blaze-builder >= 0.2 && < 0.4,
- text >= 0.10 && < 0.12,
- bytestring >= 0.9 && < 0.10
+ blaze-markup >= 0.5 && < 0.6,
+ bytestring >= 0.9 && < 0.10,
+ text >= 0.10 && < 0.12
Source-repository head
Type: git
View
11 src/Text/Blaze/Html.hs
@@ -1,9 +1,12 @@
-{-# LANGUAGE NoMonomorphismRestriction, RankNTypes #-}
-module Text.Blaze.Html where
+module Text.Blaze.Html
+ ( module Text.Blaze
+ , Html
+ , toHtml
+ ) where
import Text.Blaze
type Html = Markup
-toHtml :: forall a. ToMarkup a => a -> Markup
-toHtml = toMarkup
+toHtml :: ToMarkup a => a -> Markup
+toHtml = toMarkup
View
9 src/Util/GenerateHtmlCombinators.hs
@@ -70,11 +70,10 @@ writeHtmlVariant htmlVariant = do
, "{-# LANGUAGE OverloadedStrings #-}"
, "-- | This module exports HTML combinators used to create documents."
, "--"
- , exportList modulName $ "module Text.Blaze"
- : "module Text.Blaze.Html"
- : "docType"
- : "docTypeHtml"
- : map (sanitize . fst) sortedTags
+ , exportList modulName $ "module Text.Blaze.Html"
+ : "docType"
+ : "docTypeHtml"
+ : map (sanitize . fst) sortedTags
, DO_NOT_EDIT
, "import Prelude ((>>), (.))"
, ""
View
4 tests/TestSuite.hs
@@ -4,11 +4,11 @@ module Main where
import Test.Framework (defaultMain, testGroup)
-import qualified Text.Blaze.Tests.Cases
+import qualified Text.Blaze.Html.Tests
import qualified Util.Tests
main :: IO ()
main = defaultMain
- [ testGroup "Text.Blaze.Tests.Cases" Text.Blaze.Tests.Cases.tests
+ [ testGroup "Text.Blaze.Html.Tests" Text.Blaze.Html.Tests.tests
, testGroup "Util.Tests" Util.Tests.tests
]
View
7 tests/Text/Blaze/Tests/Cases.hs → tests/Text/Blaze/Html/Tests.hs
@@ -1,7 +1,7 @@
-- | A whole bunch of simple test cases
--
{-# LANGUAGE OverloadedStrings #-}
-module Text.Blaze.Tests.Cases
+module Text.Blaze.Html.Tests
( tests
) where
@@ -15,11 +15,10 @@ import Test.Framework.Providers.HUnit (testCase)
import Test.Framework (Test)
import qualified Data.ByteString.Lazy.Char8 as LBC
-import Text.Blaze
+import Text.Blaze.Html.Tests.Util
import Text.Blaze.Html5 hiding (map)
-import qualified Text.Blaze.Html5 as H
import Text.Blaze.Html5.Attributes
-import Text.Blaze.Tests.Util
+import qualified Text.Blaze.Html5 as H
-- | Type for a simple HTML test. This data type contains the expected output
-- and the HTML template.
View
2  tests/Text/Blaze/Tests/Util.hs → tests/Text/Blaze/Html/Tests/Util.hs
@@ -1,6 +1,6 @@
-- | Utility functions for the blaze tests
--
-module Text.Blaze.Tests.Util
+module Text.Blaze.Html.Tests.Util
( renderUsingString
, renderUsingText
, renderUsingUtf8
Please sign in to comment.
Something went wrong with that request. Please try again.