singletons-2.3.1: A framework for generating singleton types

Copyright(C) 2013 Richard Eisenberg
LicenseBSD-style (see LICENSE)
MaintainerRichard Eisenberg (rae@cs.brynmawr.edu)
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Singletons.Prelude.Eq

Description

Defines the SEq singleton version of the Eq type class.

Synopsis

Documentation

class PEq a Source #

The promoted analogue of Eq. If you supply no definition for '(:==)', then it defaults to a use of '(==)', from Data.Type.Equality.

Associated Types

type (x :: a) :== (y :: a) :: Bool infix 4 Source #

type (x :: a) :/= (y :: a) :: Bool infix 4 Source #

Instances

PEq Bool Source # 

Associated Types

type (Bool :== (x :: Bool)) (y :: Bool) :: Bool Source #

type (Bool :/= (x :: Bool)) (y :: Bool) :: Bool Source #

PEq Ordering Source # 

Associated Types

type (Ordering :== (x :: Ordering)) (y :: Ordering) :: Bool Source #

type (Ordering :/= (x :: Ordering)) (y :: Ordering) :: Bool Source #

PEq () Source # 

Associated Types

type (() :== (x :: ())) (y :: ()) :: Bool Source #

type (() :/= (x :: ())) (y :: ()) :: Bool Source #

PEq [k] Source # 

Associated Types

type ([k] :== (x :: [k])) (y :: [k]) :: Bool Source #

type ([k] :/= (x :: [k])) (y :: [k]) :: Bool Source #

PEq (Maybe k) Source # 

Associated Types

type ((Maybe k) :== (x :: Maybe k)) (y :: Maybe k) :: Bool Source #

type ((Maybe k) :/= (x :: Maybe k)) (y :: Maybe k) :: Bool Source #

PEq (NonEmpty k) Source # 

Associated Types

type ((NonEmpty k) :== (x :: NonEmpty k)) (y :: NonEmpty k) :: Bool Source #

type ((NonEmpty k) :/= (x :: NonEmpty k)) (y :: NonEmpty k) :: Bool Source #

PEq (Either k1 k2) Source # 

Associated Types

type ((Either k1 k2) :== (x :: Either k1 k2)) (y :: Either k1 k2) :: Bool Source #

type ((Either k1 k2) :/= (x :: Either k1 k2)) (y :: Either k1 k2) :: Bool Source #

PEq (k1, k2) Source # 

Associated Types

type ((k1, k2) :== (x :: (k1, k2))) (y :: (k1, k2)) :: Bool Source #

type ((k1, k2) :/= (x :: (k1, k2))) (y :: (k1, k2)) :: Bool Source #

PEq (k1, k2, k3) Source # 

Associated Types

type ((k1, k2, k3) :== (x :: (k1, k2, k3))) (y :: (k1, k2, k3)) :: Bool Source #

type ((k1, k2, k3) :/= (x :: (k1, k2, k3))) (y :: (k1, k2, k3)) :: Bool Source #

PEq (k1, k2, k3, k4) Source # 

Associated Types

type ((k1, k2, k3, k4) :== (x :: (k1, k2, k3, k4))) (y :: (k1, k2, k3, k4)) :: Bool Source #

type ((k1, k2, k3, k4) :/= (x :: (k1, k2, k3, k4))) (y :: (k1, k2, k3, k4)) :: Bool Source #

PEq (k1, k2, k3, k4, k5) Source # 

Associated Types

type ((k1, k2, k3, k4, k5) :== (x :: (k1, k2, k3, k4, k5))) (y :: (k1, k2, k3, k4, k5)) :: Bool Source #

type ((k1, k2, k3, k4, k5) :/= (x :: (k1, k2, k3, k4, k5))) (y :: (k1, k2, k3, k4, k5)) :: Bool Source #

PEq (k1, k2, k3, k4, k5, k6) Source # 

Associated Types

type ((k1, k2, k3, k4, k5, k6) :== (x :: (k1, k2, k3, k4, k5, k6))) (y :: (k1, k2, k3, k4, k5, k6)) :: Bool Source #

type ((k1, k2, k3, k4, k5, k6) :/= (x :: (k1, k2, k3, k4, k5, k6))) (y :: (k1, k2, k3, k4, k5, k6)) :: Bool Source #

PEq (k1, k2, k3, k4, k5, k6, k7) Source # 

