diff --git a/Data/Geo/GPX/Accessor/Ageofdgpsdata.hs b/Data/Geo/GPX/Accessor/Ageofdgpsdata.hs
--- a/Data/Geo/GPX/Accessor/Ageofdgpsdata.hs
+++ b/Data/Geo/GPX/Accessor/Ageofdgpsdata.hs
@@ -2,3 +2,4 @@
 
 class Ageofdgpsdata a where
   ageofdgpsdata :: a -> Maybe Double
+  setAgeofdgpsdata :: Maybe Double -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Author.hs b/Data/Geo/GPX/Accessor/Author.hs
--- a/Data/Geo/GPX/Accessor/Author.hs
+++ b/Data/Geo/GPX/Accessor/Author.hs
@@ -4,3 +4,4 @@
 
 class Author a b | a -> b where
   author :: a -> b
+  setAuthor :: b -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Bounds.hs b/Data/Geo/GPX/Accessor/Bounds.hs
--- a/Data/Geo/GPX/Accessor/Bounds.hs
+++ b/Data/Geo/GPX/Accessor/Bounds.hs
@@ -4,3 +4,4 @@
 
 class Bounds a where
   bounds :: a -> Maybe BoundsType
+  setBounds :: Maybe BoundsType -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Cmt.hs b/Data/Geo/GPX/Accessor/Cmt.hs
--- a/Data/Geo/GPX/Accessor/Cmt.hs
+++ b/Data/Geo/GPX/Accessor/Cmt.hs
@@ -2,3 +2,4 @@
 
 class Cmt a where
   cmt :: a -> Maybe String
+  setCmt :: Maybe String -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Copyright.hs b/Data/Geo/GPX/Accessor/Copyright.hs
--- a/Data/Geo/GPX/Accessor/Copyright.hs
+++ b/Data/Geo/GPX/Accessor/Copyright.hs
@@ -4,3 +4,4 @@
 
 class Copyright a where
   copyright :: a -> Maybe CopyrightType
+  setCopyright :: Maybe CopyrightType -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Creator.hs b/Data/Geo/GPX/Accessor/Creator.hs
--- a/Data/Geo/GPX/Accessor/Creator.hs
+++ b/Data/Geo/GPX/Accessor/Creator.hs
@@ -2,3 +2,4 @@
 
 class Creator a where
   creator :: a -> String
+  setCreator :: String -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Desc.hs b/Data/Geo/GPX/Accessor/Desc.hs
--- a/Data/Geo/GPX/Accessor/Desc.hs
+++ b/Data/Geo/GPX/Accessor/Desc.hs
@@ -2,3 +2,4 @@
 
 class Desc a where
   desc :: a -> Maybe String
+  setDesc :: Maybe String -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Dgpsid.hs b/Data/Geo/GPX/Accessor/Dgpsid.hs
--- a/Data/Geo/GPX/Accessor/Dgpsid.hs
+++ b/Data/Geo/GPX/Accessor/Dgpsid.hs
@@ -4,3 +4,4 @@
 
 class Dgpsid a where
   dgpsid :: a -> Maybe DgpsStationType
+  setDgpsid :: Maybe DgpsStationType -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Domain.hs b/Data/Geo/GPX/Accessor/Domain.hs
--- a/Data/Geo/GPX/Accessor/Domain.hs
+++ b/Data/Geo/GPX/Accessor/Domain.hs
@@ -2,3 +2,4 @@
 
 class Domain a where
   domain :: a -> String
+  setDomain :: String -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Ele.hs b/Data/Geo/GPX/Accessor/Ele.hs
--- a/Data/Geo/GPX/Accessor/Ele.hs
+++ b/Data/Geo/GPX/Accessor/Ele.hs
@@ -2,3 +2,4 @@
 
 class Ele a where
   ele :: a -> Maybe Double
+  setEle :: Maybe Double -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Email.hs b/Data/Geo/GPX/Accessor/Email.hs
--- a/Data/Geo/GPX/Accessor/Email.hs
+++ b/Data/Geo/GPX/Accessor/Email.hs
@@ -4,3 +4,4 @@
 
 class Email a where
   email :: a -> Maybe EmailType
+  setEmail :: Maybe EmailType -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Extensions.hs b/Data/Geo/GPX/Accessor/Extensions.hs
--- a/Data/Geo/GPX/Accessor/Extensions.hs
+++ b/Data/Geo/GPX/Accessor/Extensions.hs
@@ -4,3 +4,4 @@
 
 class Extensions a where
   extensions :: a -> Maybe ExtensionsType
+  setExtensions :: Maybe ExtensionsType -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Fix.hs b/Data/Geo/GPX/Accessor/Fix.hs
--- a/Data/Geo/GPX/Accessor/Fix.hs
+++ b/Data/Geo/GPX/Accessor/Fix.hs
@@ -4,3 +4,4 @@
 
 class Fix a where
   fix :: a -> Maybe FixType
+  setFix :: Maybe FixType -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Geoidheight.hs b/Data/Geo/GPX/Accessor/Geoidheight.hs
--- a/Data/Geo/GPX/Accessor/Geoidheight.hs
+++ b/Data/Geo/GPX/Accessor/Geoidheight.hs
@@ -2,3 +2,4 @@
 
 class Geoidheight a where
   geoidheight :: a -> Maybe Double
+  setGeoidheight :: Maybe Double -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Hdop.hs b/Data/Geo/GPX/Accessor/Hdop.hs
--- a/Data/Geo/GPX/Accessor/Hdop.hs
+++ b/Data/Geo/GPX/Accessor/Hdop.hs
@@ -2,3 +2,4 @@
 
 class Hdop a where
   hdop :: a -> Maybe Double
