Use emptyRegisterFlags and emptyCopyFlags for reduced fragility
authorDuncan Coutts <duncan.coutts@worc.ox.ac.uk>
Mon, 6 Aug 2007 15:28:24 +0000 (15:28 +0000)
committerDuncan Coutts <duncan.coutts@worc.ox.ac.uk>
Mon, 6 Aug 2007 15:28:24 +0000 (15:28 +0000)
So we will inherit default values for any new flags that get added,
so things should not break if new flags are added.

libraries/installPackage.hs

index 060ba79..3d190d6 100644 (file)
@@ -26,15 +26,12 @@ main = do args <- getArgs
 doit :: FilePath -> FilePath -> Verbosity -> IO ()
 doit pref ghcpkg verbosity =
        do let userHooks = simpleUserHooks
-              copyFlags = CopyFlags {
+              copyFlags = emptyCopyFlags {
                               copyDest = NoCopyDest,
                               copyVerbose = verbosity
                           }
-              registerFlags = RegisterFlags {
+              registerFlags = emptyRegisterFlags {
                                   regUser = MaybeUserGlobal,
-                                  regGenScript = False,
-                                  regInPlace = False,
-                                  regWithHcPkg = Just ghcpkg,
                                   regVerbose = verbosity
                               }
           lbi <- getPersistBuildConfig