-import Xml ( FromXml(..), pickle_unpickle, unpickleable )
-
-
-
--- | The database type for teams as they show up in the news.
---
-data NewsTeam =
- NewsTeam { team_name :: String }
- deriving (Eq, Show)
-
--- | This is needed to define the XmlImport instance for NewsTeam; it
--- basically says that the DB representation is the same as the XML
--- representation.
---
-instance FromXml NewsTeam where
- type Db NewsTeam = NewsTeam
- from_xml = id
-
--- | Allow us to call 'insert_xml' on the XML representation of
--- NewsTeams.
---
-instance XmlImport NewsTeam
-
-
--- | Mapping between News records and NewsTeam records in the
--- database. We don't name the fields because we don't use the names
--- explicitly; that means we have to give them nice database names
--- via groundhog.
---
-data News_NewsTeam = News_NewsTeam
- (DefaultKey News)
- (DefaultKey NewsTeam)
-
-
--- | The database type for locations as they show up in the news.
---
-data NewsLocation =
- NewsLocation {
- city :: Maybe String,
- state :: Maybe String,
- country :: String }
- deriving (Eq, Show)
+import Xml ( FromXml(..), ToDb(..), pickle_unpickle, unpickleable )