+  setHdop :: Maybe Double -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Href.hs b/Data/Geo/GPX/Accessor/Href.hs
--- a/Data/Geo/GPX/Accessor/Href.hs
+++ b/Data/Geo/GPX/Accessor/Href.hs
@@ -2,3 +2,4 @@
 
 class Href a where
   href :: a -> String
+  setHref :: String -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Id.hs b/Data/Geo/GPX/Accessor/Id.hs
--- a/Data/Geo/GPX/Accessor/Id.hs
+++ b/Data/Geo/GPX/Accessor/Id.hs
@@ -2,3 +2,4 @@
 
 class Id a where
   id :: a -> String
+  setId :: String -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Keywords.hs b/Data/Geo/GPX/Accessor/Keywords.hs
--- a/Data/Geo/GPX/Accessor/Keywords.hs
+++ b/Data/Geo/GPX/Accessor/Keywords.hs
@@ -2,3 +2,4 @@
 
 class Keywords a where
   keywords :: a -> Maybe String
+  setKeywords :: Maybe String -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Lat.hs b/Data/Geo/GPX/Accessor/Lat.hs
--- a/Data/Geo/GPX/Accessor/Lat.hs
+++ b/Data/Geo/GPX/Accessor/Lat.hs
@@ -4,3 +4,4 @@
 
 class Lat a where
   lat :: a -> LatitudeType
+  setLat :: LatitudeType -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Latlon.hs b/Data/Geo/GPX/Accessor/Latlon.hs
--- a/Data/Geo/GPX/Accessor/Latlon.hs
+++ b/Data/Geo/GPX/Accessor/Latlon.hs
@@ -4,6 +4,4 @@
 
 class Latlon a where
   latlon :: a -> (Double, Double)
-
-instance (Real a, Real b) => Latlon (a, b) where
-  latlon (a, b) = (realToFrac a, realToFrac b)
+  setLatlon :: (Double, Double) -> a -> a
diff --git a/Data/Geo/GPX/Accessor/License.hs b/Data/Geo/GPX/Accessor/License.hs
--- a/Data/Geo/GPX/Accessor/License.hs
+++ b/Data/Geo/GPX/Accessor/License.hs
@@ -2,3 +2,4 @@
 
 class License a where
   license :: a -> Maybe String
+  setLicense :: Maybe String -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Link.hs b/Data/Geo/GPX/Accessor/Link.hs
--- a/Data/Geo/GPX/Accessor/Link.hs
+++ b/Data/Geo/GPX/Accessor/Link.hs
@@ -4,3 +4,4 @@
 
 class Link a where
   link :: a -> Maybe LinkType
+  setLink :: Maybe LinkType -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Links.hs b/Data/Geo/GPX/Accessor/Links.hs
--- a/Data/Geo/GPX/Accessor/Links.hs
+++ b/Data/Geo/GPX/Accessor/Links.hs
@@ -4,3 +4,4 @@
 
 class Links a where
   links :: a -> [LinkType]
+  setLinks :: [LinkType] -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Lon.hs b/Data/Geo/GPX/Accessor/Lon.hs
--- a/Data/Geo/GPX/Accessor/Lon.hs
+++ b/Data/Geo/GPX/Accessor/Lon.hs
@@ -4,3 +4,4 @@
 
 class Lon a where
   lon :: a -> LongitudeType
+  setLon :: LongitudeType -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Magvar.hs b/Data/Geo/GPX/Accessor/Magvar.hs
--- a/Data/Geo/GPX/Accessor/Magvar.hs
+++ b/Data/Geo/GPX/Accessor/Magvar.hs
@@ -4,3 +4,4 @@
 
 class Magvar a where
   magvar :: a -> Maybe DegreesType
+  setMagvar :: Maybe DegreesType -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Maxlat.hs b/Data/Geo/GPX/Accessor/Maxlat.hs
--- a/Data/Geo/GPX/Accessor/Maxlat.hs
+++ b/Data/Geo/GPX/Accessor/Maxlat.hs
@@ -4,3 +4,4 @@
 
 class Maxlat a where
   maxlat :: a -> LatitudeType
+  setMaxlat :: LatitudeType -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Maxlon.hs b/Data/Geo/GPX/Accessor/Maxlon.hs
--- a/Data/Geo/GPX/Accessor/Maxlon.hs
+++ b/Data/Geo/GPX/Accessor/Maxlon.hs
@@ -4,3 +4,5 @@
 
 class Maxlon a where
   maxlon :: a -> LongitudeType
+  setMaxlon :: LongitudeType -> a -> a
+--
diff --git a/Data/Geo/GPX/Accessor/Metadata.hs b/Data/Geo/GPX/Accessor/Metadata.hs
--- a/Data/Geo/GPX/Accessor/Metadata.hs
+++ b/Data/Geo/GPX/Accessor/Metadata.hs
@@ -4,3 +4,4 @@
 
 class Metadata a where
   metadata :: a -> Maybe MetadataType
+  setMetadata :: Maybe MetadataType -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Minlat.hs b/Data/Geo/GPX/Accessor/Minlat.hs
--- a/Data/Geo/GPX/Accessor/Minlat.hs
+++ b/Data/Geo/GPX/Accessor/Minlat.hs
@@ -4,3 +4,4 @@
 
 class Minlat a where
   minlat :: a -> LatitudeType
+  setMinlat :: LatitudeType -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Minlon.hs b/Data/Geo/GPX/Accessor/Minlon.hs
--- a/Data/Geo/GPX/Accessor/Minlon.hs
+++ b/Data/Geo/GPX/Accessor/Minlon.hs
@@ -4,3 +4,4 @@
 
 class Minlon a where
   minlon :: a -> LongitudeType
