fromCabal -> fromCabalFile.

This commit is contained in:
Kazu Yamamoto 2013-03-03 15:50:09 +09:00
parent ca229c3be1
commit aa0b1d709c
2 changed files with 9 additions and 9 deletions

View File

@ -1,7 +1,7 @@
{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
module CabalApi (
fromCabal
fromCabalFile
, cabalParseFile
, cabalBuildInfo
, cabalAllDependPackages
@ -22,13 +22,13 @@ import Types
----------------------------------------------------------------
fromCabal :: [GHCOption]
-> Cradle
-> IO ([GHCOption]
,[IncludeDir]
,[Package]
,[LangExt])
fromCabal ghcOptions cradle = do
fromCabalFile :: [GHCOption]
-> Cradle
-> IO ([GHCOption]
,[IncludeDir]
,[Package]
,[LangExt])
fromCabalFile ghcOptions cradle = do
cabal <- cabalParseFile cfile
let binfo@BuildInfo{..} = cabalBuildInfo cabal
let exts = map (("-X" ++) . display) $ usedExtensions binfo

View File

@ -47,7 +47,7 @@ initializeGHC opt cradle fileName ghcOptions logging
| cabal =
initSession opt ghcOptions importDirs Nothing Nothing logging fileName
| otherwise = do
(gopts,idirs,depPkgs,hdrExts) <- liftIO $ fromCabal ghcOptions cradle
(gopts,idirs,depPkgs,hdrExts) <- liftIO $ fromCabalFile ghcOptions cradle
initSession opt gopts idirs (Just depPkgs) (Just hdrExts) logging fileName
where
cabal = isJust $ cradleCabalFile cradle