Associated Types

type ((k1, k2, k3, k4, k5, k6, k7) :== (x :: (k1, k2, k3, k4, k5, k6, k7))) (y :: (k1, k2, k3, k4, k5, k6, k7)) :: Bool Source #

type ((k1, k2, k3, k4, k5, k6, k7) :/= (x :: (k1, k2, k3, k4, k5, k6, k7))) (y :: (k1, k2, k3, k4, k5, k6, k7)) :: Bool Source #

class SEq k where Source #

The singleton analogue of Eq. Unlike the definition for Eq, it is required that instances define a body for '(%:==)'. You may also supply a body for '(%:/=)'.

Minimal complete definition

(%:==)

Methods

(%:==) :: forall (a :: k) (b :: k). Sing a -> Sing b -> Sing (a :== b) infix 4 Source #

Boolean equality on singletons

(%:/=) :: forall (a :: k) (b :: k). Sing a -> Sing b -> Sing (a :/= b) infix 4 Source #

Boolean disequality on singletons

(%:/=) :: forall (a :: k) (b :: k). (a :/= b) ~ Not (a :== b) => Sing a -> Sing b -> Sing (a :/= b) infix 4 Source #

Boolean disequality on singletons

Instances

SEq Bool Source # 

Methods

(%:==) :: Sing Bool a -> Sing Bool b -> Sing Bool ((Bool :== a) b) Source #

(%:/=) :: Sing Bool a -> Sing Bool b -> Sing Bool ((Bool :/= a) b) Source #

SEq Ordering Source # 
SEq () Source # 

Methods

(%:==) :: Sing () a -> Sing () b -> Sing Bool ((() :== a) b) Source #

(%:/=) :: Sing () a -> Sing () b -> Sing Bool ((() :/= a) b) Source #

SEq a => SEq [a] Source # 

Methods

(%:==) :: Sing [a] a -> Sing [a] b -> Sing Bool (([a] :== a) b) Source #

(%:/=) :: Sing [a] a -> Sing [a] b -> Sing Bool (([a] :/= a) b) Source #

SEq a => SEq (Maybe a) Source # 

Methods

(%:==) :: Sing (Maybe a) a -> Sing (Maybe a) b -> Sing Bool ((Maybe a :== a) b) Source #

(%:/=) :: Sing (Maybe a) a -> Sing (Maybe a) b -> Sing Bool ((Maybe a :/= a) b) Source #

SEq a => SEq (NonEmpty a) Source # 

Methods

(%:==) :: Sing (NonEmpty a) a -> Sing (NonEmpty a) b -> Sing Bool ((NonEmpty a :== a) b) Source #

(%:/=) :: Sing (NonEmpty a) a -> Sing (NonEmpty a) b -> Sing Bool ((NonEmpty a :/= a) b) Source #

(SEq a, SEq b) => SEq (Either a b) Source # 

Methods

(%:==) :: Sing (Either a b) a -> Sing (Either a b) b -> Sing Bool ((Either a b :== a) b) Source #

(%:/=) :: Sing (Either a b) a -> Sing (Either a b) b -> Sing Bool ((Either a b :/= a) b) Source #

(SEq a, SEq b) => SEq (a, b) Source # 

Methods

(%:==) :: Sing (a, b) a -> Sing (a, b) b -> Sing Bool (((a, b) :== a) b) Source #

(%:/=) :: Sing (a, b) a -> Sing (a, b) b -> Sing Bool (((a, b) :/= a) b) Source #

(SEq a, SEq b, SEq c) => SEq (a, b, c) Source # 

Methods

(%:==) :: Sing (a, b, c) a -> Sing (a, b, c) b -> Sing Bool (((a, b, c) :== a) b) Source #

(%:/=) :: Sing (a, b, c) a -> Sing (a, b, c) b -> Sing Bool (((a, b, c) :/= a) b) Source #

(SEq a, SEq b, SEq c, SEq d) => SEq (a, b, c, d) Source # 

Methods

(%:==) :: Sing (a, b, c, d) a -> Sing (a, b, c, d) b -> Sing Bool (((a, b, c, d) :== a) b) Source #

(%:/=) :: Sing (a, b, c, d) a -> Sing (a, b, c, d) b -> Sing Bool (((a, b, c, d) :/= a) b) Source #

(SEq a, SEq b, SEq c, SEq d, SEq e) => SEq (a, b, c, d, e) Source # 

