Safe Haskell | Safe-Inferred |
---|
MHask.Arrow
Description
This module sets the stage for the rest of the package.
It defines a type synonym ~>
which cleans up the
type signatures,
and ~>~
which is used in the default implementation
of bind. These represent the type of arrows and arrow composition
in MHask, respectively.
By using ~>
, type signatures for the MHask class operations
can be easily compared to their Hask counterparts. However,
as a reminder that you are dealing with Monads, where
typically you would see a
and b
in the Hask counterpart,
you will instead see m
and n
, and where you would
typically see m
or w
, you will instead see t
,
as a mnemonic for Monad transformer.
For illustrative purposes, this module also provides
<~
and ~<~
, to clearly illustrate how duals are
nothing more than just "flipping the arrows".
You are encouraged to compare docs or even source files
to see just how similar they are, all the way down
to default implementations.