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

Safe HaskellSafe
LanguageHaskell2010

Generics.MRSOP.Examples.RoseTree

Contents

Description

This module is analogous to RoseTreeTH, but we use no Template Haskell here.

Synopsis

Standard Rose-Tree datatype

data R a Source #

Constructors

a :>: [R a] 
Leaf a 

Instances

HasDatatypeInfo Kon Singl FamRose CodesRose Source # 

Methods

datatypeInfo :: Proxy [*] CodesRose -> SNat ix -> DatatypeInfo Singl (Lkup [[Atom Singl]] ix codes) Source #

Eq (R Int) Source # 

Methods

(==) :: R Int -> R Int -> Bool #

(/=) :: R Int -> R Int -> Bool #

Show a => Show (R a) Source # 

Methods

showsPrec :: Int -> R a -> ShowS #

show :: R a -> String #

showList :: [R a] -> ShowS #

Family Structure

type ListCode = '['[], '[I (S Z), I Z]] Source #

type RTCode = '['[K KInt, I Z], '[K KInt]] Source #

type FamRose = '[[R Int], R Int] Source #

Instance Decl

Eq Instance

Compos test

pattern RInt_ :: forall (a :: Nat). () => forall (n :: Nat). ((~#) Nat Nat a (S n), (~#) Nat Nat n Z) => SNat a Source #

Crush test

Orphan instances