zabt-0.3.0.0: Arity-typed abstract binding trees

Safe HaskellNone
LanguageHaskell2010

Zabt.Arity

Description

Arities are type-level naturals used to describe the number of variables that must be immediately bound at a Term.

Synopsis

Documentation

data Arity Source #

Constructors

G 
B Arity 

type G = G Source #

type B a = B a Source #

type A0 = G Source #

type A1 = B G Source #

type A2 = B A1 Source #

type A3 = B A2 Source #

type family DownTo (c :: * -> Constraint) (x :: Arity -> *) (a :: Arity) :: Constraint where ... Source #

The DownTo type family makes it easier to declare type constraints over families of arities.

Equations

DownTo c x G = c (x G) 
DownTo c x (B a) = (c (x (B a)), DownTo c x a)