packages feed

sai-shape-syb-0.3.2: sai-shape-syb.cabal

name:                sai-shape-syb
version:             0.3.2
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 @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 Seniuk
maintainer:          rasfar@gmail.com
homepage:            http://www.fremissant.net/shape-syb
-- URL with bug-tracker server preferred to email:
bug-reports:         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 <= 0.4.2
                     , ghc >= 7.6.3 && < 7.9
--                   , ghc-paths == 0.1.*
                     , 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.*

                     , syb <= 0.4.2
                     , ghc >= 7.6.3 && < 7.9
--                   , ghc-paths == 0.1.*
                     , 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