diff options
Diffstat (limited to 'compiler/GHC/Driver')
-rw-r--r-- | compiler/GHC/Driver/Backpack.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Driver/CmdLine.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Driver/CodeOutput.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Driver/Env.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Driver/Hooks.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Driver/Main.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Driver/Make.hs | 10 | ||||
-rw-r--r-- | compiler/GHC/Driver/MakeFile.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Driver/Monad.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Driver/Phases.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Driver/Pipeline.hs | 3 | ||||
-rw-r--r-- | compiler/GHC/Driver/Plugins.hs | 2 |
12 files changed, 16 insertions, 17 deletions
diff --git a/compiler/GHC/Driver/Backpack.hs b/compiler/GHC/Driver/Backpack.hs index 873e7867c2..3d8048e825 100644 --- a/compiler/GHC/Driver/Backpack.hs +++ b/compiler/GHC/Driver/Backpack.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE CPP #-} + {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE OverloadedStrings #-} diff --git a/compiler/GHC/Driver/CmdLine.hs b/compiler/GHC/Driver/CmdLine.hs index 56451ec199..b1226ecdca 100644 --- a/compiler/GHC/Driver/CmdLine.hs +++ b/compiler/GHC/Driver/CmdLine.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE CPP #-} + {-# LANGUAGE DeriveFunctor #-} ------------------------------------------------------------------------------- diff --git a/compiler/GHC/Driver/CodeOutput.hs b/compiler/GHC/Driver/CodeOutput.hs index 611cf498d3..4f80b6feda 100644 --- a/compiler/GHC/Driver/CodeOutput.hs +++ b/compiler/GHC/Driver/CodeOutput.hs @@ -4,7 +4,7 @@ \section{Code output phase} -} -{-# LANGUAGE CPP #-} + module GHC.Driver.CodeOutput ( codeOutput diff --git a/compiler/GHC/Driver/Env.hs b/compiler/GHC/Driver/Env.hs index 4fa77a8eb8..27e250b68c 100644 --- a/compiler/GHC/Driver/Env.hs +++ b/compiler/GHC/Driver/Env.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE CPP #-} + module GHC.Driver.Env ( Hsc(..) diff --git a/compiler/GHC/Driver/Hooks.hs b/compiler/GHC/Driver/Hooks.hs index 99c6ba8609..942c9810a5 100644 --- a/compiler/GHC/Driver/Hooks.hs +++ b/compiler/GHC/Driver/Hooks.hs @@ -3,7 +3,7 @@ -- NB: this module is SOURCE-imported by DynFlags, and should primarily -- refer to *types*, rather than *code* -{-# LANGUAGE CPP, RankNTypes, TypeFamilies #-} +{-# LANGUAGE RankNTypes, TypeFamilies #-} module GHC.Driver.Hooks ( Hooks diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs index e9e203c06b..210c8644da 100644 --- a/compiler/GHC/Driver/Main.hs +++ b/compiler/GHC/Driver/Main.hs @@ -1,5 +1,5 @@ {-# LANGUAGE BangPatterns #-} -{-# LANGUAGE CPP #-} + {-# LANGUAGE NondecreasingIndentation #-} {-# OPTIONS_GHC -fprof-auto-top #-} diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs index 003bc6e0b0..f153e96e37 100644 --- a/compiler/GHC/Driver/Make.hs +++ b/compiler/GHC/Driver/Make.hs @@ -1,5 +1,4 @@ {-# LANGUAGE BangPatterns #-} -{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE NondecreasingIndentation #-} @@ -85,6 +84,7 @@ import GHC.Utils.Misc import GHC.Utils.Error import GHC.Utils.Logger import GHC.Utils.TmpFs +import GHC.Utils.Constants (isWindowsHost) import GHC.Types.Basic import GHC.Types.Error @@ -743,14 +743,12 @@ guessOutputFile = modifySession $ \env -> name = fmap dropExtension mainModuleSrcPath name_exe = do -#if defined(mingw32_HOST_OS) -- we must add the .exe extension unconditionally here, otherwise -- when name has an extension of its own, the .exe extension will -- not be added by GHC.Driver.Pipeline.exeFileName. See #2248 - name' <- fmap (<.> "exe") name -#else - name' <- name -#endif + name' <- if isWindowsHost --FIXME: should be the target platform + then fmap (<.> "exe") name + else name mainModuleSrcPath' <- mainModuleSrcPath -- #9930: don't clobber input files (unless they ask for it) if name' == mainModuleSrcPath' diff --git a/compiler/GHC/Driver/MakeFile.hs b/compiler/GHC/Driver/MakeFile.hs index c69e4538fb..890054efd4 100644 --- a/compiler/GHC/Driver/MakeFile.hs +++ b/compiler/GHC/Driver/MakeFile.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- diff --git a/compiler/GHC/Driver/Monad.hs b/compiler/GHC/Driver/Monad.hs index 2fa3c51cc1..873cbfac4e 100644 --- a/compiler/GHC/Driver/Monad.hs +++ b/compiler/GHC/Driver/Monad.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE CPP, DeriveFunctor, DerivingVia, RankNTypes #-} +{-# LANGUAGE DeriveFunctor, DerivingVia, RankNTypes #-} {-# OPTIONS_GHC -funbox-strict-fields #-} -- ----------------------------------------------------------------------------- -- diff --git a/compiler/GHC/Driver/Phases.hs b/compiler/GHC/Driver/Phases.hs index 4f9cbf83a1..07ec166ca3 100644 --- a/compiler/GHC/Driver/Phases.hs +++ b/compiler/GHC/Driver/Phases.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- diff --git a/compiler/GHC/Driver/Pipeline.hs b/compiler/GHC/Driver/Pipeline.hs index d9246ac0f9..02ebfbb5ce 100644 --- a/compiler/GHC/Driver/Pipeline.hs +++ b/compiler/GHC/Driver/Pipeline.hs @@ -1,5 +1,6 @@ -{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} +{-# LANGUAGE BangPatterns #-} + {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE NondecreasingIndentation #-} diff --git a/compiler/GHC/Driver/Plugins.hs b/compiler/GHC/Driver/Plugins.hs index 2d8bc0ad85..42cefd17fd 100644 --- a/compiler/GHC/Driver/Plugins.hs +++ b/compiler/GHC/Driver/Plugins.hs @@ -1,5 +1,5 @@ {-# LANGUAGE RankNTypes #-} -{-# LANGUAGE CPP #-} + -- | Definitions for writing /plugins/ for GHC. Plugins can hook into -- several areas of the compiler. See the 'Plugin' type. These plugins |