Commits

Doug Burke  committed 6bf3e7e

runw3ctests: display library version when running

  • Participants
  • Parent commits 2b9941d

Comments (0)

Files changed (3)

   Updated the upper bound on the semigroup dependency (thanks to Leif
   Warner).
 
+  Display library version when running the runw3ctests executable.
+
 0.9.0.7
 
   Minor documentation fix for Swish.RDF.Graph.quote.

File app/RunW3CTests.hs

 import Control.Monad (forM_)
 
 import Data.Maybe (catMaybes)
+import Data.Version (showVersion)
 
 import Network.URI (URI, parseURI, parseURIReference, relativeTo, uriPath, uriScheme)
 
 import System.FilePath (splitFileName)
 import System.IO (hFlush, hPutStr, hPutStrLn, stderr, stdout)
 
+import Paths_swish (version)
+
 -- | The base URI for the tests.
 base :: Maybe URI
 base = parseURI "http://www.w3.org/2013/TurtleTests/"
       
 main :: IO ()
 main = do
+  -- As there's no command-line options, always display the version
+  putStrLn $ "Swish library: " ++ showVersion version
   args <- getArgs
   case args of
     [fname] -> readManifest fname >>= runTests
   * Updated the upper bound on the semigroup dependency (thanks to 
   Leif Warner).
   .
+  * Display library version when running the @runw3ctests@ executable.
+  .
   Changes in version @0.9.0.7@:
   .
   * Minor documentation fix for @Swish.RDF.Graph.quote@.
 Executable         runw3ctests
    Main-Is:        RunW3CTests.hs
    Hs-Source-Dirs: app/ 
-   -- Other-Modules:  Paths_swish
+   Other-Modules:  Paths_swish
 
    ghc-options:
       -Wall -fno-warn-orphans