Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Assertion m a where
- Assert' :: AssertionGroup -> AssertionSeverity -> Text -> AssertionStatus -> Assertion m ()
- newtype AssertionGroup = AssertionGroup [Text]
- prettyPrintAssertionGroup :: AssertionGroup -> Text -> Text
- newtype AssertionLog = AssertionLog [AssertionEntry]
- hasFailedAssertions :: AssertionLog -> Bool
- filterFailedAssertions :: AssertionLog -> [Text]
- isFailure :: AssertionEntry -> Bool
- shouldFail :: AssertionEntry -> Bool
- data AssertionEntry = AssertionEntry {}
- data AssertionStatus
- pattern FailureWithMessage :: Text -> AssertionStatus
- data AssertionSeverity
- assert' :: forall r. MemberWithError Assertion r => AssertionGroup -> AssertionSeverity -> Text -> AssertionStatus -> Sem r ()
- successIsTrue :: Bool -> AssertionStatus
- assertTrue :: Member Assertion r => Text -> Bool -> Sem r ()
- assertEquals :: (Eq a, Member Assertion r) => Text -> a -> a -> Sem r ()
- assertTrueWith :: Member Assertion r => Text -> Bool -> Text -> Sem r ()
- assertTrueWithM :: Member Assertion r => Text -> Bool -> Sem r Text -> Sem r ()
- assert :: Member Assertion r => Text -> AssertionStatus -> Sem r ()
- assertM :: Member Assertion r => Text -> Sem r AssertionStatus -> Sem r ()
- assertError :: Member Assertion r => Text -> Sem (Error Text ': r) () -> Sem r ()
- failedAssertion :: Member Assertion r => Text -> Sem r ()
- failLater :: Member Assertion r => Sem r a -> Sem r a
- warnOnly :: Member Assertion r => Sem r a -> Sem r a
- prettyPrintAssertionEntry :: AssertionEntry -> Text
- describe :: Member Assertion r => Text -> Sem r a -> Sem r a
- describe' :: Member Assertion r => [Text] -> Sem r a -> Sem r a
Documentation
Assertion effects so we can skip past them in dry runs, and optionally throw exceptions or just collect them along the way for final reporting, etc..
Assert' :: AssertionGroup -> AssertionSeverity -> Text -> AssertionStatus -> Assertion m () | Assertions are run-time checks based on actual results that may be returned by various operations. Dry runs may ignore these failures, but they're respected in real operations. |
newtype AssertionGroup #
Instances
prettyPrintAssertionGroup :: AssertionGroup -> Text -> Text #
newtype AssertionLog #
Instances
hasFailedAssertions :: AssertionLog -> Bool #
filterFailedAssertions :: AssertionLog -> [Text] #
isFailure :: AssertionEntry -> Bool #
shouldFail :: AssertionEntry -> Bool #
data AssertionEntry #
Instances
Eq AssertionEntry # | |
Defined in Napkin.Run.Effects.Languages.Assertion (==) :: AssertionEntry -> AssertionEntry -> Bool # (/=) :: AssertionEntry -> AssertionEntry -> Bool # | |
Show AssertionEntry # | |
Defined in Napkin.Run.Effects.Languages.Assertion showsPrec :: Int -> AssertionEntry -> ShowS # show :: AssertionEntry -> String # showList :: [AssertionEntry] -> ShowS # |
data AssertionStatus #
Instances
pattern FailureWithMessage :: Text -> AssertionStatus #
data AssertionSeverity #
Instances
Eq AssertionSeverity # | |
Defined in Napkin.Run.Effects.Languages.Assertion (==) :: AssertionSeverity -> AssertionSeverity -> Bool # (/=) :: AssertionSeverity -> AssertionSeverity -> Bool # | |
Show AssertionSeverity # | |
Defined in Napkin.Run.Effects.Languages.Assertion showsPrec :: Int -> AssertionSeverity -> ShowS # show :: AssertionSeverity -> String # showList :: [AssertionSeverity] -> ShowS # |
assert' :: forall r. MemberWithError Assertion r => AssertionGroup -> AssertionSeverity -> Text -> AssertionStatus -> Sem r () #
successIsTrue :: Bool -> AssertionStatus #