Skip to content

Commit

Permalink
Merge pull request #4 from haskell-works/enable-doctest
Browse files Browse the repository at this point in the history
Enable doctest
  • Loading branch information
newhoggy authored Dec 10, 2019
2 parents a616129 + 764859f commit f0a5c7f
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 27 deletions.
12 changes: 12 additions & 0 deletions doctest/DoctestDriver.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{-# LANGUAGE CPP #-}

#if MIN_VERSION_GLASGOW_HASKELL(8,4,4,0)
{-# OPTIONS_GHC -F -pgmF doctest-discover #-}
#else
module Main where

import qualified System.IO as IO

main :: IO ()
main = IO.putStrLn "WARNING: doctest will not run on GHC versions earlier than 8.4.4"
#endif
72 changes: 45 additions & 27 deletions hw-diagnostics.cabal
Original file line number Diff line number Diff line change
@@ -1,33 +1,51 @@
name: hw-diagnostics
version: 0.0.0.7
synopsis: Diagnostics library
description: Please see README.md
category: Profiling
homepage: http://github.com/haskell-works/hw-diagnostics#readme
bug-reports: https://github.com/haskell-works/hw-diagnostics/issues
author: John Ky
maintainer: newhoggy@gmail.com
copyright: 2016 John Ky
license: BSD3
license-file: LICENSE
build-type: Simple
cabal-version: >= 1.10
extra-source-files:
README.md
cabal-version: 2.4

name: hw-diagnostics
version: 0.0.0.7
synopsis: Diagnostics library
description: Please see README.md
category: Profiling
homepage: http://github.com/haskell-works/hw-diagnostics#readme
bug-reports: https://github.com/haskell-works/hw-diagnostics/issues
author: John Ky
maintainer: newhoggy@gmail.com
copyright: 2016-2019 John Ky
license: BSD-3-Clause
license-file: LICENSE
build-type: Simple
extra-source-files: README.md

source-repository head
type: git
location: https://github.com/haskell-works/hw-diagnostics

common base { build-depends: base >= 4 && < 5 }

common doctest { build-depends: doctest >= 0.16.2 && < 0.17 }
common doctest-discover { build-depends: doctest-discover >= 0.2 && < 0.3 }

common hw-diagnostics
build-depends: hw-diagnostics

common config
ghc-options: -Wall
default-language: Haskell2010

library
exposed-modules:
HaskellWorks.Diagnostics
HaskellWorks.Diagnostics.Time
other-modules:
Paths_hw_diagnostics
hs-source-dirs:
src
ghc-options: -Wall
build-depends:
base >=4 && <5
default-language: Haskell2010
import: base, config
exposed-modules: HaskellWorks.Diagnostics
HaskellWorks.Diagnostics.Time
other-modules: Paths_hw_diagnostics
autogen-modules: Paths_hw_diagnostics
hs-source-dirs: src

test-suite doctest
import: base, config
, doctest
, doctest-discover
, hw-diagnostics
type: exitcode-stdio-1.0
ghc-options: -threaded
main-is: DoctestDriver.hs
HS-Source-Dirs: doctest
build-tool-depends: doctest-discover:doctest-discover

0 comments on commit f0a5c7f

Please sign in to comment.