| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Exists
Description
Data types and type classes for working with existentially quantified
values. In the event that Quantified Class Constraints ever land in GHC,
this package will be considered obsolete. The benefit that most of the
typeclasses in this module provide is that they help populate the instances
of Exists.
- data Exists f = Exists !(f a)
- data Exists2 f = Exists2 !(f a b)
- data Exists3 f = Exists3 !(f a b c)
- class EqForall f where
- class EqForall f => EqForallPoly f where
- class EqForall f => OrdForall f where
- class (OrdForall f, EqForallPoly f) => OrdForallPoly f where
- class ShowForall f where
- class ReadForall f where
- class EnumForall f where
- class BoundedForall f where
- class MonoidForall f where
- class HashableForall f where
- class PathPieceForall f where
- class ToJSONKeyForall f where
- class FromJSONKeyForall f where
- class EqForall2 f where
- class EqForallPoly2 f where
- showsForall :: ShowForall f => f a -> ShowS
- showForall :: ShowForall f => f a -> String
Data Types
Hide a type parameter.
Constructors
| Exists !(f a) |
Instances
| BoundedForall k f => Bounded (Exists k f) Source # | |
| EnumForall k f => Enum (Exists k f) Source # | |
| EqForallPoly k f => Eq (Exists k f) Source # | |
| OrdForallPoly k f => Ord (Exists k f) Source # | |
| ReadForall k f => Read (Exists k f) Source # | |
| ShowForall k f => Show (Exists k f) Source # | |
| HashableForall k f => Hashable (Exists k f) Source # | |
| ToJSONForall k f => ToJSON (Exists k f) Source # | |
| (ToJSONKeyForall k f, ToJSONForall k f) => ToJSONKey (Exists k f) Source # | |
| FromJSONForall k f => FromJSON (Exists k f) Source # | |
| (FromJSONKeyForall k f, FromJSONForall k f) => FromJSONKey (Exists k f) Source # | |
| PathPieceForall k f => PathPiece (Exists k f) Source # | |
Type Classes
class EqForall f => EqForallPoly f where Source #
Minimal complete definition
Methods
eqForallPoly :: f a -> f b -> Bool Source #
Instances
| Eq a => EqForallPoly k (Const k a) Source # | |
| (EqForallPoly k f, EqForallPoly k g) => EqForallPoly k (Product k f g) Source # | |
| EqForallPoly k1 f => EqForallPoly k (Compose k k1 f g) Source # | |
class EqForall f => OrdForall f where Source #
Minimal complete definition
Methods
compareForall :: f a -> f a -> Ordering Source #
class (OrdForall f, EqForallPoly f) => OrdForallPoly f where Source #
Minimal complete definition
Methods
compareForallPoly :: f a -> f b -> Ordering Source #
Instances
| Ord a => OrdForallPoly k (Const k a) Source # | |
| (OrdForallPoly k f, OrdForallPoly k g) => OrdForallPoly k (Product k f g) Source # | |
class ShowForall f where Source #
Minimal complete definition
Methods
showsPrecForall :: Int -> f a -> ShowS Source #
Instances
| ShowForall k (Proxy k) Source # | |
| (ShowForall k f, ShowForall k g) => ShowForall k (Product k f g) Source # | |
class ReadForall f where Source #
Minimal complete definition
Methods
readPrecForall :: ReadPrec (Exists f) Source #
Instances
| ReadForall k (Proxy k) Source # | |
class EnumForall f where Source #
Minimal complete definition
class BoundedForall f where Source #
Minimal complete definition
class MonoidForall f where Source #
Minimal complete definition
Instances
| MonoidForall k (Proxy k) Source # | |
class HashableForall f where Source #
Minimal complete definition
Methods
hashWithSaltForall :: Int -> f a -> Int Source #
Instances
| Hashable a => HashableForall k (Const k a) Source # | |
class PathPieceForall f where Source #
Minimal complete definition
Methods
fromPathPieceForall :: Text -> Maybe (Exists f) Source #
toPathPieceForall :: f a -> Text Source #
class ToJSONKeyForall f where Source #
Minimal complete definition
Methods
toJSONKeyForall :: ToJSONKeyFunctionForall f Source #
class FromJSONKeyForall f where Source #
Minimal complete definition
Methods
fromJSONKeyForall :: FromJSONKeyFunction (Exists f) Source #
Higher Rank Classes
class EqForallPoly2 f where Source #
Minimal complete definition
Methods
eqForallPoly2 :: f a b -> f c d -> Bool Source #
Functions
showsForall :: ShowForall f => f a -> ShowS Source #
showForall :: ShowForall f => f a -> String Source #