From c60367061982d8fe9ee92381f4e2dc86adabf473 Mon Sep 17 00:00:00 2001 From: Marcin Tolysz Date: Wed, 29 Jan 2020 19:54:16 +0000 Subject: [PATCH] Expose currently hidden isWhitespace from xml-conduit --- xml-conduit/Text/XML/Stream/Parse.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xml-conduit/Text/XML/Stream/Parse.hs b/xml-conduit/Text/XML/Stream/Parse.hs index c1518468..a393b0eb 100644 --- a/xml-conduit/Text/XML/Stream/Parse.hs +++ b/xml-conduit/Text/XML/Stream/Parse.hs @@ -132,6 +132,8 @@ module Text.XML.Stream.Parse -- * Other types , PositionRange , EventPos + -- * Other helpers + , isWhitespace ) where import Conduit import Control.Applicative (Alternative (empty, (<|>)), @@ -668,6 +670,8 @@ content :: MonadThrow m => ConduitT Event o m Text content = fromMaybe T.empty <$> contentMaybe +-- | Tests if the current event could be considered a whitespace +-- It could be useful when you write your own parsers isWhitespace :: Event -> Bool isWhitespace EventBeginDocument = True isWhitespace EventEndDocument = True