aboutsummaryrefslogtreecommitdiff
path: root/hypsrc-test/Utils.hs
diff options
context:
space:
mode:
authorŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-07-01 01:14:59 +0200
committerŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-07-01 01:14:59 +0200
commit767569881732c59378fb577d1a2b57b51bc454d0 (patch)
tree40587aab863894ebd583003f11f0c42f61ce04cc /hypsrc-test/Utils.hs
parent395a9c3941f8b8891cffa5c17e1f6ae414edaa79 (diff)
Create simple script for accepting hyperlinker test case references.
Diffstat (limited to 'hypsrc-test/Utils.hs')
-rw-r--r--hypsrc-test/Utils.hs27
1 files changed, 24 insertions, 3 deletions
diff --git a/hypsrc-test/Utils.hs b/hypsrc-test/Utils.hs
index cf3e94ea..e15fabee 100644
--- a/hypsrc-test/Utils.hs
+++ b/hypsrc-test/Utils.hs
@@ -1,12 +1,33 @@
+{-# LANGUAGE CPP #-}
+
+
module Utils
- ( stripLocalAnchors
- , stripLocalLinks
- , stripLocalReferences
+ ( baseDir, rootDir
+ , srcDir, refDir, outDir, refDir', outDir'
+ , haddockPath
+ , stripLocalAnchors, stripLocalLinks, stripLocalReferences
) where
import Data.List
+import System.FilePath
+
+
+baseDir, rootDir :: FilePath
+baseDir = takeDirectory __FILE__
+rootDir = baseDir </> ".."
+
+srcDir, refDir, outDir, refDir', outDir' :: FilePath
+srcDir = baseDir </> "src"
+refDir = baseDir </> "ref"
+outDir = baseDir </> "out"
+refDir' = refDir </> "src"
+outDir' = outDir </> "src"
+
+haddockPath :: FilePath
+haddockPath = rootDir </> "dist" </> "build" </> "haddock" </> "haddock"
+
replaceBetween :: Eq a => [a] -> a -> [a] -> [a] -> [a]
replaceBetween _ _ _ [] = []