diff --git a/shake-ext.cabal b/shake-ext.cabal
--- a/shake-ext.cabal
+++ b/shake-ext.cabal
@@ -1,5 +1,5 @@
 name:                shake-ext
-version:             0.4.0.0
+version:             0.4.0.1
 synopsis:            Helper functions for linting with shake 
 description:         This package provides several linters out of the box, as well as functionality for building ATS source files with [shake](http://shakebuild.com/).
 homepage:            https://hub.darcs.net/vmchale/shake-ext
diff --git a/src/Development/Shake/ATS.hs b/src/Development/Shake/ATS.hs
--- a/src/Development/Shake/ATS.hs
+++ b/src/Development/Shake/ATS.hs
@@ -3,12 +3,14 @@
 module Development.Shake.ATS ( cgen
                              , cgenPretty
                              , cleanATS
+                             , atsBin
                              , patsHome
                              ) where
 
 import           Control.Monad              (filterM, forM_)
 import           Data.Either                (fromRight)
 import           Data.Maybe                 (fromMaybe)
+import           Data.Semigroup             (Semigroup (..))
 import           Development.Shake
 import           Development.Shake.FilePath
 import           Language.ATS
@@ -22,11 +24,20 @@
 -- TODO install the whole compiler?
 atsCommand :: CmdResult r => String -> String -> Action r
 atsCommand sourceFile out = do
-    home <- patsHome
+    let home = "/usr/local/lib/ats2-postiats-0.3.8"
     let atsArgs = [EchoStderr False, AddEnv "PATSHOME" home]
-        patsc = home ++ "/bin/patsopt"
+        patsc = "patsopt" -- home ++ "/bin/patsopt"
     command atsArgs patsc ["--output", out, "-dd", sourceFile, "-cc"]
 
+atsBin :: [String] -> String -> String -> Rules ()
+atsBin libs sourceFile out =
+    out %> \_ -> do
+        need [sourceFile]
+        let home = "/usr/local/lib/ats2-postiats-0.3.8"
+        cmd_ ["mkdir", "-p", dropDirectory1 out]
+        let toLibs = fmap ("-l" <>)
+        command [EchoStderr False, AddEnv "PATSHOME" home] "patscc" ([sourceFile, "-atsccomp", "gcc -flto -I/usr/local/lib/ats2-postiats-0.3.8/ccomp/runtime/ -I/usr/local/lib/ats2-postiats-0.3.8/", "-DATS_MEMALLOC_LIBC", "-o", out, "-cleanaft", "-O2", "-mtune=native"] <> toLibs libs)
+
 cleanATS :: Rules ()
 cleanATS =
 
@@ -38,13 +49,13 @@
 
 -- | This provides rules for generating C code from ATS source files in the
 -- @ats-src@ directory.
-cgen :: Rules ()
-cgen = do
+cgen :: FilePath -> Rules ()
+cgen dir = do
 
     atsDeps
 
     "//*.c" %> \out -> do
-        let sourceFile = "ats-src/" ++ (dropDirectory1 out -<.> "dats")
+        let sourceFile = dir ++ "/" ++ (dropDirectory1 out -<.> "dats")
         need [sourceFile]
         atsCommand sourceFile out
 
diff --git a/src/Development/Shake/C.hs b/src/Development/Shake/C.hs
--- a/src/Development/Shake/C.hs
+++ b/src/Development/Shake/C.hs
@@ -10,4 +10,5 @@
     need [src]
     home <- patsHome
     let atsArgs = [EchoStderr False, AddEnv "PATSHOME" home]
-    command atsArgs "gcc" ["-flto", "-I" ++ home ++ "/ccomp/runtime", "-I" ++ home, "-o", target, "-O2"]
+    command atsArgs "gcc" [src, "-flto", "-I" ++ home ++ "/ccomp/runtime", "-I" ++ home, "-o", target, "-O2"]
+        -- cmd ["strip", out]
diff --git a/src/Development/Shake/FileDetect.hs b/src/Development/Shake/FileDetect.hs
--- a/src/Development/Shake/FileDetect.hs
+++ b/src/Development/Shake/FileDetect.hs
@@ -8,11 +8,15 @@
     , getHappy
     , getAlex
     , getShell
+    , getDhall
     ) where
 
 import           Control.Composition
 import           Data.Semigroup      ((<>))
 import           Development.Shake
+
+getDhall :: Action [FilePath]
+getDhall = getAll ["dhall"]
 
 getYml :: Action [FilePath]
 getYml = getAll ["yaml", "yml", "yamllint"]
diff --git a/src/Development/Shake/Linters.hs b/src/Development/Shake/Linters.hs
--- a/src/Development/Shake/Linters.hs
+++ b/src/Development/Shake/Linters.hs
@@ -7,6 +7,7 @@
                                  , ghc
                                  , atsfmt
                                  , stylishHaskell
+                                 , checkDhall
                                  , module Development.Shake.FileDetect
                                  ) where
 
@@ -14,6 +15,11 @@
 import           Data.Char                    (isSpace)
 import           Development.Shake
 import           Development.Shake.FileDetect
+
+checkDhall :: FilePath -> Action ()
+checkDhall dh = do
+    contents <- liftIO $ readFile dh
+    command [Stdin contents] "dhall" []
 
 trim :: String -> String
 trim = join fmap f
