2 license: AGPL-3.0-or-later
4 -- PVP: +-+------- breaking API changes
5 -- | | +----- non-breaking API additions
6 -- | | | +--- code changes with no API change
7 version: 0.1.0.20210703
8 category: Data Structures
9 synopsis: Commonly useful symantics for Embedded Domain-Specific Languages (EDSL)
11 This is a work-in-progress collection of basic tagless-final combinators,
12 along with some advanced utilities to exploit them.
15 is for combinators indexed by a single type.
17 is for combinators indexed by an extensible function type,
18 used for typed formatting, enabling type safe dual interpreters à la printf and scanf.
19 Inspired by Oleg Kiselyov's [PrintScanF.hs](http://okmij.org/ftp/tagless-final/course/PrintScanF.hs).
20 For an example, see [symantic-http](https://hackage.haskell.org/package/symantic-http).
21 * @Symantic.{Typed,Dityped}.Lang@
22 gather commonly used tagless-final combinators
23 (the syntax part of symantics).
24 * @Symantic.Typed.Data@ is an interpreter enabling to pattern-match on combinators,
25 while keeping their extensibility.
26 * @Symantic.{Typed,Dityped}.Derive@
27 enable to give a default value to combinators which avoids boilerplate code
28 when implementing combinators for an interpreter is factorizable.
29 * @Symantic.Typed.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.Typed.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.Typed.View@
42 is an interpreter enabling to turn combinators into a human-readable string.
43 * @Symantic.Dityped.ADT@
44 enables to define formats à la printf-scanf
45 using data-constructors instead of @Either@s of tuples.
46 For an example, see [symantic-atom](https://hackage.haskell.org/package/symantic-atom).
47 * @Symantic.Dityped.CurryN@
48 gather utilities for currying or uncurrying tuples
49 of size greater or equal to 2.
50 * @Symantic.Typed.Fixity@
51 gathers utilities for parsing or viewing
52 infix, prefix and postfix combinators.
53 stability: experimental
54 author: Julien Moutinho <julm+symantic-base@sourcephile.fr>
55 maintainer: Julien Moutinho <julm+symantic-base@sourcephile.fr>
56 bug-reports: https://mails.sourcephile.fr/inbox/symantic-base
57 copyright: Julien Moutinho <julm+symantic-base@sourcephile.fr>
60 tested-with: GHC==8.10.4
70 source-repository head
72 location: git://git.sourcephile.fr/haskell/symantic-base
79 Symantic.Dityped.CurryN
80 Symantic.Dityped.Derive
87 Symantic.Typed.ObserveSharing
88 Symantic.Typed.Optimize
91 default-language: Haskell2010
96 GeneralizedNewtypeDeriving
109 -Wincomplete-uni-patterns
110 -Wincomplete-record-updates
112 -fprint-potential-instances