+  setMinlon :: LongitudeType -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Name.hs b/Data/Geo/GPX/Accessor/Name.hs
--- a/Data/Geo/GPX/Accessor/Name.hs
+++ b/Data/Geo/GPX/Accessor/Name.hs
@@ -2,3 +2,4 @@
 
 class Name a where
   name :: a -> Maybe String
+  setName :: Maybe String -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Number.hs b/Data/Geo/GPX/Accessor/Number.hs
--- a/Data/Geo/GPX/Accessor/Number.hs
+++ b/Data/Geo/GPX/Accessor/Number.hs
@@ -2,3 +2,4 @@
 
 class Number a where
   number :: a -> Maybe Int
+  setNumber :: Maybe Int -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Pdop.hs b/Data/Geo/GPX/Accessor/Pdop.hs
--- a/Data/Geo/GPX/Accessor/Pdop.hs
+++ b/Data/Geo/GPX/Accessor/Pdop.hs
@@ -2,3 +2,4 @@
 
 class Pdop a where
   pdop :: a -> Maybe Double
+  setPdop :: Maybe Double -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Pts.hs b/Data/Geo/GPX/Accessor/Pts.hs
--- a/Data/Geo/GPX/Accessor/Pts.hs
+++ b/Data/Geo/GPX/Accessor/Pts.hs
@@ -4,3 +4,4 @@
 
 class Pts a where
   pts :: a -> [PtType]
+  setPts :: [PtType] -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Rtepts.hs b/Data/Geo/GPX/Accessor/Rtepts.hs
--- a/Data/Geo/GPX/Accessor/Rtepts.hs
+++ b/Data/Geo/GPX/Accessor/Rtepts.hs
@@ -4,3 +4,4 @@
 
 class Rtepts a where
   rtepts :: a -> [WptType]
+  setRtepts :: [WptType] -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Rtes.hs b/Data/Geo/GPX/Accessor/Rtes.hs
--- a/Data/Geo/GPX/Accessor/Rtes.hs
+++ b/Data/Geo/GPX/Accessor/Rtes.hs
@@ -4,3 +4,4 @@
 
 class Rtes a where
   rtes :: a -> [RteType]
+  setRtes :: [RteType] -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Sat.hs b/Data/Geo/GPX/Accessor/Sat.hs
--- a/Data/Geo/GPX/Accessor/Sat.hs
+++ b/Data/Geo/GPX/Accessor/Sat.hs
@@ -2,3 +2,4 @@
 
 class Sat a where
   sat :: a -> Maybe Int
+  setSat :: Maybe Int -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Src.hs b/Data/Geo/GPX/Accessor/Src.hs
--- a/Data/Geo/GPX/Accessor/Src.hs
+++ b/Data/Geo/GPX/Accessor/Src.hs
@@ -2,3 +2,4 @@
 
 class Src a where
   src :: a -> Maybe String
+  setSrc :: Maybe String -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Sym.hs b/Data/Geo/GPX/Accessor/Sym.hs
--- a/Data/Geo/GPX/Accessor/Sym.hs
+++ b/Data/Geo/GPX/Accessor/Sym.hs
@@ -2,3 +2,4 @@
 
 class Sym a where
   sym :: a -> Maybe String
+  setSym :: Maybe String -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Text.hs b/Data/Geo/GPX/Accessor/Text.hs
--- a/Data/Geo/GPX/Accessor/Text.hs
+++ b/Data/Geo/GPX/Accessor/Text.hs
@@ -2,3 +2,4 @@
 
 class Text a where
   text :: a -> Maybe String
+  setText :: Maybe String -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Time.hs b/Data/Geo/GPX/Accessor/Time.hs
--- a/Data/Geo/GPX/Accessor/Time.hs
+++ b/Data/Geo/GPX/Accessor/Time.hs
@@ -1,4 +1,7 @@
 module Data.Geo.GPX.Accessor.Time where
 
+import Text.XML.XSD.DateTime
+
 class Time a where
-  time :: a -> Maybe String
+  time :: a -> Maybe DateTime
+  setTime :: Maybe DateTime -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Trkpts.hs b/Data/Geo/GPX/Accessor/Trkpts.hs
--- a/Data/Geo/GPX/Accessor/Trkpts.hs
+++ b/Data/Geo/GPX/Accessor/Trkpts.hs
@@ -4,3 +4,4 @@
 
 class Trkpts a where
   trkpts :: a -> [WptType]
+  setTrkpts :: [WptType] -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Trks.hs b/Data/Geo/GPX/Accessor/Trks.hs
--- a/Data/Geo/GPX/Accessor/Trks.hs
+++ b/Data/Geo/GPX/Accessor/Trks.hs
@@ -4,3 +4,4 @@
 
 class Trks a where
   trks :: a -> [TrkType]
+  setTrks :: [TrkType] -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Trksegs.hs b/Data/Geo/GPX/Accessor/Trksegs.hs
--- a/Data/Geo/GPX/Accessor/Trksegs.hs
+++ b/Data/Geo/GPX/Accessor/Trksegs.hs
@@ -4,3 +4,4 @@
 
 class Trksegs a where
   trksegs :: a -> [TrksegType]
+  setTrksegs :: [TrksegType] -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Type.hs b/Data/Geo/GPX/Accessor/Type.hs
--- a/Data/Geo/GPX/Accessor/Type.hs
+++ b/Data/Geo/GPX/Accessor/Type.hs
@@ -2,3 +2,4 @@
 
 class Type a where
   type' :: a -> Maybe String
+  setType :: Maybe String -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Value.hs b/Data/Geo/GPX/Accessor/Value.hs
--- a/Data/Geo/GPX/Accessor/Value.hs
+++ b/Data/Geo/GPX/Accessor/Value.hs
@@ -4,3 +4,4 @@
 
 class Value a b | a -> b where
   value :: a -> b
