aboutsummaryrefslogtreecommitdiff
path: root/common/src/Common/Util/Validation.hs
blob: f195d955067d859e9c18cb2474885920e8ce28ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Common.Util.Validation
  ( isSuccess
  , isFailure
  ) where

import           Data.Validation (Validation (Failure, Success))

isSuccess :: forall a b. Validation a b -> Bool
isSuccess (Failure _) = False
isSuccess (Success _) = True

isFailure :: forall a b. Validation a b -> Bool
isFailure = not . isSuccess