-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Various type-level operators -- -- A set of type-level operators meant to be helpful, e.g. ($), a tightly -- binding (->), and the multi-constraint operator (Show + [a, -- b]). @package type-operators @version 0.2.0.0 -- | A collection of type-level operators. module Control.Type.Operator -- | A tightly binding version of -> that lets you strip -- parentheses from function types in certain spots. Example: -- --
-- f :: Maybe Int ^> String -- = -- f :: Maybe (Int -> String) --type (^>) = (->) infixr 5 ^> -- | A flipped ^>. -- --
-- f :: Maybe String <^ Int -- = -- f :: Maybe (Int -> String) ---- -- Note: this is not partially applied like ^> and -- ->. type (<^) a b = (^>) b a infixr 5 <^ -- | Infix application. -- --
-- f :: Either String $ Maybe Int -- = -- f :: Either String (Maybe Int) --type f $ a = f a infixr 2 $ -- | A flipped $. -- --
-- f :: Maybe Int & Maybe -- = -- f :: Maybe (Maybe Int) --type a & f = f a infixl 1 & -- | Infix application that can take two arguments in combination with -- $. -- --
-- f :: Either $$ Int ^> Int $ Int ^> Int -- = -- f :: Either (Int -> Int) (Int -> Int) --type f $$ a = f a infixr 3 $$ -- | Map any constraints over any type variables. -- --
-- a :: [Show, Read] <+> a => a -> a -- = -- a :: (Show a, Read a) => a -> a -- -- a :: Show <+> [a, b, c] => a -> b -> c -> String -- = -- a :: (Show a, Show b, Show c) => a -> b -> c -> String --type family (<+>) (a :: k1) (b :: k2) :: Constraint infixl 9 <+> -- | Map a constraint over several variables. -- --
-- a :: Show <=> [a, b] => a -> b -> String -- = -- a :: (Show a, Show b) => a -> b -> String ---- | Deprecated: Since (+) is now kind-polymorphic and accepts -- the arguments on either side (=) will be removed in a future -- version. type family (<=>) (c :: k -> Constraint) (as :: [k]) infixl 9 <=>