+  setValue :: b -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Vdop.hs b/Data/Geo/GPX/Accessor/Vdop.hs
--- a/Data/Geo/GPX/Accessor/Vdop.hs
+++ b/Data/Geo/GPX/Accessor/Vdop.hs
@@ -2,3 +2,4 @@
 
 class Vdop a where
   vdop :: a -> Maybe Double
+  setVdop :: Maybe Double -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Version.hs b/Data/Geo/GPX/Accessor/Version.hs
--- a/Data/Geo/GPX/Accessor/Version.hs
+++ b/Data/Geo/GPX/Accessor/Version.hs
@@ -2,3 +2,4 @@
 
 class Version a where
   version :: a -> String
+  setVersion :: String -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Wpts.hs b/Data/Geo/GPX/Accessor/Wpts.hs
--- a/Data/Geo/GPX/Accessor/Wpts.hs
+++ b/Data/Geo/GPX/Accessor/Wpts.hs
@@ -4,3 +4,4 @@
 
 class Wpts a where
   wpts :: a -> [WptType]
+  setWpts :: [WptType] -> a -> a
diff --git a/Data/Geo/GPX/Accessor/Year.hs b/Data/Geo/GPX/Accessor/Year.hs
--- a/Data/Geo/GPX/Accessor/Year.hs
+++ b/Data/Geo/GPX/Accessor/Year.hs
@@ -2,3 +2,4 @@
 
 class Year a where
   year :: a -> Maybe String
+  setYear :: Maybe String -> a -> a
diff --git a/Data/Geo/GPX/BoundsType.hs b/Data/Geo/GPX/BoundsType.hs
--- a/Data/Geo/GPX/BoundsType.hs
+++ b/Data/Geo/GPX/BoundsType.hs
@@ -30,12 +30,16 @@
 
 instance Minlat BoundsType where
   minlat (BoundsType (x, _) (_, _)) = x
+  setMinlat a (BoundsType (_, b) (c, d)) = boundsType (a, b) (c, d)
 
 instance Maxlat BoundsType where
   maxlat (BoundsType (_, _) (x, _)) = x
+  setMaxlat c (BoundsType (a, b) (_, d)) = boundsType (a, b) (c, d)
 
 instance Minlon BoundsType where
   minlon (BoundsType (_, x) (_, _)) = x
+  setMinlon b (BoundsType (a, _) (c, d)) = boundsType (a, b) (c, d)
 
 instance Maxlon BoundsType where
   maxlon (BoundsType (_, _) (_, x)) = x
+  setMaxlon d (BoundsType (a, b) (c, _)) = boundsType (a, b) (c, d)
diff --git a/Data/Geo/GPX/CopyrightType.hs b/Data/Geo/GPX/CopyrightType.hs
--- a/Data/Geo/GPX/CopyrightType.hs
+++ b/Data/Geo/GPX/CopyrightType.hs
@@ -28,9 +28,12 @@
 
 instance Author CopyrightType String where
   author (CopyrightType x _ _) = x
+  setAuthor x (CopyrightType _ y z) = copyrightType x y z
 
 instance Year CopyrightType where
   year (CopyrightType _ x _) = x
+  setYear y (CopyrightType x _ z) = copyrightType x y z
 
 instance License CopyrightType where
   license (CopyrightType _ _ x) = x
+  setLicense z (CopyrightType x y _) = copyrightType x y z
diff --git a/Data/Geo/GPX/DegreesType.hs b/Data/Geo/GPX/DegreesType.hs
--- a/Data/Geo/GPX/DegreesType.hs
+++ b/Data/Geo/GPX/DegreesType.hs
@@ -22,3 +22,4 @@
 
 instance Value DegreesType Double where
   value (DegreesType x) = x
+  setValue x (DegreesType _) = degreesType x
diff --git a/Data/Geo/GPX/DgpsStationType.hs b/Data/Geo/GPX/DgpsStationType.hs
--- a/Data/Geo/GPX/DgpsStationType.hs
+++ b/Data/Geo/GPX/DgpsStationType.hs
@@ -8,6 +8,7 @@
 
 import Data.Geo.GPX.Accessor.Value
 import Data.Ix
+import Data.Maybe
 import Text.XML.HXT.Arrow
 
 newtype DgpsStationType = DgpsStationType Int
@@ -25,3 +26,4 @@
 
 instance Value DgpsStationType Int where
   value (DgpsStationType x) = x
+  setValue x (DgpsStationType _) = fromMaybe (error ("DgpsStationType " ++ show x ++ " out of range (0,1023)")) (dgpsStationType x)
diff --git a/Data/Geo/GPX/EmailType.hs b/Data/Geo/GPX/EmailType.hs
--- a/Data/Geo/GPX/EmailType.hs
+++ b/Data/Geo/GPX/EmailType.hs
@@ -22,6 +22,8 @@
 
 instance Id EmailType where
   id (EmailType x _) = x
+  setId a (EmailType _ b) = emailType a b
 
 instance Domain EmailType where
   domain (EmailType _ x) = x
+  setDomain b (EmailType a _) = emailType a b
diff --git a/Data/Geo/GPX/ExtensionsType.hs b/Data/Geo/GPX/ExtensionsType.hs
--- a/Data/Geo/GPX/ExtensionsType.hs
+++ b/Data/Geo/GPX/ExtensionsType.hs
@@ -21,3 +21,4 @@
 
 instance Value ExtensionsType XmlTree where
   value (ExtensionsType x) = x
+  setValue x (ExtensionsType _) = extensionsType x
diff --git a/Data/Geo/GPX/Gpx.hs b/Data/Geo/GPX/Gpx.hs
--- a/Data/Geo/GPX/Gpx.hs
+++ b/Data/Geo/GPX/Gpx.hs
@@ -4,10 +4,12 @@
 module Data.Geo.GPX.Gpx(
                          Gpx,
                          gpx,
-                         readGpxFile
+                         readGpxFile,
+                         readGpxFiles
                        ) where
 
 import Text.XML.HXT.Arrow
