diff --git a/Haskell/blog/Html.hs b/Haskell/blog/Html.hs
index 444117e..27c14e7 100644
--- a/Haskell/blog/Html.hs
+++ b/Haskell/blog/Html.hs
@@ -8,7 +8,6 @@ module Html
, body_
, head_
, title_
- , append_
, render
)
where
diff --git a/Haskell/blog/Html/Internal.hs b/Haskell/blog/Html/Internal.hs
index 512a358..9ea30fd 100644
--- a/Haskell/blog/Html/Internal.hs
+++ b/Haskell/blog/Html/Internal.hs
@@ -8,6 +8,9 @@ newtype Structure = Structure String
type Title = String
+instance Semigroup Structure where
+ (<>) c1 c2 = Structure (getStructuredString c1 <> getStructuredString c2)
+
-- * EDSL
html_ :: Title -> Structure -> Html
@@ -31,10 +34,6 @@ p_ = Structure . el "p" . escape
h1_ :: String -> Structure
h1_ = Structure . el "h1" . escape
-append_ :: Structure -> Structure -> Structure
-append_ c1 c2 = Structure (getStructuredString c1 ++ getStructuredString c2)
-
-
ul_ :: [Structure] -> Structure
ul_ = list "ul"
diff --git a/Haskell/blog/Main.hs b/Haskell/blog/Main.hs
index dcef8bd..fa740a9 100644
--- a/Haskell/blog/Main.hs
+++ b/Haskell/blog/Main.hs
@@ -7,10 +7,10 @@ main = putStrLn
$ render
$ html_
"My page title"
- ( append_
- (h1_ "Hello World!")
- ( append_
- (p_ "Paragraph #1")
+ (
+ (h1_ "Hello World!") <>
+ (
+ (p_ "Paragraph #1") <>
(p_ "Paragraph #2")
)
)