Ticket #7419: 0001-Accept-multiple-.mix-file-search-paths-for-hpc-marku.patch

File 0001-Accept-multiple-.mix-file-search-paths-for-hpc-marku.patch, 2.9 KB (added by ttuegel, 2 years ago)

Patch implementing feature

  • utils/hpc/HpcFlags.hs

    From 090d36cee8704f635fcbf9387cb4032d7687289f Mon Sep 17 00:00:00 2001
    From: Thomas Tuegel <[email protected]>
    Date: Thu, 15 Nov 2012 16:03:00 -0600
    Subject: [PATCH] Accept multiple .mix file search paths for "hpc markup"
     (ticket #7419).
    
    ---
     utils/hpc/HpcFlags.hs   |    9 +++++----
     utils/hpc/Main.hs       |    2 +-
     utils/hpc/hpc-bin.cabal |    2 +-
     3 files changed, 7 insertions(+), 6 deletions(-)
    
    diff --git a/utils/hpc/HpcFlags.hs b/utils/hpc/HpcFlags.hs
    index f5d699a..adec55c 100644
    a b data Flags = Flags 
    1313  { outputFile          :: String 
    1414  , includeMods         :: Set.Set String 
    1515  , excludeMods         :: Set.Set String 
    16   , hpcDir              :: String 
     16  , hpcDirs     :: [String] 
    1717  , srcDirs             :: [String] 
    1818  , destDir             :: String 
    1919 
    default_flags = Flags 
    3434  { outputFile          = "-" 
    3535  , includeMods         = Set.empty 
    3636  , excludeMods         = Set.empty 
    37   , hpcDir              = ".hpc" 
     37  , hpcDirs             = [".hpc"] 
    3838  , srcDirs             = [] 
    3939  , destDir             = "." 
    4040 
    includeOpt = anArg "include" "include MODULE and/or PACKAGE" "[PACKAGE:] 
    8383                $ \ a f -> f { includeMods = a `Set.insert` includeMods f } 
    8484 
    8585hpcDirOpt        = anArg "hpcdir"     "sub-directory that contains .mix files" "DIR" 
    86                    (\ a f -> f { hpcDir = a }) 
     86                   (\ a f -> f { hpcDirs = hpcDirs f ++ [a] }) 
    8787                .  infoArg "default .hpc [rarely used]" 
    8888 
    8989srcDirOpt       = anArg "srcdir"     "path to source directory of .hs files" "DIR" 
    unionModuleOpt = noArg "union" 
    130130------------------------------------------------------------------------------- 
    131131 
    132132readMixWithFlags :: Flags -> Either String TixModule -> IO Mix 
    133 readMixWithFlags flags modu = readMix [ dir ++  "/" ++ hpcDir flags 
     133readMixWithFlags flags modu = readMix [ dir ++  "/" ++ hpcDir 
    134134                                      | dir <- srcDirs flags  
     135                                      , hpcDir <- hpcDirs flags 
    135136                                      ] modu 
    136137 
    137138------------------------------------------------------------------------------- 
  • utils/hpc/Main.hs

    diff --git a/utils/hpc/Main.hs b/utils/hpc/Main.hs
    index 419a519..41aea1e 100644
    a b version_plugin = Plugin { name = "version" 
    132132                   } 
    133133 
    134134version_main :: Flags -> [String] -> IO () 
    135 version_main _ _ = putStrLn $ "hpc tools, version 0.6" 
     135version_main _ _ = putStrLn $ "hpc tools, version 0.7" 
    136136 
    137137 
    138138------------------------------------------------------------------------------ 
  • utils/hpc/hpc-bin.cabal

    diff --git a/utils/hpc/hpc-bin.cabal b/utils/hpc/hpc-bin.cabal
    index 30b9621..34e27f9 100644
    a b  
    11Name: hpc-bin 
    22-- XXX version number: 
    3 Version: 0.67 
     3Version: 0.70 
    44Copyright: XXX 
    55License: BSD3 
    66-- XXX License-File: LICENSE