+import Control.Monad
 import Data.Geo.GPX.GpxType
 import Data.Geo.GPX.PersonType
 import Data.Geo.GPX.Accessor.Value
@@ -34,6 +36,7 @@
 
 instance Author Gpx (Maybe PersonType) where
   author = author . value
+  setAuthor = (gpx .) . (. value) . setAuthor
 
 gpx :: GpxType -- ^ The gpx element contents.
        -> Gpx
@@ -47,7 +50,12 @@
 
 instance Value Gpx GpxType where
   value (Gpx x) = x
+  setValue x (Gpx _) = gpx x
 
 -- | Reads a GPX file into a list of @Gpx@ values removing whitespace.
 readGpxFile :: FilePath -> IO [Gpx]
 readGpxFile = runX . xunpickleDocument (xpickle :: PU Gpx) [(a_remove_whitespace, v_1)]
+
+-- | Reads 0 or more GPX files into a list of @Gpx@ values removing whitespace.
+readGpxFiles :: [FilePath] -> IO [Gpx]
+readGpxFiles = fmap join . (mapM readGpxFile)
diff --git a/Data/Geo/GPX/GpxType.hs b/Data/Geo/GPX/GpxType.hs
--- a/Data/Geo/GPX/GpxType.hs
+++ b/Data/Geo/GPX/GpxType.hs
@@ -59,51 +59,68 @@
 
 instance Version GpxType where
   version (GpxType x _ _ _ _ _ _) = x
+  setVersion a (GpxType _ b c d e f g) = gpxType a b c d e f g
 
 instance Creator GpxType where
   creator (GpxType _ x _ _ _ _ _) = x
+  setCreator b (GpxType a _ c d e f g) = gpxType a b c d e f g
 
 instance Metadata GpxType where
   metadata (GpxType _ _ x _ _ _ _) = x
+  setMetadata c (GpxType a b _ d e f g) = gpxType a b c d e f g
 
 instance Wpts GpxType where
   wpts (GpxType _ _ _ x _ _ _) = x
+  setWpts d (GpxType a b c _ e f g) = gpxType a b c d e f g
 
 instance Rtes GpxType where
   rtes (GpxType _ _ _ _ x _ _) = x
+  setRtes e (GpxType a b c d _ f g) = gpxType a b c d e f g
 
 instance Trks GpxType where
   trks (GpxType _ _ _ _ _ x _) = x
+  setTrks f (GpxType a b c d e _ g) = gpxType a b c d e f g
 
 instance Extensions GpxType where
   extensions (GpxType _ _ _ _ _ _ x) = x
+  setExtensions g (GpxType a b c d e f _) = gpxType a b c d e f g
 
 instance Name GpxType where
   name = (name =<<) . metadata
+  setName x (GpxType a b c d e f g) = gpxType a b (fmap (setName x) c) d e f g
 
 instance Desc GpxType where
   desc = (desc =<<) . metadata
+  setDesc x (GpxType a b c d e f g) = gpxType a b (fmap (setDesc x) c) d e f g
 
 instance Author GpxType (Maybe PersonType) where
   author = (author =<<) . metadata
+  setAuthor x (GpxType a b c d e f g) = gpxType a b (fmap (setAuthor x) c) d e f g
 
 instance Copyright GpxType where
   copyright = (copyright =<<) . metadata
+  setCopyright x (GpxType a b c d e f g) = gpxType a b (fmap (setCopyright x) c) d e f g
 
 instance Links GpxType where
   links = (links =<<) . maybeToList . metadata
+  setLinks x (GpxType a b c d e f g) = gpxType a b (fmap (setLinks x) c) d e f g
 
 instance Time GpxType where
   time = (time =<<) . metadata
+  setTime x (GpxType a b c d e f g) = gpxType a b (fmap (setTime x) c) d e f g
 
 instance Keywords GpxType where
   keywords = (keywords =<<) . metadata
+  setKeywords x (GpxType a b c d e f g) = gpxType a b (fmap (setKeywords x) c) d e f g
 
 instance Bounds GpxType where
   bounds = (bounds =<<) . metadata
+  setBounds x (GpxType a b c d e f g) = gpxType a b (fmap (setBounds x) c) d e f g
 
 instance Rtepts GpxType where
   rtepts = (rtepts =<<) . rtes
+  setRtepts x (GpxType a b c d e f g) = gpxType a b c d (fmap (setRtepts x) e) f g
 
 instance Trkpts GpxType where
   trkpts = (trkpts =<<) . trks
+  setTrkpts x (GpxType a b c d e f g) = gpxType a b c d e (fmap (setTrkpts x) f) g
diff --git a/Data/Geo/GPX/LatitudeType.hs b/Data/Geo/GPX/LatitudeType.hs
--- a/Data/Geo/GPX/LatitudeType.hs
+++ b/Data/Geo/GPX/LatitudeType.hs
@@ -25,3 +25,4 @@
 
 instance Value LatitudeType Double where
   value (LatitudeType x) = x
+  setValue x (LatitudeType _) = latitudeType x
diff --git a/Data/Geo/GPX/LongitudeType.hs b/Data/Geo/GPX/LongitudeType.hs
--- a/Data/Geo/GPX/LongitudeType.hs
+++ b/Data/Geo/GPX/LongitudeType.hs
@@ -25,3 +25,4 @@
 
 instance Value LongitudeType Double where
   value (LongitudeType x) = x
