3Description : Utilities for interacting with the System.
6Maintainer : The Idris Community.
9module IRTS.System( getDataFileName
22import Control.Applicative ((<$>))
23import Data.Maybe (fromMaybe)
24import System.FilePath ((</>), addTrailingPathSeparator)
25import System.Environment
29import Paths_idris (version)
34overrideDataDirWith :: String -> IO FilePath
35overrideDataDirWith envVar = do envValue <- lookupEnv envVar
36 maybe getDataDir return envValue
39getCC = fromMaybe "gcc" <$> lookupEnv "IDRIS_CC"
41getEnvFlags :: IO [String]
42getEnvFlags = maybe [] (splitOn " ") <$> lookupEnv "IDRIS_CFLAGS"
44getTargetDir :: IO String
45getTargetDir = overrideDataDirWith "TARGET"
47#if defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS)\
48 || defined(openbsd_HOST_OS) || defined(netbsd_HOST_OS)
49extraLib = ["-L/usr/local/lib"]
50extraInclude = ["-I/usr/local/include"]
62getLibFlags = do dir <- getDataDir
63 return $ ["-L" ++ (dir </> "rts"),
64 "-lidris_rts"] ++ extraLib ++ gmpLib ++ ["-lpthread"]
66getIdrisLibDir = addTrailingPathSeparator <$> overrideDataDirWith "IDRIS_LIBRARY_PATH"
68getIncFlags = do dir <- getDataDir
69 return $ ("-I" ++ dir </> "rts") : extraInclude
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list