packages feed

FormalGrammars-0.3.1.0: FormalGrammars.cabal

name:           FormalGrammars
version:        0.3.1.0
author:         Christian Hoener zu Siederdissen, 2013-2016
copyright:      Christian Hoener zu Siederdissen, 2013-2016
homepage:       https://github.com/choener/FormalGrammars
bug-reports:    https://github.com/choener/FormalGrammars/issues
maintainer:     choener@bioinf.uni-leipzig.de
category:       Formal Languages, Bioinformatics
license:        GPL-3
license-file:   LICENSE
build-type:     Simple
stability:      experimental
cabal-version:  >= 1.10.0
tested-with:    GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1
synopsis:       (Context-free) grammars in formal language theory
description:
                <http://www.bioinf.uni-leipzig.de/Software/gADP/ generalized Algebraic Dynamic Programming>
                .
                Context-free grammars in formal language theory are sets of
                production rules, non-terminal and terminal symbols. This
                library provides basic data types and functions to manipulate
                such grammars.
                .
                Grammars can be defined in a small domain-specific language
                that is very close to typical CFG notation. The DSL parser can
                easily be extended. Grammar products, for example, are
                implemented as a single additional sub-parser.
                .
                This library also provides the machinery that transforms an
                Inside grammar into the corresponding Outside grammar.
                .
                Starting with version 0.2.1 it is possible to write multiple
                context-free grammars within this framework.
                .
                In addition, TemplateHaskell and QuasiQuoting functionality
                allow embedding thusly defined grammars in Haskell programs.
                ADPfusion then turns such a grammar into an efficient dynamic
                program. It is also possible to generate Haskell modules that
                contain the resulting grammar, signature and algebra product.
                .
                Alternatives are ansi- or LaTeX-based pretty-printing for users
                that want to implement their CFG in another language than
                Haskell.
                .
                Formal background can be found in a number of papers which are
                given in the README.
                .



Extra-Source-Files:
  README.md
  changelog.md
  tests/parsing.gra



flag examples
  description:  build the examples
  default:      False
  manual:       True

flag debug
  description:  dump intermediate Core files
  default:      False
  manual:       True



library
  build-depends: base                  >= 4.7     && < 5.0
               , ansi-wl-pprint        >= 0.6.7   && < 0.6.8
               , bytestring            >= 0.10    && < 0.11
               , containers
               , data-default          >= 0.5     && < 0.7
               , HaTeX                 >= 3.16    && < 4.0
               , lens                  >= 4.0     && < 5.0
               , mtl                   >= 2.0     && < 3.0
               , parsers               >= 0.12    && < 0.13
               , semigroups            >= 0.16    && < 0.19
               , template-haskell
               , text                  >= 1.0     && < 1.3
               , transformers          >= 0.3     && < 0.6
               , trifecta              >= 1.6     && < 1.7
               , unordered-containers  >= 0.2     && < 0.3
               , vector                >= 0.10    && < 0.12
               --
               , ADPfusion             == 0.5.2.*
               , PrimitiveArray        == 0.7.1.*
  exposed-modules:
    FormalLanguage
    FormalLanguage.CFG
    FormalLanguage.CFG.Grammar
    FormalLanguage.CFG.Grammar.Types
    FormalLanguage.CFG.Grammar.Util
    FormalLanguage.CFG.Outside
    FormalLanguage.CFG.Parser
    FormalLanguage.CFG.PrettyPrint
    FormalLanguage.CFG.PrettyPrint.ANSI
    FormalLanguage.CFG.PrettyPrint.Haskell
    FormalLanguage.CFG.PrettyPrint.LaTeX
    FormalLanguage.CFG.QQ
    FormalLanguage.CFG.TH
    FormalLanguage.CFG.TH.Internal
  default-language:
    Haskell2010
  default-extensions: BangPatterns
                    , CPP
                    , DeriveDataTypeable
                    , DataKinds
                    , FlexibleContexts
                    , FlexibleInstances
                    , GeneralizedNewtypeDeriving
                    , LambdaCase
                    , MultiParamTypeClasses
                    , NamedFieldPuns
                    , NoMonomorphismRestriction
                    , PatternGuards
                    , QuasiQuotes
                    , RankNTypes
                    , RecordWildCards
                    , ScopedTypeVariables
                    , StandaloneDeriving
                    , TemplateHaskell
                    , TupleSections
                    , TypeFamilies
                    , TypeOperators
                    , ViewPatterns
  ghc-options:
    -O2 -funbox-strict-fields



