packages feed

symantic-base-0.3.0.20211007: symantic-base.cabal

cabal-version: 3.0
name: symantic-base
maintainer: mailto:~julm/symantic-base@todo.code.sourcephile.fr
bug-reports: https://todo.code.sourcephile.fr/~julm/symantic-base
homepage: https://git.code.sourcephile.fr/~julm/symantic-base
author: Julien Moutinho <julm+symantic-base@sourcephile.fr>
copyright: Julien Moutinho <julm+symantic-base@sourcephile.fr>
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.3.0.20211007
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.Class@
    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:
  ChangeLog.md
extra-source-files:
  cabal.project
  default.nix
  .envrc
  flake.lock
  flake.nix
  Makefile
extra-tmp-files:

source-repository head
  type: git
  location: https://git.code.sourcephile.fr/~julm/symantic-base

library
  hs-source-dirs: src
  exposed-modules:
    Symantic
    Symantic.ADT
    Symantic.Class
    Symantic.CurryN
    Symantic.Data
    Symantic.Derive
    Symantic.Fixity
    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