+  setValue x (LongitudeType _) = longitudeType x
diff --git a/Data/Geo/GPX/MetadataType.hs b/Data/Geo/GPX/MetadataType.hs
--- a/Data/Geo/GPX/MetadataType.hs
+++ b/Data/Geo/GPX/MetadataType.hs
@@ -22,8 +22,9 @@
 import Data.Geo.GPX.Accessor.Extensions
 import Text.XML.HXT.Arrow
 import Text.XML.HXT.Extras
+import Text.XML.XSD.DateTime
 
-data MetadataType = MetadataType (Maybe String) (Maybe String) (Maybe PersonType) (Maybe CopyrightType) [LinkType] (Maybe String) (Maybe String) (Maybe BoundsType) (Maybe ExtensionsType)
+data MetadataType = MetadataType (Maybe String) (Maybe String) (Maybe PersonType) (Maybe CopyrightType) [LinkType] (Maybe DateTime) (Maybe String) (Maybe BoundsType) (Maybe ExtensionsType)
   deriving (Eq, Show)
 
 metadataType :: Maybe String -- ^ The name.
@@ -31,7 +32,7 @@
                 -> Maybe PersonType -- ^ The author.
                 -> Maybe CopyrightType -- ^ The copyright.
                 -> [LinkType] -- ^ The links (link).
-                -> Maybe String -- ^ The time.
+                -> Maybe DateTime -- ^ The time.
                 -> Maybe String -- ^ The keywords.
                 -> Maybe BoundsType -- ^ The bounds.
                 -> Maybe ExtensionsType -- ^ The extensions
@@ -45,34 +46,43 @@
               (xpOption (xpElem "author" xpickle))
               (xpOption (xpElem "copyright" xpickle))
               (xpList (xpElem "link" xpickle))
-              (xpOption (xpElem "time" xpText))
+              (xpOption (xpElem "time" (xpWrapMaybe (dateTime, show) xpText)))
               (xpOption (xpElem "keywords" xpText))
               (xpOption (xpElem "bounds" xpickle))
               (xpOption (xpElem "extensions" xpickle)))
 
 instance Name MetadataType where
   name (MetadataType x _ _ _ _ _ _ _ _) = x
+  setName a (MetadataType _ b c d e f g h i) = metadataType a b c d e f g h i
 
 instance Desc MetadataType where
   desc (MetadataType _ x _ _ _ _ _ _ _) = x
+  setDesc b (MetadataType a _ c d e f g h i) = metadataType a b c d e f g h i
 
 instance Author MetadataType (Maybe PersonType) where
   author (MetadataType _ _ x _ _ _ _ _ _) = x
+  setAuthor c (MetadataType a b _ d e f g h i) = metadataType a b c d e f g h i
 
 instance Copyright MetadataType where
   copyright (MetadataType _ _ _ x _ _ _ _ _) = x
+  setCopyright d (MetadataType a b c _ e f g h i) = metadataType a b c d e f g h i
 
 instance Links MetadataType where
   links (MetadataType _ _ _ _ x _ _ _ _) = x
+  setLinks e (MetadataType a b c d _ f g h i) = metadataType a b c d e f g h i
 
 instance Time MetadataType where
   time (MetadataType _ _ _ _ _ x _ _ _) = x
+  setTime f (MetadataType a b c d e _ g h i) = metadataType a b c d e f g h i
 
 instance Keywords MetadataType where
   keywords (MetadataType _ _ _ _ _ _ x _ _) = x
+  setKeywords g (MetadataType a b c d e f _ h i) = metadataType a b c d e f g h i
 
 instance Bounds MetadataType where
   bounds (MetadataType _ _ _ _ _ _ _ x _) = x
+  setBounds h (MetadataType a b c d e f g _ i) = metadataType a b c d e f g h i
 
 instance Extensions MetadataType where
   extensions (MetadataType _ _ _ _ _ _ _ _ x) = x
+  setExtensions i (MetadataType a b c d e f g h _) = metadataType a b c d e f g h i
diff --git a/Data/Geo/GPX/PersonType.hs b/Data/Geo/GPX/PersonType.hs
--- a/Data/Geo/GPX/PersonType.hs
+++ b/Data/Geo/GPX/PersonType.hs
@@ -28,9 +28,12 @@
 
 instance Name PersonType where
   name (PersonType x _ _) = x
+  setName a (PersonType _ b c) = personType a b c
 
 instance Email PersonType where
   email (PersonType _ x _) = x
+  setEmail b (PersonType a _ c) = personType a b c
 
 instance Link PersonType where
   link (PersonType _ _ x) = x
+  setLink c (PersonType a b _) = personType a b c
diff --git a/Data/Geo/GPX/PtType.hs b/Data/Geo/GPX/PtType.hs
--- a/Data/Geo/GPX/PtType.hs
+++ b/Data/Geo/GPX/PtType.hs
@@ -11,14 +11,15 @@
 import Data.Geo.GPX.Accessor.Ele
 import Data.Geo.GPX.Accessor.Time
 import Text.XML.HXT.Arrow
+import Text.XML.XSD.DateTime
 
-data PtType = PtType LatitudeType LongitudeType (Maybe Double) (Maybe String)
+data PtType = PtType LatitudeType LongitudeType (Maybe Double) (Maybe DateTime)
   deriving (Eq, Show)
 
 ptType :: LatitudeType -- ^ The lat.
           -> LongitudeType -- ^ The lon.
           -> Maybe Double -- ^ The ele.
-          -> Maybe String -- ^ The time.
+          -> Maybe DateTime -- ^ The time.
           -> PtType
 ptType = PtType
 
@@ -28,16 +29,20 @@
                      (xpAttr "lat" xpickle)
                      (xpAttr "lon" xpickle)
                      (xpOption (xpElem "ele" xpPrim))
