module Data.Geo.OSM.Nd
(
Nd
, nd
) where
import Text.XML.HXT.Arrow.Pickle
import Data.Geo.OSM.Lens.RefL
import Data.Lens.Common
import Control.Comonad.Trans.Store
import Control.Newtype
newtype Nd =
Nd String
deriving Eq
instance XmlPickler Nd where
xpickle =
xpElem "nd" (xpWrap (nd, \(Nd r) -> r) (xpAttr "ref" xpText))
instance Show Nd where
show =
showPickled []
instance RefL Nd where
refL =
Lens $ \(Nd ref) -> store (\ref -> Nd ref) ref
instance Newtype Nd String where
pack =
Nd
unpack (Nd x) =
x
nd ::
String
-> Nd
nd =
Nd