License | BSD |
---|---|
Maintainer | sweirich@cis.upenn.edu |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
- module Generics.RepLib.R
- module Generics.RepLib.R1
- module Generics.RepLib.PreludeReps
- module Generics.RepLib.Derive
- module Generics.RepLib.RepAux
- module Generics.RepLib.SYB.Aliases
- module Generics.RepLib.SYB.Schemes
- module Generics.RepLib.Lib
- module Generics.RepLib.PreludeLib
- data (k :~: a) b :: forall k. k -> k -> * where
- class TestEquality k f where
- testEquality :: f a -> f b -> Maybe ((:~:) k a b)
Basic infrastructure
Basic Representations of types
module Generics.RepLib.R
Parameterized Representations of types
module Generics.RepLib.R1
Representations of Prelude Types
module Generics.RepLib.PreludeReps
Template Haskell for deriving representations
module Generics.RepLib.Derive
Libraries for defining Generic Operations
Library code for defining generic operations
module Generics.RepLib.RepAux
Scrap your boilerplate operations
module Generics.RepLib.SYB.Aliases
module Generics.RepLib.SYB.Schemes
Generic Utilities and Applications
Library of generic operations
module Generics.RepLib.Lib
Derivable type classes written as generic operations
module Generics.RepLib.PreludeLib
data (k :~: a) b :: forall k. k -> k -> * where infix 4 #
Propositional equality. If a :~: b
is inhabited by some terminating
value, then the type a
is the same as the type b
. To use this equality
in practice, pattern-match on the a :~: b
to get out the Refl
constructor;
in the body of the pattern-match, the compiler knows that a ~ b
.
Since: 4.7.0.0
TestEquality k ((:~:) k a) | |
(Rep a, Rep b, Sat (ctx a), Sat (ctx b)) => Rep1 ctx ((:~:) * a b) Source # | |
(~) k a b => Bounded ((:~:) k a b) | |
(~) k a b => Enum ((:~:) k a b) | |
Eq ((:~:) k a b) | |
((~) * a b, Data a) => Data ((:~:) * a b) | |
Ord ((:~:) k a b) | |
(~) k a b => Read ((:~:) k a b) | |
Show ((:~:) k a b) | |
(Rep a, Rep b) => Rep ((:~:) * a b) Source # | |
class TestEquality k f where #
This class contains types where you can learn the equality of two types from information contained in terms. Typically, only singleton types should inhabit this class.
TestEquality k ((:~:) k a) | |