-- A Simple pretty-printer for formal grammars.

executable GrammarPP
  build-depends: base
               , ansi-wl-pprint
               , cmdargs          >= 0.10   && < 0.11
               , FormalGrammars
               , trifecta
  hs-source-dirs:
    src
  default-language:
    Haskell2010
  default-extensions: DeriveDataTypeable
                    , RecordWildCards
  main-is:
    GrammarPP.hs



executable NussinovFG
  if flag(examples)
    buildable:
      True
    build-depends: base
                 , ADPfusion
                 , FormalGrammars
                 , PrimitiveArray
                 , template-haskell
                 , vector
  else
    buildable:
      False
  hs-source-dirs:
    src
  main-is:
    Nussinov.hs
  default-language:
    Haskell2010
  default-extensions: BangPatterns
                    , FlexibleContexts
                    , FlexibleInstances
                    , MultiParamTypeClasses
                    , QuasiQuotes
                    , TemplateHaskell
                    , TypeFamilies
                    , TypeOperators
  ghc-options:
    -O2
    -fcpr-off
    -funbox-strict-fields
    -funfolding-use-threshold1000
    -funfolding-keeness-factor1000
  if flag(debug)
    ghc-options:
      -ddump-to-file
      -ddump-simpl
      -ddump-stg
      -dsuppress-all



executable NeedlemanWunschFG
  if flag(examples)
    buildable:
      True
    build-depends: base
                 , ADPfusion
                 , containers
                 , FormalGrammars
                 , PrimitiveArray
                 , template-haskell
                 , vector
  else
    buildable:
      False
  hs-source-dirs:
    src
  main-is:
    NeedlemanWunsch.hs
  default-language:
    Haskell2010
  default-extensions: BangPatterns
                    , FlexibleContexts
                    , FlexibleInstances
                    , MultiParamTypeClasses
                    , QuasiQuotes
                    , TemplateHaskell
                    , TypeFamilies
                    , TypeOperators
  ghc-options:
    -O2
    -fcpr-off
    -funbox-strict-fields
    -funfolding-use-threshold1000
    -funfolding-keeness-factor1000
    -rtsopts
  if flag(debug)
    ghc-options:
      -ddump-to-file
      -ddump-simpl
      -ddump-stg
      -dsuppress-all



executable TriNeedleFG
  if flag(examples)
    buildable:
      True
    build-depends: base
                 , ADPfusion
                 , containers
                 , FormalGrammars
                 , PrimitiveArray
                 , template-haskell
                 , vector
  else
    buildable:
      False
  hs-source-dirs:
    src
  main-is:
    TriNeedle.hs
  default-language:
    Haskell2010
  default-extensions: BangPatterns
                    , FlexibleContexts
                    , FlexibleInstances
                    , MultiParamTypeClasses
                    , QuasiQuotes
                    , TemplateHaskell
                    , TypeFamilies
                    , TypeOperators
  ghc-options:
    -O2
    -fcpr-off
    -funbox-strict-fields
    -funfolding-use-threshold1000
    -funfolding-keeness-factor1000
    -rtsopts
  if flag(debug)
    ghc-options:
      -ddump-to-file
      -ddump-simpl
      -ddump-stg
      -dsuppress-all



source-repository head
  type: git
  location: git://github.com/choener/FormalGrammars