diff --git a/hsx.cabal b/hsx.cabal
--- a/hsx.cabal
+++ b/hsx.cabal
@@ -1,9 +1,9 @@
 Name:                   hsx
-Version:                0.7.0
+Version:                0.9.0
 License:                BSD3
 License-File:           LICENSE
 Author:                 Niklas Broberg, Joel Bjornson
-Maintainer:             Niklas Broberg <nibro@cs.chalmers.se>
+Maintainer:             Niklas Broberg <niklas.broberg@chalmers.se>
 
 Stability:              Experimental
 Category:               Language
@@ -27,7 +27,7 @@
                         Achieving that is not as simple as it may seem, but the XMLGenerator module provides all the
                         necessary machinery.
                         
-Homepage:               http://code.google.com/hsp
+Homepage:               http://code.haskell.com/HSP
 
 Tested-With:            GHC==6.8.3, GHC==6.10.1
 Cabal-Version: 		>= 1.2.3
@@ -36,7 +36,7 @@
 Flag base4
 
 Library
-  Build-depends:	mtl, haskell-src-exts >= 1.5, utf8-string
+  Build-depends:	mtl, haskell-src-exts >= 1.10, utf8-string
   if flag(base4)
     Build-depends:      base >= 4 && < 5
     cpp-options:        -DBASE4
diff --git a/src/HSX/Transform.hs b/src/HSX/Transform.hs
--- a/src/HSX/Transform.hs
+++ b/src/HSX/Transform.hs
@@ -232,17 +232,6 @@
         -- ... and lift the values into the XML datatype.
         return $ paren $ metaGenElement name as mattr cs'
 
-      where
-        -- | Transform expressions appearing in child position of an xml tag.
-        -- Expressions are first transformed, then wrapped in a call to
-        -- @toXml@.
-        transformChild :: Exp -> HsxM Exp
-        transformChild e = do
-            -- Transform the expression
-            te <- transformExp e
-            -- ... and apply the overloaded toXMLs to it
-            return $ metaAsChild te
-
     -- An empty xml tag should be transformed just as a standard tag,
     -- only that there are no children,
     XETag _ name attrs mattr -> do
@@ -252,6 +241,17 @@
             as = map mkAttr attrs
             -- ... and lift the values into the XML datatype.
         return $ paren $ metaGenEElement name as mattr
+
+    -- A child tag should be transformed into an application
+    -- of asChild to a list of children.
+    XChildTag _ cs  -> do
+        -- After all, it IS christmas!
+        setXmlTransformed
+        -- ... transform the children
+        cs' <- mapM transformChild cs
+        -- ... and make them into a list
+        return $ paren $ metaAsChild $ listE cs'
+
     -- PCDATA should be lifted as a string into the XML datatype.
     XPcdata pcdata    -> do setXmlTransformed
                             return $ strE pcdata
@@ -259,6 +259,7 @@
     XExpTag e     -> do setXmlTransformed
                         e' <- transformExp e
                         return $ paren $ metaAsChild e'
+
     -- Patterns as arguments to a lambda expression could be regular,
     -- but we cannot put the evaluation here since a lambda expression
     -- can have neither guards nor a where clause. Thus we must postpone
@@ -359,6 +360,16 @@
     SCCPragma  s e      -> fmap (SCCPragma  s) $ transformExp e
     GenPragma  s a b e  -> fmap (GenPragma  s a b) $ transformExp e
     _           -> return e     -- Warning - will not work inside TH brackets!
+  where
+    -- | Transform expressions appearing in child position of an xml tag.
+    -- Expressions are first transformed, then wrapped in a call to
+    -- @toXml@.
+    transformChild :: Exp -> HsxM Exp
+    transformChild e = do
+        -- Transform the expression
+        te <- transformExp e
+        -- ... and apply the overloaded toXMLs to it
+        return $ metaAsChild te
 
 transformFieldUpdate :: FieldUpdate -> HsxM FieldUpdate
 transformFieldUpdate (FieldUpdate n e) =
diff --git a/src/HSX/XMLGenerator.hs b/src/HSX/XMLGenerator.hs
--- a/src/HSX/XMLGenerator.hs
+++ b/src/HSX/XMLGenerator.hs
@@ -18,15 +18,23 @@
 -----------------------------------------------------------------------------
 module HSX.XMLGenerator where
 
-import Control.Monad.Trans
-import Control.Monad (MonadPlus(..),liftM)
+import Control.Applicative (Applicative, Alternative)
+import Control.Monad.Trans (MonadTrans(lift), MonadIO)
+import Control.Monad.Cont  (MonadCont)
+import Control.Monad.Error (MonadError)
+import Control.Monad.Reader(MonadReader)
+import Control.Monad.Writer(MonadWriter)
+import Control.Monad.State (MonadState)
+import Control.Monad.RWS   (MonadRWS)
+import Control.Monad       (MonadPlus(..),liftM)
 
 ----------------------------------------------
 -- General XML Generation
 
 -- | The monad transformer that allows a monad to generate XML values.
 newtype XMLGenT m a = XMLGenT (m a)
-  deriving (Monad, Functor, MonadIO, MonadPlus)
+  deriving (Applicative, Alternative, Monad, Functor, MonadIO, MonadPlus, MonadWriter w, MonadReader r,
+            MonadState s, MonadRWS r w s, MonadCont, MonadError e)
 
 -- | un-lift.
 unXMLGenT :: XMLGenT m a -> m a
@@ -65,10 +73,15 @@
 class XMLGen m => EmbedAsChild m c where
  asChild :: c -> GenChildList m
 
+#if __GLASGOW_HASKELL__ >= 610
+instance (EmbedAsChild m c, m ~ n) => EmbedAsChild m (XMLGenT n c) where
+ asChild m = asChild =<< m
+#else
 instance (EmbedAsChild m c, TypeCastM m1 m) => EmbedAsChild m (XMLGenT m1 c) where
  asChild (XMLGenT m1a) = do
             a <- XMLGenT $ typeCastM m1a
             asChild a
+#endif
 
 instance EmbedAsChild m c => EmbedAsChild m [c] where
  asChild = liftM concat . mapM asChild
@@ -94,6 +107,11 @@
 instance (XMLGen m, EmbedAsAttr m a) => EmbedAsAttr m (XMLGenT m a) where
  asAttr ma = ma >>= asAttr
 
+instance (EmbedAsAttr m (Attr a v), TypeCastM m1 m) => EmbedAsAttr m (Attr a (XMLGenT m1 v)) where
+ asAttr (a := (XMLGenT m1a)) = do
+            v <- XMLGenT $ typeCastM m1a
+            asAttr (a := v)
+
 instance XMLGen m => EmbedAsAttr m (Attribute m) where
  asAttr = return . return
 
@@ -104,6 +122,8 @@
 class (XMLGen m,
        SetAttr m (XML m),
        AppendChild m (XML m),
+       EmbedAsChild m (XML m),
+       EmbedAsChild m [XML m],
        EmbedAsChild m String,
        EmbedAsChild m Char, -- for overlap purposes
        EmbedAsAttr m (Attr String String),
