packages feed

silently-1.2.4: silently.cabal

name: silently
version: 1.2.4
cabal-version: >= 1.8
build-type: Simple
license: BSD3
license-file: LICENSE
copyright: (c) Trystan Spangler 2011
maintainer: trystan.s@comcast.net
stability:
homepage: https://github.com/trystan/silently
package-url: https://github.com/trystan/silently
bug-reports: https://github.com/trystan/silently/issues
synopsis: Prevent or capture writing to stdout and other handles.
description: Prevent or capture writing to stdout and other handles.
category:
author: Trystan Spangler
tested-with: GHC ==7.0

source-repository head
  type: git
  location: https://github.com/trystan/silently

Library
  build-depends:
      base >=4 && <=5
    , directory
    , deepseq
  exposed-modules: System.IO.Silently

  hs-source-dirs:
      src

  if os(windows)
    cpp-options: -DWINDOWS
  if os(linux) || os(osx) || os(freebsd) || os(openbsd) || os(netbsd)
    cpp-options: -DUNIX

-- This tests the platform specific implementation.
--
-- NOTE: Cabal 1.10 can not deal with conditional (== if-else) options.  This
-- is why we depend on silently to test the platform specific implementation.
--
-- As a consequence we can not use Hspec for testing, as this would result in
-- depending on two different versions of silently at the same time!
test-suite spec-specific
  main-is:
      Spec.hs
  type:
      exitcode-stdio-1.0
  ghc-options:
      -Wall -threaded
  hs-source-dirs:
      test
  build-depends:
      base
    , silently
    , directory
    , nanospec

-- This tests the generic implementation, that should work on all platforms.
test-suite spec-generic
  main-is:
      Spec.hs
  type:
      exitcode-stdio-1.0
  ghc-options:
      -Wall -threaded
  hs-source-dirs:
      src
    , test

  build-depends:
      base
    , deepseq
    , directory
    , nanospec