packages feed

syntactic-3.1: syntactic.cabal

Name:           syntactic
Version:        3.1
Synopsis:       Generic representation and manipulation of abstract syntax
Description:    The library provides a generic representation of type-indexed abstract syntax trees
                (or indexed data types in general). It also permits the definition of open syntax
                trees based on the technique in Data Types à la Carte [1].
                .
                (Note that the difference between version 2.x and 3.0 is not that big. The bump to
                3.0 was done because the modules changed namespace.)
                .
                For more information, see
                \"A Generic Abstract Syntax Model for Embedded Languages\"
                (ICFP 2012):
                .
                  * Paper:
                    <http://www.cse.chalmers.se/~emax/documents/axelsson2012generic.pdf>
                .
                  * Slides:
                    <http://www.cse.chalmers.se/~emax/documents/axelsson2012generic-slides.pdf>
                .
                Example EDSLs can be found in the @examples@ folder.
                .
                \[1\] W. Swierstra. Data Types à la Carte.
                /Journal of Functional Programming/, 18(4):423-436, 2008,
                <http://dx.doi.org/10.1017/S0956796808006758>.
License:        BSD3
License-file:   LICENSE
Author:         Emil Axelsson
Maintainer:     emax@chalmers.se
Copyright:      Copyright (c) 2011-2015, Emil Axelsson
Homepage:       https://github.com/emilaxelsson/syntactic
Bug-reports:    https://github.com/emilaxelsson/syntactic/issues
Stability:      experimental
Category:       Language
Build-type:     Simple
Cabal-version:  >=1.16

extra-source-files:
  CONTRIBUTORS
  examples/*.hs
  tests/*.hs
  tests/gold/*.txt
  benchmarks/*.hs

source-repository head
  type:     git
  location: https://github.com/emilaxelsson/syntactic

flag th
  description: Include the module Language.Syntactic.TH, which uses Template
               Haskell
  default:     True

library
  exposed-modules:
    Language.Syntactic
    Language.Syntactic.Syntax
    Language.Syntactic.Traversal
    Language.Syntactic.Interpretation
    Language.Syntactic.Sugar
    Language.Syntactic.Decoration
    Language.Syntactic.Functional
    Language.Syntactic.Functional.Sharing
    Language.Syntactic.Functional.Tuple
    Language.Syntactic.Functional.WellScoped
    Language.Syntactic.Sugar.Binding
    Language.Syntactic.Sugar.BindingT
    Language.Syntactic.Sugar.Monad
    Language.Syntactic.Sugar.MonadT
    Language.Syntactic.Sugar.Tuple
    Language.Syntactic.Sugar.TupleT
  if flag(th)
    exposed-modules:
      Language.Syntactic.TH

  build-depends:
    base >= 4 && < 5,
    containers,
    data-hash,
    deepseq,
    mtl >= 2 && < 3,
    tree-view
  if impl(ghc < 7.8)
    build-depends: tagged
  if flag(th)
    build-depends: template-haskell

  hs-source-dirs: src

  default-language: Haskell2010

  default-extensions:
    DefaultSignatures
    DeriveDataTypeable
    DeriveFunctor
    DeriveFoldable
    DeriveTraversable
    FlexibleContexts
    FlexibleInstances
    FunctionalDependencies
    GADTs
    GeneralizedNewtypeDeriving
    RankNTypes
    ScopedTypeVariables
    TypeFamilies
    TypeOperators

  other-extensions:
    OverlappingInstances
    UndecidableInstances

test-suite examples
  type: exitcode-stdio-1.0

  hs-source-dirs: tests examples

  main-is: Tests.hs

  default-language: Haskell2010

  default-extensions:

  build-depends:
    syntactic,
    base,
    containers,
    mtl,
    QuickCheck,
    tagged,
    tasty,
    tasty-golden,
    tasty-quickcheck,
    tasty-th,
    utf8-string

benchmark syntactic-bench
  type: exitcode-stdio-1.0

  hs-source-dirs: benchmarks

  main-is: MainBenchmark.hs

  build-depends:
    base,
    criterion >= 1,
    deepseq,
    syntactic

  default-language: Haskell2010

  default-extensions:
    FlexibleInstances
    GADTs
    MultiParamTypeClasses
    TypeOperators

  other-extensions:
    TemplateHaskell