[project @ 2005-01-12 13:44:20 by simonmar]
[ghc-hetmet.git] / ghc / utils / ghc-pkg / Main.hs
index b455d68..e57a383 100644 (file)
@@ -9,7 +9,6 @@
 
 -- TODO:
 --     - validate modules
---     - expose/hide
 --     - expanding of variables in new-style package conf
 --     - version manipulation (checking whether old version exists,
 --       hiding old version?)
@@ -19,7 +18,7 @@ module Main (main) where
 import Version ( version, targetOS, targetARCH )
 import Distribution.InstalledPackageInfo
 import Distribution.Compat.ReadP
-import Distribution.ParseUtils ( showError )
+import Distribution.ParseUtils ( showError, ParseResult(..) )
 import Distribution.Package
 import Distribution.Version
 import Compat.Directory        ( getAppUserDataDirectory, createDirectoryIfMissing )
@@ -338,8 +337,8 @@ parsePackageInfo
        -> IO InstalledPackageInfo
 parsePackageInfo str defines force =
   case parseInstalledPackageInfo str of
-    Right ok -> return ok
-    Left err -> die (showError err)
+    ParseOk ok -> return ok
+    ParseFailed err -> die (showError err)
 
 -- Used for converting versionless package names to new
 -- PackageIdentifiers.  "Version [] []" is special: it means "no