packages feed

speculation 1.4.1 → 1.4.1.1

raw patch · 3 files changed

+9/−110 lines, 3 filessetup-changed

Files

+ .travis.yml view
@@ -0,0 +1,1 @@+language: haskell
Setup.lhs view
@@ -1,107 +1,7 @@-#!/usr/bin/env runhaskell-\begin{code}-{-# LANGUAGE CPP #-}--import Control.Monad (when, unless, mplus)--import Data.Maybe (listToMaybe, fromMaybe)-import Distribution.PackageDescription     -    (PackageDescription, buildable, exeName, buildInfo, executables, customFieldsBI, BuildInfo)-import Distribution.Verbosity              (normal)-import Distribution.Simple.Build           (build)-import Distribution.Simple.LocalBuildInfo  (LocalBuildInfo(..))-import Distribution.Simple.PreProcess      (knownSuffixHandlers)-import Distribution.Simple.Program         (programFindLocation, lookupKnownProgram )-import Distribution.Simple.Setup           (defaultBuildFlags)-import Distribution.Simple -    ( Args, defaultMainWithHooks, UserHooks(..), simpleUserHooks) --import System.Exit       (ExitCode(..))-import System.FilePath   ( (</>), splitDirectories, isAbsolute )-import System.IO         (openFile, IOMode (..))-import System.Process -import System.Directory -    ( getCurrentDirectory, createDirectoryIfMissing-    , setCurrentDirectory, findExecutable, canonicalizePath-    , removeFile, doesDirectoryExist-    )--main :: IO ()-main = defaultMainWithHooks hooks--hooks :: UserHooks-hooks = simpleUserHooks { runTests = runMyTests } --findHPC :: LocalBuildInfo -> IO FilePath-findHPC lbi = do-    Just hpcProgram <- return $ lookupKnownProgram "hpc" $ withPrograms lbi-    Just hpc <- programFindLocation hpcProgram normal-    return hpc- `catch` \_ -> do-    Just hpc <- findExecutable "hpc"-    return hpc--testSpeculation :: a -> (BuildInfo -> a) -> PackageDescription -> a-testSpeculation dflt f pd = -    fromMaybe dflt $ listToMaybe -               [ f (buildInfo exe)-               | exe <- executables pd-               , exeName exe == "test-speculation" ]--runMyTests :: Args -> Bool -> PackageDescription -> LocalBuildInfo -> IO ()-runMyTests args0 _unknown pd lbi = do-    let args = if null args0 then [] else "-t" : args0-    -- dir <- getWorkingDirectory-    let testDir = buildDir lbi </> "test-speculation"-    baseDir <- getCurrentDirectory-    canonicalBuildDir <- canonicalizePath (buildDir lbi)-    t <- doesDirectoryExist testDir-    unless t $ do-        unless (testSpeculation False buildable pd) $ do-          fail "Reconfigure with 'cabal configure -ftests' or 'cabal install -ftests' and try again."-        putStrLn "building tests"-        build pd lbi defaultBuildFlags knownSuffixHandlers-        putStrLn "tests built"--    setCurrentDirectory testDir-    let customFields = testSpeculation [] customFieldsBI pd-        profiling = maybe False (const True) $ lookup "x-hpc" customFields--    when profiling $ do -        removeFile "test-speculation.tix" -        putStrLn $ "removed test-speculation.tix" -       `catch` \_ -> return ()--    exitcode <- system $ unwords $ "test-speculation" : args-    unless (exitcode == ExitSuccess) $ -        fail "test failed"--    when profiling $ do-      hpc <- findHPC lbi --      exitcode <- system $ unwords $ hpc -            : "report" -            : "test-speculation" -            : "--srcdir=../../.." -            : []-      unless (exitcode == ExitSuccess) $ -        fail "hpc report failed"--      let markupDir base = base </> "doc" </> "html" </> "test-speculation"-      createDirectoryIfMissing True (markupDir canonicalBuildDir)--      exitcode <- system $ unwords $ hpc -            : "markup" -            : "test-speculation"-            : "--srcdir=../../.." -            : ("--destdir=" ++ markupDir canonicalBuildDir) -            : "--exclude=Main" -            : []-      unless (exitcode == ExitSuccess) $ -        fail "hpc report failed"--      putStrLn $ "Code coverage created: " ++ (markupDir (buildDir lbi) </> "hpc_index.html")--\end{code}+#!/usr/bin/runhaskell+> module Main (main) where +> import Distribution.Simple +> main :: IO ()+> main = defaultMain
speculation.cabal view
@@ -1,11 +1,12 @@ name:           speculation-version:        1.4.1+version:        1.4.1.1 license:        BSD3 license-file:   LICENSE author:         Edward A. Kmett maintainer:     Edward A. Kmett <ekmett@gmail.com> stability:      experimental homepage:       http://github.com/ekmett/speculation+bug-reports:    http://github.com/ekmett/speculation/issues category:       Concurrency copyright:      (c) 2010 Edward A. Kmett build-type:     Custom@@ -64,10 +65,7 @@  .  'specSTM' provides a similar time table for STM actions, but also rolls back side-effects. The one unfortunate operational distinction is that it is forced to compute 'a' in the background thread and therefore degrades slightly less gracefully under load, although we mitigate this effect by only enqueuing if the number of sparks for the current capability is lower than the total number of capabilities, to try to avoid wasting time when all computational resources are in use. -extra-source-files:-  README.markdown-  CHANGELOG.markdown-  ISSUES.markdown+extra-source-files: README.markdown CHANGELOG.markdown ISSUES.markdown .travis.yml  source-repository head   type:     git