{-# LANGUAGE CPP #-}-- | This module is responsible for finding out where the runtime system-- and base library code is installed.--moduleDDC.Code.Config(locateBaseLibrary)where--------------------------------------------------------------------------------- When the compiler has been installed via 'cabal' install then we don't-- have the full development source tree. ---- In this case the ddc-code.cabal file defines the preprocessesor flag-- DDC_CABAL_INSTALLED, which tells us we can import the Cabal generated-- Paths_ddc_code module and ask it where its put our files.-- #if defined(DDC_CABAL_INSTALLED)importSystem.FilePathimportPaths_ddc_codeasCaballocateBaseLibrary::IOFilePathlocateBaseLibrary=do-- The rest of the files are in the same directory as the LICENSE-- file, so we can just ask for that one and take the directory name.licenseName<-Cabal.getDataFileName"LICENSE"letbasePath=takeDirectorylicenseNamereturnbasePath--------------------------------------------------------------------------------- When the compiler is built from the development source tree via make-- this code is in "packages/ddc-code", and we need to run 'ddc' from the -- root of the source tree so it can find this path.#elselocateBaseLibrary::IOFilePathlocateBaseLibrary=return"packages/ddc-code"#endif