diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2012, Matthew B. Mirman
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * The names of its contributors may not be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL MATTHEW B. MIRMAN BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Language/XmlHtml/HtmlTags.hs b/Language/XmlHtml/HtmlTags.hs
new file mode 100644
--- /dev/null
+++ b/Language/XmlHtml/HtmlTags.hs
@@ -0,0 +1,86 @@
+{-# LANGUAGE 
+ NoMonomorphismRestriction
+ #-}
+
+-----------------------------------------------------------------------------
+-- |
+-- Module      : Language.XmlHtml.HtmlTags
+-- License     : http://www.gnu.org/copyleft/gpl.html
+-- 
+-- Maintainer  : mmirman@andrew.cmu.edu
+-- Stability   : experimental
+-- Portability : probable
+-- 
+-- Some tags for writing html in a pretty format in haskell.
+
+-- TODO: Use the module redirect tequnique to exclude items we don't want.
+module Language.XmlHtml.HtmlTags where 
+
+import Language.XmlHtml.XmlWriter
+
+link lk params msg = anchor $ Param ([Attr "href" $ show lk]++params) msg
+
+href ln = Param [Attr "href" (show ln)]
+
+name ln = Param [Attr "id" (show ln)]
+
+-- HTML tags
+address             =  tag "ADDRESS"
+anchor              =  tag "A"
+applet              =  tag "APPLET"
+big                 =  tag "BIG"
+blockquote          =  tag "BLOCKQUOTE"
+body                =  tag "BODY"
+bold                =  tag "BOLD"
+caption             =  tag "CAPTION"
+center              =  tag "CENTER"
+cite                =  tag "CITE"
+ddef                =  tag "DD"
+define              =  tag "DFN"
+dlist               =  tag "DL"
+dterm               =  tag "DT"
+emphasize           =  tag "EM"
+fieldset            =  tag "FIELDSET"
+font                =  tag "FONT"
+form                =  tag "FORM"
+frame               =  tag "FRAME"
+frameset            =  tag "FRAMESET"
+h1                  =  tag "H1"
+h2                  =  tag "H2"
+h3                  =  tag "H3"
+h4                  =  tag "H4"
+h5                  =  tag "H5"
+h6                  =  tag "H6"
+header              =  tag "HEAD"
+html                =  tag "HTML"
+h_code              =  tag "CODE"
+h_div               =  tag "DIV"
+h_link              =  tag "LINK"
+h_map               =  tag "MAP"
+h_span              =  tag "SPAN"
+h_title             =  tag "TITLE"
+italics             =  tag "I"
+keyboard            =  tag "KBD"
+legend              =  tag "LEGEND"
+li                  =  tag "LI"
+noframes            =  tag "NOFRAMES"
+olist               =  tag "OL"
+option              =  tag "OPTION"
+p                   =  tag "P"
+pre                 =  tag "PRE"
+sample              =  tag "SAMP"
+select              =  tag "SELECT"
+small               =  tag "SMALL"
+strong              =  tag "STRONG"
+style               =  tag "STYLE"
+sub                 =  tag "SUB"
+sup                 =  tag "SUP"
+table               =  tag "TABLE"
+td                  =  tag "TD"
+textarea            =  tag "TEXTAREA"
+th                  =  tag "TH"
+tr                  =  tag "TR"
+tt                  =  tag "TT"
+ulist               =  tag "UL"
+underline           =  tag "U"
+variable            =  tag "VAR"
diff --git a/Language/XmlHtml/XmlWriter.hs b/Language/XmlHtml/XmlWriter.hs
new file mode 100644
--- /dev/null
+++ b/Language/XmlHtml/XmlWriter.hs
@@ -0,0 +1,94 @@
+{-# LANGUAGE 
+ FlexibleInstances, 
+ NoMonomorphismRestriction,
+ GeneralizedNewtypeDeriving,
+ FlexibleContexts,
+ EmptyDataDecls,
+ MultiParamTypeClasses,
+ FunctionalDependencies,
+ GADTs
+ #-}
+
+---------------------------------------------------------------------------
+-- |
+-- Module      : HGene.HtmlWriterInternals
+-- License     : http://www.gnu.org/copyleft/gpl.html
+-- 
+-- Maintainer  : mmirman@andrew.cmu.edu
+-- Stability   : experimental
+-- Portability : probable
+-- 
+-- The xml writer.
+
+-- TODO: Use the module redirect tequnique to exclude items we don't want.
+module Language.XmlHtml.XmlWriter where
+       
+import Control.Monad.Trans
+import Control.Monad.Writer.Strict (WriterT, tell, execWriterT)
+import Control.Monad.Writer.Class (MonadWriter(..))
+
+void a = a >> return ()
+
+-- --------------------------------------------------------------------------
+-- Type definition for the HtmlWriter
+newtype HtmlWriter a = HtmlWriter { getHtml :: WriterT String IO a}
+                     deriving (Monad, MonadWriter String)
+
+liftIO t = HtmlWriter $ lift t
+
+-- | @'writeString' s@ writes a string to the html writer monad
+writeString = tell
+
+-- | @'makeHtml' s@ currently just converts this into a string
+makeXml = execWriterT . getHtml . printThis
+
+data End
+data Par
+
+data Param a b where 
+  Param :: Printable a b => [HtmlAttr] -> a -> Param a b
+
+data Elem a b where 
+  Elem :: Printable a b => String -> a -> Elem a b
+
+data HtmlAttr = Attr String String
+
+instance Show HtmlAttr where
+  show (Attr a b) = a++"="++b
+
+-- --------------------------------------------------------------------------
+-- Printable allows us to use tag for either a monad or a string or whatever
+-- just makes syntax better, and ideally in the future, everything better.
+class Printable a b | a -> b where printThis :: a -> HtmlWriter ()
+
+instance Printable [Char] End where
+  printThis = writeString
+
+instance Printable (HtmlWriter a) End where 
+  printThis = void
+
+instance Printable a Par => Printable (Elem a Par) End where
+  printThis (Elem tg msg) = do  
+    writeString $ "<"++tg
+    printThis msg
+    writeString $ "</"++tg++">\n"
+
+instance Printable a End => Printable (Elem a End) End where 
+  printThis (Elem tg msg) = do
+    writeString $ "<"++tg++">\n"
+    printThis msg
+    writeString $ "</"++tg++">\n"
+    
+instance Printable a Par => Printable (Param a Par) Par where
+  printThis (Param params msg) = do
+    printThis $ showMiddle params
+    printThis msg
+    
+instance Printable a End => Printable (Param a End) Par where
+  printThis (Param params msg) = do
+    printThis $ showMiddle params++">\n"
+    printThis msg  
+  
+showMiddle = concatMap (\x -> " "++show x)
+
+tag tg = printThis . Elem tg
diff --git a/Main.hs b/Main.hs
new file mode 100644
--- /dev/null
+++ b/Main.hs
@@ -0,0 +1,50 @@
+{-# LANGUAGE 
+ TemplateHaskell
+ #-}
+
+-----------------------------------------------------------------------------
+-- |
+-- Module      : None
+-- License     : http://www.gnu.org/copyleft/gpl.html
+-- 
+-- Maintainer  : mmirman@andrew.cmu.edu
+-- Stability   : experimental
+-- Portability : probable
+-- 
+-- Just a test class for the main library.
+module Main where
+
+import Data.Functor
+import Language.XmlHtml.HtmlTags
+import Language.XmlHtml.XmlWriter
+import Network
+import Control.Concurrent
+import System.IO
+import System.Posix.Signals
+
+handler sock = do
+  sClose sock
+  putStrLn "Ending Program"
+  
+main = withSocketsDo $ do
+  socket <- listenOn $ PortNumber 1338
+  installHandler sigINT (Catch $ handler socket) Nothing
+  sequence_ $ repeat $ do
+    (h,_,_) <- accept socket
+    forkIO $ do
+      t <- page <$> msg
+      hPutStr h $ t
+      hFlush h
+      hClose h
+
+page content = "HTTP/1.0 200 OK\r\nContent-Length: "++show (length content)++"\r\n\r\n"++content++"\r\n"
+
+msg = makeXml $                           
+  html $ do
+    
+    liftIO $ putStrLn "hi - why is this printing so many times?"
+    
+    body $ name "thisbody" $ do
+      h1 "AHA better syntax bitches!"
+      p $ name "dig" $ "HEHE and paragraphs!"
+      anchor $ name "dog" $ href "http://www.hulu.com/" $ "And links"
diff --git a/README.textile b/README.textile
new file mode 100644
--- /dev/null
+++ b/README.textile
@@ -0,0 +1,5 @@
+h1. An embeded language for XML and HTML
+
+XML syntax is very redundant and unnecessarily verbose. This is very annoying if the content of the website is not mostly textual.  Haskell syntax is often better in these cases. If your website is in fact mostly textual, this isn't for you. 
+
+This package defines a (not necessarily efficient) structure for type safe and syntactically beautiful xml and html.  Take a look at the trivial example in Main.hs.
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Dristribution.Simple
+main = defaultMain
diff --git a/XmlHtmlWriter.cabal b/XmlHtmlWriter.cabal
new file mode 100644
--- /dev/null
+++ b/XmlHtmlWriter.cabal
@@ -0,0 +1,44 @@
+Name:                XmlHtmlWriter
+Version:             0.0.0.0
+Description:         A way to write XML and HTML with more efficient syntax.
+Synopsis:	     A library for writing XML and HTML
+
+Homepage:            http://github.com/mmirman/haskogeneous/tree/XmlHtmlWriter
+
+License:             BSD3
+
+License-file:        LICENSE
+
+Author:              Matthew Mirman
+
+Maintainer:          Matthew Mirman <mmirman@andrew.cmu.edu>
+
+Category:            Language
+
+Build-type:          Simple
+
+Cabal-version:       >=1.6
+
+Source-repository head
+  Type:     git
+  Location: git@github.com:mmirman/haskogeneous.git
+
+Library
+  
+  Build-depends:       base >= 4.0 && < 5.0, 
+                       mtl >= 2.0 && < 3.0, 
+                       transformers >= 0.2 && <= 1.0
+                       
+  Exposed-modules:    Language.XmlWriter, 
+                      Language.HtmlTags
+  
+  Extensions:  FlexibleInstances, 
+               NoMonomorphismRestriction, 
+               GeneralizedNewtypeDeriving, 
+               FlexibleContexts, 
+               EmptyDataDecls,
+               MultiParamTypeClasses,
+               FunctionalDependencies,
+               GADTs
+
+    
