GPX 0.4.8 → 0.5
raw patch · 21 files changed
+36/−36 lines, 21 filesdep ~hxtdep ~hxt-extrasnew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: hxt, hxt-extras
API changes (from Hackage documentation)
- Data.Geo.GPX.Gpx: interactGpx' :: Attributes -> FilePath -> (Gpx -> Gpx) -> Attributes -> FilePath -> IO ()
+ Data.Geo.GPX.Gpx: interactGpx' :: SysConfigList -> FilePath -> (Gpx -> Gpx) -> SysConfigList -> FilePath -> IO ()
- Data.Geo.GPX.Gpx: interactGpxIO' :: Attributes -> FilePath -> (Gpx -> IO Gpx) -> Attributes -> FilePath -> IO ()
+ Data.Geo.GPX.Gpx: interactGpxIO' :: SysConfigList -> FilePath -> (Gpx -> IO Gpx) -> SysConfigList -> FilePath -> IO ()
- Data.Geo.GPX.Gpx: interactsGpx' :: Attributes -> FilePath -> [Gpx -> Gpx] -> Attributes -> FilePath -> IO ()
+ Data.Geo.GPX.Gpx: interactsGpx' :: SysConfigList -> FilePath -> [Gpx -> Gpx] -> SysConfigList -> FilePath -> IO ()
- Data.Geo.GPX.Gpx: interactsGpxIO' :: Attributes -> FilePath -> [Gpx -> IO Gpx] -> Attributes -> FilePath -> IO ()
+ Data.Geo.GPX.Gpx: interactsGpxIO' :: SysConfigList -> FilePath -> [Gpx -> IO Gpx] -> SysConfigList -> FilePath -> IO ()
Files
- Data/Geo/GPX/BoundsType.hs +1/−1
- Data/Geo/GPX/CopyrightType.hs +1/−1
- Data/Geo/GPX/DegreesType.hs +1/−1
- Data/Geo/GPX/DgpsStationType.hs +1/−1
- Data/Geo/GPX/EmailType.hs +1/−1
- Data/Geo/GPX/ExtensionsType.hs +2/−2
- Data/Geo/GPX/FixType.hs +1/−1
- Data/Geo/GPX/Gpx.hs +11/−11
- Data/Geo/GPX/GpxType.hs +1/−1
- Data/Geo/GPX/LatitudeType.hs +1/−1
- Data/Geo/GPX/LinkType.hs +1/−1
- Data/Geo/GPX/LongitudeType.hs +1/−1
- Data/Geo/GPX/MetadataType.hs +1/−1
- Data/Geo/GPX/PersonType.hs +1/−1
- Data/Geo/GPX/PtType.hs +1/−1
- Data/Geo/GPX/PtsegType.hs +1/−1
- Data/Geo/GPX/RteType.hs +1/−1
- Data/Geo/GPX/TrkType.hs +1/−1
- Data/Geo/GPX/TrksegType.hs +1/−1
- Data/Geo/GPX/WptType.hs +1/−1
- GPX.cabal +5/−5
Data/Geo/GPX/BoundsType.hs view
@@ -10,7 +10,7 @@ import Data.Geo.GPX.Accessor.Maxlat import Data.Geo.GPX.Accessor.Minlon import Data.Geo.GPX.Accessor.Maxlon-import Text.XML.HXT.Arrow+import Text.XML.HXT.Core data BoundsType = BoundsType (LatitudeType, LongitudeType) (LatitudeType, LongitudeType) deriving (Show, Eq)
Data/Geo/GPX/CopyrightType.hs view
@@ -9,7 +9,7 @@ import Data.Geo.GPX.Accessor.Author import Data.Geo.GPX.Accessor.Year import Data.Geo.GPX.Accessor.License-import Text.XML.HXT.Arrow+import Text.XML.HXT.Core data CopyrightType = CopyrightType String (Maybe String) (Maybe String) deriving (Eq, Show)
Data/Geo/GPX/DegreesType.hs view
@@ -8,7 +8,7 @@ import Data.Geo.GPX.Accessor.Value import Data.Fixed-import Text.XML.HXT.Arrow+import Text.XML.HXT.Core newtype DegreesType = DegreesType Double deriving (Eq, Show)
Data/Geo/GPX/DgpsStationType.hs view
@@ -6,10 +6,10 @@ dgpsStationType ) where +import Text.XML.HXT.Core import Data.Geo.GPX.Accessor.Value import Data.Ix import Data.Maybe-import Text.XML.HXT.Arrow newtype DgpsStationType = DgpsStationType Int deriving Eq
Data/Geo/GPX/EmailType.hs view
@@ -4,7 +4,7 @@ emailType ) where -import Text.XML.HXT.Arrow+import Text.XML.HXT.Core import Data.Geo.GPX.Accessor.Id import Data.Geo.GPX.Accessor.Domain
Data/Geo/GPX/ExtensionsType.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances #-}+{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-} -- | Complex Type: @extensionsType@ <http://www.topografix.com/GPX/1/1/#type_extensionsType> module Data.Geo.GPX.ExtensionsType(@@ -6,7 +6,7 @@ extensionsType ) where -import Text.XML.HXT.Arrow+import Text.XML.HXT.Core import Data.Geo.GPX.Accessor.Value newtype ExtensionsType = ExtensionsType XmlTree
Data/Geo/GPX/FixType.hs view
@@ -10,7 +10,7 @@ fixType ) where -import Text.XML.HXT.Arrow hiding (none)+import Text.XML.HXT.Core hiding (none) data FixType = None | Twod | Threed | Dgps | Pps deriving (Eq, Enum)
Data/Geo/GPX/Gpx.hs view
@@ -16,7 +16,7 @@ interactsGpx' ) where -import Text.XML.HXT.Arrow+import Text.XML.HXT.Core import Control.Monad import Data.List import Data.Geo.GPX.GpxType@@ -63,26 +63,26 @@ -- | 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)]+readGpxFile = runX . xunpickleDocument (xpickle :: PU Gpx) [withRemoveWS yes, withValidate no] -- | Reads 0 or more GPX files into a list of @Gpx@ values removing whitespace. readGpxFiles :: [FilePath] -> IO [Gpx] readGpxFiles = fmap join . mapM readGpxFile -- | Reads a GPX file, executes the given function on the XML, then writes the given file.-interactGpxIO' :: Attributes -- ^ The options for reading the GPX file.+interactGpxIO' :: SysConfigList -- ^ The options for reading the GPX file. -> FilePath -- ^ The GPX file to read. -> (Gpx -> IO Gpx) -- ^ The function to execute on the XML that is read.- -> Attributes -- ^ The options for writing the GPX file.+ -> SysConfigList -- ^ The options for writing the GPX file. -> FilePath -- ^ The GPX file to write. -> IO () interactGpxIO' froma from f toa to = runX (xunpickleDocument (xpickle :: PU Gpx) froma from >>> arrIO f >>> xpickleDocument (xpickle :: PU Gpx) toa to) >> return () -- | Reads a GPX file, executes the given functions on the XML, then writes the given file.-interactsGpxIO' :: Attributes -- ^ The options for reading the GPX file.+interactsGpxIO' :: SysConfigList -- ^ The options for reading the GPX file. -> FilePath -- ^ The GPX file to read. -> [Gpx -> IO Gpx] -- ^ The function to execute on the XML that is read.- -> Attributes -- ^ The options for writing the GPX file.+ -> SysConfigList -- ^ The options for writing the GPX file. -> FilePath -- ^ The GPX file to write. -> IO () interactsGpxIO' froma from = interactGpxIO' froma from . sumIO'@@ -92,7 +92,7 @@ -> (Gpx -> IO Gpx) -- ^ The function to execute on the XML that is read. -> FilePath -- ^ The GPX file to write. -> IO ()-interactGpxIO from f = interactGpxIO' [(a_remove_whitespace, v_1)] from f [(a_indent, v_1)]+interactGpxIO from f = interactGpxIO' [] from f [] -- | Reads a GPX file removing whitespace, executes the given functions on the XML, then writes the given file with indentation. interactsGpxIO :: FilePath -- ^ The GPX file to read.@@ -102,19 +102,19 @@ interactsGpxIO from = interactGpxIO from . sumIO' -- | Reads a GPX file, executes the given function on the XML, then writes the given file.-interactGpx' :: Attributes -- ^ The options for reading the GPX file.+interactGpx' :: SysConfigList -- ^ The options for reading the GPX file. -> FilePath -- ^ The GPX file to read. -> (Gpx -> Gpx) -- ^ The function to execute on the XML that is read.- -> Attributes -- ^ The options for writing the GPX file.+ -> SysConfigList -- ^ The options for writing the GPX file. -> FilePath -- ^ The GPX file to write. -> IO () interactGpx' froma from f = interactGpxIO' froma from (return . f) -- | Reads a GPX file, executes the given functions on the XML, then writes the given file.-interactsGpx' :: Attributes -- ^ The options for reading the GPX file.+interactsGpx' :: SysConfigList -- ^ The options for reading the GPX file. -> FilePath -- ^ The GPX file to read. -> [Gpx -> Gpx] -- ^ The functions to execute on the XML that is read.- -> Attributes -- ^ The options for writing the GPX file.+ -> SysConfigList -- ^ The options for writing the GPX file. -> FilePath -- ^ The GPX file to write. -> IO () interactsGpx' froma from = interactGpx' froma from . sum'
Data/Geo/GPX/GpxType.hs view
@@ -29,7 +29,7 @@ import Data.Geo.GPX.Accessor.Bounds import Data.Geo.GPX.Accessor.Rtepts import Data.Geo.GPX.Accessor.Trkpts-import Text.XML.HXT.Arrow+import Text.XML.HXT.Core import Text.XML.HXT.Extras import Data.Maybe
Data/Geo/GPX/LatitudeType.hs view
@@ -8,7 +8,7 @@ import Data.Geo.GPX.Accessor.Value import Data.Fixed-import Text.XML.HXT.Arrow+import Text.XML.HXT.Core newtype LatitudeType = LatitudeType Double deriving (Eq, Ord, Enum, Num, Fractional, Floating, Real, RealFrac, RealFloat)
Data/Geo/GPX/LinkType.hs view
@@ -4,7 +4,7 @@ linkType ) where -import Text.XML.HXT.Arrow+import Text.XML.HXT.Core data LinkType = LinkType String (Maybe String) (Maybe String) deriving (Eq, Show)
Data/Geo/GPX/LongitudeType.hs view
@@ -8,7 +8,7 @@ import Data.Geo.GPX.Accessor.Value import Data.Fixed-import Text.XML.HXT.Arrow+import Text.XML.HXT.Core newtype LongitudeType = LongitudeType Double deriving (Eq, Ord, Enum, Num, Fractional, Floating, Real, RealFrac, RealFloat)
Data/Geo/GPX/MetadataType.hs view
@@ -20,7 +20,7 @@ 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.Core import Text.XML.HXT.Extras import Text.XML.XSD.DateTime
Data/Geo/GPX/PersonType.hs view
@@ -9,7 +9,7 @@ import Data.Geo.GPX.Accessor.Name import Data.Geo.GPX.Accessor.Email import Data.Geo.GPX.Accessor.Link-import Text.XML.HXT.Arrow+import Text.XML.HXT.Core data PersonType = PersonType (Maybe String) (Maybe EmailType) (Maybe LinkType) deriving (Eq, Show)
Data/Geo/GPX/PtType.hs view
@@ -10,7 +10,7 @@ import Data.Geo.GPX.Accessor.Lon import Data.Geo.GPX.Accessor.Ele import Data.Geo.GPX.Accessor.Time-import Text.XML.HXT.Arrow+import Text.XML.HXT.Core import Text.XML.XSD.DateTime data PtType = PtType LatitudeType LongitudeType (Maybe Double) (Maybe DateTime)
Data/Geo/GPX/PtsegType.hs view
@@ -6,7 +6,7 @@ import Data.Geo.GPX.PtType import Data.Geo.GPX.Accessor.Pts-import Text.XML.HXT.Arrow+import Text.XML.HXT.Core newtype PtsegType = PtsegType [PtType] deriving (Eq, Show)
Data/Geo/GPX/RteType.hs view
@@ -16,7 +16,7 @@ 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.Core import Text.XML.HXT.Extras data RteType = RteType (Maybe String) (Maybe String) (Maybe String) (Maybe String) [LinkType] (Maybe Int) (Maybe String) (Maybe ExtensionsType) [WptType]
Data/Geo/GPX/TrkType.hs view
@@ -17,7 +17,7 @@ import Data.Geo.GPX.Accessor.Extensions import Data.Geo.GPX.Accessor.Trksegs import Data.Geo.GPX.Accessor.Trkpts-import Text.XML.HXT.Arrow+import Text.XML.HXT.Core import Text.XML.HXT.Extras data TrkType = TrkType (Maybe String) (Maybe String) (Maybe String) (Maybe String) [LinkType] (Maybe Int) (Maybe String) (Maybe ExtensionsType) [TrksegType]
Data/Geo/GPX/TrksegType.hs view
@@ -8,7 +8,7 @@ import Data.Geo.GPX.ExtensionsType import Data.Geo.GPX.Accessor.Trkpts import Data.Geo.GPX.Accessor.Extensions-import Text.XML.HXT.Arrow+import Text.XML.HXT.Core data TrksegType = TrksegType [WptType] (Maybe ExtensionsType) deriving (Eq, Show)
Data/Geo/GPX/WptType.hs view
@@ -35,7 +35,7 @@ import Data.Geo.GPX.Accessor.Extensions import Data.Geo.GPX.Accessor.Latlon import Data.Geo.GPX.Accessor.Value-import Text.XML.HXT.Arrow+import Text.XML.HXT.Core import Text.XML.HXT.Extras import Text.XML.XSD.DateTime
GPX.cabal view
@@ -1,14 +1,14 @@ Name: GPX-Version: 0.4.8+Version: 0.5 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 <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ>-Maintainer: Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ>-Copyright: 2009, 2010, 2011 Tony Morris+Author: Tony Morris+Maintainer: code@tmorris.net+Copyright: 2009, 2010 Tony Morris build-type: Simple cabal-version: >= 1.2 @@ -17,7 +17,7 @@ Library if flag(small_base)- Build-Depends: base < 5 && >= 3, hxt, hxt-extras, containers, xsd+ Build-Depends: base < 5 && >= 3, hxt >= 9.1, hxt-extras >= 0.4.1, containers, xsd else Build-Depends: base < 5 && >= 3, hxt, hxt-extras, containers, xsd