cabal-version: 3.0 name: symantic-base maintainer: mailto:~julm/symantic-base@todo.hut.sourcephile.fr bug-reports: https://todo.hut.sourcephile.fr/~julm/symantic-base homepage: https://git.hut.sourcephile.fr/~julm/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.2.0.20210831 stability: experimental category: Data Structures synopsis: Basic symantics 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.Lang@ gathers commonly used tagless-final combinators (the syntax part of symantics). * @Symantic.Data@ is an interpreter enabling to pattern-match on combinators, while keeping their extensibility. * @Symantic.Derive@ enables to give a default value to combinators which avoids boilerplate code when implementing combinators for an interpreter is factorizable. * @Symantic.ObserveSharing@ enables to observe Haskell @let@ definitions, turning infinite values into finite ones, which is useful to inspect and optimize recursive grammars for example. 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.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). * @Symantic.View@ is an interpreter enabling to turn combinators into a human-readable string. * @Symantic.ADT@ enables to derive reciprocal functions between data-constructors and @Either@s of tuples. * @Symantic.CurryN@ gathers utilities for currying or uncurrying tuples of size greater or equal to 2. * @Symantic.Fixity@ gathers utilities for parsing or viewing infix, prefix and postfix combinators. build-type: Simple tested-with: GHC==8.10.4 extra-doc-files: extra-source-files: cabal.project default.nix .envrc flake.lock flake.nix Makefile extra-tmp-files: source-repository head type: git location: https://git.hut.sourcephile.fr/~julm/symantic-base library hs-source-dirs: src exposed-modules: Symantic Symantic.ADT Symantic.CurryN Symantic.Data Symantic.Derive Symantic.Fixity Symantic.Lang Symantic.ObserveSharing Symantic.Optimize Symantic.Reify Symantic.View default-language: Haskell2010 default-extensions: DefaultSignatures FlexibleContexts FlexibleInstances GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses NamedFieldPuns NoImplicitPrelude 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