--- At first there appears to be an equally-valid approach, getting the
--- Groundhog type from the XML one. But Groundhog won't use type family
--- instances, so here we are.
+-- Both Groundhog and HXT are very particular about the types that
+-- they can use, and there's no way to reuse e.g. a type that HXT
+-- can pickle in Groundhog. This typeclass gives us a standard way
+-- to get the database type from the XML type that we have to define
+-- for HXT.
+--
+class (ToDb a) => FromXml a where
+ -- | A function for getting a @Db a@ out of an @a@.
+ from_xml :: a -> Db a
+
+
+-- | A class for XML representations which are children of other
+-- elements. The foal is to associate a child XML element with its
+-- parent element's database type. This is required to construct the
+-- database analogue of @a@ in 'FromXmlFk'.