diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# ats-pkg
+# ATSPackage
 
 [![Build Status](https://travis-ci.org/vmchale/atspkg.svg?branch=master)](https://travis-ci.org/vmchale/atspkg)
 
diff --git a/ats-pkg.cabal b/ats-pkg.cabal
--- a/ats-pkg.cabal
+++ b/ats-pkg.cabal
@@ -1,7 +1,7 @@
 name:                ats-pkg
-version:             2.2.0.8
+version:             2.2.0.11
 synopsis:            Package manager for ATS
-description:         A collection of scripts to make building ATS projects easy.
+description:         A collection of scripts to simplify building ATS projects.
 homepage:            https://github.com/vmchale/atspkg#readme
 license:             BSD3
 license-file:        LICENSE
@@ -11,6 +11,7 @@
 category:            Development
 build-type:          Custom
 extra-doc-files:     README.md
+                   , docs/manual.tex
 extra-source-files:  stack.yaml
                    , man/atspkg.1
 cabal-version:       1.18
@@ -37,6 +38,7 @@
                      , Language.ATS.Package.Compiler
                      , Language.ATS.Package.Build
                      , Language.ATS.Package.Upgrade
+                     , Language.ATS.Package.Tools
   build-depends:       base >= 4.7 && < 5
                      , http-client
                      , filemanip
@@ -59,6 +61,7 @@
                      , temporary
                      , ansi-wl-pprint
                      , binary
+                     , dependency
                      -- , lzma
                      -- , bzlib
   default-language:    Haskell2010
diff --git a/docs/manual.tex b/docs/manual.tex
new file mode 100644
--- /dev/null
+++ b/docs/manual.tex
@@ -0,0 +1,58 @@
+\documentclass{article}
+
+\usepackage{amsmath}
+\usepackage{appendix}
+\usepackage{hyperref}
+\usepackage{siunitx}
+
+\usepackage[english]{babel}
+
+\begin{document}
+
+\title{ATSPackage user manual}
+\author{Vanessa McHale}
+\maketitle
+
+\tableofcontents
+
+\section{Introduction}
+
+ATSpackage is a collection of build scripts written in Haskell. There are three
+things it accomplishes:
+
+\begin{enumerate}
+  \item Distributed builds. ATSPackage allows users depend on libraries that are
+    hosted elsewhere.
+  \item Simplified builds. As ATSPackage contains scripts to download the
+    compiler, builds are easier for potential contributors.
+  \item Haskell integration. ATSPackage has first-class support for building ATS
+    code that depends on Haskell libraries. 
+\end{enumerate}
+
+With that in mind, it is worthwhile to enumerate some things that it does
+\textit{not} accomplish:
+
+\begin{enumerate}
+  \item Package management. ATSPackage does allow for \textit{reproducible}
+    builds, but it does not resolve dependencies. Future support for package
+    management is planned.
+  \item Full flexibility of C. As ATSPackage is intended to simplify builds, it
+    does not expose everything. This will likely not cause problems, provided
+    that the libraries dependend on are written in C, ATS, or Haskell.
+\end{enumerate}
+
+\section{Builds}
+
+ATSPackage supports three build types: binary, dynamic library, and static
+library.
+
+\subsection{Binary Builds with Haskell Dependencies}
+
+ATSPackage allows binary builds with Haskell dependencies by allowing a package
+to depend on an object file generated by GHC. The object file can be generated
+by cabal, so this is a flexible approach.
+
+ATSPackage can also generate data types for ATS based on Haskell types. You can
+use this to eliminate some of the work involved in writing FFI bindings.
+
+\end{document}
diff --git a/src/Language/ATS/Package.hs b/src/Language/ATS/Package.hs
--- a/src/Language/ATS/Package.hs
+++ b/src/Language/ATS/Package.hs
@@ -4,12 +4,18 @@
                             , setupCompiler
                             , build
                             , buildAll
+                            , check
+                            , mkPkg
+                            , cleanAll
+                            , upgradeAtsPkg
+                            , fetchDeps
+                            , getCCompiler
                             -- * Types
                             , Version (..)
                             , Pkg (..)
                             , Bin (..)
-                            , Constraint (..)
-                            , Dependency (..)
+                            , ATSConstraint (..)
+                            , ATSDependency (..)
                             , TargetPair (..)
                             -- * Lenses
                             , dirLens
@@ -17,4 +23,7 @@
 
 import           Language.ATS.Package.Build
 import           Language.ATS.Package.Compiler
+import           Language.ATS.Package.Dependency
+import           Language.ATS.Package.Tools
 import           Language.ATS.Package.Type
+import           Language.ATS.Package.Upgrade
diff --git a/src/Language/ATS/Package/Build.hs b/src/Language/ATS/Package/Build.hs
--- a/src/Language/ATS/Package/Build.hs
+++ b/src/Language/ATS/Package/Build.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE RecordWildCards   #-}
 {-# LANGUAGE TupleSections     #-}
 
 -- | This module holds various functions for turning a package into a set of rules
@@ -112,7 +113,10 @@
         need tests
         mapM_ cmd_ tests
 
-options :: Bool -> Bool -> [String] -> ShakeOptions
+options :: Bool -- ^ Whether to rebuild config
+        -> Bool -- ^ Whether to rebuild all targets
+        -> [String] -- ^ A list of targets
+        -> ShakeOptions
 options rb rba rs = shakeOptions { shakeFiles = ".atspkg"
                           , shakeThreads = 4
                           , shakeLint = Just LintBasic
@@ -170,8 +174,8 @@
     ]
 
 pkgToTargets :: Pkg -> [FilePath] -> [FilePath]
-pkgToTargets ~(Pkg bs _ _ _ _ _ _ _ _ _ _) [] = TL.unpack . target <$> bs
-pkgToTargets _ ts                             = ts
+pkgToTargets ~Pkg{..} [] = TL.unpack . target <$> bin
+pkgToTargets _ ts        = ts
 
 pkgToAction :: [IO ()] -- ^ Setup actions to be performed
             -> [String] -- ^ Targets
diff --git a/src/Language/ATS/Package/Dependency.hs b/src/Language/ATS/Package/Dependency.hs
--- a/src/Language/ATS/Package/Dependency.hs
+++ b/src/Language/ATS/Package/Dependency.hs
@@ -2,8 +2,6 @@
 
 module Language.ATS.Package.Dependency ( -- * Functions
                                          fetchDeps
-                                       -- * Types
-                                       , Dependency (..)
                                        -- * Constants
                                        , libcAtomicOps
                                        , libcGC
@@ -18,6 +16,7 @@
 import           Data.Maybe                           (fromMaybe)
 import           Data.Semigroup                       (Semigroup (..))
 import qualified Data.Text.Lazy                       as TL
+import           Development.Shake.ATS
 import           Dhall
 import           Language.ATS.Package.Error
 import           Language.ATS.Package.Type
@@ -28,18 +27,18 @@
 import           System.Posix.Files
 import           System.Process
 
-libcAtomicOps :: Version -> Dependency
-libcAtomicOps v = Dependency "atomic-ops" ("atomic-ops-" <> g v) ("https://github.com/ivmai/libatomic_ops/releases/download/v" <> g v <> "/libatomic_ops-" <> g v <> ".tar.gz") v
+libcAtomicOps :: Version -> ATSDependency
+libcAtomicOps v = ATSDependency "atomic-ops" ("atomic-ops-" <> g v) ("https://github.com/ivmai/libatomic_ops/releases/download/v" <> g v <> "/libatomic_ops-" <> g v <> ".tar.gz") v
     where g = TL.pack . show
 
-libcGC :: Version -> Dependency
-libcGC v = Dependency "gc" ("gc-" <> g v) ("https://github.com/ivmai/bdwgc/releases/download/v" <> g v <> "/gc-" <> g v <> ".tar.gz") v
+libcGC :: Version -> ATSDependency
+libcGC v = ATSDependency "gc" ("gc-" <> g v) ("https://github.com/ivmai/bdwgc/releases/download/v" <> g v <> "/gc-" <> g v <> ".tar.gz") v
     where g = TL.pack . show
 
 fetchDeps :: Bool -- ^ Set to 'False' if unsure.
           -> [IO ()] -- ^ Setup steps that can be performed concurrently
-          -> [Dependency] -- ^ ATS dependencies
-          -> [Dependency] -- ^ C Dependencies
+          -> [ATSDependency] -- ^ ATS dependencies
+          -> [ATSDependency] -- ^ C Dependencies
           -> Bool -- ^ Whether to perform setup anyhow.
           -> IO ()
 fetchDeps b setup' deps cdeps b' =
@@ -50,7 +49,7 @@
             unpacked = fmap (over dirLens (TL.pack d <>)) cdeps
             clibs = fmap (buildHelper b) unpacked
         parallel_ (setup' ++ libs' ++ clibs)
-        mapM_ setup unpacked
+        mapM_ (setup (GCC Nothing Nothing)) unpacked
 
 pkgHome :: IO FilePath
 pkgHome = (++ "/.atspkg/") <$> getEnv "HOME"
@@ -65,13 +64,16 @@
     pure $ join (ds : ds')
 
 -- TODO? autoconf
-clibSetup :: String -> FilePath -> IO ()
-clibSetup lib' p = do
+clibSetup :: CCompiler -- ^ C compiler
+          -> String -- ^ Library name
+          -> FilePath -- ^ Filepath to unpack to
+          -> IO ()
+clibSetup cc' lib' p = do
     subdirs <- allSubdirs p
     configurePath <- fromMaybe (p <> "/configure") <$> findFile subdirs "configure"
     setFileMode configurePath ownerModes
     h <- pkgHome
-    let procEnv = Just [("CFLAGS" :: String, "-I" <> h <> "include"), ("PATH", "/usr/bin:/bin")]
+    let procEnv = Just [("CC", ccToString cc'), ("CFLAGS" :: String, "-I" <> h <> "include"), ("PATH", "/usr/bin:/bin")]
     putStrLn $ "configuring " ++ lib' ++ "..."
     void $ readCreateProcess ((proc configurePath ["--prefix", h]) { cwd = Just p, env = procEnv, std_err = CreatePipe }) ""
     putStrLn $ "building " ++ lib' ++ "..."
@@ -79,12 +81,14 @@
     putStrLn $ "installing " ++ lib' ++ "..."
     void $ readCreateProcess ((proc "make" ["install"]) { cwd = Just p, std_err = CreatePipe }) ""
 
-setup :: Dependency -> IO ()
-setup (Dependency lib' dirName' _ _) = do
+setup :: CCompiler -- ^ C compiler to use
+      -> ATSDependency -- ^ ATSDependency itself
+      -> IO ()
+setup cc' (ATSDependency lib' dirName' _ _) = do
     lib'' <- (<> TL.unpack lib') <$> pkgHome
     b <- doesFileExist lib''
     unless b $ do
-        clibSetup (TL.unpack lib') (TL.unpack dirName')
+        clibSetup cc' (TL.unpack lib') (TL.unpack dirName')
         writeFile lib'' ""
 
 getCompressor :: Text -> IO (ByteString -> ByteString)
@@ -93,8 +97,8 @@
     | ".tar" `TL.isSuffixOf` s = pure id
     | otherwise = unrecognized (TL.unpack s)
 
-buildHelper :: Bool -> Dependency -> IO ()
-buildHelper b (Dependency lib' dirName' url'' _) = do
+buildHelper :: Bool -> ATSDependency -> IO ()
+buildHelper b (ATSDependency lib' dirName' url'' _) = do
 
     let (lib, dirName, url') = (lib', dirName', url'') & each %~ TL.unpack
 
diff --git a/src/Language/ATS/Package/Exec.hs b/src/Language/ATS/Package/Exec.hs
--- a/src/Language/ATS/Package/Exec.hs
+++ b/src/Language/ATS/Package/Exec.hs
@@ -4,22 +4,19 @@
                                  ) where
 
 import           Control.Composition
-import           Control.Lens                    hiding (argument)
-import           Data.Bool                       (bool)
-import           Data.Maybe                      (fromMaybe)
-import           Data.Semigroup                  (Semigroup (..))
-import qualified Data.Text.Lazy                  as TL
-import           Data.Version                    hiding (Version (..))
+import           Control.Lens               hiding (argument)
+import           Data.Bool                  (bool)
+import           Data.Maybe                 (fromMaybe)
+import           Data.Semigroup             (Semigroup (..))
+import qualified Data.Text.Lazy             as TL
+import           Data.Version               hiding (Version (..))
 import           Development.Shake.ATS
 import           Development.Shake.FilePath
-import           Language.ATS.Package.Build
-import           Language.ATS.Package.Compiler
-import           Language.ATS.Package.Dependency
-import           Language.ATS.Package.Upgrade
-import           Options.Applicative             hiding (auto)
+import           Language.ATS.Package       hiding (version)
+import           Options.Applicative        hiding (auto)
 import           Paths_ats_pkg
 import           System.Directory
-import           System.IO.Temp                  (withSystemTempDirectory)
+import           System.IO.Temp             (withSystemTempDirectory)
 
 wrapper :: ParserInfo Command
 wrapper = info (helper <*> versionInfo <*> command')
@@ -82,7 +79,7 @@
 fetchPkg :: String -> IO ()
 fetchPkg pkg = withSystemTempDirectory "atspkg" $ \p -> do
     let (lib, dirName, url') = ("atspkg", p, pkg) & each %~ TL.pack
-    fetchDeps True mempty [Dependency lib dirName url' undefined] [] True
+    fetchDeps True mempty [ATSDependency lib dirName url' undefined] [] True
     ps <- getSubdirs p
     pkgDir <- fromMaybe p <$> findFile (p:ps) "atspkg.dhall"
     let a = withCurrentDirectory (takeDirectory pkgDir) (mkPkg False False mempty ["install"] Nothing)
diff --git a/src/Language/ATS/Package/Tools.hs b/src/Language/ATS/Package/Tools.hs
new file mode 100644
--- /dev/null
+++ b/src/Language/ATS/Package/Tools.hs
@@ -0,0 +1,13 @@
+module Language.ATS.Package.Tools ( getCCompiler
+                                  ) where
+
+import           Data.List
+import           Development.Shake.ATS
+
+getCCompiler :: String -> CCompiler
+getCCompiler "gcc"   = GCC Nothing Nothing
+getCCompiler "clang" = Clang
+getCCompiler x
+    | "gcc" `isPrefixOf` x = GCC (Just $ drop 3 x) Nothing
+    | "gcc" `isSuffixOf` x = GCC Nothing (Just . reverse . drop 3 . reverse $ x)
+    | otherwise = Other x
diff --git a/src/Language/ATS/Package/Type.hs b/src/Language/ATS/Package/Type.hs
--- a/src/Language/ATS/Package/Type.hs
+++ b/src/Language/ATS/Package/Type.hs
@@ -11,40 +11,40 @@
 
 module Language.ATS.Package.Type ( -- * Types
                                    Pkg (..)
-                                 , Dependency (..)
+                                 , ATSDependency (..)
                                  , Bin (..)
                                  , Version (..)
-                                 , Constraint (..)
+                                 , ATSConstraint (..)
                                  , TargetPair (..)
+                                 , CCompiler (..)
                                  -- * Lenses
                                  , dirLens
                                  ) where
 
 import           Control.Lens
 import           Data.Binary           (Binary (..))
+import           Data.Dependency
 import           Development.Shake.ATS
 import           Dhall
 
--- TODO constraints?
-
-data Constraint = Constraint { pkgName :: Text
-                             , lower   :: Maybe Version
-                             , upper   :: Maybe Version
-                             }
+data ATSConstraint = ATSConstraint { pkgName :: Text
+                                   , lower   :: Maybe Version
+                                   , upper   :: Maybe Version
+                                   }
                 deriving (Eq, Show, Generic, Interpret)
 
 deriving newtype instance Interpret Version
 
 -- TODO make this a map from versions to tarballs etc.
 -- | Type for a dependency
-data Dependency = Dependency { libName    :: Text -- ^ Library name, e.g.
-                             , dir        :: Text -- ^ Directory we should unpack to
-                             , url        :: Text -- ^ Url pointing to tarball
-                             , libVersion :: Version
-                             }
+data ATSDependency = ATSDependency { libName    :: Text -- ^ Library name, e.g.
+                                   , dir        :: Text -- ^ Directory we should unpack to
+                                   , url        :: Text -- ^ Url pointing to tarball
+                                   , libVersion :: Version
+                                   }
                 deriving (Eq, Show, Generic, Interpret, Binary)
 
-makeLensesFor [("dir", "dirLens")] ''Dependency
+makeLensesFor [("dir", "dirLens")] ''ATSDependency
 
 -- | This is just a tuple, except I can figure out how to use it with Dhall.
 data TargetPair = TargetPair { hs  :: Text
@@ -63,14 +63,15 @@
                }
          deriving (Show, Eq, Generic, Interpret, Binary)
 
+-- TODO make binaries optional
 -- | Data type associated with @atspkg.dhall@ file.
 data Pkg = Pkg { bin          :: [Bin] -- ^ List of binaries to be built
                , test         :: [Bin] -- ^ List of test suites
                , man          :: Maybe Text -- ^ Optional (markdown) manpages to be converted using @pandoc@.
                , version      :: Version -- ^ Library version
                , compiler     :: Version -- ^ Compiler version
-               , dependencies :: [Dependency] -- ^ List of dependencies
-               , clib         :: [Dependency] -- ^ List of C dependencies
+               , dependencies :: [ATSDependency] -- ^ List of dependencies
+               , clib         :: [ATSDependency] -- ^ List of C dependencies
                , ccompiler    :: Text -- ^ The C compiler we should use
                , cflags       :: [Text] -- ^ List of flags to pass to the C compiler
                , atsSource    :: [Text] -- ^ Directory containing ATS source to be compile to C.
diff --git a/stack.yaml b/stack.yaml
--- a/stack.yaml
+++ b/stack.yaml
@@ -4,11 +4,12 @@
   - '.'
 extra-deps:
   - shake-ext-2.3.0.0
-  - shake-ats-1.3.0.1
+  - shake-ats-1.3.0.3
   - composition-prelude-1.1.0.2
-  - language-ats-0.1.1.18
+  - language-ats-0.2.0.0
   - cli-setup-0.2.0.1
-  - hs2ats-0.2.1.2
+  - hs2ats-0.2.1.3
+  - dependency-0.1.0.0
 flags:
   ats-pkg:
     development: false
