Safe Haskell | None |
---|---|
Language | Haskell2010 |
Funny operators that are mere type aliases for the constructs in TypeSpec
Synopsis
- type (--*) title expr = It title expr
- type (~~~) title expr = It title expr
- type (~~~~~~) title expr = It title expr
- type (~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr
- type (###) title expr = Explain title expr
- type (######) title expr = Explain title expr
- type (#########) title expr = Explain title expr
- type (############) title expr = Explain title expr
- type (###############) title expr = Explain title expr
- type (##################) title expr = Explain title expr
- type (#####################) title expr = Explain title expr
- type (########################) title expr = Explain title expr
- type (###########################) title expr = Explain title expr
- type (##############################) title expr = Explain title expr
- type (#################################) title expr = Explain title expr
- type (####################################) title expr = Explain title expr
- type (#######################################) title expr = Explain title expr
- type (##########################################) title expr = Explain title expr
- type (#############################################) title expr = Explain title expr
- type (################################################) title expr = Explain title expr
- type (###################################################) title expr = Explain title expr
- type (######################################################) title expr = Explain title expr
- type (#########################################################) title expr = Explain title expr
- type (############################################################) title expr = Explain title expr
- type (###############################################################) title expr = Explain title expr
- type (##################################################################) title expr = Explain title expr
- type (#####################################################################) title expr = Explain title expr
- type (########################################################################) title expr = Explain title expr
- type (-*) expectation1 expectation2 = expectation1 -/- expectation2
- type (-*-) expectation1 expectation2 = expectation1 -/- expectation2
- module Test.TypeSpec
Crazy Type operators for It
type (--*) title expr = It title expr infixr 3 Source #
Alias for It
, note that the number of ~
s is alway a multiple of 3. This
provides the impression of an underlined title followed by other expectations.
It allows to write the following type:
type ExpectationWithTitle = TypeSpec ( "This is a title for some assertions:" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (2 + 2) `Is` 4 )
type (~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
type (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) title expr = It title expr infixr 3 Source #
Crazy Type operators for TypeSpec
type (###) title expr = Explain title expr infixr 1 Source #
Create a TypeSpec
with an initial description or title followed by some
expectations. Note that the number of #
s is alway a multiple of 3.
It allows to rewrite the example above in a shorter way:
type ExpectationWithTitleShorter = "This is a title for some assertions:" ###################################### (2 + 2) `Is` 4
type (#########) title expr = Explain title expr infixr 1 Source #
type (############) title expr = Explain title expr infixr 1 Source #
type (###############) title expr = Explain title expr infixr 1 Source #
type (##################) title expr = Explain title expr infixr 1 Source #
type (#####################) title expr = Explain title expr infixr 1 Source #
type (########################) title expr = Explain title expr infixr 1 Source #
type (###########################) title expr = Explain title expr infixr 1 Source #
type (##############################) title expr = Explain title expr infixr 1 Source #
type (#################################) title expr = Explain title expr infixr 1 Source #
type (####################################) title expr = Explain title expr infixr 1 Source #
type (#######################################) title expr = Explain title expr infixr 1 Source #
type (##########################################) title expr = Explain title expr infixr 1 Source #
type (#############################################) title expr = Explain title expr infixr 1 Source #
type (################################################) title expr = Explain title expr infixr 1 Source #
type (###################################################) title expr = Explain title expr infixr 1 Source #
type (######################################################) title expr = Explain title expr infixr 1 Source #
type (#########################################################) title expr = Explain title expr infixr 1 Source #
type (############################################################) title expr = Explain title expr infixr 1 Source #
type (###############################################################) title expr = Explain title expr infixr 1 Source #
type (##################################################################) title expr = Explain title expr infixr 1 Source #
type (#####################################################################) title expr = Explain title expr infixr 1 Source #
type (########################################################################) title expr = Explain title expr infixr 1 Source #
Grouping Aliases
type (-*-) expectation1 expectation2 = expectation1 -/- expectation2 infixr 3 Source #
Crazy operator alias for -/-
with higher precedence.
It allows to group expectations more beautiful than using type level lists.
specCrazyMoreNested :: "Title" ###### "Top-level " ~~~~~~~~~~~~ "Nested:" ~~~~~~~~~ Int `Is` Int -*- Int `Is` Int -*- Int `Is` Int -/- "Top-level " ~~~~~~~~~~~~ "Nested:" ~~~~~~~~~ Int `Is` Int -*- "Nested:" ~~~~~~~~~ Int `Is` Int -*- Int `Is` Int specCrazyMoreNested = Valid
module Test.TypeSpec