]> Git — Sourcephile - haskell/symantic-base.git/blob - symantic-base.cabal
doc: rename {hut => code}.sourcephile.fr
[haskell/symantic-base.git] / symantic-base.cabal
1 cabal-version: 3.0
2 name: symantic-base
3 maintainer: mailto:~julm/symantic-base@todo.code.sourcephile.fr
4 bug-reports: https://todo.code.sourcephile.fr/~julm/symantic-base
5 homepage: https://git.code.sourcephile.fr/~julm/symantic-base
6 author: Julien Moutinho <julm+symantic-base@sourcephile.fr>
7 copyright: Julien Moutinho <julm+symantic-base@sourcephile.fr>
8 license: AGPL-3.0-or-later
9 license-file: LICENSES/AGPL-3.0-or-later.txt
10 -- PVP: +-+------- breaking API changes
11 -- | | +----- non-breaking API additions
12 -- | | | +--- code changes with no API change
13 version: 0.2.0.20210903
14 stability: experimental
15 category: Data Structures
16 synopsis: Basic symantics combinators for Embedded Domain-Specific Languages (EDSL)
17 description:
18 This is a work-in-progress collection of basic tagless-final combinators,
19 along with some advanced utilities to exploit them.
20
21 * @Symantic.Class@
22 gathers commonly used tagless-final combinators
23 (the syntax part of symantics).
24 * @Symantic.Data@ is an interpreter enabling to pattern-match on combinators,
25 while keeping their extensibility.
26 * @Symantic.Derive@
27 enables to give a default value to combinators which avoids boilerplate code
28 when implementing combinators for an interpreter is factorizable.
29 * @Symantic.ObserveSharing@
30 enables to observe Haskell @let@ definitions,
31 turning infinite values into finite ones,
32 which is useful to inspect and optimize recursive grammars for example.
33 Inspired by Andy Gill's [Type-safe observable sharing in Haskell](https://doi.org/10.1145/1596638.1596653).
34 For an example, see [symantic-parser](https://hackage.haskell.org/package/symantic-parser).
35 * @Symantic.Reify@
36 enables the lifting to any interpreter
37 of any Haskell functions taking as arguments
38 only polymorphic types (possibly constrained)
39 or functions using such types.
40 Inspired by Oleg Kiselyov's [TDPE.hs](http://okmij.org/ftp/tagless-final/course/TDPE.hs).
41 * @Symantic.View@
42 is an interpreter enabling to turn combinators into a human-readable string.
43 * @Symantic.ADT@
44 enables to derive reciprocal functions between
45 data-constructors and @Either@s of tuples.
46 * @Symantic.CurryN@
47 gathers utilities for currying or uncurrying tuples
48 of size greater or equal to 2.
49 * @Symantic.Fixity@
50 gathers utilities for parsing or viewing
51 infix, prefix and postfix combinators.
52 build-type: Simple
53 tested-with: GHC==8.10.4
54 extra-doc-files:
55 ChangeLog.md
56 extra-source-files:
57 cabal.project
58 default.nix
59 .envrc
60 flake.lock
61 flake.nix
62 Makefile
63 extra-tmp-files:
64
65 source-repository head
66 type: git
67 location: https://git.code.sourcephile.fr/~julm/symantic-base
68
69 library
70 hs-source-dirs: src
71 exposed-modules:
72 Symantic
73 Symantic.ADT
74 Symantic.Class
75 Symantic.CurryN
76 Symantic.Data
77 Symantic.Derive
78 Symantic.Fixity
79 Symantic.ObserveSharing
80 Symantic.Optimize
81 Symantic.Reify
82 Symantic.View
83 default-language: Haskell2010
84 default-extensions:
85 DefaultSignatures
86 FlexibleContexts
87 FlexibleInstances
88 GeneralizedNewtypeDeriving
89 LambdaCase
90 MultiParamTypeClasses
91 NamedFieldPuns
92 NoImplicitPrelude
93 RecordWildCards
94 ScopedTypeVariables
95 TupleSections
96 TypeApplications
97 TypeFamilies
98 TypeOperators
99 ghc-options:
100 -Wall
101 -Wincomplete-uni-patterns
102 -Wincomplete-record-updates
103 -Wpartial-fields
104 -fprint-potential-instances
105 build-depends:
106 base >= 4.10 && < 5,
107 containers,
108 hashable,
109 template-haskell,
110 transformers,
111 unordered-containers