diff --git a/Data/Geo/GPX.hs b/Data/Geo/GPX.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX.hs
@@ -0,0 +1,142 @@
+-- | GPX 1.1 Schema <http://www.topografix.com/GPX/1/1/>
+module Data.Geo.GPX(
+                module Data.Geo.GPX.DgpsStationType,
+                module Data.Geo.GPX.FixType,
+                module Data.Geo.GPX.DegreesType,
+                module Data.Geo.GPX.LongitudeType,
+                module Data.Geo.GPX.LatitudeType,
+                module Data.Geo.GPX.BoundsType,
+                module Data.Geo.GPX.ExtensionsType,
+                module Data.Geo.GPX.PtType,
+                module Data.Geo.GPX.PtsegType,
+                module Data.Geo.GPX.EmailType,
+                module Data.Geo.GPX.LinkType,
+                module Data.Geo.GPX.PersonType,
+                module Data.Geo.GPX.CopyrightType,
+                module Data.Geo.GPX.WptType,
+                module Data.Geo.GPX.TrksegType,
+                module Data.Geo.GPX.TrkType,
+                module Data.Geo.GPX.RteType,
+                module Data.Geo.GPX.MetadataType,
+                module Data.Geo.GPX.GpxType,
+                module Data.Geo.GPX.Gpx,
+                module Data.Geo.GPX.Accessor.Minlat,
+                module Data.Geo.GPX.Accessor.Maxlat,
+                module Data.Geo.GPX.Accessor.Minlon,
+                module Data.Geo.GPX.Accessor.Maxlon,
+                module Data.Geo.GPX.Accessor.Author,
+                module Data.Geo.GPX.Accessor.Year,
+                module Data.Geo.GPX.Accessor.License,
+                module Data.Geo.GPX.Accessor.Value,
+                module Data.Geo.GPX.Accessor.Id,
+                module Data.Geo.GPX.Accessor.Domain,
+                module Data.Geo.GPX.Accessor.Version,
+                module Data.Geo.GPX.Accessor.Creator,
+                module Data.Geo.GPX.Accessor.Metadata,
+                module Data.Geo.GPX.Accessor.Wpts,
+                module Data.Geo.GPX.Accessor.Rtes,
+                module Data.Geo.GPX.Accessor.Trks,
+                module Data.Geo.GPX.Accessor.Extensions,
+                module Data.Geo.GPX.Accessor.Href,
+                module Data.Geo.GPX.Accessor.Text,
+                module Data.Geo.GPX.Accessor.Type,
+                module Data.Geo.GPX.Accessor.Name,
+                module Data.Geo.GPX.Accessor.Desc,
+                module Data.Geo.GPX.Accessor.Copyright,
+                module Data.Geo.GPX.Accessor.Links,
+                module Data.Geo.GPX.Accessor.Time,
+                module Data.Geo.GPX.Accessor.Keywords,
+                module Data.Geo.GPX.Accessor.Bounds,
+                module Data.Geo.GPX.Accessor.Lat,
+                module Data.Geo.GPX.Accessor.Lon,
+                module Data.Geo.GPX.Accessor.Ele,
+                module Data.Geo.GPX.Accessor.Magvar,
+                module Data.Geo.GPX.Accessor.Geoidheight,
+                module Data.Geo.GPX.Accessor.Cmt,
+                module Data.Geo.GPX.Accessor.Src,
+                module Data.Geo.GPX.Accessor.Sym,
+                module Data.Geo.GPX.Accessor.Fix,
+                module Data.Geo.GPX.Accessor.Sat,
+                module Data.Geo.GPX.Accessor.Hdop,
+                module Data.Geo.GPX.Accessor.Vdop,
+                module Data.Geo.GPX.Accessor.Pdop,
+                module Data.Geo.GPX.Accessor.Ageofdgpsdata,
+                module Data.Geo.GPX.Accessor.Dgpsid,
+                module Data.Geo.GPX.Accessor.Email,
+                module Data.Geo.GPX.Accessor.Link,
+                module Data.Geo.GPX.Accessor.Pts,
+                module Data.Geo.GPX.Accessor.Number,
+                module Data.Geo.GPX.Accessor.Rtepts,
+                module Data.Geo.GPX.Accessor.Trkpts,
+                module Data.Geo.GPX.Accessor.Trksegs
+              ) where
+
+import Data.Geo.GPX.DgpsStationType
+import Data.Geo.GPX.FixType
+import Data.Geo.GPX.DegreesType
+import Data.Geo.GPX.LongitudeType
+import Data.Geo.GPX.LatitudeType
+import Data.Geo.GPX.BoundsType
+import Data.Geo.GPX.ExtensionsType
+import Data.Geo.GPX.PtType
+import Data.Geo.GPX.PtsegType
+import Data.Geo.GPX.EmailType
+import Data.Geo.GPX.LinkType
+import Data.Geo.GPX.PersonType
+import Data.Geo.GPX.CopyrightType
+import Data.Geo.GPX.WptType
+import Data.Geo.GPX.TrksegType
+import Data.Geo.GPX.TrkType
+import Data.Geo.GPX.RteType
+import Data.Geo.GPX.MetadataType
+import Data.Geo.GPX.GpxType
+import Data.Geo.GPX.Gpx
+import Data.Geo.GPX.Accessor.Minlat
+import Data.Geo.GPX.Accessor.Maxlat
+import Data.Geo.GPX.Accessor.Minlon
+import Data.Geo.GPX.Accessor.Maxlon
+import Data.Geo.GPX.Accessor.Author
+import Data.Geo.GPX.Accessor.Year
+import Data.Geo.GPX.Accessor.License
+import Data.Geo.GPX.Accessor.Value
+import Data.Geo.GPX.Accessor.Id
+import Data.Geo.GPX.Accessor.Domain
+import Data.Geo.GPX.Accessor.Version
+import Data.Geo.GPX.Accessor.Creator
+import Data.Geo.GPX.Accessor.Metadata
+import Data.Geo.GPX.Accessor.Wpts
+import Data.Geo.GPX.Accessor.Rtes
+import Data.Geo.GPX.Accessor.Trks
+import Data.Geo.GPX.Accessor.Extensions
+import Data.Geo.GPX.Accessor.Href
+import Data.Geo.GPX.Accessor.Text
+import Data.Geo.GPX.Accessor.Type
+import Data.Geo.GPX.Accessor.Name
+import Data.Geo.GPX.Accessor.Desc
+import Data.Geo.GPX.Accessor.Copyright
+import Data.Geo.GPX.Accessor.Links
+import Data.Geo.GPX.Accessor.Time
+import Data.Geo.GPX.Accessor.Keywords
+import Data.Geo.GPX.Accessor.Bounds
+import Data.Geo.GPX.Accessor.Lat
+import Data.Geo.GPX.Accessor.Lon
+import Data.Geo.GPX.Accessor.Ele
+import Data.Geo.GPX.Accessor.Magvar
+import Data.Geo.GPX.Accessor.Geoidheight
+import Data.Geo.GPX.Accessor.Cmt
+import Data.Geo.GPX.Accessor.Src
+import Data.Geo.GPX.Accessor.Sym
+import Data.Geo.GPX.Accessor.Fix
+import Data.Geo.GPX.Accessor.Sat
+import Data.Geo.GPX.Accessor.Hdop
+import Data.Geo.GPX.Accessor.Vdop
+import Data.Geo.GPX.Accessor.Pdop
+import Data.Geo.GPX.Accessor.Ageofdgpsdata
+import Data.Geo.GPX.Accessor.Dgpsid
+import Data.Geo.GPX.Accessor.Email
+import Data.Geo.GPX.Accessor.Link
+import Data.Geo.GPX.Accessor.Pts
+import Data.Geo.GPX.Accessor.Number
+import Data.Geo.GPX.Accessor.Rtepts
+import Data.Geo.GPX.Accessor.Trkpts
+import Data.Geo.GPX.Accessor.Trksegs
diff --git a/Data/Geo/GPX/Accessor/Ageofdgpsdata.hs b/Data/Geo/GPX/Accessor/Ageofdgpsdata.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Ageofdgpsdata.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Ageofdgpsdata where
+
+class Ageofdgpsdata a where
+  ageofdgpsdata :: a -> Maybe Double
diff --git a/Data/Geo/GPX/Accessor/Author.hs b/Data/Geo/GPX/Accessor/Author.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Author.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
+
+module Data.Geo.GPX.Accessor.Author where
+
+class Author a b | a -> b where
+  author :: a -> b
diff --git a/Data/Geo/GPX/Accessor/Bounds.hs b/Data/Geo/GPX/Accessor/Bounds.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Bounds.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Bounds where
+
+import Data.Geo.GPX.BoundsType
+
+class Bounds a where
+  bounds :: a -> Maybe BoundsType
diff --git a/Data/Geo/GPX/Accessor/Cmt.hs b/Data/Geo/GPX/Accessor/Cmt.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Cmt.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Cmt where
+
+class Cmt a where
+  cmt :: a -> Maybe String
diff --git a/Data/Geo/GPX/Accessor/Copyright.hs b/Data/Geo/GPX/Accessor/Copyright.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Copyright.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Copyright where
+
+import Data.Geo.GPX.CopyrightType
+
+class Copyright a where
+  copyright :: a -> Maybe CopyrightType
diff --git a/Data/Geo/GPX/Accessor/Creator.hs b/Data/Geo/GPX/Accessor/Creator.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Creator.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Creator where
+
+class Creator a where
+  creator :: a -> String
diff --git a/Data/Geo/GPX/Accessor/Desc.hs b/Data/Geo/GPX/Accessor/Desc.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Desc.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Desc where
+
+class Desc a where
+  desc :: a -> Maybe String
diff --git a/Data/Geo/GPX/Accessor/Dgpsid.hs b/Data/Geo/GPX/Accessor/Dgpsid.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Dgpsid.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Dgpsid where
+
+import Data.Geo.GPX.DgpsStationType
+
+class Dgpsid a where
+  dgpsid :: a -> Maybe DgpsStationType
diff --git a/Data/Geo/GPX/Accessor/Domain.hs b/Data/Geo/GPX/Accessor/Domain.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Domain.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Domain where
+
+class Domain a where
+  domain :: a -> String
diff --git a/Data/Geo/GPX/Accessor/Ele.hs b/Data/Geo/GPX/Accessor/Ele.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Ele.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Ele where
+
+class Ele a where
+  ele :: a -> Maybe Double
diff --git a/Data/Geo/GPX/Accessor/Email.hs b/Data/Geo/GPX/Accessor/Email.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Email.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Email where
+
+import Data.Geo.GPX.EmailType
+
+class Email a where
+  email :: a -> Maybe EmailType
diff --git a/Data/Geo/GPX/Accessor/Extensions.hs b/Data/Geo/GPX/Accessor/Extensions.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Extensions.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Extensions where
+
+import Data.Geo.GPX.ExtensionsType
+
+class Extensions a where
+  extensions :: a -> Maybe ExtensionsType
diff --git a/Data/Geo/GPX/Accessor/Fix.hs b/Data/Geo/GPX/Accessor/Fix.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Fix.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Fix where
+
+import Data.Geo.GPX.FixType
+
+class Fix a where
+  fix :: a -> Maybe FixType
diff --git a/Data/Geo/GPX/Accessor/Geoidheight.hs b/Data/Geo/GPX/Accessor/Geoidheight.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Geoidheight.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Geoidheight where
+
+class Geoidheight a where
+  geoidheight :: a -> Maybe Double
diff --git a/Data/Geo/GPX/Accessor/Hdop.hs b/Data/Geo/GPX/Accessor/Hdop.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Hdop.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Hdop where
+
+class Hdop a where
+  hdop :: a -> Maybe Double
diff --git a/Data/Geo/GPX/Accessor/Href.hs b/Data/Geo/GPX/Accessor/Href.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Href.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Href where
+
+class Href a where
+  href :: a -> String
diff --git a/Data/Geo/GPX/Accessor/Id.hs b/Data/Geo/GPX/Accessor/Id.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Id.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Id where
+
+class Id a where
+  id :: a -> String
diff --git a/Data/Geo/GPX/Accessor/Keywords.hs b/Data/Geo/GPX/Accessor/Keywords.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Keywords.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Keywords where
+
+class Keywords a where
+  keywords :: a -> Maybe String
diff --git a/Data/Geo/GPX/Accessor/Lat.hs b/Data/Geo/GPX/Accessor/Lat.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Lat.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Lat where
+
+import Data.Geo.GPX.LatitudeType
+
+class Lat a where
+  lat :: a -> LatitudeType
diff --git a/Data/Geo/GPX/Accessor/License.hs b/Data/Geo/GPX/Accessor/License.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/License.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.License where
+
+class License a where
+  license :: a -> Maybe String
diff --git a/Data/Geo/GPX/Accessor/Link.hs b/Data/Geo/GPX/Accessor/Link.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Link.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Link where
+
+import Data.Geo.GPX.LinkType
+
+class Link a where
+  link :: a -> Maybe LinkType
diff --git a/Data/Geo/GPX/Accessor/Links.hs b/Data/Geo/GPX/Accessor/Links.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Links.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Links where
+
+import Data.Geo.GPX.LinkType
+
+class Links a where
+  links :: a -> [LinkType]
diff --git a/Data/Geo/GPX/Accessor/Lon.hs b/Data/Geo/GPX/Accessor/Lon.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Lon.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Lon where
+
+import Data.Geo.GPX.LongitudeType
+
+class Lon a where
+  lon :: a -> LongitudeType
diff --git a/Data/Geo/GPX/Accessor/Magvar.hs b/Data/Geo/GPX/Accessor/Magvar.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Magvar.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Magvar where
+
+import Data.Geo.GPX.DegreesType
+
+class Magvar a where
+  magvar :: a -> Maybe DegreesType
diff --git a/Data/Geo/GPX/Accessor/Maxlat.hs b/Data/Geo/GPX/Accessor/Maxlat.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Maxlat.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Maxlat where
+
+import Data.Geo.GPX.LatitudeType
+
+class Maxlat a where
+  maxlat :: a -> LatitudeType
diff --git a/Data/Geo/GPX/Accessor/Maxlon.hs b/Data/Geo/GPX/Accessor/Maxlon.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Maxlon.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Maxlon where
+
+import Data.Geo.GPX.LongitudeType
+
+class Maxlon a where
+  maxlon :: a -> LongitudeType
diff --git a/Data/Geo/GPX/Accessor/Metadata.hs b/Data/Geo/GPX/Accessor/Metadata.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Metadata.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Metadata where
+
+import Data.Geo.GPX.MetadataType
+
+class Metadata a where
+  metadata :: a -> Maybe MetadataType
diff --git a/Data/Geo/GPX/Accessor/Minlat.hs b/Data/Geo/GPX/Accessor/Minlat.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Minlat.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Minlat where
+
+import Data.Geo.GPX.LatitudeType
+
+class Minlat a where
+  minlat :: a -> LatitudeType
diff --git a/Data/Geo/GPX/Accessor/Minlon.hs b/Data/Geo/GPX/Accessor/Minlon.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Minlon.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Minlon where
+
+import Data.Geo.GPX.LongitudeType
+
+class Minlon a where
+  minlon :: a -> LongitudeType
diff --git a/Data/Geo/GPX/Accessor/Name.hs b/Data/Geo/GPX/Accessor/Name.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Name.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Name where
+
+class Name a where
+  name :: a -> Maybe String
diff --git a/Data/Geo/GPX/Accessor/Number.hs b/Data/Geo/GPX/Accessor/Number.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Number.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Number where
+
+class Number a where
+  number :: a -> Maybe Int
diff --git a/Data/Geo/GPX/Accessor/Pdop.hs b/Data/Geo/GPX/Accessor/Pdop.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Pdop.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Pdop where
+
+class Pdop a where
+  pdop :: a -> Maybe Double
diff --git a/Data/Geo/GPX/Accessor/Pts.hs b/Data/Geo/GPX/Accessor/Pts.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Pts.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Pts where
+
+import Data.Geo.GPX.PtType
+
+class Pts a where
+  pts :: a -> [PtType]
diff --git a/Data/Geo/GPX/Accessor/Rtepts.hs b/Data/Geo/GPX/Accessor/Rtepts.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Rtepts.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Rtepts where
+
+import Data.Geo.GPX.WptType
+
+class Rtepts a where
+  rtepts :: a -> [WptType]
diff --git a/Data/Geo/GPX/Accessor/Rtes.hs b/Data/Geo/GPX/Accessor/Rtes.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Rtes.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Rtes where
+
+import Data.Geo.GPX.RteType
+
+class Rtes a where
+  rtes :: a -> [RteType]
diff --git a/Data/Geo/GPX/Accessor/Sat.hs b/Data/Geo/GPX/Accessor/Sat.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Sat.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Sat where
+
+class Sat a where
+  sat :: a -> Maybe Int
diff --git a/Data/Geo/GPX/Accessor/Src.hs b/Data/Geo/GPX/Accessor/Src.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Src.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Src where
+
+class Src a where
+  src :: a -> Maybe String
diff --git a/Data/Geo/GPX/Accessor/Sym.hs b/Data/Geo/GPX/Accessor/Sym.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Sym.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Sym where
+
+class Sym a where
+  sym :: a -> Maybe String
diff --git a/Data/Geo/GPX/Accessor/Text.hs b/Data/Geo/GPX/Accessor/Text.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Text.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Text where
+
+class Text a where
+  text :: a -> Maybe String
diff --git a/Data/Geo/GPX/Accessor/Time.hs b/Data/Geo/GPX/Accessor/Time.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Time.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Time where
+
+class Time a where
+  time :: a -> Maybe String
diff --git a/Data/Geo/GPX/Accessor/Trkpts.hs b/Data/Geo/GPX/Accessor/Trkpts.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Trkpts.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Trkpts where
+
+import Data.Geo.GPX.WptType
+
+class Trkpts a where
+  trkpts :: a -> [WptType]
diff --git a/Data/Geo/GPX/Accessor/Trks.hs b/Data/Geo/GPX/Accessor/Trks.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Trks.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Trks where
+
+import Data.Geo.GPX.TrkType
+
+class Trks a where
+  trks :: a -> [TrkType]
diff --git a/Data/Geo/GPX/Accessor/Trksegs.hs b/Data/Geo/GPX/Accessor/Trksegs.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Trksegs.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Trksegs where
+
+import Data.Geo.GPX.TrksegType
+
+class Trksegs a where
+  trksegs :: a -> [TrksegType]
diff --git a/Data/Geo/GPX/Accessor/Type.hs b/Data/Geo/GPX/Accessor/Type.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Type.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Type where
+
+class Type a where
+  type' :: a -> Maybe String
diff --git a/Data/Geo/GPX/Accessor/Value.hs b/Data/Geo/GPX/Accessor/Value.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Value.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
+
+module Data.Geo.GPX.Accessor.Value where
+
+class Value a b | a -> b where
+  value :: a -> b
diff --git a/Data/Geo/GPX/Accessor/Vdop.hs b/Data/Geo/GPX/Accessor/Vdop.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Vdop.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Vdop where
+
+class Vdop a where
+  vdop :: a -> Maybe Double
diff --git a/Data/Geo/GPX/Accessor/Version.hs b/Data/Geo/GPX/Accessor/Version.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Version.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Version where
+
+class Version a where
+  version :: a -> String
diff --git a/Data/Geo/GPX/Accessor/Wpts.hs b/Data/Geo/GPX/Accessor/Wpts.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Wpts.hs
@@ -0,0 +1,6 @@
+module Data.Geo.GPX.Accessor.Wpts where
+
+import Data.Geo.GPX.WptType
+
+class Wpts a where
+  wpts :: a -> [WptType]
diff --git a/Data/Geo/GPX/Accessor/Year.hs b/Data/Geo/GPX/Accessor/Year.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Accessor/Year.hs
@@ -0,0 +1,4 @@
+module Data.Geo.GPX.Accessor.Year where
+
+class Year a where
+  year :: a -> Maybe String
diff --git a/Data/Geo/GPX/BoundsType.hs b/Data/Geo/GPX/BoundsType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/BoundsType.hs
@@ -0,0 +1,41 @@
+-- | Complex Type: @boundsType@ <http://www.topografix.com/GPX/1/1/#type_boundsType>
+module Data.Geo.GPX.BoundsType(
+                                BoundsType,
+                                boundsType
+                              ) where
+
+import Data.Geo.GPX.LatitudeType
+import Data.Geo.GPX.LongitudeType
+import Data.Geo.GPX.Accessor.Minlat
+import Data.Geo.GPX.Accessor.Maxlat
+import Data.Geo.GPX.Accessor.Minlon
+import Data.Geo.GPX.Accessor.Maxlon
+import Text.XML.HXT.Arrow
+
+data BoundsType = BoundsType (LatitudeType, LongitudeType) (LatitudeType, LongitudeType)
+  deriving (Show, Eq)
+
+boundsType :: (LatitudeType, LongitudeType) -- ^ The minimum latitude and longitude.
+              -> (LatitudeType, LongitudeType) -- ^ The maximum latitude and longitude.
+              -> BoundsType
+boundsType = BoundsType
+
+instance XmlPickler BoundsType where
+  xpickle = xpWrap (\(minlat', minlon', maxlat', maxlon') -> boundsType (minlat', minlon') (maxlat', maxlon'),
+                    \(BoundsType (minlat', minlon') (maxlat', maxlon')) -> (minlat', minlon', maxlat', maxlon')) (xp4Tuple
+                      (xpAttr "minlat" xpickle)
+                      (xpAttr "minlon" xpickle)
+                      (xpAttr "maxlat" xpickle)
+                      (xpAttr "maxlon" xpickle))
+
+instance Minlat BoundsType where
+  minlat (BoundsType (x, _) (_, _)) = x
+
+instance Maxlat BoundsType where
+  maxlat (BoundsType (_, _) (x, _)) = x
+
+instance Minlon BoundsType where
+  minlon (BoundsType (_, x) (_, _)) = x
+
+instance Maxlon BoundsType where
+  maxlon (BoundsType (_, _) (_, x)) = x
diff --git a/Data/Geo/GPX/CopyrightType.hs b/Data/Geo/GPX/CopyrightType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/CopyrightType.hs
@@ -0,0 +1,36 @@
+{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances #-}
+
+-- | Complex Type: @copyrightType@ <http://www.topografix.com/GPX/1/1/#type_copyrightType>
+module Data.Geo.GPX.CopyrightType(
+                                   CopyrightType,
+                                   copyrightType
+                                 ) where
+
+import Data.Geo.GPX.Accessor.Author
+import Data.Geo.GPX.Accessor.Year
+import Data.Geo.GPX.Accessor.License
+import Text.XML.HXT.Arrow
+
+data CopyrightType = CopyrightType String (Maybe String) (Maybe String)
+  deriving (Eq, Show)
+
+copyrightType :: String -- ^ The author.
+                 -> Maybe String -- ^ The year.
+                 -> Maybe String -- ^ The license.
+                 -> CopyrightType
+copyrightType = CopyrightType
+
+instance XmlPickler CopyrightType where
+  xpickle = xpWrap (\(author', year', license') -> copyrightType author' year' license', \(CopyrightType author' year' license') -> (author', year', license')) (xpTriple
+              (xpAttr "author" xpText)
+              (xpOption (xpElem "year" xpText))
+              (xpOption (xpElem "license" xpText)))
+
+instance Author CopyrightType String where
+  author (CopyrightType x _ _) = x
+
+instance Year CopyrightType where
+  year (CopyrightType _ x _) = x
+
+instance License CopyrightType where
+  license (CopyrightType _ _ x) = x
diff --git a/Data/Geo/GPX/DegreesType.hs b/Data/Geo/GPX/DegreesType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/DegreesType.hs
@@ -0,0 +1,24 @@
+{-# LANGUAGE MultiParamTypeClasses #-}
+
+-- | Simple Type: @degreesType@ <http://www.topografix.com/GPX/1/1/#type_degreesType>
+module Data.Geo.GPX.DegreesType(
+                                 DegreesType,
+                                 degreesType
+                               ) where
+
+import Data.Geo.GPX.Accessor.Value
+import Data.Fixed
+import Text.XML.HXT.Arrow
+
+newtype DegreesType = DegreesType Double
+  deriving (Eq, Show)
+
+degreesType :: Double -- ^ The value which will be between 0 and 360 (values out of the range are truncated using a modulus operation).
+               -> DegreesType
+degreesType n = DegreesType (n `mod'` 360)
+
+instance XmlPickler DegreesType where
+  xpickle = xpWrap (degreesType, \(DegreesType n) -> n) xpPrim
+
+instance Value DegreesType Double where
+  value (DegreesType x) = x
diff --git a/Data/Geo/GPX/DgpsStationType.hs b/Data/Geo/GPX/DgpsStationType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/DgpsStationType.hs
@@ -0,0 +1,27 @@
+{-# LANGUAGE MultiParamTypeClasses #-}
+
+-- | Simple Type: @dgpsStationType@ <http://www.topografix.com/GPX/1/1/#type_dgpsStationType>
+module Data.Geo.GPX.DgpsStationType(
+                                     DgpsStationType,
+                                     dgpsStationType
+                                   ) where
+
+import Data.Geo.GPX.Accessor.Value
+import Data.Ix
+import Text.XML.HXT.Arrow
+
+newtype DgpsStationType = DgpsStationType Int
+  deriving Eq
+
+dgpsStationType :: Int -- ^ The value between 0 and 1023.
+                   -> Maybe DgpsStationType
+dgpsStationType n = if inRange (0, 1023) n then Just (DgpsStationType n) else Nothing
+
+instance Show DgpsStationType where
+  show (DgpsStationType n) = show n
+
+instance XmlPickler DgpsStationType where
+  xpickle = xpWrapMaybe (dgpsStationType, \(DgpsStationType n) -> n) xpickle
+
+instance Value DgpsStationType Int where
+  value (DgpsStationType x) = x
diff --git a/Data/Geo/GPX/EmailType.hs b/Data/Geo/GPX/EmailType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/EmailType.hs
@@ -0,0 +1,27 @@
+-- | Complex Type: @emailType@ <http://www.topografix.com/GPX/1/1/#type_emailType>
+module Data.Geo.GPX.EmailType(
+                               EmailType,
+                               emailType
+                             ) where
+
+import Text.XML.HXT.Arrow
+import Data.Geo.GPX.Accessor.Id
+import Data.Geo.GPX.Accessor.Domain
+
+data EmailType = EmailType String String
+  deriving (Eq, Show)
+
+emailType :: String -- ^ The id.
+             -> String -- ^ The domain.
+             -> EmailType
+emailType = EmailType
+
+instance XmlPickler EmailType where
+  xpickle = xpWrap (uncurry emailType, \(EmailType id' domain') -> (id', domain'))
+              (xpPair (xpAttr "id" xpText) (xpAttr "domain" xpText))
+
+instance Id EmailType where
+  id (EmailType x _) = x
+
+instance Domain EmailType where
+  domain (EmailType _ x) = x
diff --git a/Data/Geo/GPX/ExtensionsType.hs b/Data/Geo/GPX/ExtensionsType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/ExtensionsType.hs
@@ -0,0 +1,23 @@
+{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances #-}
+
+-- | Complex Type: @extensionsType@ <http://www.topografix.com/GPX/1/1/#type_extensionsType>
+module Data.Geo.GPX.ExtensionsType(
+                                    ExtensionsType,
+                                    extensionsType
+                                  ) where
+
+import Text.XML.HXT.Arrow
+import Data.Geo.GPX.Accessor.Value
+
+newtype ExtensionsType = ExtensionsType XmlTree
+  deriving (Eq, Show)
+
+instance XmlPickler ExtensionsType where
+  xpickle = xpWrap (ExtensionsType, \(ExtensionsType t) -> t) xpTree
+
+extensionsType :: XmlTree -- ^ The extensions sub-tree.
+                  -> ExtensionsType
+extensionsType = ExtensionsType
+
+instance Value ExtensionsType XmlTree where
+  value (ExtensionsType x) = x
diff --git a/Data/Geo/GPX/FixType.hs b/Data/Geo/GPX/FixType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/FixType.hs
@@ -0,0 +1,66 @@
+-- | Simple Type: @fixType@ <http://www.topografix.com/GPX/1/1/#type_fixType>
+module Data.Geo.GPX.FixType(
+                             FixType,
+                             foldFixType,
+                             none,
+                             twod,
+                             threed,
+                             dgps,
+                             pps,
+                             fixType
+                           ) where
+
+import Text.XML.HXT.Arrow hiding (none)
+
+data FixType = None | Twod | Threed | Dgps | Pps
+  deriving (Eq, Enum)
+
+-- | The catamorphism for @FixType@.
+foldFixType :: a -- ^ The value if @none@.
+               -> a -- ^ The value if @twod@.
+               -> a -- ^ The value if @threed@.
+               -> a -- ^ The value if @dgps@.
+               -> a -- ^ The value if @pps@.
+               -> FixType -- ^ The value to fold.
+               -> a
+foldFixType n _ _ _ _ None = n
+foldFixType _ t _ _ _ Twod = t
+foldFixType _ _ t _ _ Threed = t
+foldFixType _ _ _ d _ Dgps = d
+foldFixType _ _ _ _ p Pps = p
+
+-- | Construct a @FixType@ with a value of @none@.
+none :: FixType
+none = None
+
+-- | Construct a @FixType@ with a value of @2d@.
+twod :: FixType
+twod = Twod
+
+-- | Construct a @FixType@ with a value of @3d@.
+threed :: FixType
+threed = Threed
+
+-- | Construct a @FixType@ with a value of @dgps@.
+dgps :: FixType
+dgps = Dgps
+
+-- | Construct a @FixType@ with a value of @pps@.
+pps :: FixType
+pps = Pps
+
+-- | Construct a @FixType@ using a string with a value of @["none", "2d", "3d", "dgps", "pps"]@.
+fixType :: String -- ^ The string value to construct a @FixType@ with.
+           -> Maybe FixType
+fixType "none" = Just none
+fixType "2d"= Just twod
+fixType "3d" = Just threed
+fixType "dgps" = Just dgps
+fixType "pps" = Just pps
+fixType _ = Nothing
+
+instance XmlPickler FixType where
+  xpickle = xpWrapMaybe (fixType, show) xpText
+
+instance Show FixType where
+  show = foldFixType "none" "2d" "3d" "dgps" "pps"
diff --git a/Data/Geo/GPX/Gpx.hs b/Data/Geo/GPX/Gpx.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/Gpx.hs
@@ -0,0 +1,27 @@
+{-# LANGUAGE MultiParamTypeClasses #-}
+
+-- | Element: @gpx@ <http://www.topografix.com/GPX/1/1/#element_gpx>
+module Data.Geo.GPX.Gpx(
+                         Gpx,
+                         gpx
+                       ) where
+
+import Text.XML.HXT.Arrow
+import Data.Geo.GPX.GpxType
+import Data.Geo.GPX.Accessor.Value
+
+newtype Gpx = Gpx GpxType
+  deriving Eq
+
+gpx :: GpxType -- ^ The gpx element contents.
+       -> Gpx
+gpx = Gpx
+
+instance Show Gpx where
+  show (Gpx n) = show n
+
+instance XmlPickler Gpx where
+  xpickle = xpWrap (gpx, \(Gpx n) -> n) (xpElem "gpx" xpickle)
+
+instance Value Gpx GpxType where
+  value (Gpx x) = x
diff --git a/Data/Geo/GPX/GpxType.hs b/Data/Geo/GPX/GpxType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/GpxType.hs
@@ -0,0 +1,65 @@
+-- | Complex Type: @gpxType@ <http://www.topografix.com/GPX/1/1/#type_gpxType>
+module Data.Geo.GPX.GpxType(
+                             GpxType,
+                             gpxType
+                           ) where
+
+import Data.Geo.GPX.MetadataType
+import Data.Geo.GPX.WptType
+import Data.Geo.GPX.RteType
+import Data.Geo.GPX.TrkType
+import Data.Geo.GPX.ExtensionsType
+import Data.Geo.GPX.Accessor.Version
+import Data.Geo.GPX.Accessor.Creator
+import Data.Geo.GPX.Accessor.Metadata
+import Data.Geo.GPX.Accessor.Wpts
+import Data.Geo.GPX.Accessor.Rtes
+import Data.Geo.GPX.Accessor.Trks
+import Data.Geo.GPX.Accessor.Extensions
+import Text.XML.HXT.Arrow
+import Text.XML.HXT.Extras
+
+data GpxType = GpxType String String (Maybe MetadataType) [WptType] [RteType] [TrkType] (Maybe ExtensionsType)
+  deriving (Eq, Show)
+
+gpxType :: String -- ^ The version.
+           -> String -- ^ The creator.
+           -> Maybe MetadataType -- ^ The metadata.
+           -> [WptType] -- ^ The waypoints (wpt).
+           -> [RteType] -- ^ The routes (rte).
+           -> [TrkType] -- ^ The tracks (trk).
+           -> Maybe ExtensionsType -- ^ The extensions.
+           -> GpxType
+gpxType = GpxType
+
+instance XmlPickler GpxType where
+  xpickle = xpWrap (\(version', creator', metadata', wpt', rte', trk', extensions') -> gpxType version' creator' metadata' wpt' rte' trk' extensions',
+              \(GpxType version' creator' metadata' wpt' rte' trk' extensions') -> (version', creator', metadata', wpt', rte', trk', extensions')) (xp7Tuple
+                (xpAttr "version" xpText)
+                (xpAttr "creator" xpText)
+                (xpOption (xpElem "metadata" xpickle))
+                (xpList (xpElem "wpt" xpickle))
+                (xpList (xpElem "rte" xpickle))
+                (xpList (xpElem "trk" xpickle))
+                (xpOption (xpElem "extensions" xpickle)))
+
+instance Version GpxType where
+  version (GpxType x _ _ _ _ _ _) = x
+
+instance Creator GpxType where
+  creator (GpxType _ x _ _ _ _ _) = x
+
+instance Metadata GpxType where
+  metadata (GpxType _ _ x _ _ _ _) = x
+
+instance Wpts GpxType where
+  wpts (GpxType _ _ _ x _ _ _) = x
+
+instance Rtes GpxType where
+  rtes (GpxType _ _ _ _ x _ _) = x
+
+instance Trks GpxType where
+  trks (GpxType _ _ _ _ _ x _) = x
+
+instance Extensions GpxType where
+  extensions (GpxType _ _ _ _ _ _ x) = x
diff --git a/Data/Geo/GPX/LatitudeType.hs b/Data/Geo/GPX/LatitudeType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/LatitudeType.hs
@@ -0,0 +1,27 @@
+{-# LANGUAGE MultiParamTypeClasses #-}
+
+-- | Simple Type: @latitudeType@ <http://www.topografix.com/GPX/1/1/#type_latitudeType>
+module Data.Geo.GPX.LatitudeType(
+                                  LatitudeType,
+                                  latitudeType
+                                ) where
+
+import Data.Geo.GPX.Accessor.Value
+import Data.Fixed
+import Text.XML.HXT.Arrow
+
+newtype LatitudeType = LatitudeType Double
+  deriving Eq
+
+latitudeType :: Double -- ^ The value which will be between -90 and 90 (values out of the range are truncated using a modulus operation).
+                -> LatitudeType
+latitudeType n = LatitudeType ((n + 90) `mod'` 180 - 90)
+
+instance XmlPickler LatitudeType where
+  xpickle = xpWrap (latitudeType, \(LatitudeType n) -> n) xpPrim
+
+instance Show LatitudeType where
+  show (LatitudeType n) = show n
+
+instance Value LatitudeType Double where
+  value (LatitudeType x) = x
diff --git a/Data/Geo/GPX/LinkType.hs b/Data/Geo/GPX/LinkType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/LinkType.hs
@@ -0,0 +1,22 @@
+-- | Complex Type: @linkType@ <http://www.topografix.com/GPX/1/1/#type_linkType>
+module Data.Geo.GPX.LinkType(
+                              LinkType,
+                              linkType
+                            ) where
+
+import Text.XML.HXT.Arrow
+
+data LinkType = LinkType String (Maybe String) (Maybe String)
+  deriving (Eq, Show)
+
+linkType :: String -- ^ The href.
+            -> Maybe String -- ^ The text.
+            -> Maybe String -- ^ The type.
+            -> LinkType
+linkType = LinkType
+
+instance XmlPickler LinkType where
+  xpickle = xpWrap (\(href, text, type') -> linkType href text type', \(LinkType href text type') -> (href, text, type')) (xpTriple
+              (xpAttr "href" xpText)
+              (xpOption (xpElem "text" xpText))
+              (xpOption (xpElem "type" xpText)))
diff --git a/Data/Geo/GPX/LongitudeType.hs b/Data/Geo/GPX/LongitudeType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/LongitudeType.hs
@@ -0,0 +1,27 @@
+{-# LANGUAGE MultiParamTypeClasses #-}
+
+-- | Simple Type: @latitudeType@ <http://www.topografix.com/GPX/1/1/#type_latitudeType>
+module Data.Geo.GPX.LongitudeType(
+                                   LongitudeType,
+                                   longitudeType
+                                 ) where
+
+import Data.Geo.GPX.Accessor.Value
+import Data.Fixed
+import Text.XML.HXT.Arrow
+
+newtype LongitudeType = LongitudeType Double
+  deriving Eq
+
+longitudeType :: Double -- ^ The value which will be between -180 and 180 (values out of the range are truncated using a modulus operation).
+                 -> LongitudeType
+longitudeType n = LongitudeType ((n + 180) `mod'` 360 - 180)
+
+instance XmlPickler LongitudeType where
+  xpickle = xpWrap (longitudeType, \(LongitudeType n) -> n) xpPrim
+
+instance Show LongitudeType where
+  show (LongitudeType n) = show n
+
+instance Value LongitudeType Double where
+  value (LongitudeType x) = x
diff --git a/Data/Geo/GPX/MetadataType.hs b/Data/Geo/GPX/MetadataType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/MetadataType.hs
@@ -0,0 +1,78 @@
+{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances  #-}
+
+-- | Complex Type: @metadataType@ <http://www.topografix.com/GPX/1/1/#type_metadataType>
+module Data.Geo.GPX.MetadataType(
+                                  MetadataType,
+                                  metadataType
+                                ) where
+
+import Data.Geo.GPX.PersonType
+import Data.Geo.GPX.CopyrightType
+import Data.Geo.GPX.LinkType
+import Data.Geo.GPX.BoundsType
+import Data.Geo.GPX.ExtensionsType
+import Data.Geo.GPX.Accessor.Name
+import Data.Geo.GPX.Accessor.Desc
+import Data.Geo.GPX.Accessor.Author
+import Data.Geo.GPX.Accessor.Copyright
+import Data.Geo.GPX.Accessor.Links
+import Data.Geo.GPX.Accessor.Time
+import Data.Geo.GPX.Accessor.Keywords
+import Data.Geo.GPX.Accessor.Bounds
+import Data.Geo.GPX.Accessor.Extensions
+import Text.XML.HXT.Arrow
+import Text.XML.HXT.Extras
+
+data MetadataType = MetadataType (Maybe String) (Maybe String) (Maybe PersonType) (Maybe CopyrightType) [LinkType] (Maybe String) (Maybe String) (Maybe BoundsType) (Maybe ExtensionsType)
+  deriving (Eq, Show)
+
+metadataType :: Maybe String -- ^ The name.
+                -> Maybe String -- ^ The desc.
+                -> Maybe PersonType -- ^ The author.
+                -> Maybe CopyrightType -- ^ The copyright.
+                -> [LinkType] -- ^ The links (link).
+                -> Maybe String -- ^ The time.
+                -> Maybe String -- ^ The keywords.
+                -> Maybe BoundsType -- ^ The bounds.
+                -> Maybe ExtensionsType -- ^ The extensions
+                -> MetadataType
+metadataType = MetadataType
+
+instance XmlPickler MetadataType where
+  xpickle = xpWrap (\(a, b, c, d, e, f, g, h, i) -> metadataType a b c d e f g h i, \(MetadataType a b c d e f g h i) -> (a, b, c, d, e, f, g, h, i)) (xp9Tuple
+              (xpOption (xpElem "name" xpText))
+              (xpOption (xpElem "desc" xpText))
+              (xpOption (xpElem "author" xpickle))
+              (xpOption (xpElem "copyright" xpickle))
+              (xpList (xpElem "link" xpickle))
+              (xpOption (xpElem "time" xpText))
+              (xpOption (xpElem "keywords" xpText))
+              (xpOption (xpElem "bounds" xpickle))
+              (xpOption (xpElem "extensions" xpickle)))
+
+instance Name MetadataType where
+  name (MetadataType x _ _ _ _ _ _ _ _) = x
+
+instance Desc MetadataType where
+  desc (MetadataType _ x _ _ _ _ _ _ _) = x
+
+instance Author MetadataType (Maybe PersonType) where
+  author (MetadataType _ _ x _ _ _ _ _ _) = x
+
+instance Copyright MetadataType where
+  copyright (MetadataType _ _ _ x _ _ _ _ _) = x
+
+instance Links MetadataType where
+  links (MetadataType _ _ _ _ x _ _ _ _) = x
+
+instance Time MetadataType where
+  time (MetadataType _ _ _ _ _ x _ _ _) = x
+
+instance Keywords MetadataType where
+  keywords (MetadataType _ _ _ _ _ _ x _ _) = x
+
+instance Bounds MetadataType where
+  bounds (MetadataType _ _ _ _ _ _ _ x _) = x
+
+instance Extensions MetadataType where
+  extensions (MetadataType _ _ _ _ _ _ _ _ x) = x
diff --git a/Data/Geo/GPX/PersonType.hs b/Data/Geo/GPX/PersonType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/PersonType.hs
@@ -0,0 +1,36 @@
+-- | Complex Type: @personType@ <http://www.topografix.com/GPX/1/1/#type_personType>
+module Data.Geo.GPX.PersonType(
+                                PersonType,
+                                personType
+                              ) where
+
+import Data.Geo.GPX.EmailType
+import Data.Geo.GPX.LinkType
+import Data.Geo.GPX.Accessor.Name
+import Data.Geo.GPX.Accessor.Email
+import Data.Geo.GPX.Accessor.Link
+import Text.XML.HXT.Arrow
+
+data PersonType = PersonType (Maybe String) (Maybe EmailType) (Maybe LinkType)
+  deriving (Eq, Show)
+
+personType :: Maybe String -- ^ The name.
+              -> Maybe EmailType -- ^ The email.
+              -> Maybe LinkType -- ^ The link.
+              -> PersonType
+personType = PersonType
+
+instance XmlPickler PersonType where
+  xpickle = xpWrap (\(name', email', link') -> personType name' email' link', \(PersonType name' email' link') -> (name', email', link')) (xpTriple
+              (xpOption (xpElem "name" xpText))
+              (xpOption (xpElem "email" xpickle))
+              (xpOption (xpElem "link" xpickle)))
+
+instance Name PersonType where
+  name (PersonType x _ _) = x
+
+instance Email PersonType where
+  email (PersonType _ x _) = x
+
+instance Link PersonType where
+  link (PersonType _ _ x) = x
diff --git a/Data/Geo/GPX/PtType.hs b/Data/Geo/GPX/PtType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/PtType.hs
@@ -0,0 +1,43 @@
+-- | Complex Type: @ptType@ <http://www.topografix.com/GPX/1/1/#type_ptType>
+module Data.Geo.GPX.PtType(
+                            PtType,
+                            ptType
+                          ) where
+
+import Data.Geo.GPX.LatitudeType
+import Data.Geo.GPX.LongitudeType
+import Data.Geo.GPX.Accessor.Lat
+import Data.Geo.GPX.Accessor.Lon
+import Data.Geo.GPX.Accessor.Ele
+import Data.Geo.GPX.Accessor.Time
+import Text.XML.HXT.Arrow
+
+data PtType = PtType LatitudeType LongitudeType (Maybe Double) (Maybe String)
+  deriving (Eq, Show)
+
+ptType :: LatitudeType -- ^ The lat.
+          -> LongitudeType -- ^ The lon.
+          -> Maybe Double -- ^ The ele.
+          -> Maybe String -- ^ The time.
+          -> PtType
+ptType = PtType
+
+instance XmlPickler PtType where
+  xpickle = xpWrap (\(lat', lon', ele', time') -> ptType lat' lon' ele' time',
+                   \(PtType lat' lon' ele' time') -> (lat', lon', ele', time')) (xp4Tuple
+                     (xpAttr "lat" xpickle)
+                     (xpAttr "lon" xpickle)
+                     (xpOption (xpElem "ele" xpPrim))
+                     (xpOption (xpElem "time" xpText)))
+
+instance Lat PtType where
+  lat (PtType x _ _ _) = x
+
+instance Lon PtType where
+  lon (PtType _ x _ _) = x
+
+instance Ele PtType where
+  ele (PtType _ _ x _) = x
+
+instance Time PtType where
+  time (PtType _ _ _ x) = x
diff --git a/Data/Geo/GPX/PtsegType.hs b/Data/Geo/GPX/PtsegType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/PtsegType.hs
@@ -0,0 +1,22 @@
+-- | Complex Type: @ptsegType@ <http://www.topografix.com/GPX/1/1/#type_ptsegType>
+module Data.Geo.GPX.PtsegType(
+                               PtsegType,
+                               ptsegType
+                             ) where
+
+import Data.Geo.GPX.PtType
+import Data.Geo.GPX.Accessor.Pts
+import Text.XML.HXT.Arrow
+
+newtype PtsegType = PtsegType [PtType]
+  deriving (Eq, Show)
+
+ptsegType :: [PtType] -- ^ The points (pt).
+             -> PtsegType
+ptsegType = PtsegType
+
+instance XmlPickler PtsegType where
+  xpickle = xpWrap (ptsegType, \(PtsegType k) -> k) (xpList (xpElem "pt" xpickle))
+
+instance Pts PtsegType where
+  pts (PtsegType x) = x
diff --git a/Data/Geo/GPX/RteType.hs b/Data/Geo/GPX/RteType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/RteType.hs
@@ -0,0 +1,74 @@
+-- | Complex Type: @rteType@ <http://www.topografix.com/GPX/1/1/#type_rteType>
+module Data.Geo.GPX.RteType(
+                             RteType,
+                             rteType
+                           ) where
+
+import Data.Geo.GPX.WptType
+import Data.Geo.GPX.ExtensionsType
+import Data.Geo.GPX.LinkType
+import Data.Geo.GPX.Accessor.Name
+import Data.Geo.GPX.Accessor.Cmt
+import Data.Geo.GPX.Accessor.Desc
+import Data.Geo.GPX.Accessor.Src
+import Data.Geo.GPX.Accessor.Links
+import Data.Geo.GPX.Accessor.Number
+import Data.Geo.GPX.Accessor.Type
+import Data.Geo.GPX.Accessor.Extensions
+import Data.Geo.GPX.Accessor.Rtepts
+import Text.XML.HXT.Arrow
+import Text.XML.HXT.Extras
+
+data RteType = RteType (Maybe String) (Maybe String) (Maybe String) (Maybe String) [LinkType] (Maybe Int) (Maybe String) (Maybe ExtensionsType) [WptType]
+  deriving (Eq, Show)
+
+rteType :: Maybe String -- ^ The name.
+           -> Maybe String -- ^ The cmt.
+           -> Maybe String -- ^ The desc.
+           -> Maybe String -- ^ The src.
+           -> [LinkType] -- ^ The links (link).
+           -> Maybe Int -- ^ The number.
+           -> Maybe String -- ^ The type.
+           -> Maybe ExtensionsType -- ^ The extensions.
+           -> [WptType] -- ^ The route points (rtept).
+           -> RteType
+rteType a b c d e f = RteType a b c d e (fmap abs f)
+
+instance XmlPickler RteType where
+  xpickle = xpWrap (\(a, b, c, d, e, f, g, h, i) -> rteType a b c d e f g h i, \(RteType a b c d e f g h i) -> (a, b, c, d, e, f, g, h, i)) (xp9Tuple
+              (xpOption (xpElem "name" xpText))
+              (xpOption (xpElem "cmt" xpText))
+              (xpOption (xpElem "desc" xpText))
+              (xpOption (xpElem "src" xpText))
+              (xpList (xpElem "link" xpickle))
+              (xpOption (xpElem "number" xpPrim))
+              (xpOption (xpElem "type" xpText))
+              (xpOption (xpElem "extensions" xpickle))
+              (xpList (xpElem "rtept" xpickle)))
+
+instance Name RteType where
+  name (RteType x _ _ _ _ _ _ _ _) = x
+
+instance Cmt RteType where
+  cmt (RteType _ x _ _ _ _ _ _ _) = x
+
+instance Desc RteType where
+  desc (RteType _ _ x _ _ _ _ _ _) = x
+
+instance Src RteType where
+  src (RteType _ _ _ x _ _ _ _ _) = x
+
+instance Links RteType where
+  links (RteType _ _ _ _ x _ _ _ _) = x
+
+instance Number RteType where
+  number (RteType _ _ _ _ _ x _ _ _) = x
+
+instance Type RteType where
+  type' (RteType _ _ _ _ _ _ x _ _) = x
+
+instance Extensions RteType where
+  extensions (RteType _ _ _ _ _ _ _ x _) = x
+
+instance Rtepts RteType where
+  rtepts (RteType _ _ _ _ _ _ _ _ x) = x
diff --git a/Data/Geo/GPX/TrkType.hs b/Data/Geo/GPX/TrkType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/TrkType.hs
@@ -0,0 +1,74 @@
+-- | Complex Type: @trkType@ <http://www.topografix.com/GPX/1/1/#type_trkType>
+module Data.Geo.GPX.TrkType(
+                             TrkType,
+                             trkType
+                           ) where
+
+import Data.Geo.GPX.TrksegType
+import Data.Geo.GPX.ExtensionsType
+import Data.Geo.GPX.LinkType
+import Data.Geo.GPX.Accessor.Name
+import Data.Geo.GPX.Accessor.Cmt
+import Data.Geo.GPX.Accessor.Desc
+import Data.Geo.GPX.Accessor.Src
+import Data.Geo.GPX.Accessor.Links
+import Data.Geo.GPX.Accessor.Number
+import Data.Geo.GPX.Accessor.Type
+import Data.Geo.GPX.Accessor.Extensions
+import Data.Geo.GPX.Accessor.Trksegs
+import Text.XML.HXT.Arrow
+import Text.XML.HXT.Extras
+
+data TrkType = TrkType (Maybe String) (Maybe String) (Maybe String) (Maybe String) [LinkType] (Maybe Int) (Maybe String) (Maybe ExtensionsType) [TrksegType]
+  deriving (Eq, Show)
+
+trkType :: Maybe String -- ^ The name.
+           -> Maybe String -- ^ The cmt.
+           -> Maybe String -- ^ The desc.
+           -> Maybe String -- ^ The src.
+           -> [LinkType] -- ^ The links (link).
+           -> Maybe Int -- ^ The number.
+           -> Maybe String -- ^ The type.
+           -> Maybe ExtensionsType -- ^ The extensions.
+           -> [TrksegType] -- ^ The track segments (trkseg).
+           -> TrkType
+trkType a b c d e f = TrkType a b c d e (fmap abs f)
+
+instance XmlPickler TrkType where
+  xpickle = xpWrap (\(a, b, c, d, e, f, g, h, i) -> trkType a b c d e f g h i, \(TrkType a b c d e f g h i) -> (a, b, c, d, e, f, g, h, i)) (xp9Tuple
+              (xpOption (xpElem "name" xpText))
+              (xpOption (xpElem "cmt" xpText))
+              (xpOption (xpElem "desc" xpText))
+              (xpOption (xpElem "src" xpText))
+              (xpList (xpElem "link" xpickle))
+              (xpOption (xpElem "number" xpPrim))
+              (xpOption (xpElem "type" xpText))
+              (xpOption (xpElem "extensions" xpickle))
+              (xpList (xpElem "trkseg" xpickle)))
+
+instance Name TrkType where
+  name (TrkType x _ _ _ _ _ _ _ _) = x
+
+instance Cmt TrkType where
+  cmt (TrkType _ x _ _ _ _ _ _ _) = x
+
+instance Desc TrkType where
+  desc (TrkType _ _ x _ _ _ _ _ _) = x
+
+instance Src TrkType where
+  src (TrkType _ _ _ x _ _ _ _ _) = x
+
+instance Links TrkType where
+  links (TrkType _ _ _ _ x _ _ _ _) = x
+
+instance Number TrkType where
+  number (TrkType _ _ _ _ _ x _ _ _) = x
+
+instance Type TrkType where
+  type' (TrkType _ _ _ _ _ _ x _ _) = x
+
+instance Extensions TrkType where
+  extensions (TrkType _ _ _ _ _ _ _ x _) = x
+
+instance Trksegs TrkType where
+  trksegs (TrkType _ _ _ _ _ _ _ _ x) = x
diff --git a/Data/Geo/GPX/TrksegType.hs b/Data/Geo/GPX/TrksegType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/TrksegType.hs
@@ -0,0 +1,30 @@
+-- | Complex Type: @trksegType@ <http://www.topografix.com/GPX/1/1/#type_trksegType>
+module Data.Geo.GPX.TrksegType(
+                                TrksegType,
+                                trksegType
+                              ) where
+
+import Data.Geo.GPX.WptType
+import Data.Geo.GPX.ExtensionsType
+import Data.Geo.GPX.Accessor.Trkpts
+import Data.Geo.GPX.Accessor.Extensions
+import Text.XML.HXT.Arrow
+
+data TrksegType = TrksegType [WptType] (Maybe ExtensionsType)
+  deriving (Eq, Show)
+
+trksegType :: [WptType] -- ^ The track points (trkpt).
+              -> Maybe ExtensionsType -- ^ The extensions.
+              -> TrksegType
+trksegType = TrksegType
+
+instance XmlPickler TrksegType where
+  xpickle = xpWrap (\(trkpt', extensions') -> trksegType trkpt' extensions', \(TrksegType trkpt' extensions') -> (trkpt', extensions')) (xpPair
+              (xpList (xpElem "trkpt" xpickle))
+              (xpOption (xpElem "extensions" xpickle)))
+
+instance Trkpts TrksegType where
+  trkpts (TrksegType x _) = x
+
+instance Extensions TrksegType where
+  extensions (TrksegType _ x) = x
diff --git a/Data/Geo/GPX/WptType.hs b/Data/Geo/GPX/WptType.hs
new file mode 100644
--- /dev/null
+++ b/Data/Geo/GPX/WptType.hs
@@ -0,0 +1,171 @@
+-- | Complex Type: @wptType@ <http://www.topografix.com/GPX/1/1/#type_wptType>
+module Data.Geo.GPX.WptType(
+                             WptType,
+                             wptType
+                           ) where
+
+import Data.Geo.GPX.LatitudeType
+import Data.Geo.GPX.LongitudeType
+import Data.Geo.GPX.DegreesType
+import Data.Geo.GPX.LinkType
+import Data.Geo.GPX.FixType
+import Data.Geo.GPX.DgpsStationType
+import Data.Geo.GPX.ExtensionsType
+import Data.Geo.GPX.Accessor.Lat
+import Data.Geo.GPX.Accessor.Lon
+import Data.Geo.GPX.Accessor.Ele
+import Data.Geo.GPX.Accessor.Time
+import Data.Geo.GPX.Accessor.Magvar
+import Data.Geo.GPX.Accessor.Geoidheight
+import Data.Geo.GPX.Accessor.Name
+import Data.Geo.GPX.Accessor.Cmt
+import Data.Geo.GPX.Accessor.Desc
+import Data.Geo.GPX.Accessor.Src
+import Data.Geo.GPX.Accessor.Links
+import Data.Geo.GPX.Accessor.Sym
+import Data.Geo.GPX.Accessor.Type
+import Data.Geo.GPX.Accessor.Fix
+import Data.Geo.GPX.Accessor.Sat
+import Data.Geo.GPX.Accessor.Hdop
+import Data.Geo.GPX.Accessor.Vdop
+import Data.Geo.GPX.Accessor.Pdop
+import Data.Geo.GPX.Accessor.Ageofdgpsdata
+import Data.Geo.GPX.Accessor.Dgpsid
+import Data.Geo.GPX.Accessor.Extensions
+import Text.XML.HXT.Arrow
+import Text.XML.HXT.Extras
+
+data WptType = WptType LatitudeType
+                       LongitudeType
+                       (Maybe Double)
+                       (Maybe String)
+                       (Maybe DegreesType)
+                       (Maybe Double)
+                       (Maybe String)
+                       (Maybe String)
+                       (Maybe String)
+                       (Maybe String)
+                       [LinkType]
+                       (Maybe String)
+                       (Maybe String)
+                       (Maybe FixType)
+                       (Maybe Int)
+                       (Maybe Double)
+                       (Maybe Double)
+                       (Maybe Double)
+                       (Maybe Double)
+                       (Maybe DgpsStationType)
+                       (Maybe ExtensionsType)
+  deriving (Eq, Show)
+
+wptType :: LatitudeType -- ^ The lat.
+           -> LongitudeType -- ^ The lon.
+           -> Maybe Double -- ^ The ele.
+           -> Maybe String -- ^ The time.
+           -> Maybe DegreesType -- ^ The magvar.
+           -> Maybe Double -- ^ The geoidheight.
+           -> Maybe String -- ^ The name.
+           -> Maybe String -- ^ The cmt.
+           -> Maybe String -- ^ The desc.
+           -> Maybe String -- ^ The src.
+           -> [LinkType] -- ^ The links (link).
+           -> Maybe String -- ^ The sym.
+           -> Maybe String -- ^ The type.
+           -> Maybe FixType -- ^ The fix.
+           -> Maybe Int -- ^ The sat.
+           -> Maybe Double -- ^ The hdop.
+           -> Maybe Double -- ^ The vdop.
+           -> Maybe Double -- ^ The pdop.
+           -> Maybe Double -- ^ The ageofdgpsdata.
+           -> Maybe DgpsStationType -- ^ The dgpsid.
+           -> Maybe ExtensionsType -- ^ The extensions.
+           -> WptType
+wptType a b c d e f g h i j k l m n o p = WptType a b c d e f g h i j k l m n o (fmap abs p)
+
+instance XmlPickler WptType where
+  xpickle = xpWrap (\(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) -> wptType a b c d e f g h i j k l m n o p q r s t u,
+                   \(WptType a b c d e f g h i j k l m n o p q r s t u) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u)) (xp21Tuple
+                    (xpAttr "lat" xpickle)
+                    (xpAttr "lon" xpickle)
+                    (xpOption (xpElem "ele" xpPrim))
+                    (xpOption (xpElem "time" xpText))
+                    (xpOption (xpElem "magvar" xpickle))
+                    (xpOption (xpElem "geoidheight" xpPrim))
+                    (xpOption (xpElem "name" xpText))
+                    (xpOption (xpElem "cmt" xpText))
+                    (xpOption (xpElem "desc" xpText))
+                    (xpOption (xpElem "src" xpText))
+                    (xpList (xpElem "link" xpickle))
+                    (xpOption (xpElem "sym" xpText))
+                    (xpOption (xpElem "type" xpText))
+                    (xpOption (xpElem "fix" xpickle))
+                    (xpOption (xpElem "sat" xpPrim))
+                    (xpOption (xpElem "hdop" xpPrim))
+                    (xpOption (xpElem "vdop" xpPrim))
+                    (xpOption (xpElem "pdop" xpPrim))
+                    (xpOption (xpElem "ageofdgpsdata" xpPrim))
+                    (xpOption (xpElem "dgpsid" xpickle))
+                    (xpOption (xpElem "extensions" xpickle)))
+
+instance Lat WptType where
+  lat (WptType x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+
+instance Lon WptType where
+  lon (WptType _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+
+instance Ele WptType where
+  ele (WptType _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+
+instance Time WptType where
+  time (WptType _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+
+instance Magvar WptType where
+  magvar (WptType _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+
+instance Geoidheight WptType where
+  geoidheight (WptType _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+
+instance Name WptType where
+  name (WptType _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+
+instance Cmt WptType where
+  cmt (WptType _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+
+instance Desc WptType where
+  desc (WptType _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _) = x
+
+instance Src WptType where
+  src (WptType _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _) = x
+
+instance Links WptType where
+  links (WptType _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _) = x
+
+instance Sym WptType where
+  sym (WptType _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _) = x
+
+instance Type WptType where
+  type' (WptType _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _) = x
+
+instance Fix WptType where
+  fix (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _) = x
+
+instance Sat WptType where
+  sat (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _) = x
+
+instance Hdop WptType where
+  hdop (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _) = x
+
+instance Vdop WptType where
+  vdop (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _) = x
+
+instance Pdop WptType where
+  pdop (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _) = x
+
+instance Ageofdgpsdata WptType where
+  ageofdgpsdata (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _) = x
+
+instance Dgpsid WptType where
+  dgpsid (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _) = x
+
+instance Extensions WptType where
+  extensions (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x) = x
diff --git a/GPX.cabal b/GPX.cabal
new file mode 100644
--- /dev/null
+++ b/GPX.cabal
@@ -0,0 +1,94 @@
+Name:                GPX
+Version:             0.1
+License:             BSD3
+License-File:        LICENSE
+Synopsis:            Parse GPX files
+Description:         Parse GPS Exchange (GPX) files using HXT into data structures.
+Homepage:            http://code.google.com/p/geo-gpx/
+Category:            Utils
+Author:              Tony Morris
+Maintainer:          code@tmorris.net
+Copyright:           2009 Tony Morris
+build-type:          Simple
+cabal-version:       >= 1.2
+
+Flag small_base
+  Description:     Choose the new, split-up base package.
+
+Library
+  if flag(small_base)
+    Build-Depends: base < 4 && >= 3, hxt, hxt-extras, containers
+  else
+    Build-Depends: base < 3, hxt, hxt-extras, containers
+
+  GHC-Options:    -Wall
+  Exposed-Modules: Data.Geo.GPX
+                   Data.Geo.GPX.DgpsStationType
+                   Data.Geo.GPX.FixType
+                   Data.Geo.GPX.DegreesType
+                   Data.Geo.GPX.LongitudeType
+                   Data.Geo.GPX.LatitudeType
+                   Data.Geo.GPX.BoundsType
+                   Data.Geo.GPX.ExtensionsType
+                   Data.Geo.GPX.PtType
+                   Data.Geo.GPX.PtsegType
+                   Data.Geo.GPX.EmailType
+                   Data.Geo.GPX.LinkType
+                   Data.Geo.GPX.PersonType
+                   Data.Geo.GPX.CopyrightType
+                   Data.Geo.GPX.WptType
+                   Data.Geo.GPX.TrksegType
+                   Data.Geo.GPX.TrkType
+                   Data.Geo.GPX.RteType
+                   Data.Geo.GPX.MetadataType
+                   Data.Geo.GPX.GpxType
+                   Data.Geo.GPX.Gpx
+                   Data.Geo.GPX.Accessor.Minlat
+                   Data.Geo.GPX.Accessor.Maxlat
+                   Data.Geo.GPX.Accessor.Minlon
+                   Data.Geo.GPX.Accessor.Maxlon
+                   Data.Geo.GPX.Accessor.Author
+                   Data.Geo.GPX.Accessor.Year
+                   Data.Geo.GPX.Accessor.License
+                   Data.Geo.GPX.Accessor.Value
+                   Data.Geo.GPX.Accessor.Id
+                   Data.Geo.GPX.Accessor.Domain
+                   Data.Geo.GPX.Accessor.Version
+                   Data.Geo.GPX.Accessor.Creator
+                   Data.Geo.GPX.Accessor.Metadata
+                   Data.Geo.GPX.Accessor.Wpts
+                   Data.Geo.GPX.Accessor.Rtes
+                   Data.Geo.GPX.Accessor.Trks
+                   Data.Geo.GPX.Accessor.Extensions
+                   Data.Geo.GPX.Accessor.Href
+                   Data.Geo.GPX.Accessor.Text
+                   Data.Geo.GPX.Accessor.Type
+                   Data.Geo.GPX.Accessor.Name
+                   Data.Geo.GPX.Accessor.Desc
+                   Data.Geo.GPX.Accessor.Copyright
+                   Data.Geo.GPX.Accessor.Links
+                   Data.Geo.GPX.Accessor.Time
+                   Data.Geo.GPX.Accessor.Keywords
+                   Data.Geo.GPX.Accessor.Bounds
+                   Data.Geo.GPX.Accessor.Lat
+                   Data.Geo.GPX.Accessor.Lon
+                   Data.Geo.GPX.Accessor.Ele
+                   Data.Geo.GPX.Accessor.Magvar
+                   Data.Geo.GPX.Accessor.Geoidheight
+                   Data.Geo.GPX.Accessor.Cmt
+                   Data.Geo.GPX.Accessor.Src
+                   Data.Geo.GPX.Accessor.Sym
+                   Data.Geo.GPX.Accessor.Fix
+                   Data.Geo.GPX.Accessor.Sat
+                   Data.Geo.GPX.Accessor.Hdop
+                   Data.Geo.GPX.Accessor.Vdop
+                   Data.Geo.GPX.Accessor.Pdop
+                   Data.Geo.GPX.Accessor.Ageofdgpsdata
+                   Data.Geo.GPX.Accessor.Dgpsid
+                   Data.Geo.GPX.Accessor.Email
+                   Data.Geo.GPX.Accessor.Link
+                   Data.Geo.GPX.Accessor.Pts
+                   Data.Geo.GPX.Accessor.Number
+                   Data.Geo.GPX.Accessor.Rtepts
+                   Data.Geo.GPX.Accessor.Trkpts
+                   Data.Geo.GPX.Accessor.Trksegs
diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,27 @@
+Copyright 2009 Tony Morris
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. 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.
+3. Neither the name of the author nor the names of his contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 THE AUTHORS OR CONTRIBUTORS 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/Setup.lhs b/Setup.lhs
new file mode 100644
--- /dev/null
+++ b/Setup.lhs
@@ -0,0 +1,3 @@
+#!/usr/bin/env runhaskell
+> import Distribution.Simple
+> main = defaultMain
