Copyright | (C) 2013 Richard Eisenberg |
---|---|
License | (C) 2013 Richard Eisenberg |
Maintainer | Richard Eisenberg (eir@cis.upenn.edu) |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Defines the SEq singleton version of the Eq type class.
Documentation
class kparam ~ KProxy => SEq kparam whereSource
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 '(%:/=)'.
(%:==) :: forall a b. Sing a -> Sing b -> Sing (a :== b)Source
Boolean equality on singletons
(%:/=) :: forall a b. Sing a -> Sing b -> Sing (a :/= b)Source
Boolean disequality on singletons
SEq Bool (KProxy Bool) | |
SEq Ordering (KProxy Ordering) | |
SEq * (KProxy *) | |
SEq Nat (KProxy Nat) | |
SEq Symbol (KProxy Symbol) | |
SEq () (KProxy ()) | |
SEq a0 (KProxy a0) => SEq [a] (KProxy [a]) | |
SEq a0 (KProxy a0) => SEq (Maybe a) (KProxy (Maybe a)) | |
(SEq a0 (KProxy a0), SEq b0 (KProxy b0)) => SEq (Either a b) (KProxy (Either a b)) | |
(SEq a0 (KProxy a0), SEq b0 (KProxy b0)) => SEq ((,) a b) (KProxy ((,) a b)) | |
(SEq a0 (KProxy a0), SEq b0 (KProxy b0), SEq c0 (KProxy c0)) => SEq ((,,) a b c) (KProxy ((,,) a b c)) | |
(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)) | |
(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)) | |
(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)) | |
(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)) |
A type family to compute Boolean equality. Instances are provided
only for open kinds, such as *
and function kinds. Instances are
also provided for datatypes exported from base. A poly-kinded instance
is not provided, as a recursive definition for algebraic kinds is
generally more useful.
A re-export of the type-level (==)
that conforms to the singletons naming
convention.