diff options
author | koral <> | 2020-08-01 14:07:00 (GMT) |
---|---|---|
committer | hdiff <hdiff@hdiff.luite.com> | 2020-08-01 14:07:00 (GMT) |
commit | d7503e53e6e210bc4aec732049a9eaa112fe8132 (patch) | |
tree | 4475f5bf06dd44cda318cd22b0e8efec13b9e131 /Text/OPML/Types.hs | |
parent | 13e2a350a8d7b35d80ad2b7da46ea142b8211c7f (diff) |
Diffstat (limited to 'Text/OPML/Types.hs')
-rw-r--r-- | Text/OPML/Types.hs | 4 |
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 |