summaryrefslogtreecommitdiff
path: root/Text/OPML/Types.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Text/OPML/Types.hs')
-rw-r--r--Text/OPML/Types.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Text/OPML/Types.hs b/Text/OPML/Types.hs
index 3bf821c..b4f222e 100644
--- a/Text/OPML/Types.hs
+++ b/Text/OPML/Types.hs
@@ -54,7 +54,9 @@ import URI.ByteString
data Null deriving(Typeable)
instance Predicate Null Text where
- validate p value = unless (Text.null value) $ throwRefine $ RefineOtherException (typeOf p) "Text is not null"
+ validate p value = if not $ Text.null value
+ then pure $ RefineOtherException (typeOf p) "Text is not null"
+ else Nothing
data OpmlHead = OpmlHead
{ opmlTitle :: Text