generic-data-1.1.0.2: Deriving instances with GHC.Generics and related utilities

Safe Haskell | None
Language | Haskell2010

Generic.Data.Internal.Resolvers

Description

Newtypes with special instances for deriving.

### Warning

This is an internal module: it is not subject to any versioning policy, breaking changes can happen at any time.

If something here seems useful, please report it or create a pull request to export it from an external module.

Synopsis

- newtype Id1 (f :: Type -> Type) a = Id1 {
  - unId1 :: f a
  }
- newtype Opaque a = Opaque {
  - unOpaque :: a
  }
- newtype Opaque1 (f :: Type -> Type) a = Opaque1 {
  - unOpaque1 :: f a
  }

# Documentation

newtype Id1 (f :: Type -> Type) a Source #

A newtype whose instances for simple classes (`Eq`, `Ord`, `Read`, `Show`) use higher-kinded class instances for `f` (`Eq1`, `Ord1`, `Read1`, `Show1`).

Constructors

Id1 |

Fields

- unId1 :: f a

#### Instances

Instances details

Eq1 f => Eq1 (Id1 f) Source # |
Instance details Defined in Generic.Data.Internal.Resolvers Methods liftEq :: (a -> b -> Bool) -> Id1 f a -> Id1 f b -> Bool Source #
Ord1 f => Ord1 (Id1 f) Source # |
Instance details Defined in Generic.Data.Internal.Resolvers Methods liftCompare :: (a -> b -> Ordering) -> Id1 f a -> Id1 f b -> Ordering Source #
Read1 f => Read1 (Id1 f) Source # |
Instance details Defined in Generic.Data.Internal.Resolvers Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Id1 f a) Source # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Id1 f a] Source # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Id1 f a) Source # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Id1 f a] Source #
Show1 f => Show1 (Id1 f) Source # |
Instance details Defined in Generic.Data.Internal.Resolvers Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Id1 f a -> ShowS Source # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Id1 f a] -> ShowS Source #
(Read1 f, Read a) => Read (Id1 f a) Source # |
Instance details Defined in Generic.Data.Internal.Resolvers Methods readsPrec :: Int -> ReadS (Id1 f a) Source # readList :: ReadS [Id1 f a] Source # readPrec :: ReadPrec (Id1 f a) Source # readListPrec :: ReadPrec [Id1 f a] Source #
(Show1 f, Show a) => Show (Id1 f a) Source # |
Instance details Defined in Generic.Data.Internal.Resolvers Methods showsPrec :: Int -> Id1 f a -> ShowS Source # show :: Id1 f a -> String Source # showList :: [Id1 f a] -> ShowS Source #
(Eq1 f, Eq a) => Eq (Id1 f a) Source # |
Instance details Defined in Generic.Data.Internal.Resolvers Methods (==) :: Id1 f a -> Id1 f a -> Bool Source # (/=) :: Id1 f a -> Id1 f a -> Bool Source #
(Ord1 f, Ord a) => Ord (Id1 f a) Source # |
Instance details Defined in Generic.Data.Internal.Resolvers Methods compare :: Id1 f a -> Id1 f a -> Ordering Source # (<) :: Id1 f a -> Id1 f a -> Bool Source # (<=) :: Id1 f a -> Id1 f a -> Bool Source # (>) :: Id1 f a -> Id1 f a -> Bool Source # (>=) :: Id1 f a -> Id1 f a -> Bool Source # max :: Id1 f a -> Id1 f a -> Id1 f a Source # min :: Id1 f a -> Id1 f a -> Id1 f a Source #

newtype Opaque a Source #

A newtype with trivial instances, that considers every value equivalent to every other one, and shows as just `"_"`.

Constructors

Opaque |

Fields

- unOpaque :: a

#### Instances

Instances details

Eq1 Opaque Source # | All equal.
Instance details Defined in Generic.Data.Internal.Resolvers Methods liftEq :: (a -> b -> Bool) -> Opaque a -> Opaque b -> Bool Source #
Ord1 Opaque Source # | All equal.
Instance details Defined in Generic.Data.Internal.Resolvers Methods liftCompare :: (a -> b -> Ordering) -> Opaque a -> Opaque b -> Ordering Source #
Show1 Opaque Source # | Shown as `"_"`.
Instance details Defined in Generic.Data.Internal.Resolvers Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Opaque a -> ShowS Source # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Opaque a] -> ShowS Source #
Show (Opaque a) Source # | Shown as `"_"`.
Instance details Defined in Generic.Data.Internal.Resolvers Methods showsPrec :: Int -> Opaque a -> ShowS Source # show :: Opaque a -> String Source # showList :: [Opaque a] -> ShowS Source #
Eq (Opaque a) Source # | All equal.
Instance details Defined in Generic.Data.Internal.Resolvers Methods (==) :: Opaque a -> Opaque a -> Bool Source # (/=) :: Opaque a -> Opaque a -> Bool Source #
Ord (Opaque a) Source # | All equal.
Instance details Defined in Generic.Data.Internal.Resolvers Methods compare :: Opaque a -> Opaque a -> Ordering Source # (<) :: Opaque a -> Opaque a -> Bool Source # (<=) :: Opaque a -> Opaque a -> Bool Source # (>) :: Opaque a -> Opaque a -> Bool Source # (>=) :: Opaque a -> Opaque a -> Bool Source # max :: Opaque a -> Opaque a -> Opaque a Source # min :: Opaque a -> Opaque a -> Opaque a Source #

newtype Opaque1 (f :: Type -> Type) a Source #

A higher-kinded version of `Opaque`.

Constructors

Opaque1 |

Fields

- unOpaque1 :: f a

#### Instances

Instances details

Eq1 (Opaque1 f) Source # | All equal.
Instance details Defined in Generic.Data.Internal.Resolvers Methods liftEq :: (a -> b -> Bool) -> Opaque1 f a -> Opaque1 f b -> Bool Source #
Ord1 (Opaque1 f) Source # | All equal.
Instance details Defined in Generic.Data.Internal.Resolvers Methods liftCompare :: (a -> b -> Ordering) -> Opaque1 f a -> Opaque1 f b -> Ordering Source #
Show1 (Opaque1 f) Source # | Shown as `"_"`.
Instance details Defined in Generic.Data.Internal.Resolvers Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Opaque1 f a -> ShowS Source # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Opaque1 f a] -> ShowS Source #
Show (Opaque1 f a) Source # | Shown as `"_"`.
Instance details Defined in Generic.Data.Internal.Resolvers Methods showsPrec :: Int -> Opaque1 f a -> ShowS Source # show :: Opaque1 f a -> String Source # showList :: [Opaque1 f a] -> ShowS Source #
Eq (Opaque1 f a) Source # | All equal.
Instance details Defined in Generic.Data.Internal.Resolvers Methods (==) :: Opaque1 f a -> Opaque1 f a -> Bool Source # (/=) :: Opaque1 f a -> Opaque1 f a -> Bool Source #
Ord (Opaque1 f a) Source # | All equal.

Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

compare :: Opaque1 f a -> Opaque1 f a -> Ordering Source #

(<) :: Opaque1 f a -> Opaque1 f a -> Bool Source #

(<=) :: Opaque1 f a -> Opaque1 f a -> Bool Source #

(>) :: Opaque1 f a -> Opaque1 f a -> Bool Source #

(>=) :: Opaque1 f a -> Opaque1 f a -> Bool Source #

max :: Opaque1 f a -> Opaque1 f a -> Opaque1 f a Source #

min :: Opaque1 f a -> Opaque1 f a -> Opaque1 f a Source #