]> Git — Sourcephile - haskell/symantic-base.git/blob - symantic-base.cabal
iface: add semantic `Forall`
[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.20221211
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.EithersOfTuples@
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.Viewer@
49 interprets combinators as human-readable text.
50 * @Symantic.Semantics.Viewer.Fixity@
51 gathers utilities for parsing or viewing
52 infix, prefix and postfix combinators.
53 * @Symantic.Syntaxes.Reader@
54 is an intermediate interpreter enabling to change
55 the syntax combinators using an environment.
56 * @Symantic.Utils.Reify@
57 enables the lifting to any interpreter
58 of any Haskell functions taking as arguments
59 only polymorphic types (possibly constrained)
60 or functions using such types.
61 Inspired by Oleg Kiselyov's [TDPE.hs](http://okmij.org/ftp/tagless-final/course/TDPE.hs).
62
63 build-type: Simple
64 tested-with: GHC ==8.10.4
65 extra-doc-files: ChangeLog.md
66 extra-source-files:
67 .envrc
68 cabal.project
69 flake.lock
70 flake.nix
71 Makefile
72
73 extra-tmp-files:
74
75 source-repository head
76 type: git
77 location: git://git.sourcephile.fr/haskell/symantic-base
78
79 library
80 hs-source-dirs: src
81 exposed-modules:
82 Symantic
83 Symantic.Semantics
84 Symantic.Semantics.Forall
85 Symantic.Semantics.Reader
86 Symantic.Semantics.SharingObserver
87 Symantic.Semantics.Viewer
88 Symantic.Semantics.Viewer.Fixity
89 Symantic.Syntaxes
90 Symantic.Syntaxes.Classes
91 Symantic.Syntaxes.CurryN
92 Symantic.Syntaxes.Data
93 Symantic.Syntaxes.Derive
94 Symantic.Syntaxes.EithersOfTuples
95 Symantic.Syntaxes.Reify
96 Symantic.Syntaxes.TuplesOfFunctions
97
98 default-language: Haskell2010
99 default-extensions:
100 NoImplicitPrelude
101 DefaultSignatures
102 FlexibleContexts
103 FlexibleInstances
104 GeneralizedNewtypeDeriving
105 ImportQualifiedPost
106 LambdaCase
107 MultiParamTypeClasses
108 NamedFieldPuns
109 RecordWildCards
110 ScopedTypeVariables
111 TupleSections
112 TypeApplications
113 TypeFamilies
114 TypeOperators
115
116 ghc-options:
117 -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates
118 -Wpartial-fields -fprint-potential-instances
119
120 build-depends:
121 , base >=4.10 && <5
122 , containers
123 , hashable
124 , template-haskell
125 , transformers
126 , unordered-containers