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