packages feed

hgeometry-0.6.0.0: hgeometry.cabal

-- Initial hgeometry.cabal generated by cabal init.  For further
-- documentation, see http://haskell.org/cabal/users-guide/

name:                hgeometry
version:             0.6.0.0
synopsis:            Geometric Algorithms, Data structures, and Data types.
description:
  HGeometry provides some basic geometry types, and geometric algorithms and
  data structures for them. The main two focusses are: (1) Strong type safety,
  and (2) implementations of geometric algorithms and data structures with good
  asymptotic running time guarantees. Note that HGeometry is still highly experimental, don't be surprised to find bugs.

homepage:            https://fstaals.net/software/hgeometry
license:             BSD3
license-file:        LICENSE
author:              Frank Staals
maintainer:          frank@fstaals.net
-- copyright:

tested-with:         GHC >= 7.10.2

category:            Geometry
build-type:          Simple

extra-source-files:  README.md
                     resources/basic.isy
                     test/Data/Geometry/pointInPolygon.ipe
                     test/Data/Geometry/Polygon/Convex/convexTests.ipe
                     test/Algorithms/Geometry/SmallestEnclosingDisk/manual.ipe
                     test/Algorithms/Geometry/LineSegmentIntersection/manual.ipe
                     examples/BAPC2014/sample.in
                     examples/BAPC2014/sample.out
                     examples/BAPC2014/testdata.in
                     examples/BAPC2014/testdata.out
                     examples/BAPC2012/G.in
                     examples/BAPC2012/G.out
                     examples/BAPC2012/sampleG.in
                     examples/BAPC2012/sampleG.out


cabal-version:       >=1.10
source-repository head
  type:     git
  location: https://github.com/noinia/hgeometry


flag examples
  description: Build demonstration programs
  default:     False
  manual:      True

