generics-mrsop-2.0.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

Methods

showHO :: Singl k -> String Source #

EqHO Singl Source # 
Instance details

Defined in Generics.MRSOP.Opaque

Methods

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

Family Singl FamRoseInt CodesRoseInt Source # 
Instance details

Defined in Generics.MRSOP.Examples.RoseTreeTH

Family Singl FamRose CodesRose Source # 
Instance details

Defined in Generics.MRSOP.Examples.RoseTree

Family Singl FamTerm CodesTerm Source # 
Instance details

Defined in Generics.MRSOP.Examples.LambdaAlphaEqTH

Family Singl FamStmtString CodesStmtString Source # 
Instance details

Defined in Generics.MRSOP.Examples.SimpTH

HasDatatypeInfo Singl FamRoseInt CodesRoseInt Source # 
Instance details

Defined in Generics.MRSOP.Examples.RoseTreeTH

HasDatatypeInfo Singl FamRose CodesRose Source # 
Instance details

Defined in Generics.MRSOP.Examples.RoseTree

HasDatatypeInfo Singl FamTerm CodesTerm Source # 
Instance details

Defined in Generics.MRSOP.Examples.LambdaAlphaEqTH

HasDatatypeInfo Singl FamStmtString CodesStmtString Source # 
Instance details

Defined in Generics.MRSOP.Examples.SimpTH

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

Methods

showHO :: Singl k -> String Source #

EqHO Singl Source # 
Instance details

Defined in Generics.MRSOP.Opaque

Methods

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

Family Singl FamRoseInt CodesRoseInt Source # 
Instance details

Defined in Generics.MRSOP.Examples.RoseTreeTH

Family Singl FamRose CodesRose Source # 
Instance details

Defined in Generics.MRSOP.Examples.RoseTree

Family Singl FamTerm CodesTerm Source # 
Instance details

Defined in Generics.MRSOP.Examples.LambdaAlphaEqTH

Family Singl FamStmtString CodesStmtString Source # 
Instance details

Defined in Generics.MRSOP.Examples.SimpTH

HasDatatypeInfo Singl FamRoseInt CodesRoseInt Source # 
Instance details

Defined in Generics.MRSOP.Examples.RoseTreeTH

HasDatatypeInfo Singl FamRose CodesRose Source # 
Instance details

Defined in Generics.MRSOP.Examples.RoseTree

HasDatatypeInfo Singl FamTerm CodesTerm Source # 
Instance details

Defined in Generics.MRSOP.Examples.LambdaAlphaEqTH

HasDatatypeInfo Singl FamStmtString CodesStmtString Source # 
Instance details

Defined in Generics.MRSOP.Examples.SimpTH

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