singletons-2.0.0.1: A framework for generating singleton types

Copyright(C) 2013 Richard Eisenberg
LicenseBSD-style (see LICENSE)
MaintainerRichard Eisenberg (eir@cis.upenn.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 (kproxy ~ KProxy) => PEq kproxy 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 :== y :: Bool infix 4 Source

type x :/= y :: Bool infix 4 Source

Instances

PEq Bool (KProxy Bool) Source 
PEq Ordering (KProxy Ordering) Source 
PEq () (KProxy ()) Source 
PEq [k] (KProxy [k]) Source 
PEq (Maybe k) (KProxy (Maybe k)) Source 
PEq (Either k k) (KProxy (Either k k)) Source 
PEq ((,) k k) (KProxy ((,) k k)) Source 
PEq ((,,) k k k) (KProxy ((,,) k k k)) Source 
PEq ((,,,) k k k k) (KProxy ((,,,) k k k k)) Source 
PEq ((,,,,) k k k k k) (KProxy ((,,,,) k k k k k)) Source 
PEq ((,,,,,) k k k k k k) (KProxy ((,,,,,) k k k k k k)) Source 
PEq ((,,,,,,) k k k k k k k) (KProxy ((,,,,,,) k k k k k k k)) Source 

class (kparam ~ KProxy) => SEq kparam 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 b. Sing a -> Sing b -> Sing (a :== b) infix 4 Source

Boolean equality on singletons

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

Boolean disequality on singletons

Instances

SEq Bool (KProxy Bool) Source 
SEq Ordering (KProxy Ordering) Source 
SEq () (KProxy ()) Source 
SEq a0 (KProxy a0) => SEq [a] (KProxy [a]) Source 
SEq a0 (KProxy a0) => SEq (Maybe a) (KProxy (Maybe a)) Source 
(SEq a0 (KProxy a0), SEq b0 (KProxy b0)) => SEq (Either a b) (KProxy (Either a b)) Source 
(SEq a0 (KProxy a0), SEq b0 (KProxy b0)) => SEq ((,) a b) (KProxy ((,) a b)) Source 
(SEq a0 (KProxy a0), SEq b0 (KProxy b0), SEq c0 (KProxy c0)) => SEq ((,,) a b c) (KProxy ((,,) a b c)) Source 
(SEq a0 (KProxy a0), SEq b0 (KProxy b0), SEq c0 (KProxy c0), SEq d0 (KProxy d0)) => SEq ((,,,) a b c d) (KProxy ((,,,) a b c d)) Source 
(SEq a0 (KProxy a0), SEq b0 (KProxy b0), SEq c0 (KProxy c0), SEq d0 (KProxy d0), SEq e0 (KProxy e0)) => SEq ((,,,,) a b c d e) (KProxy ((,,,,) a b c d e)) Source 
(SEq a0 (KProxy a0), SEq b0 (KProxy b0), SEq c0 (KProxy c0), SEq d0 (KProxy d0), SEq e0 (KProxy e0), SEq f0 (KProxy f0)) => SEq ((,,,,,) a b c d e f) (KProxy ((,,,,,) a b c d e f)) Source 
(SEq a0 (KProxy a0), SEq b0 (KProxy b0), SEq c0 (KProxy c0), SEq d0 (KProxy d0), SEq e0 (KProxy e0), SEq f0 (KProxy f0), SEq g0 (KProxy g0)) => SEq ((,,,,,,) a b c d e f g) (KProxy ((,,,,,,) a b c d e f g)) Source 

data (:==$) l Source

Instances

SuppressUnusedWarnings (TyFun k (TyFun k Bool -> *) -> *) ((:==$) k) Source 
type Apply (TyFun k Bool -> *) k ((:==$) k) l0 = (:==$$) k l0 Source 

data l :==$$ l Source

Instances

SuppressUnusedWarnings (k -> TyFun k Bool -> *) ((:==$$) k) Source 
type Apply Bool k ((:==$$) k l1) l0 = (:==$$$) k l1 l0 Source 

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

data (:/=$) l Source

Instances

SuppressUnusedWarnings (TyFun k (TyFun k Bool -> *) -> *) ((:/=$) k) Source 
type Apply (TyFun k Bool -> *) k ((:/=$) k) l0 = (:/=$$) k l0 Source 

data l :/=$$ l Source

Instances

SuppressUnusedWarnings (k -> TyFun k Bool -> *) ((:/=$$) k) Source 
type Apply Bool k ((:/=$$) k l1) l0 = (:/=$$$) k l1 l0 Source 

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