generics-mrsop-2.3.0: Generic Programming with Mutually Recursive Sums of Products.

Safe HaskellSafe
LanguageHaskell2010

Generics.MRSOP.Opaque

Contents

Description

A curation of base types commonly used by the everyday Haskell programmer.

Synopsis

Opaque Types

In order to plug in custom opaque types, the programmer must provide their own Kon and Singl. This module serves more as an example.

data Kon Source #

Types with kind Kon will be used to index a Singl type with their values inside.

Instances
Eq Kon Source # 
Instance details

Defined in Generics.MRSOP.Opaque

Methods

(==) :: Kon -> Kon -> Bool #

(/=) :: Kon -> Kon -> Bool #

Show Kon Source # 
Instance details

Defined in Generics.MRSOP.Opaque

Methods

showsPrec :: Int -> Kon -> ShowS #

show :: Kon -> String #

showList :: [Kon] -> ShowS #

TestEquality Singl Source # 
Instance details

Defined in Generics.MRSOP.Opaque

Methods

testEquality :: Singl a -> Singl b -> Maybe (a :~: b) #

ShowHO Singl Source # 
Instance details

Defined in Generics.MRSOP.Opaque

EqHO Singl Source # 
Instance details

Defined in Generics.MRSOP.Opaque

Methods

eqHO :: Singl k -> Singl k -> Bool Source #

Family Singl FamRose CodesRose Source # 
Instance details

Defined in Generics.MRSOP.Examples.RoseTree

HasDatatypeInfo Singl FamRose CodesRose Source # 
Instance details

Defined in Generics.MRSOP.Examples.RoseTree

data Singl (kon :: Kon) :: * where Source #

A singleton GADT for the allowed Konstants.

Instances
TestEquality Singl Source # 
Instance details

Defined in Generics.MRSOP.Opaque

Methods

testEquality :: Singl a -> Singl b -> Maybe (a :~: b) #

ShowHO Singl Source # 
Instance details

Defined in Generics.MRSOP.Opaque

EqHO Singl Source # 
Instance details

Defined in Generics.MRSOP.Opaque

Methods

eqHO :: Singl k -> Singl k -> Bool Source #

Family Singl FamRose CodesRose Source # 
Instance details

Defined in Generics.MRSOP.Examples.RoseTree

HasDatatypeInfo Singl FamRose CodesRose Source # 
Instance details

Defined in Generics.MRSOP.Examples.RoseTree

Eq (Singl k) Source # 
Instance details

Defined in Generics.MRSOP.Opaque

Methods

(==) :: Singl k -> Singl k -> Bool #

(/=) :: Singl k -> Singl k -> Bool #

Show (Singl k) Source # 
Instance details

Defined in Generics.MRSOP.Opaque

Methods

showsPrec :: Int -> Singl k -> ShowS #

show :: Singl k -> String #

showList :: [Singl k] -> ShowS #

eqSingl :: Singl k -> Singl k -> Bool Source #

Equality over singletons