packages feed

ADPfusion-0.6.0.0: ADPfusion.cabal

cabal-version:  2.2
name:           ADPfusion
version:        0.6.0.0
author:         Christian Hoener zu Siederdissen, 2011-2019
copyright:      Christian Hoener zu Siederdissen, 2011-2019
homepage:       https://github.com/choener/ADPfusion
bug-reports:    https://github.com/choener/ADPfusion/issues
maintainer:     choener@bioinf.uni-leipzig.de
category:       Algorithms, Data Structures, Bioinformatics, Formal Languages
license:        BSD-3-Clause
license-file:   LICENSE
build-type:     Simple
stability:      experimental
tested-with:    GHC == 8.6.4
synopsis:       Efficient, high-level dynamic programming.
description:
                <http://www.bioinf.uni-leipzig.de/Software/gADP/ generalized Algebraic Dynamic Programming>
                .
                ADPfusion combines stream-fusion (using the stream interface provided by the vector
                library) and type-level programming to provide highly efficient dynamic programming
                combinators.
                .
                ADPfusion allows writing dynamic programs for single- and multi-tape problems.
                Inputs can be sequences, or sets. New input types can be defined, without having to
                rewrite this library thanks to the open-world assumption of ADPfusion.
                .
                The library provides the machinery for Outside and Ensemble algorithms as well.
                Ensemble algorithms combine Inside and Outside calculations.
                .
                Starting with version 0.4.1 we support writing multiple context-free grammars
                (interleaved syntactic variables). Such grammars have applications in bioinformatics
                and linguistics.
                .
                The homepage provides a number of tutorial-style examples, with linear and
                context-free grammars over sequence and set inputs.
                .
                The formal background for generalized algebraic dynamic programming and ADPfusion is
                described in a number of papers. These can be found on the gADP homepage and in the
                README.
                .
                Note: The core @ADPfusion@ library only provides machinery for linear language over
                sequences. The add-ons @ADPfusionSubword@, @ADPfusionForest@, and others provide
                specialized machinery for other types of formal languages.



Extra-Source-Files:
  README.md
  changelog.md



flag debug
  description:  Enable bounds checking and various other debug operations at the cost of a significant performance penalty.
  default:      False
  manual:       True

flag debugoutput
  description:  Enable debug output, which spams the screen full of index information
  default:      False
  manual:       True

flag debugdump
  description:  Enable dumping intermediate / core files
  default:      False
  manual:       True

flag dump-core
  description: Dump HTML for the core generated by GHC during compilation
  default:     False
  manual:      True

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

flag spectest
  description:  build the spec-ctor test case
  default:      False
  manual:       True

flag devel
  description:  build additional tests
  default:      False
  manual:       True

flag btstruc
  description:  performance test for backtracking structures
  default:      False
  manual:       True

flag llvm
  description:  use llvm
  default:      False
  manual:       True



common deps
  build-depends: base               >= 4.7    && < 5.0
               , bits               >= 0.4
               , containers
               , deepseq
               , ghc-prim
               , mmorph             >= 1.0
               , mtl                >= 2.0
               , primitive          >= 0.5.4
               , QuickCheck         >= 2.7
               , singletons         >= 2.4
               , strict             >= 0.3
               , template-haskell   >= 2.0
               , th-orphans         >= 0.12
               , transformers       >= 0.3
               , tuple              >= 0.3
               , vector             >= 0.11
               --
               , DPutils            == 0.1.0.*
               , OrderedBits        == 0.0.2.*
               , PrimitiveArray     == 0.10.0.*
  default-extensions: BangPatterns
                    , ConstraintKinds
                    , CPP
                    , DataKinds
                    , DefaultSignatures
                    , DeriveAnyClass
                    , DeriveDataTypeable
                    , DeriveGeneric
                    , FlexibleContexts
                    , FlexibleInstances
                    , GADTs
                    , KindSignatures
                    , MagicHash
                    , MultiParamTypeClasses
                    -- PolyKinds is very important to get GHC to pick up all
                    -- the instances correctly.
                    , PolyKinds
                    , RankNTypes
                    , RecordWildCards
                    , ScopedTypeVariables
                    , StandaloneDeriving
                    , TemplateHaskell
                    , TupleSections
                    , TypeApplications
                    , TypeFamilies
                    , TypeOperators
                    , TypeSynonymInstances
                    , UndecidableInstances
                    , UnicodeSyntax
  default-language:
    Haskell2010
  ghc-options:
    -O2 -funbox-strict-fields
  if flag(debugdump)
    ghc-options:
      -ddump-to-file
      -ddump-simpl
      -dsuppress-all
  if flag(dump-core)
    build-depends: dump-core
    ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html



