witness-0.2: values that witness types

Data.Witness.List

Synopsis

Documentation

data ListType w a whereSource

a witness type for HList-style lists. Here we use () and (,) for HNil and HCons. The w parameter is the witness type of the elements.

Constructors

NilListType :: ListType w () 
ConsListType :: w a -> ListType w b -> ListType w (a, b) 

Instances

SimpleWitness w => SimpleWitness (ListType w) 
Representative w => Representative (ListType w) 
Eq1 w => Eq1 (ListType w) 
Representative w => Is (ListType w) () 
(Is w a, Is (ListType w) b) => Is (ListType w) (a, b) 
Eq1 w => Eq (ListType w a) 

class HasListElement n list whereSource

Associated Types

type ListElement n list :: *Source

Methods

getListElement :: Nat n -> list -> ListElement n listSource

putListElement :: Nat n -> ListElement n list -> list -> listSource

Instances

modifyListElement :: HasListElement n t => Nat n -> (ListElement n t -> ListElement n t) -> t -> tSource