record Enumerator : Type -> Type -> Type
An (a,b)-enumerator is an enumerator for values of type b provided
that we already know how to enumerate subterms of type a
Totality: total
Visibility: export
Constructor: MkEnumerator : (List a -> List b) -> Enumerator a b
Projection: .runEnumerator : Enumerator a b -> List a -> List b
Hints:
Alternative (Enumerator a)
Applicative (Enumerator a)
Functor (Enumerator a)
Monad (Enumerator a)
pairWith : (b -> c -> d) -> Enumerator a b -> Enumerator a c -> Enumerator a d
This interleaving is fair, unlike one defined using concatMap.
Cf. paper for definition of fairness
Totality: total
Visibility: exportpair : Enumerator a b -> Enumerator a c -> Enumerator a (b, c)
- Totality: total
Visibility: export const : List b -> Enumerator a b
Like `pure` but returns more than one result
Totality: total
Visibility: exportrec : Enumerator a a
The construction of recursive substructures is memoised by
simply passing the result of the recursive call
Totality: total
Visibility: exportsized : Enumerator a a -> Nat -> List a
Assuming that the enumerator is building one layer of term,
sized e n will produce a list of values of depth n
Totality: total
Visibility: exportstream : Enumerator a a -> Stream (List a)
Assuming that the enumerator is building one layer of term,
stream e will produce a list of increasingly deep values
Totality: total
Visibility: exportregular : (d : Desc List) -> Enumerator (Fix d) (Fix d)
- Totality: total
Visibility: export