packages feed

OSM 0.6.0 → 0.6.1

raw patch · 42 files changed

+538/−4 lines, 42 files

Files

OSM.cabal view
@@ -1,5 +1,5 @@ Name:                 OSM-Version:              0.6.0+Version:              0.6.1 License:              BSD3 License-File:         LICENSE Synopsis:             Parse OpenStreetMap files@@ -36,17 +36,19 @@                       Data.Geo.OSM.Api                       Data.Geo.OSM.Area                       Data.Geo.OSM.Bound+                      Data.Geo.OSM.BoundOption                       Data.Geo.OSM.Bounds                       Data.Geo.OSM.Changeset                       Data.Geo.OSM.Children                       Data.Geo.OSM.GpxFile                       Data.Geo.OSM.Home+                      Data.Geo.OSM.Lens+                      Data.Geo.OSM.Member+                      Data.Geo.OSM.MemberType                       Data.Geo.OSM.Nd                       Data.Geo.OSM.Node                       Data.Geo.OSM.NodeWayRelation                       Data.Geo.OSM.NWRCommon-                      Data.Geo.OSM.MemberType-                      Data.Geo.OSM.Member                       Data.Geo.OSM.OSM                       Data.Geo.OSM.Preferences                       Data.Geo.OSM.Relation@@ -56,4 +58,43 @@                       Data.Geo.OSM.Version                       Data.Geo.OSM.Way                       Data.Geo.OSM.Waynodes-                      +                      Data.Geo.OSM.Lens.AccountCreatedL+                      Data.Geo.OSM.Lens.AreaL+                      Data.Geo.OSM.Lens.BoundsL+                      Data.Geo.OSM.Lens.BoxL+                      Data.Geo.OSM.Lens.ChangesetL+                      Data.Geo.OSM.Lens.ChildrenL+                      Data.Geo.OSM.Lens.DisplayNameL+                      Data.Geo.OSM.Lens.GeneratorL+                      Data.Geo.OSM.Lens.HomeL+                      Data.Geo.OSM.Lens.IdL+                      Data.Geo.OSM.Lens.KL+                      Data.Geo.OSM.Lens.LatL+                      Data.Geo.OSM.Lens.LonL+                      Data.Geo.OSM.Lens.MaximumL+                      Data.Geo.OSM.Lens.MaxlatL+                      Data.Geo.OSM.Lens.MaxlonL+                      Data.Geo.OSM.Lens.MemberL+                      Data.Geo.OSM.Lens.MinimumL+                      Data.Geo.OSM.Lens.MinlatL+                      Data.Geo.OSM.Lens.MinlonL+                      Data.Geo.OSM.Lens.NameL+                      Data.Geo.OSM.Lens.NdL+                      Data.Geo.OSM.Lens.OriginL+                      Data.Geo.OSM.Lens.PendingL+                      Data.Geo.OSM.Lens.PerPageL+                      Data.Geo.OSM.Lens.PublicL+                      Data.Geo.OSM.Lens.RefL+                      Data.Geo.OSM.Lens.RoleL+                      Data.Geo.OSM.Lens.TagsL+                      Data.Geo.OSM.Lens.TimestampL+                      Data.Geo.OSM.Lens.TracepointsL+                      Data.Geo.OSM.Lens.TypeL+                      Data.Geo.OSM.Lens.UidL+                      Data.Geo.OSM.Lens.UserL+                      Data.Geo.OSM.Lens.VersionL+                      Data.Geo.OSM.Lens.VisibleL+                      Data.Geo.OSM.Lens.VL+                      Data.Geo.OSM.Lens.WaynodesL+                      Data.Geo.OSM.Lens.ZoomL+
+ src/Data/Geo/OSM/BoundOption.hs view
@@ -0,0 +1,48 @@+-- | A bound-option is either a @Bound@, @Bounds@ or empty.+module Data.Geo.OSM.BoundOption+(+  BoundOption+, foldBoundOption+, optionBound+, optionBounds+, optionEmptyBound+) where++import Data.Geo.OSM.Bound+import Data.Geo.OSM.Bounds++data BoundOption =+  OptionBound Bound+  | OptionBounds Bounds+  | Empty+  deriving Eq++foldBoundOption ::+  (Bound -> x)+  -> (Bounds -> x)+  -> x+  -> BoundOption+  -> x+foldBoundOption f _ _ (OptionBound b) =+  f b+foldBoundOption _ f _ (OptionBounds b) =+  f b+foldBoundOption _ _ f Empty =+  f++optionBound ::+  Bound+  -> BoundOption+optionBound =+  OptionBound++optionBounds ::+  Bounds+  -> BoundOption+optionBounds =+  OptionBounds++optionEmptyBound ::+  BoundOption+optionEmptyBound =+  Empty
+ src/Data/Geo/OSM/Lens.hs view
@@ -0,0 +1,82 @@+module Data.Geo.OSM.Lens(+  module Data.Geo.OSM.Lens.PublicL+, module Data.Geo.OSM.Lens.OriginL+, module Data.Geo.OSM.Lens.PerPageL+, module Data.Geo.OSM.Lens.MaxlonL+, module Data.Geo.OSM.Lens.AreaL+, module Data.Geo.OSM.Lens.GeneratorL+, module Data.Geo.OSM.Lens.RefL+, module Data.Geo.OSM.Lens.TracepointsL+, module Data.Geo.OSM.Lens.UidL+, module Data.Geo.OSM.Lens.MinlonL+, module Data.Geo.OSM.Lens.VL+, module Data.Geo.OSM.Lens.ChildrenL+, module Data.Geo.OSM.Lens.IdL+, module Data.Geo.OSM.Lens.MaxlatL+, module Data.Geo.OSM.Lens.MinlatL+, module Data.Geo.OSM.Lens.NdL+, module Data.Geo.OSM.Lens.MinimumL+, module Data.Geo.OSM.Lens.MaximumL+, module Data.Geo.OSM.Lens.HomeL+, module Data.Geo.OSM.Lens.AccountCreatedL+, module Data.Geo.OSM.Lens.BoundsL+, module Data.Geo.OSM.Lens.KL+, module Data.Geo.OSM.Lens.MemberL+, module Data.Geo.OSM.Lens.LatL+, module Data.Geo.OSM.Lens.VersionL+, module Data.Geo.OSM.Lens.WaynodesL+, module Data.Geo.OSM.Lens.TimestampL+, module Data.Geo.OSM.Lens.PendingL+, module Data.Geo.OSM.Lens.DisplayNameL+, module Data.Geo.OSM.Lens.VisibleL+, module Data.Geo.OSM.Lens.UserL+, module Data.Geo.OSM.Lens.LonL+, module Data.Geo.OSM.Lens.BoxL+, module Data.Geo.OSM.Lens.TagsL+, module Data.Geo.OSM.Lens.NameL+, module Data.Geo.OSM.Lens.ZoomL+, module Data.Geo.OSM.Lens.RoleL+, module Data.Geo.OSM.Lens.ChangesetL+, module Data.Geo.OSM.Lens.TypeL+) where++import Data.Geo.OSM.Lens.PublicL+import Data.Geo.OSM.Lens.OriginL+import Data.Geo.OSM.Lens.PerPageL+import Data.Geo.OSM.Lens.MaxlonL+import Data.Geo.OSM.Lens.AreaL+import Data.Geo.OSM.Lens.GeneratorL+import Data.Geo.OSM.Lens.RefL+import Data.Geo.OSM.Lens.TracepointsL+import Data.Geo.OSM.Lens.UidL+import Data.Geo.OSM.Lens.MinlonL+import Data.Geo.OSM.Lens.VL+import Data.Geo.OSM.Lens.ChildrenL+import Data.Geo.OSM.Lens.IdL+import Data.Geo.OSM.Lens.MaxlatL+import Data.Geo.OSM.Lens.MinlatL+import Data.Geo.OSM.Lens.NdL+import Data.Geo.OSM.Lens.MinimumL+import Data.Geo.OSM.Lens.MaximumL+import Data.Geo.OSM.Lens.HomeL+import Data.Geo.OSM.Lens.AccountCreatedL+import Data.Geo.OSM.Lens.BoundsL+import Data.Geo.OSM.Lens.KL+import Data.Geo.OSM.Lens.MemberL+import Data.Geo.OSM.Lens.LatL+import Data.Geo.OSM.Lens.VersionL+import Data.Geo.OSM.Lens.WaynodesL+import Data.Geo.OSM.Lens.TimestampL+import Data.Geo.OSM.Lens.PendingL+import Data.Geo.OSM.Lens.DisplayNameL+import Data.Geo.OSM.Lens.VisibleL+import Data.Geo.OSM.Lens.UserL+import Data.Geo.OSM.Lens.LonL+import Data.Geo.OSM.Lens.BoxL+import Data.Geo.OSM.Lens.TagsL+import Data.Geo.OSM.Lens.NameL+import Data.Geo.OSM.Lens.ZoomL+import Data.Geo.OSM.Lens.RoleL+import Data.Geo.OSM.Lens.ChangesetL+import Data.Geo.OSM.Lens.TypeL+
+ src/Data/Geo/OSM/Lens/AccountCreatedL.hs view
@@ -0,0 +1,8 @@+-- | Values with a @account_created@ string accessor.+module Data.Geo.OSM.Lens.AccountCreatedL where++import Data.Lens.Common++class AccountCreatedL a where+  accountCreatedL :: +    Lens a String
+ src/Data/Geo/OSM/Lens/AreaL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @area@ string accessor.+module Data.Geo.OSM.Lens.AreaL where++import Data.Geo.OSM.Area+import Data.Lens.Common++class AreaL a where+  areaL ::+    Lens a Area
+ src/Data/Geo/OSM/Lens/BoundsL.hs view
@@ -0,0 +1,10 @@+-- | Values with a @bounds@ accessor which is either empty, a @Bound@ or a @Bounds@.+module Data.Geo.OSM.Lens.BoundsL where++import Data.Lens.Common+import Data.Geo.OSM.BoundOption++class BoundsL a where+  boundsL ::+    Lens a BoundOption+
+ src/Data/Geo/OSM/Lens/BoxL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @box@ string accessor.+module Data.Geo.OSM.Lens.BoxL where++import Data.Lens.Common++class BoxL a where+  boxL ::+    Lens a String+
+ src/Data/Geo/OSM/Lens/ChangesetL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @changeset@ optional string accessor.+module Data.Geo.OSM.Lens.ChangesetL where++import Data.Lens.Common++class ChangesetL a where+  changesetL ::+    Lens a (Maybe String)+
+ src/Data/Geo/OSM/Lens/ChildrenL.hs view
@@ -0,0 +1,10 @@+-- | Values with node, way or relation children accessor.+module Data.Geo.OSM.Lens.ChildrenL where++import Data.Geo.OSM.Children+import Data.Lens.Common++class ChildrenL a where+  childrenL ::+    Lens a Children+
+ src/Data/Geo/OSM/Lens/DisplayNameL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @display_name@ string accessor.+module Data.Geo.OSM.Lens.DisplayNameL where++import Data.Lens.Common++class DisplayNameL a where+  displayNameL ::+    Lens a String+
+ src/Data/Geo/OSM/Lens/GeneratorL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @generator@ optional string accessor.+module Data.Geo.OSM.Lens.GeneratorL where++import Data.Lens.Common++class GeneratorL a where+  generatorL ::+    Lens a (Maybe String)+
+ src/Data/Geo/OSM/Lens/HomeL.hs view
@@ -0,0 +1,10 @@+-- | Values with a @home@ optional string accessor.+module Data.Geo.OSM.Lens.HomeL where++import Data.Lens.Common+import Data.Geo.OSM.Home++class HomeL a where+  homeL ::+    Lens a (Maybe Home)+
+ src/Data/Geo/OSM/Lens/IdL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @id@ string accessor.+module Data.Geo.OSM.Lens.IdL where++import Data.Lens.Common++class IdL a where+  idL ::+    Lens a String+
+ src/Data/Geo/OSM/Lens/KL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @k@ string accessor.+module Data.Geo.OSM.Lens.KL where++import Data.Lens.Common++class KL a where+  kL ::+    Lens a String+
+ src/Data/Geo/OSM/Lens/LatL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @lat@ string accessor.+module Data.Geo.OSM.Lens.LatL where++import Data.Lens.Common++class LatL a where+  latL ::+    Lens a String+
+ src/Data/Geo/OSM/Lens/LonL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @lon@ string accessor.+module Data.Geo.OSM.Lens.LonL where++import Data.Lens.Common++class LonL a where+  lonL ::+    Lens a String+
+ src/Data/Geo/OSM/Lens/MaximumL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @maximum@ string accessor.+module Data.Geo.OSM.Lens.MaximumL where++import Data.Lens.Common++class MaximumL a where+  maximumL :: +    Lens a String+
+ src/Data/Geo/OSM/Lens/MaxlatL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @maxlat@ string accessor.+module Data.Geo.OSM.Lens.MaxlatL where++import Data.Lens.Common++class MaxlatL a where+  maxlatL :: +    Lens a String+
+ src/Data/Geo/OSM/Lens/MaxlonL.hs view
@@ -0,0 +1,9 @@+-- -- | Values with a @maxlon@ string accessor.+module Data.Geo.OSM.Lens.MaxlonL where++import Data.Lens.Common++class MaxlonL a where+  maxlonL ::+    Lens a String+
+ src/Data/Geo/OSM/Lens/MemberL.hs view
@@ -0,0 +1,10 @@+-- | Values with a @member@ accessor that is a list of @Member@.+module Data.Geo.OSM.Lens.MemberL where++import Data.Geo.OSM.Member+import Data.Lens.Common++class MemberL a where+  memberL ::+    Lens a [Member]+
+ src/Data/Geo/OSM/Lens/MinimumL.hs view
@@ -0,0 +1,8 @@+-- | Values with a @minimum@ string accessor.+module Data.Geo.OSM.Lens.MinimumL where++import Data.Lens.Common++class MinimumL a where+  minimumL :: +    Lens a String
+ src/Data/Geo/OSM/Lens/MinlatL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @minlat@ string accessor.+module Data.Geo.OSM.Lens.MinlatL where++import Data.Lens.Common++class MinlatL a where+  minlatL ::+    Lens a String+
+ src/Data/Geo/OSM/Lens/MinlonL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @minlon@ string accessor.+module Data.Geo.OSM.Lens.MinlonL where++import Data.Lens.Common++class MinlonL a where+  minlonL ::+    Lens a String+
+ src/Data/Geo/OSM/Lens/NameL.hs view
@@ -0,0 +1,9 @@+-- -- | Values with a @name@ string accessor.+module Data.Geo.OSM.Lens.NameL where++import Data.Lens.Common++class NameL a where+  nameL ::+    Lens a String+
+ src/Data/Geo/OSM/Lens/NdL.hs view
@@ -0,0 +1,10 @@+-- | Values with a @nd@ accessor that is a list of @Nd@.+module Data.Geo.OSM.Lens.NdL where++import Data.Geo.OSM.Nd+import Data.Lens.Common++class NdL a where+  ndL ::+    Lens a [Nd]+
+ src/Data/Geo/OSM/Lens/OriginL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @origin@ optional string accessor.+module Data.Geo.OSM.Lens.OriginL where++import Data.Lens.Common++class OriginL a where+  originL :: +    Lens a (Maybe String)+
+ src/Data/Geo/OSM/Lens/PendingL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @pending@ boolean accessor.+module Data.Geo.OSM.Lens.PendingL where++import Data.Lens.Common++class PendingL a where+  pendingL ::+    Lens a Bool+
+ src/Data/Geo/OSM/Lens/PerPageL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @per_page@ string accessor.+module Data.Geo.OSM.Lens.PerPageL where++import Data.Lens.Common++class PerPageL a where+  perPageL ::+    Lens a String+
+ src/Data/Geo/OSM/Lens/PublicL.hs view
@@ -0,0 +1,9 @@+-- -- | Values with a @public@ boolean accessor.+module Data.Geo.OSM.Lens.PublicL where++import Data.Lens.Common++class PublicL a where+  publicL ::+    Lens a Bool+
+ src/Data/Geo/OSM/Lens/RefL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @ref@ string accessor.+module Data.Geo.OSM.Lens.RefL where++import Data.Lens.Common++class RefL a where+  refL ::+    Lens a String+
+ src/Data/Geo/OSM/Lens/RoleL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @role@ string accessor.+module Data.Geo.OSM.Lens.RoleL where++import Data.Lens.Common++class RoleL a where+  roleL ::+    Lens a String+
+ src/Data/Geo/OSM/Lens/TagsL.hs view
@@ -0,0 +1,10 @@+-- | Values with a @tags@ accessor that is a list of tags.+module Data.Geo.OSM.Lens.TagsL where++import Data.Geo.OSM.Tag+import Data.Lens.Common++class TagsL a where+  tagsL ::+    Lens a [Tag]+
+ src/Data/Geo/OSM/Lens/TimestampL.hs view
@@ -0,0 +1,11 @@+{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}++-- | Values with a @timestamp@ accessor.+module Data.Geo.OSM.Lens.TimestampL where++import Data.Lens.Common++class TimestampL a b | a -> b where+  timestampL ::+    Lens a b+
+ src/Data/Geo/OSM/Lens/TracepointsL.hs view
@@ -0,0 +1,10 @@+-- | Values with a @tracepoints@ string accessor.+module Data.Geo.OSM.Lens.TracepointsL where++import Data.Geo.OSM.Tracepoints+import Data.Lens.Common++class TracepointsL a where+  tracepointsL ::+    Lens a Tracepoints+
+ src/Data/Geo/OSM/Lens/TypeL.hs view
@@ -0,0 +1,10 @@+-- | Values with a @type@ accessor.+module Data.Geo.OSM.Lens.TypeL where++import Data.Geo.OSM.MemberType+import Data.Lens.Common++class TypeL a where+  typeL ::+    Lens a MemberType+
+ src/Data/Geo/OSM/Lens/UidL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @uid@ optional string accessor.+module Data.Geo.OSM.Lens.UidL where++import Data.Lens.Common++class UidL a where+  uidL ::+    Lens a (Maybe String)+
+ src/Data/Geo/OSM/Lens/UserL.hs view
@@ -0,0 +1,11 @@+{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}++-- | Values with a @user@ accessor.+module Data.Geo.OSM.Lens.UserL where++import Data.Lens.Common++class UserL a b | a -> b where+  userL ::+    Lens a b+
+ src/Data/Geo/OSM/Lens/VL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @v@ string accessor.+module Data.Geo.OSM.Lens.VL where++import Data.Lens.Common++class VL a where+  vL ::+    Lens a String+
+ src/Data/Geo/OSM/Lens/VersionL.hs view
@@ -0,0 +1,11 @@+{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}++-- | Values with a @version@ accessor.+module Data.Geo.OSM.Lens.VersionL where++import Data.Lens.Common++class VersionL a b | a -> b where+  versionL ::+    Lens a b+
+ src/Data/Geo/OSM/Lens/VisibleL.hs view
@@ -0,0 +1,9 @@+-- | Values with a @visible@ boolean accessor.+module Data.Geo.OSM.Lens.VisibleL where++import Data.Lens.Common++class VisibleL a where+  visibleL ::+    Lens a Bool+
+ src/Data/Geo/OSM/Lens/WaynodesL.hs view
@@ -0,0 +1,10 @@+-- | Values with a @waynodes@ string accessor.+module Data.Geo.OSM.Lens.WaynodesL where++import Data.Geo.OSM.Waynodes+import Data.Lens.Common++class WaynodesL a where+  waynodesL ::+    Lens a Waynodes+
+ src/Data/Geo/OSM/Lens/ZoomL.hs view
@@ -0,0 +1,8 @@+-- | Values with a @zoom@ string accessor.+module Data.Geo.OSM.Lens.ZoomL where++import Data.Lens.Common++class ZoomL a where+  zoomL ::+    Lens a String