library
  import:
    deps
  exposed-modules:
    -- core system
    ADP.Fusion.Core
    ADP.Fusion.Core.Apply
    ADP.Fusion.Core.Classes
    ADP.Fusion.Core.Multi
    ADP.Fusion.Core.SynVar.Array
    ADP.Fusion.Core.SynVar.Array.Type
    ADP.Fusion.Core.SynVar.Axiom
    ADP.Fusion.Core.SynVar.Backtrack
    ADP.Fusion.Core.SynVar.Fill
    ADP.Fusion.Core.SynVar.FillTyLvl
    ADP.Fusion.Core.SynVar.Indices
    ADP.Fusion.Core.SynVar.Recursive.Type
    ADP.Fusion.Core.SynVar.Split.Type
    ADP.Fusion.Core.SynVar.TableWrap
    ADP.Fusion.Core.Term.Chr
    ADP.Fusion.Core.Term.Deletion
    ADP.Fusion.Core.Term.Edge
    ADP.Fusion.Core.Term.Epsilon
    ADP.Fusion.Core.Term.MultiChr
    ADP.Fusion.Core.Term.PeekIndex
    ADP.Fusion.Core.Term.Str
    ADP.Fusion.Core.Term.Switch
    ADP.Fusion.Core.Term.Test
    ADP.Fusion.Core.TH
    ADP.Fusion.Core.TH.Backtrack
    ADP.Fusion.Core.TH.Common
    ADP.Fusion.Core.TyLvlIx
--    -- Point L
    ADP.Fusion.PointL
    ADP.Fusion.PointL.Core
    ADP.Fusion.PointL.SynVar.Indices
--    ADP.Fusion.PointL.SynVar.Recursive
    ADP.Fusion.PointL.Term.Chr
    ADP.Fusion.PointL.Term.Deletion
    ADP.Fusion.PointL.Term.Epsilon
    ADP.Fusion.PointL.Term.MultiChr
    ADP.Fusion.PointL.Term.Str
    ADP.Fusion.PointL.Term.Switch
--    ADP.Fusion.PointL.Term.Test
--    -- Point R
    ADP.Fusion.PointR
    ADP.Fusion.PointR.Core
    ADP.Fusion.PointR.SynVar.Indices
    ADP.Fusion.PointR.Term.Chr
    ADP.Fusion.PointR.Term.Deletion
    ADP.Fusion.PointR.Term.Epsilon
    ADP.Fusion.PointR.Term.MultiChr
    -- Unit
    ADP.Fusion.Unit
    ADP.Fusion.Unit.Core
    ADP.Fusion.Unit.SynVar.Indices
    ADP.Fusion.Unit.Term.Deletion
    ADP.Fusion.Unit.Term.Epsilon
--    -- tutorials
--    ADP.Fusion.Tutorial.NeedlemanWunsch



test-suite properties
  import:
    deps
  type:
    exitcode-stdio-1.0
  main-is:
    properties.hs
  other-modules:
    QuickCheck.Common
    QuickCheck.Point
  ghc-options:
    -threaded -rtsopts -with-rtsopts=-N
  hs-source-dirs:
    tests
  cpp-options:
    -DADPFUSION_TEST_SUITE_PROPERTIES
  build-depends: ADPfusion
               , tasty                        >= 0.11
               , tasty-quickcheck             >= 0.8
               , tasty-th                     >= 0.1



