symantic-base-0.1.0.20210703: symantic-base.cabal
cabal-version: 3.0
license: AGPL-3.0-or-later
name: symantic-base
-- PVP: +-+------- breaking API changes
-- | | +----- non-breaking API additions
-- | | | +--- code changes with no API change
version: 0.1.0.20210703
category: Data Structures
synopsis: Commonly useful symantics 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.Typed@
is for combinators indexed by a single type.
* @Symantic.Dityped@
is for combinators indexed by an extensible function type,
used for typed formatting, enabling type safe dual interpreters à la printf and scanf.
Inspired by Oleg Kiselyov's [PrintScanF.hs](http://okmij.org/ftp/tagless-final/course/PrintScanF.hs).
For an example, see [symantic-http](https://hackage.haskell.org/package/symantic-http).
* @Symantic.{Typed,Dityped}.Lang@
gather commonly used tagless-final combinators
(the syntax part of symantics).
* @Symantic.Typed.Data@ is an interpreter enabling to pattern-match on combinators,
while keeping their extensibility.
* @Symantic.{Typed,Dityped}.Derive@
enable to give a default value to combinators which avoids boilerplate code
when implementing combinators for an interpreter is factorizable.
* @Symantic.Typed.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.Typed.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.Typed.View@
is an interpreter enabling to turn combinators into a human-readable string.
* @Symantic.Dityped.ADT@
enables to define formats à la printf-scanf
using data-constructors instead of @Either@s of tuples.
For an example, see [symantic-atom](https://hackage.haskell.org/package/symantic-atom).
* @Symantic.Dityped.CurryN@
gather utilities for currying or uncurrying tuples
of size greater or equal to 2.
* @Symantic.Typed.Fixity@
gathers utilities for parsing or viewing
infix, prefix and postfix combinators.
stability: experimental
author: Julien Moutinho <julm+symantic-base@sourcephile.fr>
maintainer: Julien Moutinho <julm+symantic-base@sourcephile.fr>
bug-reports: https://mails.sourcephile.fr/inbox/symantic-base
copyright: Julien Moutinho <julm+symantic-base@sourcephile.fr>
build-type: Simple
tested-with: GHC==8.10.4
extra-source-files:
cabal.project
default.nix
.envrc
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.Dityped
Symantic.Dityped.ADT
Symantic.Dityped.CurryN
Symantic.Dityped.Derive
Symantic.Dityped.Lang
Symantic.Typed
Symantic.Typed.Data
Symantic.Typed.Derive
Symantic.Typed.Fixity
Symantic.Typed.Lang
Symantic.Typed.ObserveSharing
Symantic.Typed.Optimize
Symantic.Typed.Reify
Symantic.Typed.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