packages feed

hackernews-1.2.0.0: hackernews.cabal

name:                hackernews
version:             1.2.0.0
description:         API for news.ycombinator.com
license:             MIT
synopsis:            API for Hacker News
license-file:        LICENSE
author:              David Johnson
maintainer:          djohnson.m@gmail.com
category:            Web
build-type:          Simple
cabal-version:       >=1.10
extra-source-files:
    jsbits/options.js
    README.md
    LICENSE
    ghc-examples/Example.hs
    ghcjs-examples/Example.hs
    ghc-tests/Test.hs
    ghcjs-tests/Test.hs
executable example
  main-is: Example.hs
  default-language: Haskell2010
  if impl (ghcjs)
    build-depends:
        base
      , hackernews == 1.2.*
      , ghcjs-base
    hs-source-dirs: ghcjs-examples
  else
    build-depends:
         base
       , hackernews == 1.2.*
       , http-client-tls
       , http-client
    hs-source-dirs: ghc-examples

executable ghcjs-tests
  main-is: Test.hs
  if impl(ghcjs)
    hs-source-dirs: ghcjs-tests
    build-depends: base
               , hackernews == 1.2.*
               , ghcjs-base
               , hspec
               , hspec-core
               , quickcheck-instances
               , aeson
               , QuickCheck
  else
    buildable: False
  default-language: Haskell2010

library
  exposed-modules:  Web.HackerNews
                  , Web.HackerNews.Types
  hs-source-dirs: src
  build-depends:
      servant >= 0.9 && < 0.12
    , QuickCheck
    , quickcheck-instances
  if impl(ghcjs)
    ghcjs-options:  -Wall
    hs-source-dirs: ghcjs-src
    build-depends:  aeson
                  , attoparsec == 0.13.*
                  , base < 5
                  , ghcjs-base
                  , string-conversions == 0.4.*
                  , text == 1.2.*
  else
    ghc-options:  -Wall
    hs-source-dirs: ghc-src
    build-depends: aeson
                 , base < 5
                 , servant-client >= 0.9 && < 0.12
                 , http-client == 0.5.*
                 , string-conversions == 0.4.*
                 , http-types == 0.9.*
                 , text == 1.2.*
  default-language:    Haskell2010

Test-Suite ghc-tests
  type:                exitcode-stdio-1.0
  if impl(ghcjs)
    buildable: False
  default-language:    Haskell2010
  main-is:             Test.hs
  ghc-options:         -rtsopts -threaded -Wall
  hs-source-dirs:      ghc-tests
  build-depends:       aeson
                     , base
                     , hackernews == 1.2.*
                     , hspec
                     , http-client-tls
                     , http-client
                     , QuickCheck
                     , quickcheck-instances

source-repository head
  type:     git
  location: https://github.com/dmjio/hackernews