generics-mrsop-1.0.0.1: 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 # 

Methods

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

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

Show Kon Source # 

Methods

showsPrec :: Int -> Kon -> ShowS #

show :: Kon -> String #

showList :: [Kon] -> ShowS #

Show1 Kon Singl Source # 

Methods

show1 :: f k -> String Source #

Eq1 Kon Singl Source # 

Methods

eq1 :: f k -> f k -> Bool Source #

HasDatatypeInfo Kon Singl FamRoseInt CodesRoseInt Z Source # 
HasDatatypeInfo Kon Singl FamRose CodesRose Z Source # 
HasDatatypeInfo Kon Singl FamTerm CodesTerm Z Source # 
HasDatatypeInfo Kon Singl FamStmtString CodesStmtString Z Source # 
HasDatatypeInfo Kon Singl FamRoseInt CodesRoseInt (S Z) Source # 
HasDatatypeInfo Kon Singl FamRose CodesRose (S Z) Source # 
HasDatatypeInfo Kon Singl FamStmtString CodesStmtString (S (S Z)) Source # 
HasDatatypeInfo Kon Singl FamStmtString CodesStmtString (S Z) Source # 

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

A singleton GADT for the allowed Konstants.

Instances

Show1 Kon Singl Source # 

Methods

show1 :: f k -> String Source #

Eq1 Kon Singl Source # 

Methods

eq1 :: f k -> f k -> Bool Source #

HasDatatypeInfo Kon Singl FamRoseInt CodesRoseInt Z Source # 
HasDatatypeInfo Kon Singl FamRose CodesRose Z Source # 
HasDatatypeInfo Kon Singl FamTerm CodesTerm Z Source # 
HasDatatypeInfo Kon Singl FamStmtString CodesStmtString Z Source # 
HasDatatypeInfo Kon Singl FamRoseInt CodesRoseInt (S Z) Source # 
HasDatatypeInfo Kon Singl FamRose CodesRose (S Z) Source # 
HasDatatypeInfo Kon Singl FamStmtString CodesStmtString (S (S Z)) Source # 
HasDatatypeInfo Kon Singl FamStmtString CodesStmtString (S Z) Source # 
Eq (Singl k) Source # 

Methods

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

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

Show (Singl k) Source # 

Methods

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

show :: Singl k -> String #

showList :: [Singl k] -> ShowS #

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

Equality over singletons