File: Paths.hs

package info (click to toggle)
haskell-shake 0.13.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 888 kB
  • ctags: 127
  • sloc: haskell: 6,388; makefile: 35; ansic: 25; sh: 2
file content (22 lines) | stat: -rw-r--r-- 588 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- | Fake cabal module for local building

module Paths_shake where

import Data.Version
import System.IO.Unsafe
import System.Directory
import Control.Exception


-- We want getDataFileName to be relative to the current directory even if
-- we issue a change directory command. Therefore, first call caches, future ones read.
curdir :: String
curdir = unsafePerformIO getCurrentDirectory

getDataFileName :: FilePath -> IO FilePath
getDataFileName x = do
    evaluate curdir
    return $ curdir ++ "/" ++ x

version :: Version
version = Version {versionBranch = [0,0], versionTags = []}