freer-converse-0.1.0.0: Handle effects conversely using monadic conversation

Safe HaskellSafe
LanguageHaskell2010

Data.Functor.Classes.FreerConverse.Parametric

Description

When you have a value of f a, but you can not possibly have some constraint on a, you often can not use type class instances of f a, because they require instances for a. This module provides type classes that mirror existing type classes but do not have the constraint on a, usually at the cost of functionality.

Synopsis

Documentation

class ShowP f where Source #

Without a Show a constraint it is impossible to show a value of type Maybe a. It is, however, possible to distinguish between the Just _ and @Nothing cases.

This type class provides this functionality. It is similar to Show1 in transformers' Data.Functor.Classes, but without the Show a constraint. Therefore, it can be used on quantified, unconstrained types like forall a. Maybe a.

Methods

showsPrecP :: Int -> f a -> ShowS Source #

Like showsPrec, but without using values of type a

showP :: f a -> String Source #

Like show, but without using values of type a

Instances

ShowP [] Source # 

Methods

showsPrecP :: Int -> [a] -> ShowS Source #

showP :: [a] -> String Source #

ShowP Maybe Source # 
ShowP IO Source # 

Methods

showsPrecP :: Int -> IO a -> ShowS Source #

showP :: IO a -> String Source #

Show a => ShowP (Either a) Source # 

Methods

showsPrecP :: Int -> Either a a -> ShowS Source #

showP :: Either a a -> String Source #

Show a => ShowP ((,) a) Source # 

Methods

showsPrecP :: Int -> (a, a) -> ShowS Source #

showP :: (a, a) -> String Source #

ShowP (Proxy *) Source #

Equal to the Show instance

Methods

showsPrecP :: Int -> Proxy * a -> ShowS Source #

showP :: Proxy * a -> String Source #

Show a => ShowP (Const * a) Source #

Equal to the Show instance

Methods

showsPrecP :: Int -> Const * a a -> ShowS Source #

showP :: Const * a a -> String Source #

defaultShowsPrecP :: (Functor f, Show (f Placeholder)) => Int -> f a -> ShowS Source #

Implements showsPrecP using an instance Functor f and an instance Show a => Show (f a)

The values of type a will be shown as _