Skip to content

Instantly share code, notes, and snippets.

@spl
Last active December 16, 2015 02:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spl/5363469 to your computer and use it in GitHub Desktop.
Save spl/5363469 to your computer and use it in GitHub Desktop.
This is a simple example of using Shake (version 0.10.2). It demonstrates how to copy an input file to an output file with a file that is an additional dependency for a target even though it is not used in the rule itself.
{-# OPTIONS_GHC -Wall #-}
module Main where
import Development.Shake
main :: IO ()
main = shakeArgs shakeOptions $ do
want ["output-file"]
"output-file" *> \dst -> do
need ["dependency-file"]
copyFile' "input-file" dst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment