diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,15 @@
+Copyright (c) 2016, Dino Morelli <dino@ui3.info>
+
+Permission to use, copy, modify, and/or distribute this software
+for any purpose with or without fee is hereby granted, provided
+that the above copyright notice and this permission notice appear
+in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
+OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
--- /dev/null
+++ b/README.md
@@ -0,0 +1,91 @@
+# hsinstall
+
+
+## Synopsis
+
+Install Haskell software
+
+
+## Description
+
+This is a utility to install Haskell programs on a system using
+stack. Even though stack has an `install` command, I found it to be
+not enough for my needs. This software tries to install the binaries,
+the LICENSE file and also the resources directory if it finds one.
+
+Installations can be performed in one of two directory
+structures. FHS, or the Filesystem Hierarchy Standard (most UNIX-like
+systems) and what I call "bundle" which is a portable directory
+for the app and all of its files. They look like this:
+
+bundle is sort-of a self-contained structure like this:
+
+     $PREFIX/
+       $PROJECT-$VERSION/
+         bin/...
+         doc/LICENSE
+         resources/...
+
+fhs is the more traditional UNIX structure like this:
+
+     $PREFIX/
+       bin/...
+       share/
+         $PROJECT-$VERSION/
+           doc/LICENSE
+           resources/...
+
+There are two parts to hsinstall that are intended to work 
+together. The first part is a Haskell shell script,
+`util/install.hs`. Take a copy of this script and check it into
+a project you're working on. This will be your installation
+script. Running the script with the `--help` switch will explain
+the options. Near the top of the script are default values for
+these options that should be tuned to what your project needs.
+
+The other part of hsinstall is a library. The install script will try
+to install a `resources` directory if it finds one. the HSInstall
+library code is then used in your code to locate the resources
+at runtime.
+
+Note that you only need this library if your software has data files
+it needs to locate at runtime in the installation directories. Many
+programs don't have this requirement and can ignore the library
+altogether.
+
+The application in this project, in the `app` dir, is a demo of
+using the library to locate resources. It has no use other than as
+a live example.
+
+The `install.hs` script is deliberately not being compiled so that
+it's flexible and hackable by developers to serve whatever additional
+installation needs they may have for a given project. It's also
+deliberately self-contained, relying on nothing other than core
+libraries that ship with the GHC.
+
+
+## Development
+
+For developers who need to build against a local copy of hsinstall
+I found this technique useful. Clone a copy of the source code and
+install it locally:
+
+      $ darcs clone http://hub.darcs.net/dino/hsinstall
+      $ cd hsinstall
+      $ stack install
+
+In another project (nearby on your system, say), modify `stack.yaml`:
+
+      extra-package-dbs:
+      - ../hsinstall/.stack-work/install/x86_64-linux/lts-7.0/8.0.1/pkgdb
+
+And then you should be able to build against this copy of
+hsinstall. Of course, these are just examples, the version numbers
+above will almost certainly be different.
+
+
+## Contact
+
+### Authors
+
+Dino Morelli <dino@ui3.info>
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/app/Main.hs b/app/Main.hs
new file mode 100644
--- /dev/null
+++ b/app/Main.hs
@@ -0,0 +1,16 @@
+module Main where
+
+import HSInstall ( getRsrcDir )
+import System.FilePath ( (</>) )
+
+import Paths_hsinstall ( getDataDir )
+
+
+main :: IO ()
+main = do
+   putStrLn "Running..."
+
+   fooPath <- (</> "foo") <$> getRsrcDir getDataDir
+   putStrLn $ "foo resource file path: " ++ fooPath
+
+   readFile fooPath >>= putStr
diff --git a/hsinstall.cabal b/hsinstall.cabal
new file mode 100644
--- /dev/null
+++ b/hsinstall.cabal
@@ -0,0 +1,41 @@
+name:                hsinstall
+version:             1.0
+synopsis:            Install Haskell software
+description:         This is a utility to install Haskell programs on a system using stack. Even though stack has an `install` command, I found it to be not enough for my needs. This software tries to install the binaries, the LICENSE file and also the resources directory if it finds one. There is also an optional library component to assist with locating installed data files at runtime.
+homepage:            
+license:             ISC
+license-file:        LICENSE
+author:              Dino Morelli
+maintainer:          Dino Morelli <dino@ui3.info>
+copyright:           2016 Dino Morelli
+stability:           experimental
+category:            Utility
+build-type:          Simple
+cabal-version:       >=1.10
+data-files:          resources/foo
+extra-source-files:  README.md
+                     resources/foo
+                     util/install.hs
+
+executable an-app
+   hs-source-dirs:     app
+   main-is:            Main.hs
+   ghc-options:        -Wall
+   build-depends:      base >= 4.9 && < 5.0
+                     , directory
+                     , filepath
+                     , hsinstall
+   default-language:   Haskell2010
+
+library
+   hs-source-dirs:     src
+   exposed-modules:    HSInstall
+   ghc-options:        -Wall
+   build-depends:      base >= 4.9 && < 5.0
+                     , directory
+                     , filepath
+   default-language:    Haskell2010
+
+source-repository head
+  type:     darcs
+  location: http://hub.darcs.net/dino/hsinstall
diff --git a/resources/foo b/resources/foo
new file mode 100644
--- /dev/null
+++ b/resources/foo
@@ -0,0 +1,1 @@
+This is the contents of the file `foo`
diff --git a/src/HSInstall.hs b/src/HSInstall.hs
new file mode 100644
--- /dev/null
+++ b/src/HSInstall.hs
@@ -0,0 +1,70 @@
+{- |
+   Support library for users of the installation script in
+   hsinstall. When your project has data files in a @resources@
+   directory, this library can be used to locate those files
+   at runtime.
+-}
+module HSInstall
+   ( getRsrcDir )
+   where
+
+import Control.Monad ( liftM2, mplus )
+import System.Directory ( doesDirectoryExist )
+import System.Environment ( getExecutablePath )
+import System.FilePath ( (</>), takeDirectory, takeFileName )
+
+
+{- |
+   Get the path to the resources, relative to where the binary was
+   installed and executed from. The argument passed here is expected
+   to be the @getDataDir@ generated by Cabal at compile time in the
+   @Paths_YOUR_PROJECT@ module.
+
+   Usage:
+
+   @
+      import HSInstall ( getRsrcDir )
+      import Paths_YOUR_PROJECT ( getDataDir )
+
+      resourcesDir <- getRsrcDir getDataDir
+   @
+-}
+getRsrcDir :: IO FilePath -> IO FilePath
+getRsrcDir cabalDataDir =
+   maybe (fail "Unable to find resources directory")
+      return =<< searchResult
+
+   where
+      searchResult :: IO (Maybe FilePath)
+      searchResult = foldl (liftM2 mplus) (return Nothing) $ map (>>= mbExists)
+         [ mkRsrcPathFHS cabalDataDir
+         , mkRsrcPathFHSNoVer cabalDataDir
+         , mkRsrcPathBundle
+         ]
+
+      mbExists :: FilePath -> IO (Maybe FilePath)
+      mbExists p = do
+         exists <- doesDirectoryExist p
+         return $ if exists then Just p else Nothing
+
+
+mkRsrcPathFHS :: IO FilePath -> IO FilePath
+mkRsrcPathFHS cabalDataDir = do
+   appDir <- takeFileName <$> cabalDataDir
+   ( </> "share" </> appDir </> "resources" ) . takeDirectory . takeDirectory
+      <$> getExecutablePath
+
+
+mkRsrcPathFHSNoVer :: IO FilePath -> IO FilePath
+mkRsrcPathFHSNoVer cabalDataDir = do
+   appDir <- takeFileName <$> cabalDataDir
+   ( </> "share" </> (removeVersion appDir) </> "resources" ) . takeDirectory . takeDirectory
+      <$> getExecutablePath
+
+   where
+      removeVersion = init . reverse . dropWhile (/= '-') . reverse
+
+
+mkRsrcPathBundle :: IO FilePath
+mkRsrcPathBundle =
+   ( </> "resources" ) . takeDirectory . takeDirectory <$> getExecutablePath
diff --git a/stack.yaml b/stack.yaml
new file mode 100644
--- /dev/null
+++ b/stack.yaml
@@ -0,0 +1,66 @@
+# This file was automatically generated by 'stack init'
+# 
+# Some commonly used options have been documented as comments in this file.
+# For advanced use and comprehensive documentation of the format, please see:
+# http://docs.haskellstack.org/en/stable/yaml_configuration/
+
+# Resolver to choose a 'specific' stackage snapshot or a compiler version.
+# A snapshot resolver dictates the compiler version and the set of packages
+# to be used for project dependencies. For example:
+# 
+# resolver: lts-3.5
+# resolver: nightly-2015-09-21
+# resolver: ghc-7.10.2
+# resolver: ghcjs-0.1.0_ghc-7.10.2
+# resolver:
+#  name: custom-snapshot
+#  location: "./custom-snapshot.yaml"
+resolver: lts-7.0
+
+# User packages to be built.
+# Various formats can be used as shown in the example below.
+# 
+# packages:
+# - some-directory
+# - https://example.com/foo/bar/baz-0.0.2.tar.gz
+# - location:
+#    git: https://github.com/commercialhaskell/stack.git
+#    commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
+# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a
+#   extra-dep: true
+#  subdirs:
+#  - auto-update
+#  - wai
+# 
+# A package marked 'extra-dep: true' will only be built if demanded by a
+# non-dependency (i.e. a user package), and its test suites and benchmarks
+# will not be run. This is useful for tweaking upstream packages.
+packages:
+- '.'
+# Dependency packages to be pulled from upstream that are not in the resolver
+# (e.g., acme-missiles-0.3)
+extra-deps: []
+
+# Override default flag values for local packages and extra-deps
+flags: {}
+
+# Extra package databases containing global packages
+extra-package-dbs: []
+
+# Control whether we use the GHC we find on the path
+# system-ghc: true
+# 
+# Require a specific version of stack, using version ranges
+# require-stack-version: -any # Default
+# require-stack-version: ">=1.1"
+# 
+# Override the architecture used by stack, especially useful on Windows
+# arch: i386
+# arch: x86_64
+# 
+# Extra directories used by stack for building
+# extra-include-dirs: [/path/to/dir]
+# extra-lib-dirs: [/path/to/dir]
+# 
+# Allow a newer minor version of GHC than the snapshot specifies
+# compiler-check: newer-minor
diff --git a/util/install.hs b/util/install.hs
new file mode 100644
--- /dev/null
+++ b/util/install.hs
@@ -0,0 +1,296 @@
+#! /usr/bin/env stack
+{- stack runghc -}
+
+{-# LANGUAGE ScopedTypeVariables #-}
+
+import Control.Exception
+import Control.Monad
+import Data.List
+import Data.Version
+import Distribution.Package
+import Distribution.PackageDescription hiding ( error, options )
+import Distribution.PackageDescription.Parse
+import Distribution.Verbosity
+import Distribution.Version
+import System.Console.GetOpt
+import System.Directory
+import System.Environment
+import System.Exit
+import System.FilePath
+import System.Process
+import Text.Printf
+import Text.Read
+
+
+defaultOptions :: Options
+defaultOptions = Options
+   { optClean = False
+   , optDelete = False
+   , optHelp = False
+   , optPrefix = "/opt"
+   , optRsrcCpVerbose = True
+   , optInstType = FHS
+   , optVersion = True
+   }
+
+data InstallType = Bundle | FHS
+
+
+main :: IO ()
+main = do
+   -- Parse args
+   (opts, _) <- parseOpts =<< getArgs
+
+   -- User asked for help
+   when (optHelp opts) $ putStrLn usageText >> exitSuccess
+
+   -- Locate cabal file
+   cabalFiles <- (filter $ isSuffixOf ".cabal") <$> getDirectoryContents "."
+
+   when (null cabalFiles) $ do
+      die "Can't continue because no cabal files were found in ."
+
+   -- Parse the cabal file and extract things we need from it
+   -- then pass a pile of what we know to a function to create the
+   -- installation dirs
+   dirs <- constructDirs opts . package . packageDescription
+      <$> readPackageDescription normal (head cabalFiles)
+
+
+   -- Perform the installation
+
+   -- Remove existing install directory
+   appDirExists <- doesDirectoryExist $ appDir dirs
+   when (optDelete opts && appDirExists) $ do
+      putStrLn $ "Removing existing directory " ++ (appDir dirs)
+      removeDirectoryRecursive $ appDir dirs
+
+   -- Clean before building
+   when (optClean opts) $ system "stack clean" >> return ()
+
+   -- Copy the binaries
+   installExitCode <- system $ "stack install --local-bin-path=" ++ (binDir dirs)
+   unless (ok installExitCode) $ die "Can't continue because stack install failed"
+
+   -- Copy the license
+   putStrLn "\nCopying LICENSE"
+   createDirectoryIfMissing True $ docDir dirs
+   copyFile "LICENSE" (docDir dirs </> "LICENSE")
+
+   -- Copy the resources
+   let rsrcDirSrc = "." </> "resources"
+   rsrcsExist <- doesDirectoryExist rsrcDirSrc
+   when rsrcsExist $ do
+      putStrLn $ "\nCopying resources"
+      copyTree (optRsrcCpVerbose opts) rsrcDirSrc (rsrcDir dirs)
+      return ()
+
+   exitSuccess
+
+
+data Dirs = Dirs
+   { appDir :: FilePath
+   , binDir :: FilePath
+   , docDir :: FilePath
+   , rsrcDir :: FilePath
+   }
+
+
+constructDirs :: Options -> PackageId -> Dirs
+constructDirs opts pkgId =
+   Dirs appDir binDir' (appDir </> "doc") (appDir </> "resources")
+
+   where
+      project = unPackageName . pkgName $ pkgId
+      version = showVersion . pkgVersion $ pkgId
+      versionPart = if optVersion opts then "-" ++ version else ""
+      appDir = case (optInstType opts) of
+         Bundle -> optPrefix opts </> (project ++ versionPart)
+         FHS    -> optPrefix opts </> "share" </> (project ++ versionPart)
+      binDir' = case (optInstType opts) of
+         Bundle -> appDir </> "bin"
+         FHS    -> optPrefix opts </> "bin"
+
+
+{- Turn an exit code (say, from system) into a Bool
+-}
+ok :: ExitCode -> Bool
+ok ExitSuccess = True
+ok _           = False
+
+
+{-
+   Argument parsing code
+-}
+
+data Options = Options
+   { optClean :: Bool
+   , optDelete :: Bool
+   , optHelp :: Bool
+   , optPrefix :: FilePath
+   , optRsrcCpVerbose :: Bool
+   , optInstType :: InstallType
+   , optVersion :: Bool
+   }
+
+
+instance Read InstallType where
+   readsPrec _ "bundle" = [(Bundle, "")]
+   readsPrec _ "fhs"    = [(FHS, "")]
+   readsPrec _ _        = []
+
+instance Show InstallType where
+   show Bundle = "bundle"
+   show FHS = "fhs"
+
+
+readInstallType :: String -> InstallType
+readInstallType s =
+   case (readEither s) of
+      Left _ -> error $ printf "Can't continue because %s is not a valid install type\n\n%s" s usageText
+      Right t -> t
+
+
+options :: [OptDescr (Options -> Options)]
+options =
+   [ Option ['c'] ["clean"]
+      (NoArg (\opts -> opts { optClean = True } ))
+      ("Do 'stack clean' first." ++ (defaultText . optClean $ defaultOptions))
+   , Option ['C'] ["no-clean"]
+      (NoArg (\opts -> opts { optClean = False } ))
+      ("Do not 'stack clean' first."
+         ++ (defaultText . not . optClean $ defaultOptions))
+   , Option ['d'] ["delete"]
+      (NoArg (\opts -> opts { optDelete = True } ))
+      ("Delete the app directory before copying files."
+         ++ (defaultText . optDelete $ defaultOptions))
+   , Option ['D'] ["no-delete"]
+      (NoArg (\opts -> opts { optDelete = False } ))
+      ("Do not delete the app directory before copying files."
+         ++ (defaultText . not . optDelete $ defaultOptions))
+   , Option ['h'] ["help"]
+      (NoArg (\opts -> opts { optHelp = True } ))
+      "This help information."
+   , Option ['p'] ["prefix"]
+      (ReqArg (\s opts -> opts { optPrefix = s } ) "PREFIX" )
+      (printf "Install prefix directory. Defaults to %s so what you'll end up with is %s/PROJECT-VERSION"
+         (optPrefix defaultOptions) (optPrefix defaultOptions))
+   , Option ['r'] ["resource-copy-verbose"]
+      (NoArg (\opts -> opts { optRsrcCpVerbose = True } ))
+      ("Be chatty when copying the resources directory."
+         ++ (defaultText . optRsrcCpVerbose $ defaultOptions))
+   , Option ['R'] ["no-resource-copy-verbose"]
+      (NoArg (\opts -> opts { optRsrcCpVerbose = False } ))
+      ("Don't be chatty when copying the resources directory. Useful when there are a LOT of resources."
+         ++ (defaultText . not . optRsrcCpVerbose $ defaultOptions))
+   , Option ['t'] ["type"]
+      (ReqArg (\s opts -> opts { optInstType = readInstallType s } ) "INST_TYPE" )
+      (printf "Installation type, see INSTALLATION TYPE below for details. Default: %s"
+         (show . optInstType $ defaultOptions))
+   , Option ['v'] ["version"]
+      (NoArg (\opts -> opts { optVersion = True } ))
+      (printf "Include version in installation path, meaning: %s/PROJECT-VERSION %s"
+         (optPrefix defaultOptions) (defaultText . optVersion $ defaultOptions))
+   , Option ['V'] ["no-version"]
+      (NoArg (\opts -> opts { optVersion = False } ))
+      (printf "Do not include version in installation path, meaning: %s/PROJECT %s"
+         (optPrefix defaultOptions) (defaultText . not . optVersion $ defaultOptions))
+   ]
+
+
+defaultText :: Bool -> String
+defaultText True  = " Default"
+defaultText False = ""
+
+
+parseOpts :: [String] -> IO (Options, [String])
+parseOpts args =
+   case getOpt Permute options args of
+      (o,n,[]  ) -> return (foldl (flip id) defaultOptions o, n)
+      (_,_,errs) -> ioError $ userError (concat errs ++ usageText)
+
+
+usageText :: String
+usageText = (usageInfo header options) ++ "\n" ++ footer
+   where
+      header = init $ unlines
+         [ "Usage: install.hs [OPTIONS]"
+         , ""
+         , "options:"
+         ]
+      footer = init $ unlines
+         [ "INSTALLATION TYPE"
+         , ""
+         , "This is the topology used when copying files, one of: bundle, fhs"
+         , ""
+         , "bundle is sort-of a self-contained structure like this:"
+         , ""
+         , "  $PREFIX/"
+         , "    $PROJECT-$VERSION/    <-- this is the \"app directory\""
+         , "      bin/..."
+         , "      doc/LICENSE"
+         , "      resources/..."
+         , ""
+         , "fhs is the more traditional UNIX structure like this:"
+         , ""
+         , "  $PREFIX/"
+         , "    bin/..."
+         , "    share/"
+         , "      $PROJECT-$VERSION/  <-- this is the \"app directory\""
+         , "        doc/LICENSE"
+         , "        resources/..."
+         , ""
+         , "Be aware that when the --delete switch is used along with fhs type, the binaries WILL NOT be deleted, only the \"app directory\"."
+         , ""
+         , "COMPILING"
+         , ""
+         , "install.hs was intentionally left as a script, but if you would prefer to compile it, do this:"
+         , ""
+         , "  $ stack ghc -- -o util/install util/install.hs"
+         , ""
+         , ""
+         , "This script is part of the hsinstall package by Dino Morelli <dino@ui3.info>"
+         ]
+
+
+{-
+   Recursive file copying code
+
+   It was desireable to have a standalone recursive file copy in
+   this script for maximum cross-platform compatibility and to
+   avoid Haskell library dependencies.
+
+   Many thanks to [abuzittin gillifirca](https://codereview.stackexchange.com/users/20251/abuzittin-gillifirca) for the StackOverflow post [Copying files in Haskell](https://codereview.stackexchange.com/questions/68908/copying-files-in-haskell) where the following code was lifted.
+-}
+
+copyTree :: Bool -> FilePath -> FilePath -> IO ()
+copyTree chatty s t = do
+    createDirectoryIfMissing True t
+    subItems <- getSubitems s
+    mapM_ (copyItem chatty s t) subItems
+
+
+getSubitems :: FilePath -> IO [(Bool, FilePath)]
+getSubitems path = getSubitems' ""
+  where
+    getChildren path =  (\\ [".", ".."]) <$> getDirectoryContents path
+
+    getSubitems' relPath = do
+        let absPath = path </> relPath
+        isDir <- doesDirectoryExist absPath
+        children <- if isDir then getChildren absPath else return []
+        let relChildren = [relPath </> p | p <- children]
+        ((isDir, relPath) :) . concat <$> mapM getSubitems' relChildren
+
+
+copyItem :: Bool -> FilePath -> FilePath -> (Bool, FilePath) -> IO ()
+copyItem chatty baseSourcePath baseTargetPath (isDir, relativePath) = do
+    let sourcePath = baseSourcePath </> relativePath
+    let targetPath = baseTargetPath </> relativePath
+
+    when chatty $
+       putStrLn $ "Copying " ++ sourcePath ++ " to " ++ targetPath
+
+    if isDir
+      then createDirectoryIfMissing False targetPath
+      else copyFile sourcePath targetPath
diff --git a/util/prefs/boring b/util/prefs/boring
new file mode 100644
--- /dev/null
+++ b/util/prefs/boring
@@ -0,0 +1,124 @@
+# This file contains a list of extended regular expressions, one per
+# line. A file path matching any of these expressions will be filtered
+# out during `darcs add', or when the `--look-for-adds' flag is passed
+# to `darcs whatsnew' and `record'. The entries in ~/.darcs/boring (if
+# it exists) supplement those in this file.
+# 
+# Blank lines, and lines beginning with an octothorpe (#) are ignored.
+# See regex(7) for a description of extended regular expressions.
+
+### compiler and interpreter intermediate files
+# haskell (ghc) interfaces
+\.hi$
+\.hi-boot$
+\.o-boot$
+# object files
+\.o$
+\.o\.cmd$
+# profiling haskell
+\.p_hi$
+\.p_o$
+# haskell program coverage resp. profiling info
+\.tix$
+\.prof$
+# fortran module files
+\.mod$
+# linux kernel
+\.ko\.cmd$
+\.mod\.c$
+(^|/)\.tmp_versions($|/)
+# *.ko files aren't boring by default because they might
+# be Korean translations rather than kernel modules
+# \.ko$
+# python, emacs, java byte code
+\.py[co]$
+\.elc$
+\.class$
+# objects and libraries; lo and la are libtool things
+\.(obj|a|exe|so|lo|la)$
+# compiled zsh configuration files
+\.zwc$
+# Common LISP output files for CLISP and CMUCL
+\.(fas|fasl|sparcf|x86f)$
+
+### build and packaging systems
+# cabal intermediates
+\.installed-pkg-config
+\.setup-config
+# standard cabal build dir, might not be boring for everybody
+# ^dist(/|$)
+# autotools
+(^|/)autom4te\.cache($|/)
+(^|/)config\.(log|status)$
+# microsoft web expression, visual studio metadata directories
+\_vti_cnf$
+\_vti_pvt$
+# gentoo tools
+\.revdep-rebuild.*
+# generated dependencies
+^\.depend$
+
+### version control systems
+# cvs
+(^|/)CVS($|/)
+\.cvsignore$
+# cvs, emacs locks
+^\.#
+# rcs
+(^|/)RCS($|/)
+,v$
+# subversion
+(^|/)\.svn($|/)
+# mercurial
+(^|/)\.hg($|/)
+# git
+(^|/)\.git($|/)
+# bzr
+\.bzr$
+# sccs
+(^|/)SCCS($|/)
+# darcs
+(^|/)_darcs($|/)
+(^|/)\.darcsrepo($|/)
+^\.darcs-temp-mail$
+-darcs-backup[[:digit:]]+$
+# gnu arch
+(^|/)(\+|,)
+(^|/)vssver\.scc$
+\.swp$
+(^|/)MT($|/)
+(^|/)\{arch\}($|/)
+(^|/).arch-ids($|/)
+# bitkeeper
+(^|/)BitKeeper($|/)
+(^|/)ChangeSet($|/)
+
+### miscellaneous
+# backup files
+~$
+\.bak$
+\.BAK$
+# patch originals and rejects
+\.orig$
+\.rej$
+# X server
+\..serverauth.*
+# image spam
+\#
+(^|/)Thumbs\.db$
+# vi, emacs tags
+(^|/)(tags|TAGS)$
+#(^|/)\.[^/]
+# core dumps
+(^|/|\.)core$
+# partial broken files (KIO copy operations)
+\.part$
+# waf files, see http://code.google.com/p/waf/
+(^|/)\.waf-[[:digit:].]+-[[:digit:]]+($|/)
+(^|/)\.lock-wscript$
+# mac os finder
+(^|/)\.DS_Store$
+# emacs saved sessions (desktops)
+(^|.*/)\.emacs\.desktop(\.lock)?$
+
+(^|/).stack-work($|/)
