~

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
Negation of ~==
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.
Something of kind a ~> b is a defunctionalized type function that is not necessarily generative or injective. Defunctionalized type functions (also called "defunctionalization symbols") can be partially applied, even if the original type function cannot be. For more information on how this works, see the "Promotion and partial application" section of the README. The singleton for things of kind a ~> b is SLambda. SLambda values can be constructed in one of two ways:
  1. With the singFun* family of combinators (e.g., singFun1). For example, if you have:
type Id :: a -> a
sId :: Sing a -> Sing (Id a)

Then you can construct a value of type Sing @(a ~> a) (that is, SLambda @a @a like so:
sIdFun :: Sing @(a ~> a) IdSym0
sIdFun = singFun1 @IdSym0 sId

Where IdSym0 :: a ~> a is the defunctionlized version of Id.
  1. Using the SingI class. For example, sing @IdSym0 is another way of defining sIdFun above. The singletons-th library automatically generates SingI instances for defunctionalization symbols such as IdSym0.
Normal type-level arrows (->) can be converted into defunctionalization arrows (~>) by the use of the TyCon family of types. (Refer to the Haddocks for TyCon1 to see an example of this in practice.) For this reason, we do not make an effort to define defunctionalization symbols for most type constructors of kind a -> b, as they can be used in defunctionalized settings by simply applying TyCon{N} with an appropriate N. This includes the (->) type constructor itself, which is of kind Type -> Type -> Type. One can turn it into something of kind Type ~> Type ~> Type by writing TyCon2 (->), or something of kind Type -> Type ~> Type by writing TyCon1 ((->) t) (where t :: Type).
Create a linear trail between two given points.
twiddleEx
= mconcat ((~~) <$> hexagon 1 <*> hexagon 1)
# centerXY # pad 1.1
Return True if the current file's name matches the given GlobPattern.
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.
Flipped (<~).
Composition of handlers.
Group subtraction: x ~~ y == x <> invert y