packages feed

doctest 0.9.11.1 → 0.9.12

raw patch · 4 files changed

+28/−6 lines, 4 filesdep ~ghc

Dependency ranges changed: ghc

Files

LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2009-2014 Simon Hengel <sol@typeful.net>+Copyright (c) 2009-2015 Simon Hengel <sol@typeful.net>  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
doctest.cabal view
@@ -1,5 +1,5 @@ name:             doctest-version:          0.9.11.1+version:          0.9.12 synopsis:         Test interactive Haskell examples description:      The doctest program checks examples in source code comments.                   It is modeled after doctest for Python@@ -12,7 +12,7 @@ homepage:         https://github.com/sol/doctest#readme license:          MIT license-file:     LICENSE-copyright:        (c) 2009-2014 Simon Hengel+copyright:        (c) 2009-2015 Simon Hengel author:           Simon Hengel <sol@typeful.net> maintainer:       Simon Hengel <sol@typeful.net> build-type:       Simple@@ -48,7 +48,7 @@     , Sandbox   build-depends:       base          == 4.*-    , ghc           >= 7.0 && < 7.10+    , ghc           >= 7.0 && < 7.12     , syb           >= 0.3 && < 0.5     , deepseq     , directory@@ -74,7 +74,7 @@   type:       exitcode-stdio-1.0   ghc-options:-      -Wall -Werror -threaded+      -Wall -threaded   cpp-options:       -DTEST   hs-source-dirs:@@ -106,7 +106,7 @@   type:       exitcode-stdio-1.0   ghc-options:-      -Wall -Werror -threaded+      -Wall -threaded   hs-source-dirs:       test   build-depends:
src/Extract.hs view
@@ -7,7 +7,9 @@ import           Control.Exception import           Data.List (partition, isSuffixOf) import           Data.Maybe+#if __GLASGOW_HASKELL__ < 710 import           Data.Foldable (concat)+#endif  import           Control.DeepSeq (deepseq, NFData(rnf)) import           Data.Generics@@ -23,7 +25,9 @@ import           Exception (ExceptionMonad) import           System.Directory import           System.FilePath+#if __GLASGOW_HASKELL__ < 710 import           NameSet (NameSet)+#endif import           Coercion (Coercion) import           FastString (unpackFS) import           Digraph (flattenSCCs)@@ -177,7 +181,11 @@     -- traversing the whole source in a generic way, to ensure that we get     -- everything in source order.     header  = [(Nothing, x) | Just x <- [hsmodHaddockModHeader source]]+#if __GLASGOW_HASKELL__ < 710     exports = [(Nothing, L loc doc) | L loc (IEDoc doc) <- concat (hsmodExports source)]+#else+    exports = [(Nothing, L loc doc) | L loc (IEDoc doc) <- maybe [] unLoc (hsmodExports source)]+#endif     decls   = extractDocStrings (hsmodDecls source)  type Selector a = a -> ([(Maybe String, LHsDocString)], Bool)@@ -195,8 +203,10 @@ extractDocStrings = everythingBut (++) (([], False) `mkQ` fromLHsDecl   `extQ` fromLDocDecl   `extQ` fromLHsDocString+#if __GLASGOW_HASKELL__ < 710   `extQ` (ignore :: Selector NameSet)   `extQ` (ignore :: Selector PostTcKind)+#endif    -- HsExpr never contains any documentation, but it may contain error thunks.   --@@ -211,11 +221,19 @@   `extQ` (ignore :: Selector Coercion)  #if __GLASGOW_HASKELL__ >= 706+#if __GLASGOW_HASKELL__ < 710   -- hswb_kvs and hswb_tvs may be error thunks   `extQ` (ignore :: Selector (HsWithBndrs [LHsType RdrName]))   `extQ` (ignore :: Selector (HsWithBndrs [LHsType Name]))   `extQ` (ignore :: Selector (HsWithBndrs (LHsType RdrName)))   `extQ` (ignore :: Selector (HsWithBndrs (LHsType Name)))+#else+  -- hswb_kvs and hswb_tvs may be error thunks+  `extQ` (ignore :: Selector (HsWithBndrs RdrName [LHsType RdrName]))+  `extQ` (ignore :: Selector (HsWithBndrs Name    [LHsType Name]))+  `extQ` (ignore :: Selector (HsWithBndrs RdrName (LHsType RdrName)))+  `extQ` (ignore :: Selector (HsWithBndrs Name    (LHsType Name)))+#endif #endif   )   where
src/Runner.hs view
@@ -12,7 +12,11 @@ ) where  import           Prelude hiding (putStr, putStrLn, error)++#if __GLASGOW_HASKELL__ < 710 import           Data.Monoid+#endif+ import           Control.Applicative import           Control.Monad hiding (forM_) import           Text.Printf (printf)