-                     (xpOption (xpElem "time" xpText)))
+                     (xpOption (xpElem "time" (xpWrapMaybe (dateTime, show) xpText))))
 
 instance Lat PtType where
   lat (PtType x _ _ _) = x
+  setLat a (PtType _ b c d) = ptType a b c d
 
 instance Lon PtType where
   lon (PtType _ x _ _) = x
+  setLon b (PtType a _ c d) = ptType a b c d
 
 instance Ele PtType where
   ele (PtType _ _ x _) = x
+  setEle c (PtType a b _ d) = ptType a b c d
 
 instance Time PtType where
   time (PtType _ _ _ x) = x
+  setTime d (PtType a b c _) = ptType a b c d
diff --git a/Data/Geo/GPX/PtsegType.hs b/Data/Geo/GPX/PtsegType.hs
--- a/Data/Geo/GPX/PtsegType.hs
+++ b/Data/Geo/GPX/PtsegType.hs
@@ -20,3 +20,4 @@
 
 instance Pts PtsegType where
   pts (PtsegType x) = x
+  setPts x (PtsegType _) = ptsegType x
diff --git a/Data/Geo/GPX/RteType.hs b/Data/Geo/GPX/RteType.hs
--- a/Data/Geo/GPX/RteType.hs
+++ b/Data/Geo/GPX/RteType.hs
@@ -48,27 +48,36 @@
 
 instance Name RteType where
   name (RteType x _ _ _ _ _ _ _ _) = x
+  setName a (RteType _ b c d e f g h i) = rteType a b c d e f g h i
 
 instance Cmt RteType where
   cmt (RteType _ x _ _ _ _ _ _ _) = x
+  setCmt b (RteType a _ c d e f g h i) = rteType a b c d e f g h i
 
 instance Desc RteType where
   desc (RteType _ _ x _ _ _ _ _ _) = x
+  setDesc c (RteType a b _ d e f g h i) = rteType a b c d e f g h i
 
 instance Src RteType where
   src (RteType _ _ _ x _ _ _ _ _) = x
+  setSrc d (RteType a b c _ e f g h i) = rteType a b c d e f g h i
 
 instance Links RteType where
   links (RteType _ _ _ _ x _ _ _ _) = x
+  setLinks e (RteType a b c d _ f g h i) = rteType a b c d e f g h i
 
 instance Number RteType where
   number (RteType _ _ _ _ _ x _ _ _) = x
+  setNumber f (RteType a b c d e _ g h i) = rteType a b c d e f g h i
 
 instance Type RteType where
   type' (RteType _ _ _ _ _ _ x _ _) = x
+  setType g (RteType a b c d e f _ h i) = rteType a b c d e f g h i
 
 instance Extensions RteType where
   extensions (RteType _ _ _ _ _ _ _ x _) = x
+  setExtensions h (RteType a b c d e f g _ i) = rteType a b c d e f g h i
 
 instance Rtepts RteType where
   rtepts (RteType _ _ _ _ _ _ _ _ x) = x
+  setRtepts i (RteType a b c d e f g h _) = rteType a b c d e f g h i
diff --git a/Data/Geo/GPX/TrkType.hs b/Data/Geo/GPX/TrkType.hs
--- a/Data/Geo/GPX/TrkType.hs
+++ b/Data/Geo/GPX/TrkType.hs
@@ -49,30 +49,41 @@
 
 instance Name TrkType where
   name (TrkType x _ _ _ _ _ _ _ _) = x
+  setName a (TrkType _ b c d e f g h i) = trkType a b c d e f g h i
 
 instance Cmt TrkType where
   cmt (TrkType _ x _ _ _ _ _ _ _) = x
+  setCmt b (TrkType a _ c d e f g h i) = trkType a b c d e f g h i
 
 instance Desc TrkType where
   desc (TrkType _ _ x _ _ _ _ _ _) = x
+  setDesc c (TrkType a b _ d e f g h i) = trkType a b c d e f g h i
 
 instance Src TrkType where
   src (TrkType _ _ _ x _ _ _ _ _) = x
+  setSrc d (TrkType a b c _ e f g h i) = trkType a b c d e f g h i
 
 instance Links TrkType where
   links (TrkType _ _ _ _ x _ _ _ _) = x
+  setLinks e (TrkType a b c d _ f g h i) = trkType a b c d e f g h i
 
 instance Number TrkType where
   number (TrkType _ _ _ _ _ x _ _ _) = x
+  setNumber f (TrkType a b c d e _ g h i) = trkType a b c d e f g h i
 
 instance Type TrkType where
   type' (TrkType _ _ _ _ _ _ x _ _) = x
+  setType g (TrkType a b c d e f _ h i) = trkType a b c d e f g h i
 
 instance Extensions TrkType where
   extensions (TrkType _ _ _ _ _ _ _ x _) = x
+  setExtensions h (TrkType a b c d e f g _ i) = trkType a b c d e f g h i
 
 instance Trksegs TrkType where
   trksegs (TrkType _ _ _ _ _ _ _ _ x) = x
+  setTrksegs i (TrkType a b c d e f g h _) = trkType a b c d e f g h i
 
 instance Trkpts TrkType where
   trkpts = (trkpts =<<) . trksegs
+  setTrkpts x (TrkType a b c d e f g h i) = trkType a b c d e f g h (fmap (setTrkpts x) i)
+
diff --git a/Data/Geo/GPX/TrksegType.hs b/Data/Geo/GPX/TrksegType.hs
--- a/Data/Geo/GPX/TrksegType.hs
+++ b/Data/Geo/GPX/TrksegType.hs
@@ -25,6 +25,8 @@
 
 instance Trkpts TrksegType where
   trkpts (TrksegType x _) = x
+  setTrkpts a (TrksegType _ b) = trksegType a b
 
 instance Extensions TrksegType where
   extensions (TrksegType _ x) = x
