git.iko.soy/typeable/dom-parser
on master help sign in
Upd: useful
413d8d3Aleksey Uimanov
CHANGELOG.md+1−1
@@ -3,7 +3,7 @@
3## 1.0.0
3## 1.0.0
4* Added support for parsing attributes
4* Added support for parsing attributes
5* Changed public interface for 'parseContent'
5* Changed public interface for 'parseContent'
6−* Added usefull functions
6+* Added useful functions
7* Dropped unnecessary dependency from shakespeare
7* Dropped unnecessary dependency from shakespeare
8
8
9## 0.1.0
9## 0.1.0
src/Text/XML/DOM/Parser/Combinators.hs+3−3
@@ -179,7 +179,7 @@ ignoreElem test parser = do
179 if ign then pure Nothing else Just <$> parser
179 if ign then pure Nothing else Just <$> parser
180
180
181-- | If current element has no children nodes does not run parser and returns
181-- | If current element has no children nodes does not run parser and returns
182−-- Nothing. Otherwise runs parser inside current element. Usefull when you got
182+-- Nothing. Otherwise runs parser inside current element. Useful when you got
183-- XML with strange empty elements which must be just ignored, but `inElem` runs
183-- XML with strange empty elements which must be just ignored, but `inElem` runs
184-- parser inside of this elements which causes to parser error.
184-- parser inside of this elements which causes to parser error.
185ignoreEmpty
185ignoreEmpty
@@ -213,7 +213,7 @@ getCurrentName :: (Monad m) => DomParserT Identity m Text
213getCurrentName = view $ pdElements . to runIdentity . localName
213getCurrentName = view $ pdElements . to runIdentity . localName
214
214
215-- | If name of current tag differs from first argument throws 'PENotFound' with
215-- | If name of current tag differs from first argument throws 'PENotFound' with
216−-- tag name replaced in last path's segment. Usefull for checking root
216+-- tag name replaced in last path's segment. Useful for checking root
217-- document's element name.
217-- document's element name.
218checkCurrentName
218checkCurrentName
219 :: (Monad m)
219 :: (Monad m)
@@ -275,7 +275,7 @@ maybeReadContent f t = maybe (Left msg) Right $ f t
275 msg = "Not readable " <> n <> ": " <> t
275 msg = "Not readable " <> n <> ": " <> t
276 n = T.pack $ show $ typeRep (Proxy :: Proxy a)
276 n = T.pack $ show $ typeRep (Proxy :: Proxy a)
277
277
278−-- | Tries to read given text to value using 'Read'. Usefull to use
278+-- | Tries to read given text to value using 'Read'. Useful to use
279-- with 'parseContent' and 'parseAttribute'
279-- with 'parseContent' and 'parseAttribute'
280readContent
280readContent
281 :: (Read a, Typeable a)
281 :: (Read a, Typeable a)