-- Very simple two-sequence alignment.

executable NeedlemanWunsch

  if flag(examples)
    buildable:
      True
    build-depends:  base
                 ,  ADPfusion
                 ,  primitive
                 ,  PrimitiveArray
                 ,  template-haskell
                 ,  vector
                 ,  DPutils
  else
    buildable:
      False
  hs-source-dirs:
    src
  main-is:
    NeedlemanWunsch.hs
  default-language:
    Haskell2010
  default-extensions: BangPatterns
                    , DataKinds
                    , FlexibleContexts
                    , FlexibleInstances
                    , MultiParamTypeClasses
                    , PartialTypeSignatures
                    , PolyKinds
                    , RecordWildCards
                    , TemplateHaskell
                    , TypeApplications
                    , TypeFamilies
                    , TypeOperators
                    , UnicodeSyntax
  ghc-options:
    -O2
    -funbox-strict-fields
    -- these parameters do well enough with GHC 8.2
    -- for larger programs, we may have to increase the number of worker
    -- arguments.
    -flate-dmd-anal
    -fspec-constr-count=20
    -fspec-constr-keen
    -fspec-constr-recursive=20
    -fspec-constr-threshold=20
  if flag(debugdump)
    ghc-options:
      -ddump-to-file
      -ddump-simpl
      -dsuppress-all
  if flag(llvm)
    ghc-options:
      -fllvm
      -optlo-O3
  if flag(dump-core)
    build-depends: dump-core
    ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html



executable SmithWaterman

  if flag(examples)
    buildable:
      True
    build-depends:  base
                 ,  ADPfusion
                 ,  primitive
                 ,  PrimitiveArray
                 ,  template-haskell
                 ,  vector
                 ,  DPutils
  else
    buildable:
      False
  hs-source-dirs:
    src
  main-is:
    SmithWaterman.hs
  default-language:
    Haskell2010
  default-extensions: BangPatterns
                    , DataKinds
                    , FlexibleContexts
                    , FlexibleInstances
                    , MultiParamTypeClasses
                    , PartialTypeSignatures
                    , PolyKinds
                    , RecordWildCards
                    , TemplateHaskell
                    , TypeApplications
                    , TypeFamilies
                    , TypeOperators
                    , UnicodeSyntax
  ghc-options:
    -O2
    -funbox-strict-fields
    -- these parameters do well enough with GHC 8.2
    -- for larger programs, we may have to increase the number of worker
    -- arguments.
    -flate-dmd-anal
    -fspec-constr-count=20
    -fspec-constr-keen
    -fspec-constr-recursive=20
    -fspec-constr-threshold=20
  if flag(debugdump)
    ghc-options:
      -ddump-to-file
      -ddump-simpl
      -dsuppress-all
  if flag(llvm)
    ghc-options:
      -fllvm
      -optlo-O3
  if flag(dump-core)
    build-depends: dump-core
    ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html



-- Very simple two-sequence alignment.

executable spectest

  if flag(spectest)
    buildable:
      True
    build-depends:  base
                 ,  ADPfusion
                 ,  PrimitiveArray
                 ,  template-haskell
                 ,  vector
  else
    buildable:
      False
  hs-source-dirs:
    src
  main-is:
    SpecTest.hs
  default-language:
    Haskell2010
  default-extensions: BangPatterns
                    , FlexibleContexts
                    , FlexibleInstances
                    , MultiParamTypeClasses
                    , RecordWildCards
                    , TemplateHaskell
                    , TypeFamilies
                    , TypeOperators
  ghc-options:
    -O2
    -funbox-strict-fields
    -funfolding-use-threshold1000
    -funfolding-keeness-factor1000




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