packages feed

sai-shape-syb-0.3.4: sai-shape-syb.cabal

name:                sai-shape-syb
version:             0.3.4
synopsis:            Obtain homogeneous values from arbitrary values, transforming or culling data
description:
    This package provides SYB shape support: generic mapping to
    homogeneous types, and related features.  Complements existing
    Uniplate and TH shape libraries.
    .
    Given a value of arbitrary complexity (mutually recursive
    heterogeneous constructor application), you can obtain
    a structure-preserving representation (homomorphism) as
    a homogeneous type @<http://hackage.haskell.org/package/sai-shape-syb-0.3.4/docs/SAI-Data-Generics-Shape-SYB.html#t:Homo Homo> <# a>@, parameterised by any choice type @<# a>@.
    .
    See the project
    <http://www.fremissant.net/shape-syb homepage> for more information.
license:             BSD3
license-file:        LICENSE
author:              Andrew G. Seniuk
maintainer:          Andrew Seniuk <rasfar@gmail.com>
homepage:            http://fremissant.net/shape-syb
bug-reports:         http://fremissant.net/shape-syb/trac
---bug-reports:         Andrew Seniuk <rasfar@gmail.com>
category:            Generics
build-type:          Simple
-- extra-source-files:  
cabal-version:       >=1.10
stability:           experimental

extra-source-files:     tests/*.hs
                      , HTML/*.html
                      , HTML/*.css

-- source-repository head
--   type:                 git
--   location:             https://github.com/rasfar/shape-syb

Flag USE_DATA_TREE
  Description: Use Data.Tree instead of custom Rose type
  Default:     True
--Default:     False

-- Flag OPTIMISE
--   Description: Use -O2 (etc.); otherwise, use -O0
-- --Default:     True
--   Default:     False
-- 
-- Flag PROFILE
--   Description: Enable profiling
-- --Default:     True
--   Default:     False
-- 
-- Flag DYNAMIC
--   Description: Enable dynamically-linked executable
-- --Default:     True
--   Default:     False

Library
  exposed-modules:     SAI.Data.Generics.Shape
                     , SAI.Data.Generics.Shape.SYB
                     , SAI.Data.Generics.Shape.SYB.Filter
                     , SAI.Data.Generics.Shape.SYB.GHC
  -- other-modules:       
  -- other-extensions:    
  build-depends:
                       base == 4.*
                       -- syb bounded above (<=0.4.2) by ghc-syb-utils ATT
                     , syb == 0.*
                     , ghc >= 7.4 && < 7.10
                       -- (tested with ghc-syb-utils-0.2.2, but probably
                       -- advisable to use the latest available version)
                     , ghc-syb-utils == 0.2.*
  if flag(USE_DATA_TREE)
    build-depends: containers == 0.5.*
  hs-source-dirs:      src
  default-language:    Haskell2010
--   if flag(PROFILE)
--     ghc-options: -fprof-auto -auto-all -caf-all
--   if flag(OPTIMISE)
--     ghc-options: -O2
--   else
--     ghc-options: -O0
-- Hackage upload complains:
--if flag(DYNAMIC)
--  ghc-options: -dynamic
  if flag(USE_DATA_TREE)
    cpp-options: -DUSE_DATA_TREE=1
  else
    cpp-options: -DUSE_DATA_TREE=0

  ghc-options: -optP-Wundef -fno-warn-overlapping-patterns -rtsopts
--ghc-options: -optP-Wundef -fno-warn-overlapping-patterns -rtsopts -threaded

  -- needed?
  if impl(ghc < 6.12) 
    ghc-options:          -package-name syb

--ghc-options:            -Wall

test-suite unit-tests
  type:                exitcode-stdio-1.0
  main-is:             Main.hs
--other-modules:       Random
--other-extensions:    TemplateHaskell
--   if flag(PROFILE)
--     ghc-options: -fprof-auto -auto-all -caf-all
--   if flag(OPTIMISE)
--     ghc-options: -O2
--   else
--     ghc-options: -O0
-- Hackage upload complains:
--if flag(DYNAMIC)
--  ghc-options: -dynamic
  if flag(USE_DATA_TREE)
    cpp-options: -DUSE_DATA_TREE=1
  else
    cpp-options: -DUSE_DATA_TREE=0
  ghc-options: -optP-Wundef -fno-warn-overlapping-patterns -rtsopts -threaded
  build-depends:
                       base == 4.*

                     , sai-shape-syb

                       -- syb bounded above (<=0.4.2) by ghc-syb-utils ATT
                     , syb == 0.*
                     , ghc >= 7.4 && < 7.9
                       -- (tested with ghc-syb-utils-0.2.2, but probably
                       -- advisable to use the latest available version)
                     , ghc-syb-utils == 0.2.*
                     -- XXX only for testing (to make a Data.Map)
                     , containers == 0.5.*
                     , HUnit == 1.2.*
  hs-source-dirs:      tests
  default-language:    Haskell2010