Methods

(%:==) :: Sing (a, b, c, d, e) a -> Sing (a, b, c, d, e) b -> Sing Bool (((a, b, c, d, e) :== a) b) Source #

(%:/=) :: Sing (a, b, c, d, e) a -> Sing (a, b, c, d, e) b -> Sing Bool (((a, b, c, d, e) :/= a) b) Source #

(SEq a, SEq b, SEq c, SEq d, SEq e, SEq f) => SEq (a, b, c, d, e, f) Source # 

Methods

(%:==) :: Sing (a, b, c, d, e, f) a -> Sing (a, b, c, d, e, f) b -> Sing Bool (((a, b, c, d, e, f) :== a) b) Source #

(%:/=) :: Sing (a, b, c, d, e, f) a -> Sing (a, b, c, d, e, f) b -> Sing Bool (((a, b, c, d, e, f) :/= a) b) Source #

(SEq a, SEq b, SEq c, SEq d, SEq e, SEq f, SEq g) => SEq (a, b, c, d, e, f, g) Source # 

Methods

(%:==) :: Sing (a, b, c, d, e, f, g) a -> Sing (a, b, c, d, e, f, g) b -> Sing Bool (((a, b, c, d, e, f, g) :== a) b) Source #

(%:/=) :: Sing (a, b, c, d, e, f, g) a -> Sing (a, b, c, d, e, f, g) b -> Sing Bool (((a, b, c, d, e, f, g) :/= a) b) Source #

data (:==$) (l :: TyFun a6989586621679297822 (TyFun a6989586621679297822 Bool -> Type)) Source #

Instances

SuppressUnusedWarnings (TyFun a6989586621679297822 (TyFun a6989586621679297822 Bool -> Type) -> *) ((:==$) a6989586621679297822) Source # 

Methods

suppressUnusedWarnings :: Proxy ((:==$) a6989586621679297822) t -> () Source #

type Apply a6989586621679297822 (TyFun a6989586621679297822 Bool -> Type) ((:==$) a6989586621679297822) l Source # 
type Apply a6989586621679297822 (TyFun a6989586621679297822 Bool -> Type) ((:==$) a6989586621679297822) l = (:==$$) a6989586621679297822 l

data (l :: a6989586621679297822) :==$$ (l :: TyFun a6989586621679297822 Bool) Source #

Instances

SuppressUnusedWarnings (a6989586621679297822 -> TyFun a6989586621679297822 Bool -> *) ((:==$$) a6989586621679297822) Source # 

Methods

suppressUnusedWarnings :: Proxy ((:==$$) a6989586621679297822) t -> () Source #

type Apply a Bool ((:==$$) a l1) l2 Source # 
type Apply a Bool ((:==$$) a l1) l2 = (:==) a l1 l2

type (:==$$$) (t :: a6989586621679297822) (t :: a6989586621679297822) = (:==) t t Source #

data (:/=$) (l :: TyFun a6989586621679297822 (TyFun a6989586621679297822 Bool -> Type)) Source #

Instances

SuppressUnusedWarnings (TyFun a6989586621679297822 (TyFun a6989586621679297822 Bool -> Type) -> *) ((:/=$) a6989586621679297822) Source # 

Methods

suppressUnusedWarnings :: Proxy ((:/=$) a6989586621679297822) t -> () Source #

type Apply a6989586621679297822 (TyFun a6989586621679297822 Bool -> Type) ((:/=$) a6989586621679297822) l Source # 
type Apply a6989586621679297822 (TyFun a6989586621679297822 Bool -> Type) ((:/=$) a6989586621679297822) l = (:/=$$) a6989586621679297822 l

data (l :: a6989586621679297822) :/=$$ (l :: TyFun a6989586621679297822 Bool) Source #

Instances

SuppressUnusedWarnings (a6989586621679297822 -> TyFun a6989586621679297822 Bool -> *) ((:/=$$) a6989586621679297822) Source # 

Methods

suppressUnusedWarnings :: Proxy ((:/=$$) a6989586621679297822) t -> () Source #

type Apply a Bool ((:/=$$) a l1) l2 Source # 
type Apply a Bool ((:/=$$) a l1) l2 = (:/=) a l1 l2

type (:/=$$$) (t :: a6989586621679297822) (t :: a6989586621679297822) = (:/=) t t Source #