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:             1.3.0.0
+version:             1.3.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
@@ -29,10 +29,11 @@
                      , Development.Shake.Man
   build-depends:       base >= 4.10 && < 5
                      , shake
-                     , language-ats >= 0.1.0.5
+                     , language-ats >= 0.1.1.2
                      , mtl
                      , composition-prelude
                      , directory
+                     , text
   default-language:    Haskell2010
   if flag(development)
     ghc-options:       -Werror
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
@@ -19,6 +19,7 @@
 import           Data.Either                (fromRight)
 import           Data.Maybe                 (fromMaybe)
 import           Data.Semigroup             (Semigroup (..))
+import qualified Data.Text.Lazy             as TL
 import           Development.Shake
 import           Development.Shake.FilePath
 import           Language.ATS
@@ -78,7 +79,7 @@
         path <- fromMaybe "" <$> getEnv "PATH"
         let toLibs = fmap ("-l" <>)
         command
-            [EchoStderr False, AddEnv "PATSHOME" home, AddEnv "PATH" (home ++ "/bin:" ++ path)]
+            [EchoStderr False, AddEnv "PATSHOME" home, AddEnv "PATH" (home ++ "/bin:" ++ path), AddEnv "PATSHOMELOCS" "./.atspkg/contrib"]
             (home ++ "/bin/patscc")
             ([sourceFile, "-atsccomp", "gcc -flto -I" ++ h ++ "/ccomp/runtime/ -I" ++ h, gcFlag gc, "-o", out, "-cleanaft", "-O2", "-mtune=native", "-flto"] <> toLibs libs)
 
@@ -117,6 +118,15 @@
         handleSource v v' sourceFile
         atsCommand v v' sourceFile out
 
+fixDir :: FilePath -> String -> String
+fixDir p =
+      TL.unpack
+    . TL.replace (TL.pack "./") (TL.pack $ p ++ "/")
+    . TL.replace (TL.pack "../") (TL.pack $ joinPath (init $ splitPath p) ++ "/")
+    . TL.replace (TL.pack "$PATSHOMELOCS") (TL.pack ".atspkg/contrib")
+    . TL.replace (TL.pack "\\\n") mempty
+    . TL.pack
+
 trim :: String -> String
 trim = init . drop 1
 
@@ -125,7 +135,8 @@
 transitiveDeps ps = fmap join $ forM ps $ \p -> do
     contents <- liftIO $ readFile p
     let ats = fromRight mempty . parseATS . lexATS $ contents
-    deps <- filterM doesFileExist $ trim <$> getDependencies ats
+    let dir = takeDirectory p
+    deps <- filterM doesFileExist $ fixDir dir . trim <$> getDependencies ats
     deps' <- transitiveDeps deps
     pure $ (p:deps) ++ deps'
 
