Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
i7
peregrine
Commits
713dc7d0
Commit
713dc7d0
authored
Dec 01, 2014
by
Philipp Meyer
Browse files
Added not operator for PropResult
parent
b6cb1c4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Property.hs
View file @
713dc7d0
...
...
@@ -13,6 +13,7 @@ module Property
PropResult
(
..
),
resultAnd
,
resultOr
,
resultNot
,
resultsAnd
,
resultsOr
)
where
...
...
@@ -124,7 +125,7 @@ showPropertyName :: Property -> String
showPropertyName
p
=
showPropertyType
(
pcont
p
)
++
" property"
++
(
if
null
(
pname
p
)
then
""
else
" "
++
show
(
pname
p
))
data
PropResult
=
Satisfied
|
Unsatisfied
|
Unknown
data
PropResult
=
Satisfied
|
Unsatisfied
|
Unknown
deriving
(
Show
,
Read
)
resultAnd
::
PropResult
->
PropResult
->
PropResult
resultAnd
Satisfied
x
=
x
...
...
@@ -138,6 +139,11 @@ resultOr _ Satisfied = Satisfied
resultOr
Unsatisfied
x
=
x
resultOr
Unknown
_
=
Unknown
resultNot
::
PropResult
->
PropResult
resultNot
Satisfied
=
Unsatisfied
resultNot
Unsatisfied
=
Unsatisfied
resultNot
Unknown
=
Unknown
resultsAnd
::
[
PropResult
]
->
PropResult
resultsAnd
=
foldr
resultAnd
Satisfied
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment