summaryrefslogtreecommitdiff
path: root/app/haddock.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/haddock.hs')
-rw-r--r--app/haddock.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/haddock.hs b/app/haddock.hs
new file mode 100644
index 0000000..d6ab808
--- /dev/null
+++ b/app/haddock.hs
@@ -0,0 +1,16 @@
+module Main where
+
+import StackWrapper
+
+import qualified GhcLib as G
+
+import System.Environment
+import System.FilePath
+import System.Process
+
+main :: IO ()
+main =
+ run $ G.run "haddock" $ do
+ args <- getArgs
+ binDir <- head . lines <$> readProcess "stack" ["path", "--compiler-bin"] ""
+ callProcess (binDir </> "haddock") args