cabal-version: 3.0 name: symantic-base maintainer: mailto:symantic-base@sourcephile.fr bug-reports: https://mails.sourcephile.fr/inbox/symantic-base homepage: https://git.sourcephile.fr/haskell/symantic-base author: Julien Moutinho copyright: Julien Moutinho license: AGPL-3.0-or-later license-file: LICENSES/AGPL-3.0-or-later.txt -- PVP: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change version: 0.5.0.20221211 stability: experimental category: Data Structures synopsis: Basic symantic combinators for Embedded Domain-Specific Languages (EDSL) description: This is a work-in-progress collection of basic tagless-final combinators, along with some advanced utilities to exploit them. * @Symantic.Syntaxes.Classes@ gathers commonly used tagless-final combinators (the syntax part of symantics). * @Symantic.Syntaxes.Data@ interprets combinators as data constructors enabling to pattern-match on combinators while keeping their extensibility. * @Symantic.Syntaxes.Derive@ to give a default value to combinators which avoids boilerplate code when implementing combinators for an interpreter is factorizable. * @Symantic.Syntaxes.EithersOfTuples@ leverages @GHC.Generics@ to generate reciprocal functions between algebraic data type constructors and Eithers-of-Tuples. * @Symantic.Syntaxes.TuplesOfFunctions@ enables the use of Tuples-of-Functions instead of Eithers-of-Tuples. * @Symantic.Syntaxes.CurryN@ gathers utilities for currying or uncurrying tuples of size greater or equal to two. * @Symantic.Semantics.SharingObserver@ interprets combinators to observe @let@ definitions at the host language level (Haskell), effectively turning infinite values into finite ones, which is useful for example to inspect and optimize recursive grammars. Inspired by Andy Gill's [Type-safe observable sharing in Haskell](https://doi.org/10.1145/1596638.1596653). For an example, see [symantic-parser](https://hackage.haskell.org/package/symantic-parser). * @Symantic.Semantics.Viewer@ interprets combinators as human-readable text. * @Symantic.Semantics.Viewer.Fixity@ gathers utilities for parsing or viewing infix, prefix and postfix combinators. * @Symantic.Syntaxes.Reader@ is an intermediate interpreter enabling to change the syntax combinators using an environment. * @Symantic.Utils.Reify@ enables the lifting to any interpreter of any Haskell functions taking as arguments only polymorphic types (possibly constrained) or functions using such types. Inspired by Oleg Kiselyov's [TDPE.hs](http://okmij.org/ftp/tagless-final/course/TDPE.hs). build-type: Simple tested-with: GHC ==8.10.4 extra-doc-files: ChangeLog.md extra-source-files: .envrc cabal.project flake.lock flake.nix Makefile extra-tmp-files: source-repository head type: git location: git://git.sourcephile.fr/haskell/symantic-base library hs-source-dirs: src exposed-modules: Symantic Symantic.Semantics Symantic.Semantics.Forall Symantic.Semantics.Reader Symantic.Semantics.SharingObserver Symantic.Semantics.Viewer Symantic.Semantics.Viewer.Fixity Symantic.Syntaxes Symantic.Syntaxes.Classes Symantic.Syntaxes.CurryN Symantic.Syntaxes.Data Symantic.Syntaxes.Derive Symantic.Syntaxes.EithersOfTuples Symantic.Syntaxes.Reify Symantic.Syntaxes.TuplesOfFunctions default-language: Haskell2010 default-extensions: NoImplicitPrelude DefaultSignatures FlexibleContexts FlexibleInstances GeneralizedNewtypeDeriving ImportQualifiedPost LambdaCase MultiParamTypeClasses NamedFieldPuns RecordWildCards ScopedTypeVariables TupleSections TypeApplications TypeFamilies TypeOperators ghc-options: -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates -Wpartial-fields -fprint-potential-instances build-depends: , base >=4.10 && <5 , containers , hashable , template-haskell , transformers , unordered-containers