weave-0.1.0.0: weave.cabal
cabal-version: 3.0
name: weave
version: 0.1.0.0
synopsis: Compositional breadth-first walks
description:
An experimental control structure for defining breadth-first walks in trees
and graphs in a compositional manner.
@Weave@ is an applicative transformer for multi-level computations.
This library actually defines multiple variants of @Weave@ with different
performance profiles. The most useful ones are "Weave.Lazy" and
"Weave.Oblivious". Two other variants "Weave.Strict" and "Weave.Endless"
are included mainly as curiosities.
The main application of @Weave@ is to define /breadth-first monadic unfolds/.
Examples of such unfolds for some general-purpose tree structures can be
found under the namespace @Weave.Unfold@, for each variant of @Weave@.
See also my blog post:
<https://blog.poisson.chat/posts/2025-03-30-breadth-first-unfolds.html Unfolding trees breadth-first in Haskell>.
Internally, to avoid duplication, those unfolds are implemented as a Backpack
mixin @Weave.Unfold@. This package might not work with Stack, which doesn't
support Backpack. For minimal dependencies and no backpack, the @weave-core@
library is also available, containing only the @Weave@ types.
license: BSD-3-Clause
license-file: LICENSE
author: Li-yao Xia
maintainer: lysxia@gmail.com
homepage: https://gitlab.com/lysxia/weave
category: Control
build-type: Simple
extra-doc-files: CHANGELOG.md
tested-with: GHC == 9.10.1, GHC == 9.12.1
common warnings
ghc-options: -Wall
build-depends: base > 4 && < 5
library mixin
import: warnings
visibility: public
exposed-modules:
Weave.Unfold
signatures:
Weave.Sig
build-depends:
binary-tree ^>= 0.1,
containers >= 0.7 && < 0.9,
data-fix ^>= 0.3,
transformers ^>= 0.6
hs-source-dirs: src
default-language: Haskell2010
library
import: warnings
exposed-modules:
Weave.Unfold.Oblivious
reexported-modules:
Weave.Strict,
Weave.Lazy,
Weave.Oblivious,
Weave.Endless,
Weave.Unfold.Strict,
Weave.Unfold.Lazy,
Weave.Unfold.Endless
mixins:
mixin (Weave.Unfold as Weave.Unfold.Strict) requires (Weave.Sig as Weave.Strict),
mixin (Weave.Unfold as Weave.Unfold.Lazy) requires (Weave.Sig as Weave.Lazy),
mixin (Weave.Unfold as Weave.Unfold.Endless) requires (Weave.Sig as Weave.Endless)
build-depends:
weave:mixin,
weave-core ^>= 0.1
hs-source-dirs: src
default-language: Haskell2010
source-repository head
type: git
location: https://gitlab.com/lysxia/weave