+  setExtensions b (TrksegType a _) = trksegType a b
diff --git a/Data/Geo/GPX/WptType.hs b/Data/Geo/GPX/WptType.hs
--- a/Data/Geo/GPX/WptType.hs
+++ b/Data/Geo/GPX/WptType.hs
@@ -36,11 +36,12 @@
 import Data.Geo.GPX.Accessor.Value
 import Text.XML.HXT.Arrow
 import Text.XML.HXT.Extras
+import Text.XML.XSD.DateTime
 
 data WptType = WptType LatitudeType
                        LongitudeType
                        (Maybe Double)
-                       (Maybe String)
+                       (Maybe DateTime)
                        (Maybe DegreesType)
                        (Maybe Double)
                        (Maybe String)
@@ -63,7 +64,7 @@
 wptType :: LatitudeType -- ^ The lat.
            -> LongitudeType -- ^ The lon.
            -> Maybe Double -- ^ The ele.
-           -> Maybe String -- ^ The time.
+           -> Maybe DateTime -- ^ The time.
            -> Maybe DegreesType -- ^ The magvar.
            -> Maybe Double -- ^ The geoidheight.
            -> Maybe String -- ^ The name.
@@ -90,7 +91,7 @@
                     (xpAttr "lat" xpickle)
                     (xpAttr "lon" xpickle)
                     (xpOption (xpElem "ele" xpPrim))
-                    (xpOption (xpElem "time" xpText))
+                    (xpOption (xpElem "time" (xpWrapMaybe (dateTime, show) xpText)))
                     (xpOption (xpElem "magvar" xpickle))
                     (xpOption (xpElem "geoidheight" xpPrim))
                     (xpOption (xpElem "name" xpText))
@@ -111,66 +112,88 @@
 
 instance Lat WptType where
   lat (WptType x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+  setLat a (WptType _ 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
 
 instance Lon WptType where
   lon (WptType _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+  setLon b (WptType a _ 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
 
 instance Ele WptType where
   ele (WptType _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+  setEle c (WptType a b _ 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
 
 instance Time WptType where
   time (WptType _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+  setTime d (WptType a b c _ 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
 
 instance Magvar WptType where
   magvar (WptType _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+  setMagvar e (WptType a b c d _ 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
 
 instance Geoidheight WptType where
   geoidheight (WptType _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+  setGeoidheight f (WptType a b c d e _ 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
 
 instance Name WptType where
   name (WptType _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+  setName g (WptType a b c d e f _ 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
 
 instance Cmt WptType where
   cmt (WptType _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _) = x
+  setCmt h (WptType a b c d e f g _ 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
 
 instance Desc WptType where
   desc (WptType _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _) = x
+  setDesc i (WptType a b c d e f g h _ 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
 
 instance Src WptType where
   src (WptType _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _) = x
+  setSrc j (WptType a b c d e f g h i _ 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
 
 instance Links WptType where
   links (WptType _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _) = x
+  setLinks k (WptType a b c d e f g h i j _ 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
 
 instance Sym WptType where
   sym (WptType _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _) = x
+  setSym l (WptType a b c d e f g h i j k _ 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
 
 instance Type WptType where
   type' (WptType _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _) = x
+  setType m (WptType a b c d e f g h i j k l _ 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
 
 instance Fix WptType where
   fix (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _) = x
+  setFix n (WptType a b c d e f g h i j k l m _ 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
 
 instance Sat WptType where
   sat (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _) = x
+  setSat o (WptType a b c d e f g h i j k l m n _ 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
 
 instance Hdop WptType where
   hdop (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _) = x
+  setHdop p (WptType a b c d e f g h i j k l m n o _ 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
 
 instance Vdop WptType where
   vdop (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _) = x
+  setVdop q (WptType a b c d e f g h i j k l m n o p _ 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
 
 instance Pdop WptType where
   pdop (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _) = x
+  setPdop r (WptType a b c d e f g h i j k l m n o p q _ 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
 
 instance Ageofdgpsdata WptType where
   ageofdgpsdata (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _) = x
-
+  setAgeofdgpsdata s (WptType a b c d e f g h i j k l m n o p q r _ t u) = wptType a b c d e f g h i j k l m n o p q r s t u
+--
 instance Dgpsid WptType where
   dgpsid (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _) = x
+  setDgpsid t (WptType a b c d e f g h i j k l m n o p q r s _ u) = wptType a b c d e f g h i j k l m n o p q r s t u
 
 instance Extensions WptType where
   extensions (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x) = x
+  setExtensions u (WptType a b c d e f g h i j k l m n o p q r s t _) = wptType a b c d e f g h i j k l m n o p q r s t u
 
 instance Latlon WptType where
   latlon e = (value (lat e), value (lon e))
+  setLatlon (a, b) (WptType _ _ c d e f g h i j k l m n o p q r s t u) = wptType (latitudeType a) (longitudeType b) c d e f g h i j k l m n o p q r s t u
diff --git a/GPX.cabal b/GPX.cabal
--- a/GPX.cabal
+++ b/GPX.cabal
@@ -1,5 +1,5 @@
 Name:                GPX
-Version:             0.3
+Version:             0.4.1
 License:             BSD3
 License-File:        LICENSE
 Synopsis:            Parse GPX files
@@ -17,9 +17,9 @@
 
 Library
   if flag(small_base)
-    Build-Depends: base < 4 && >= 3, hxt, hxt-extras, containers
+    Build-Depends: base < 4 && >= 3, hxt, hxt-extras, containers, xsd
   else
-    Build-Depends: base < 3, hxt, hxt-extras, containers
+    Build-Depends: base < 3, hxt, hxt-extras, containers, xsd
 
   GHC-Options:    -Wall
   Exposed-Modules: Data.Geo.GPX
