Making cabalBuildInfo pure.

This commit is contained in:
Kazu Yamamoto
2013-03-01 13:14:46 +09:00
parent 431e3fa904
commit a8e57615ba
3 changed files with 4 additions and 5 deletions

View File

@@ -13,6 +13,6 @@ spec = do
describe "cabalBuildInfo" $ do
it "extracts build info" $ do
info <- cabalParseFile "test/data/cabalapi.cabal" >>= cabalBuildInfo
info <- cabalBuildInfo <$> cabalParseFile "test/data/cabalapi.cabal"
let infoStr = show info
infoStr `shouldBe` "BuildInfo {buildable = True, buildTools = [], cppOptions = [], ccOptions = [], ldOptions = [], pkgconfigDepends = [], frameworks = [], cSources = [], hsSourceDirs = [], otherModules = [ModuleName [\"Browse\"],ModuleName [\"CabalApi\"],ModuleName [\"Cabal\"],ModuleName [\"CabalDev\"],ModuleName [\"Check\"],ModuleName [\"ErrMsg\"],ModuleName [\"Flag\"],ModuleName [\"GHCApi\"],ModuleName [\"GHCChoice\"],ModuleName [\"Gap\"],ModuleName [\"Info\"],ModuleName [\"Lang\"],ModuleName [\"Lint\"],ModuleName [\"List\"],ModuleName [\"Paths_ghc_mod\"],ModuleName [\"Types\"]], defaultLanguage = Nothing, otherLanguages = [], defaultExtensions = [], otherExtensions = [], oldExtensions = [], extraLibs = [], extraLibDirs = [], includeDirs = [], includes = [], installIncludes = [], options = [(GHC,[\"-Wall\"])], ghcProfOptions = [], ghcSharedOptions = [], customFieldsBI = [], targetBuildDepends = []}"