packages feed

cabal-gild-0.2.0.1: fixtures/simple-example.format

name:          simple-example
version:       1
synopsis:
  Simple example of cabal-doctest demonstrating a library
  with doctests

description:   A package skeleton, to demostrate the use of cabal-doctest
homepage:      https://github.com/phadej/cabal-doctest
license:       BSD3
license-file:  LICENSE
author:        Oleg Grenrus <oleg.grenrus@iki.fi>
maintainer:    Oleg Grenrus <oleg.grenrus@iki.fi>
copyright:     (c) 2017 Oleg Grenrus
category:      Example
build-type:    Custom
cabal-version: 1.12
tested-with:
  GHC ==7.0.4
   || ==7.2.2
   || ==7.4.2
   || ==7.6.3
   || ==7.8.4
   || ==7.10.3
   || ==8.0.2
   || ==8.2.2
   || ==8.4.4
   || ==8.6.3

custom-setup
  setup-depends:
      base
    , Cabal
    , cabal-doctest  >=1.0.6 && <1.1

library
  exposed-modules:    Example
  default-extensions:
    RankNTypes
    ScopedTypeVariables

  build-depends:      base >=4.3 && <4.13
  hs-source-dirs:     src
  default-language:   Haskell2010

  if impl(ghcjs)
    cpp-options: -DFOOBAR

  if impl(ghc)
    -- cabal-gild: glob-files cbits/**/*.c
    c-sources:
      cbits/source1.c
      cbits/source2.c
      cbits/sub/source3.c

  -- empty interval
  if impl(hugs)
    build-depends: unbuildable <0
    build-depends:
        unbuildable   <0
      , unbuildable2  <0

  -- full interval
  build-depends:      text
  build-depends:
      containers
    , pretty

  -- only upper bound
  build-depends:      foo <1
  build-depends:      foo <2
  build-depends:
      abc  <1
    , def  <1
    , ghj  <2

  -- build-tool-depends are formatted like build-depends
  build-tool-depends: happy:happy
  build-tool-depends:
      alex:alex    >=1
    , happy:happy  >=1

test-suite doctests
  type:             exitcode-stdio-1.0
  main-is:          doctests.hs

  -- cabal-gild: fragment build-depends.fragment
  build-depends:
      base
    , doctest           >=0.15 && <0.17
    , QuickCheck        >=2.12 && <2.13
    , simple-example
    , template-haskell

  ghc-options:      -Wall -threaded
  hs-source-dirs:   tests
  default-language: Haskell2010