Skip to content

Instantly share code, notes, and snippets.

@kylecorbelli
Last active July 5, 2018 18:17
Show Gist options
  • Save kylecorbelli/495d0e023f19c2d7afea6d1f76b2b05f to your computer and use it in GitHub Desktop.
Save kylecorbelli/495d0e023f19c2d7afea6d1f76b2b05f to your computer and use it in GitHub Desktop.
module Html where
import Control.Monad.Reader (Reader, ask, runReader)
import Data.List (intercalate)
import Prelude hiding (div)
type Html = String
type Email = String
div :: [Html] -> Html
div children =
"<div>" ++ combine children ++ "</div>"
h1 :: [Html] -> Html
h1 children =
"<h1>" ++ combine children ++ "</h1>"
p :: [Html] -> Html
p children =
"<p>" ++ combine children ++ "</p>"
combine :: [Html] -> Html
combine = intercalate ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment