dep-software-0.1.0.0
Maintainerhapytexeu+gh@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

Dep.Class.Opposite

Description

This module defines a typeclass Opposite that specifies that each value of a specific type has an opposite value of the same type.

Synopsis

A typeclass to determine the opposite value.

class Opposite a where Source #

A typeclass where the values of its members have an opposite element from the same type.

Minimal complete definition

Nothing

Methods

opposite Source #

Arguments

:: a

The given item to determine the opposite from.

-> a

The opposite of the given value.

A function that determines the opposite value.

default opposite :: (Functor f, Opposite b, a ~ f b) => a -> a Source #

Instances

Instances details
Opposite Bool Source # 
Instance details

Defined in Dep.Class.Opposite

Methods

opposite :: Bool -> Bool Source #

Opposite ThreeValue Source # 
Instance details

Defined in Dep.Data.ThreeValue

Opposite a => Opposite [a] Source # 
Instance details

Defined in Dep.Class.Opposite

Methods

opposite :: [a] -> [a] Source #

Opposite a => Opposite (Maybe a) Source # 
Instance details

Defined in Dep.Class.Opposite

Methods

opposite :: Maybe a -> Maybe a Source #

Opposite a => Opposite (Three a) Source # 
Instance details

Defined in Dep.Data.Three

Methods

opposite :: Three a -> Three a Source #

Opposite b => Opposite (a -> b) Source # 
Instance details

Defined in Dep.Class.Opposite

Methods

opposite :: (a -> b) -> a -> b Source #