From 7026ce88b5c7753fe5c3d4164c02c9de58bf6979 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sun, 26 Jul 2009 18:19:34 +0000 Subject: [PATCH] Add a -fbuilding-cabal-package flag This means GHC knows whether it's building a Cabal package, or just Haskell sources. For example, it may wish to give different error messages when building a Cabal package. --- compiler/main/DynFlags.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 9ff139c..0809d04 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -315,6 +315,7 @@ data DynFlag | Opt_EmbedManifest | Opt_EmitExternalCore | Opt_SharedImplib + | Opt_BuildingCabalPackage -- temporary flags | Opt_RunCPS @@ -1757,6 +1758,7 @@ fFlags = [ ( "embed-manifest", Opt_EmbedManifest, const Supported ), ( "ext-core", Opt_EmitExternalCore, const Supported ), ( "shared-implib", Opt_SharedImplib, const Supported ), + ( "building-cabal-package", Opt_BuildingCabalPackage, const Supported ), ( "implicit-import-qualified", Opt_ImplicitImportQualified, const Supported ) ] -- 1.7.10.4