summaryrefslogtreecommitdiff
path: root/Text/OPML/Types.hs
diff options
context:
space:
mode:
authorkoral <>2020-08-01 14:07:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2020-08-01 14:07:00 (GMT)
commitd7503e53e6e210bc4aec732049a9eaa112fe8132 (patch)
tree4475f5bf06dd44cda318cd22b0e8efec13b9e131 /Text/OPML/Types.hs
parent13e2a350a8d7b35d80ad2b7da46ea142b8211c7f (diff)
version 0.9.0.0HEAD0.9.0.0master
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