library
  ghc-options: -Wall -fno-warn-unticked-promoted-constructors -fno-warn-type-defaults

  exposed-modules:
                    -- * Generic Geometry
                    Data.Geometry
                    Data.Geometry.Properties
                    Data.Geometry.Transformation
                    Data.Geometry.Boundary
                    Data.Geometry.Duality

                    -- * Basic Geometry Types
                    Data.Geometry.Vector
                    Data.Geometry.Vector.VectorFixed
                    -- Data.Geometry.Vector.Vinyl
                    Data.Geometry.Interval
                    Data.Geometry.Interval.Util
                    Data.Geometry.Point
                    Data.Geometry.Line
                    Data.Geometry.Line.Internal
                    Data.Geometry.LineSegment
                    Data.Geometry.SubLine
                    Data.Geometry.HalfLine
                    Data.Geometry.PolyLine
                    Data.Geometry.Triangle
                    -- Data.Geometry.Plane
                    Data.Geometry.Slab
                    Data.Geometry.Box
                    Data.Geometry.Box.Internal
                    Data.Geometry.Ball
                    Data.Geometry.Polygon
                    Data.Geometry.Polygon.Convex

                    -- * Geometric Data Structures
                    Data.Geometry.IntervalTree
                    Data.Geometry.SegmentTree
                    Data.Geometry.SegmentTree.Generic

                    Data.Geometry.KDTree
                    Data.Geometry.PlanarSubdivision

                    -- * Algorithms
                    Algorithms.Util

                    -- * Geometric Algorithms
                    Algorithms.Geometry.ConvexHull.GrahamScan
                    Algorithms.Geometry.ConvexHull.DivideAndConqueror

                    Algorithms.Geometry.SmallestEnclosingBall.Types
                    Algorithms.Geometry.SmallestEnclosingBall.RandomizedIncrementalConstruction
                    Algorithms.Geometry.SmallestEnclosingBall.Naive

                    Algorithms.Geometry.DelaunayTriangulation.Types
                    Algorithms.Geometry.DelaunayTriangulation.DivideAndConqueror
                    Algorithms.Geometry.DelaunayTriangulation.Naive

                    Algorithms.Geometry.PolyLineSimplification.DouglasPeucker

                    Algorithms.Geometry.EuclideanMST.EuclideanMST

                    Algorithms.Geometry.WellSeparatedPairDecomposition.WSPD
                    Algorithms.Geometry.WellSeparatedPairDecomposition.Types

                    Algorithms.Geometry.Diameter

                    Algorithms.Geometry.LineSegmentIntersection.Naive
                    Algorithms.Geometry.LineSegmentIntersection.BentleyOttmann
                    Algorithms.Geometry.LineSegmentIntersection.Types

                    -- * Graph Algorithms
                    Algorithms.Graph.DFS
                    Algorithms.Graph.MST

                    -- * Ipe Types
                    Data.Geometry.Ipe
                    Data.Geometry.Ipe.Literal
                    Data.Geometry.Ipe.Attributes
                    Data.Geometry.Ipe.Types
                    Data.Geometry.Ipe.Writer
                    Data.Geometry.Ipe.Reader
                    Data.Geometry.Ipe.PathParser
                    Data.Geometry.Ipe.IpeOut
                    Data.Geometry.Ipe.FromIpe

                    -- * General Data Types
                    Data.UnBounded
                    Data.Range
                    Data.Ext
                    Data.Seq2
                    Data.Seq
                    Data.CircularSeq
                    Data.Sequence.Util
                    Data.BinaryTree
                    Data.BinaryTree.Zipper

                    Data.CircularList.Util
                    Data.BalBST
                    Data.Util

                    -- * Planar Graphs
                    Data.Permutation
                    Data.PlanarGraph
                    Data.PlaneGraph

                    -- * Other
                    System.Random.Shuffle
                    Control.Monad.State.Persistent



  other-modules:
                   Data.Geometry.Ipe.ParserPrimitives




  -- other-extensions:
  build-depends:

                  Frames           >= 0.1.3.0
                , base             >= 4.8       &&     < 5
                , bifunctors       >= 4.1
                , bytestring       >= 0.10
                , containers       >= 0.5.5
                , contravariant    >= 1.4
                , lens             >= 4.2
                , linear           >= 1.10
                , semigroupoids    >= 5
                , semigroups       >= 0.18
                , singletons       >= 2.0
                , text             >= 1.1.1.0
                , vinyl            >= 0.5       &&     < 0.6
                , deepseq          >= 1.1

               -- , validation       >= 0.4

               , parsec           >= 3
               -- , tranformers      > 0.3

               , vector           >= 0.11
               , fixed-vector     >= 0.6.4.0
               , data-clist       >= 0.0.7.2

               , hexpat           >= 0.20.9
               , mtl
               , random
               , template-haskell


               , time
               , directory
               , optparse-applicative


  hs-source-dirs: src
                  -- examples/demo

  default-language:    Haskell2010

  default-extensions: TypeFamilies
                    , GADTs
                    , KindSignatures
                    , DataKinds
                    , TypeOperators
                    , ConstraintKinds
                    , PolyKinds
                    , RankNTypes

                    , PatternSynonyms
                    , TupleSections
                    , LambdaCase
                    , ViewPatterns

                    , StandaloneDeriving
                    , GeneralizedNewtypeDeriving
                    , DeriveFunctor
                    , DeriveFoldable
                    , DeriveTraversable
                    , DeriveGeneric
                    , AutoDeriveTypeable


                    , FlexibleInstances
                    , FlexibleContexts
                    , MultiParamTypeClasses

executable hgeometry-examples
  if !flag(examples)
    buildable: False
  main-is: Main.hs

  if flag(examples)
    build-depends: base
                 , hgeometry
                 , lens
                 , containers
                 , vinyl
                 , Frames
                 , semigroups
                 , optparse-applicative   >= 0.13.0.0
                 , text
                 , hexpat
                 , bytestring
                 , directory
                 , time
                 , random


  hs-source-dirs: examples

  other-modules: Demo.DrawGPX
                 Demo.WriteEnsemble
                 Demo.MinDisk
                 Demo.Delaunay
                 Demo.ExpectedPairwiseDistance

                 Demo.GPXParser

  default-language: Haskell2010

  default-extensions: TypeFamilies
                    , GADTs
                    , KindSignatures
                    , DataKinds
                    , TypeOperators
                    , ConstraintKinds
                    , PolyKinds
                    , RankNTypes

                    , PatternSynonyms
                    , ViewPatterns

                    , StandaloneDeriving
                    , GeneralizedNewtypeDeriving
                    , DeriveFunctor
                    , DeriveFoldable
                    , DeriveTraversable

                    , DeriveDataTypeable
                    , AutoDeriveTypeable

                    , FlexibleInstances
                    , FlexibleContexts
                    , MultiParamTypeClasses



