Commit 3b0324fd authored by Ben Gamari's avatar Ben Gamari 🐢

Add merge utility

parent c888041d
import Data.Foldable
import Options.Applicative
import qualified MeasurementTree as MTree
import MeasurementTree (Measurements, Label)
args :: Parser (FilePath, [FilePath])
args =
(,)
<$> option str (long "output" <> short 'o' <> help "output file")
<*> some (argument str (metavar "FILE" <> help "results.json files"))
main :: IO ()
main = do
(output, files) <- execParser $ info (helper <*> args) mempty
trees <- mapM (fmap (maybe (error "uh oh") id) . MTree.readFile) files
MTree.writeFile output (fold trees)
......@@ -51,3 +51,10 @@ executable nofib-compare
optparse-applicative,
nofib
default-language: Haskell2010
executable nofib-merge
main-is: Merge.hs
build-depends: base >=4.10 && <4.13,
optparse-applicative,
nofib
default-language: Haskell2010
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment