~ -package:singletons
Creates a test from the specified
Testable, with the specified
label attached to it.
Since
Test is
Testable, this can be used as a
shorthand way of attaching a
TestLabel to one or more tests.
Shorthand for a test case that asserts equality (with the expected
value on the left-hand side, and the actual value on the right-hand
side).
Creates a test case resulting from asserting the condition obtained
from the specified
AssertionPredicable.
Shorthand for a test case that asserts equality (with the actual value
on the left-hand side, and the expected value on the right-hand side).
(
>~) with the arguments flipped
Compose loop bodies
(~>) :: Functor m => (a -> Producer b m r) -> (b -> Effect m ()) -> (a -> Effect m r)
(~>) :: Functor m => (a -> Producer b m r) -> (b -> Producer c m ()) -> (a -> Producer c m r)
(~>) :: Functor m => (a -> Pipe x b m r) -> (b -> Consumer x m ()) -> (a -> Consumer x m r)
(~>) :: Functor m => (a -> Pipe x b m r) -> (b -> Pipe x c m ()) -> (a -> Pipe x c m r)
The following diagrams show the flow of information:
a .---> b a
| / | |
+-----|-----+ / +-----|-----+ +------|------+
| v | / | v | | v |
| | / | | | |
x ==> f ==> b ---' x ==> g ==> c = x ==> f ~> g ==> c
| | | | | |
| | | | | | | | |
+-----|-----+ +-----|-----+ +------|------+
v v v
r () r
For a more complete diagram including bidirectional flow, see
"Pipes.Core#respond-diagram".
Equivalent to (
>>~) with the arguments flipped
Performs an inexact match, the first item should be the thing to
match. If the second item is a blank string, that is considered to
match anything. For example:
(TagText "test" ~== TagText "" ) == True
(TagText "test" ~== TagText "test") == True
(TagText "test" ~== TagText "soup") == False
For
TagOpen missing attributes on the right are allowed.
Create a linear trail between two given points.
twiddleEx
= mconcat ((~~) <$> hexagon 1 <*> hexagon 1)
# centerXY # pad 1.1
Match a file name against a glob pattern.
Infix operator alias for
phony, for sake of consistency with
normal rules.
An approximate equality comparison operator.
For real
IEEE types, two values are approximately equal in the
following cases:
- at least half of their significand bits agree;
- both values are less than epsilon;
- both values are NaN.
For complex
IEEE types, two values are approximately equal in
the followiing cases:
- their magnitudes are approximately equal and the angle between
them is less than 32*epsilon;
- both magnitudes are less than epsilon;
- both have a NaN real or imaginary part.
Admitedly, the
32 is a bit of a hack. Future versions of the
library may switch to a more principled test of the angle.
Group subtraction: x ~~ y == x <> invert y
About equal operator.
>>> (1.0 + epsilon) ~= (1.0 :: Double)
True
A natural transformation from f to g.