test-suite doctests
  type:          exitcode-stdio-1.0
  ghc-options:   -threaded
  main-is:       doctests.hs
  build-depends: base, doctest >= 0.8

  default-language:    Haskell2010

test-suite hspec
  type:                 exitcode-stdio-1.0
  default-language:     Haskell2010
  hs-source-dirs:       test
  main-is:              Spec.hs
  ghc-options:   -O2 -fno-warn-unticked-promoted-constructors

  other-modules: Data.RangeSpec
                 Data.EdgeOracleSpec
                 Data.PlanarGraphSpec
                 Data.Geometry.Ipe.ReaderSpec
                 Data.Geometry.PolygonSpec
                 Data.Geometry.PointSpec
                 Data.Geometry.Polygon.Convex.ConvexSpec
                 Data.Geometry.KDTreeSpec
                 Data.Geometry.IntervalSpec
                 Data.Geometry.BoxSpec


                 Algorithms.Geometry.SmallestEnclosingDisk.RISpec
                 Algorithms.Geometry.DelaunayTriangulation.DTSpec
                 Algorithms.Geometry.WellSeparatedPairDecomposition.WSPDSpec
                 Algorithms.Geometry.LineSegmentIntersection.BentleyOttmannSpec

                 QuickCheck.Instances
                 Util


  build-depends:        base
                      , hspec        >= 2.1
                      , QuickCheck   >= 2.5
                      , hgeometry
                      , Frames
                      , lens
                      , data-clist
                      , linear
                      , bytestring
                      , vinyl
                      , semigroups
                      , vector
                      , containers
                      , random

  default-extensions: TypeFamilies
                    , GADTs
                    , KindSignatures
                    , DataKinds
                    , TypeOperators
                    , ConstraintKinds
                    , PolyKinds
                    , RankNTypes

                    , PatternSynonyms
                    , ViewPatterns
                    , LambdaCase
                    , TupleSections


                    , StandaloneDeriving
                    , GeneralizedNewtypeDeriving
                    , DeriveFunctor
                    , DeriveFoldable
                    , DeriveTraversable

                    , AutoDeriveTypeable

                    , FlexibleInstances
                    , FlexibleContexts
                    , MultiParamTypeClasses
                    , OverloadedStrings

test-suite bapc_examples
  type:          exitcode-stdio-1.0
  ghc-options:   -O2 -fno-warn-unticked-promoted-constructors
  main-is:       bapc_examples.hs
  hs-source-dirs: examples
  build-depends: base
               , doctest    >= 0.8
               , array      >= 0.5
               , hgeometry
               , lens
               , data-clist
               , linear
               , semigroups

  other-modules: BAPC2012.Gunslinger
                 BAPC2014.Armybase

  default-language:    Haskell2010

  default-extensions: TypeFamilies
                    , GADTs
                    , DataKinds
                    , TypeOperators
                    , ConstraintKinds
                    , PolyKinds
                    , PatternSynonyms
                    , ViewPatterns

benchmark benchmarks

  hs-source-dirs: benchmark test

  main-is: Benchmarks.hs
  type: exitcode-stdio-1.0

  other-modules:

  build-depends:
                base
              , criterion >= 1.1.4.0 && < 1.2
              , semigroups
              , deepseq
              , deepseq-generics
              , hgeometry
              , Frames
              , lens
              , QuickCheck

  ghc-options: -Wall -O2 -rtsopts -fno-warn-unticked-promoted-constructors

  default-language:    Haskell2010

  default-extensions: TypeFamilies
                    , GADTs
                    , KindSignatures
                    , DataKinds
                    , TypeOperators
                    , ConstraintKinds
                    , PolyKinds
                    , RankNTypes

                    , PatternSynonyms
                    , ViewPatterns
                    , LambdaCase
                    , TupleSections


                    , StandaloneDeriving
                    , GeneralizedNewtypeDeriving
                    , DeriveFunctor
                    , DeriveFoldable
                    , DeriveTraversable

                    , AutoDeriveTypeable

                    , FlexibleInstances
                    , FlexibleContexts
                    , MultiParamTypeClasses
                    , OverloadedStrings