Commit cf36f55c authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Move several modules under .Simple

Compiler, Program, PreProcess and Setup are really part of the Simple
build system.
Also move a couple GHC modules under Simple.GHC.*
parent 0757a3b4
......@@ -46,20 +46,17 @@ Library {
Distribution.InstalledPackageInfo,
Distribution.License,
Distribution.Make,
Distribution.Program,
Distribution.Package,
Distribution.PackageDescription,
Distribution.Configuration,
Distribution.ParseUtils,
Distribution.PreProcess,
Distribution.PreProcess.Unlit,
Distribution.Setup,
Distribution.Simple,
Distribution.Simple.Build,
Distribution.Simple.Compiler,
Distribution.Simple.Configure,
Distribution.Simple.GHC,
Distribution.Simple.GHCMakefile,
Distribution.Simple.GHCPackageConfig,
Distribution.Simple.GHC.Makefile,
Distribution.Simple.GHC.PackageConfig,
Distribution.Simple.Haddock,
Distribution.Simple.Hugs,
Distribution.Simple.Install,
......@@ -67,7 +64,11 @@ Library {
Distribution.Simple.JHC,
Distribution.Simple.LocalBuildInfo,
Distribution.Simple.NHC,
Distribution.Simple.PreProcess,
Distribution.Simple.PreProcess.Unlit,
Distribution.Simple.Program,
Distribution.Simple.Register,
Distribution.Simple.Setup,
Distribution.Simple.SetupWrapper,
Distribution.Simple.SrcDist,
Distribution.Simple.Utils,
......
{-# OPTIONS -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Compiler
......@@ -8,7 +7,7 @@
-- Stability : alpha
-- Portability : portable
--
-- Haskell implementations.
-- Haskell compiler flavors
{- All rights reserved.
......@@ -40,86 +39,9 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -}
module Distribution.Compiler (
-- * Haskell implementations
CompilerFlavor(..), Compiler(..),
showCompilerId, compilerVersion,
compilerPath, compilerPkgToolPath,
-- * Support for language extensions
Flag,
extensionsToFlags,
unsupportedExtensions
#ifdef DEBUG
,hunitTests
#endif
) where
import Distribution.Version (Version(..))
import Distribution.Package (PackageIdentifier(..), showPackageId)
import Language.Haskell.Extension (Extension(..))
import Distribution.Program
import Data.List (nub)
import Data.Maybe (catMaybes, isNothing)
#ifdef DEBUG
import Test.HUnit (Test)
#endif
-- ------------------------------------------------------------
-- * Command Line Types and Exports
-- ------------------------------------------------------------
module Distribution.Compiler (CompilerFlavor(..)) where
data CompilerFlavor
= GHC | NHC | Hugs | HBC | Helium | JHC | OtherCompiler String
deriving (Show, Read, Eq, Ord)
data Compiler = Compiler {
compilerFlavor :: CompilerFlavor,
compilerId :: PackageIdentifier,
compilerProg :: ConfiguredProgram,
compilerPkgTool :: ConfiguredProgram,
compilerExtensions :: [(Extension, Flag)]
}
deriving (Show, Read)
showCompilerId :: Compiler -> String
showCompilerId = showPackageId . compilerId
compilerVersion :: Compiler -> Version
compilerVersion = pkgVersion . compilerId
compilerPath :: Compiler -> FilePath
compilerPath = programPath . compilerProg
compilerPkgToolPath :: Compiler -> FilePath
compilerPkgToolPath = programPath . compilerPkgTool
-- ------------------------------------------------------------
-- * Extensions
-- ------------------------------------------------------------
-- |For the given compiler, return the flags for the supported extensions.
unsupportedExtensions :: Compiler -> [Extension] -> [Extension]
unsupportedExtensions comp exts =
[ ext | ext <- exts
, isNothing $ lookup ext (compilerExtensions comp) ]
type Flag = String
-- |For the given compiler, return the flags for the supported extensions.
extensionsToFlags :: Compiler -> [Extension] -> [Flag]
extensionsToFlags comp exts =
nub $ filter (not . null) $ catMaybes
[ lookup ext (compilerExtensions comp)
| ext <- exts ]
-- ------------------------------------------------------------
-- * Testing
-- ------------------------------------------------------------
deriving (Show, Read, Eq, Ord)
#ifdef DEBUG
hunitTests :: [Test]
hunitTests = []
#endif
......@@ -85,9 +85,9 @@ module Distribution.Make (
-- local
import Distribution.Package --must not specify imports, since we're exporting moule.
import Distribution.Program(defaultProgramConfiguration)
import Distribution.Simple.Program(defaultProgramConfiguration)
import Distribution.PackageDescription
import Distribution.Setup --(parseArgs, Action(..), optionHelpString)
import Distribution.Simple.Setup
import Distribution.Simple.Utils (die, maybeExit)
......
......@@ -51,7 +51,7 @@ module Distribution.Simple (
module Distribution.Package,
module Distribution.Version,
module Distribution.License,
module Distribution.Compiler,
module Distribution.Simple.Compiler,
module Language.Haskell.Extension,
-- * Simple interface
defaultMain, defaultMainNoRead, defaultMainArgs,
......@@ -66,16 +66,16 @@ module Distribution.Simple (
) where
-- local
import Distribution.Compiler
import Distribution.Simple.Compiler
import Distribution.Package --must not specify imports, since we're exporting moule.
import Distribution.PackageDescription
import Distribution.Program(Program(..), ProgramConfiguration,
import Distribution.Simple.Program(Program(..), ProgramConfiguration,
defaultProgramConfiguration, addKnownProgram,
pfesetupProgram, rawSystemProgramConf)
import Distribution.PreProcess (knownSuffixHandlers, ppSuffixes,
import Distribution.Simple.PreProcess (knownSuffixHandlers, ppSuffixes,
removePreprocessedPackage,
preprocessSources, PPSuffixHandler)
import Distribution.Setup
import Distribution.Simple.Setup
import Distribution.Simple.Build ( build, makefile )
import Distribution.Simple.SrcDist ( sdist )
......
......@@ -49,15 +49,15 @@ module Distribution.Simple.Build (
#endif
) where
import Distribution.Compiler ( Compiler(..), CompilerFlavor(..) )
import Distribution.Simple.Compiler ( Compiler(..), CompilerFlavor(..) )
import Distribution.PackageDescription
( PackageDescription(..), BuildInfo(..),
setupMessage, Executable(..), Library(..),
autogenModuleName, mapBuildInfo )
import Distribution.Package ( PackageIdentifier(..), showPackageId )
import Distribution.Setup ( CopyDest(..), BuildFlags(..),
import Distribution.Simple.Setup ( CopyDest(..), BuildFlags(..),
MakefileFlags(..) )
import Distribution.PreProcess ( preprocessSources, PPSuffixHandler )
import Distribution.Simple.PreProcess ( preprocessSources, PPSuffixHandler )
import Distribution.Simple.LocalBuildInfo
( LocalBuildInfo(..),
InstallDirs(..), absoluteInstallDirs,
......
{-# OPTIONS -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Compiler
-- Copyright : Isaac Jones 2003-2004
--
-- Maintainer : Isaac Jones <ijones@syntaxpolice.org>
-- Stability : alpha
-- Portability : portable
--
-- Haskell implementations.
{- All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Isaac Jones nor the names of other
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -}
module Distribution.Simple.Compiler (
-- * Haskell implementations
CompilerFlavor(..), Compiler(..),
showCompilerId, compilerVersion,
compilerPath, compilerPkgToolPath,
-- * Support for language extensions
Flag,
extensionsToFlags,
unsupportedExtensions
#ifdef DEBUG
,hunitTests
#endif
) where
import Distribution.Compiler (CompilerFlavor(..))
import Distribution.Version (Version(..))
import Distribution.Package (PackageIdentifier(..), showPackageId)
import Language.Haskell.Extension (Extension(..))
import Distribution.Simple.Program
import Data.List (nub)
import Data.Maybe (catMaybes, isNothing)
#ifdef DEBUG
import Test.HUnit (Test)
#endif
data Compiler = Compiler {
compilerFlavor :: CompilerFlavor,
compilerId :: PackageIdentifier,
compilerProg :: ConfiguredProgram,
compilerPkgTool :: ConfiguredProgram,
compilerExtensions :: [(Extension, Flag)]
}
deriving (Show, Read)
showCompilerId :: Compiler -> String
showCompilerId = showPackageId . compilerId
compilerVersion :: Compiler -> Version
compilerVersion = pkgVersion . compilerId
compilerPath :: Compiler -> FilePath
compilerPath = programPath . compilerProg
compilerPkgToolPath :: Compiler -> FilePath
compilerPkgToolPath = programPath . compilerPkgTool
-- ------------------------------------------------------------
-- * Extensions
-- ------------------------------------------------------------
-- |For the given compiler, return the flags for the supported extensions.
unsupportedExtensions :: Compiler -> [Extension] -> [Extension]
unsupportedExtensions comp exts =
[ ext | ext <- exts
, isNothing $ lookup ext (compilerExtensions comp) ]
type Flag = String
-- |For the given compiler, return the flags for the supported extensions.
extensionsToFlags :: Compiler -> [Extension] -> [Flag]
extensionsToFlags comp exts =
nub $ filter (not . null) $ catMaybes
[ lookup ext (compilerExtensions comp)
| ext <- exts ]
-- ------------------------------------------------------------
-- * Testing
-- ------------------------------------------------------------
#ifdef DEBUG
hunitTests :: [Test]
hunitTests = []
#endif
......@@ -68,7 +68,7 @@ import Distribution.Compat.Directory
( createDirectoryIfMissing )
import Distribution.Compat.ReadP
( readP_to_S, many, skipSpaces )
import Distribution.Compiler
import Distribution.Simple.Compiler
( CompilerFlavor(..), Compiler(..), compilerVersion, compilerPath
, compilerPkgToolPath, unsupportedExtensions )
import Distribution.Package
......@@ -80,11 +80,11 @@ import Distribution.PackageDescription
, setupMessage, satisfyDependency, hasLibs )
import Distribution.ParseUtils
( showDependency )
import Distribution.Program
import Distribution.Simple.Program
( Program(..), ProgramLocation(..), ConfiguredProgram(..), programPath
, ProgramConfiguration, configureAllKnownPrograms, knownPrograms
, lookupKnownProgram, requireProgram )
import Distribution.Setup
import Distribution.Simple.Setup
( ConfigFlags(..), CopyDest(..) )
import Distribution.Simple.InstallDirs
( InstallDirs(..), InstallDirTemplates(..), defaultInstallDirs
......
......@@ -47,8 +47,8 @@ module Distribution.Simple.GHC (
configure, build, makefile, installLib, installExe
) where
import Distribution.Simple.GHCMakefile
import Distribution.Setup ( MakefileFlags(..) )
import Distribution.Simple.GHC.Makefile
import Distribution.Simple.Setup ( MakefileFlags(..) )
import Distribution.PackageDescription
( PackageDescription(..), BuildInfo(..),
withLib, setupMessage,
......@@ -58,17 +58,17 @@ import Distribution.Simple.LocalBuildInfo
( LocalBuildInfo(..), autogenModulesDir )
import Distribution.Simple.Utils
import Distribution.Package ( PackageIdentifier(..), showPackageId )
import Distribution.Program ( rawSystemProgram, rawSystemProgramConf,
import Distribution.Simple.Program ( rawSystemProgram, rawSystemProgramConf,
Program(..), ConfiguredProgram(..),
ProgramConfiguration, addKnownProgram,
userMaybeSpecifyPath, requireProgram,
programPath, lookupProgram,
ghcProgram, ghcPkgProgram,
arProgram, ranlibProgram, ldProgram )
import Distribution.Compiler
import Distribution.Simple.Compiler
import Distribution.Version ( Version(..), showVersion,
VersionRange(..), orLaterVersion )
import qualified Distribution.Simple.GHCPackageConfig as GHC
import qualified Distribution.Simple.GHC.PackageConfig as GHC
( localPackageConfig,
canReadLocalPackageConfig )
import Distribution.System
......
-- DO NOT EDIT: change GHCMakefile.in, and run ../../mkGHCMakefile.sh
module Distribution.Simple.GHCMakefile where{ makefileTemplate=unlines
-- DO NOT EDIT: change Makefile.in, and run ../../../mkGHCMakefile.sh
module Distribution.Simple.GHC.Makefile where {
makefileTemplate :: String; makefileTemplate=unlines
["# -----------------------------------------------------------------------------","# Makefile template starts here.","","GHC_OPTS += -i$(odir)","","# For adding options on the command-line","GHC_OPTS += $(EXTRA_HC_OPTS)","","WAY_p_OPTS = -prof","","ifneq \"$(way)\" \"\"","way_ := $(way)_","_way := _$(way)","GHC_OPTS += $(WAY_$(way)_OPTS)","GHC_OPTS += -hisuf $(way_)hi -hcsuf $(way_)hc -osuf $(osuf)","endif","osuf = $(way_)o","hisuf = $(way_)hi","","HS_OBJS = $(patsubst %,$(odir)/%.$(osuf),$(subst .,/,$(modules)))","HS_IFS = $(patsubst %,$(odir)/%.$(hisuf),$(subst .,/,$(modules)))","C_OBJS = $(patsubst %.c,$(odir)/%.$(osuf),$(C_SRCS))","","LIB = $(odir)/libHS$(package)$(_way).a","","RM = rm -f","","# Optionally include local customizations:","-include Makefile.local","","# Rules follow:","","MKSTUBOBJS = find $(odir) -name \"*_stub.$(osuf)\" -print","# HACK ^^^ we tried to use $(wildcard), but apparently it fails due to ","# make using cached directory contents, or something.","","all :: .depend $(LIB)","",".depend : $(MAKEFILE)","\t$(GHC) -M -optdep-f -optdep.depend $(foreach way,$(WAYS),-optdep-s -optdep$(way)) $(foreach obj,$(MKDEPENDHS_OBJ_SUFFICES),-osuf $(obj)) $(filter-out -split-objs, $(GHC_OPTS)) $(modules)","\tfor dir in $(sort $(foreach mod,$(HS_OBJS) $(C_OBJS),$(dir $(mod)))); do \\","\t\tif test ! -d $$dir; then mkdir -p $$dir; fi \\","\tdone","","include .depend","","ifneq \"$(filter -split-objs, $(GHC_OPTS))\" \"\"","$(LIB) : $(HS_OBJS) $(C_OBJS)","\t@$(RM) $@","\t(echo $(C_OBJS) `$(MKSTUBOBJS)`; find $(patsubst %.$(osuf),%_split,$(HS_OBJS)) -name '*.$(way_)o' -print) | xargs -s 30000 $(AR) q $(EXTRA_AR_ARGS) $@ ","else","$(LIB) : $(HS_OBJS) $(C_OBJS)","\t@$(RM) $@","\techo $(C_OBJS) $(HS_OBJS) `$(MKSTUBOBJS)` | xargs -s 30000 $(AR) q $(EXTRA_AR_ARGS) $@ ","endif","","ifneq \"$(GHCI_LIB)\" \"\"","ifeq \"$(way)\" \"\"","all :: $(GHCI_LIB)","","$(GHCI_LIB) : $(HS_OBJS) $(C_OBJS)","\t@$(RM) $@","\t$(LD) -r -x -o $@ $(EXTRA_LD_OPTS) $(HS_OBJS) `$(MKSTUBOBJS)` $(C_OBJS)","endif","endif","","# suffix rules","","ifneq \"$(odir)\" \"\"","odir_ = $(odir)/","else","odir_ =","endif","","$(odir_)%.$(osuf) : $(srcdir)/%.hs","\t$(GHC) $(GHC_OPTS) -c $< -o $@ -ohi $(basename $@).$(hisuf)","","$(odir_)%.$(osuf) : $(srcdir)/%.lhs\t ","\t$(GHC) $(GHC_OPTS) -c $< -o $@ -ohi $(basename $@).$(hisuf)","","# The .hs files might be in $(odir) if they were preprocessed","$(odir_)%.$(osuf) : $(odir_)%.hs","\t$(GHC) $(GHC_OPTS) -c $< -o $@ -ohi $(basename $@).$(hisuf)","","$(odir_)%.$(osuf) : $(odir_)%.lhs","\t$(GHC) $(GHC_OPTS) -c $< -o $@ -ohi $(basename $@).$(hisuf)","","$(odir_)%.$(osuf) : $(srcdir)/%.c","\t@$(RM) $@","\t$(GHC) $(GHC_CC_OPTS) -c $< -o $@","","$(odir_)%.$(osuf) : $(srcdir)/%.$(way_)s","\t@$(RM) $@","\t$(GHC) $(GHC_CC_OPTS) -c $< -o $@","","$(odir_)%.$(osuf) : $(srcdir)/%.S","\t@$(RM) $@","\t$(GHC) $(GHC_CC_OPTS) -c $< -o $@","","$(odir_)%.$(way_)s : $(srcdir)/%.c","\t@$(RM) $@","\t$(GHC) $(GHC_CC_OPTS) -S $< -o $@","","$(odir_)%.$(osuf)-boot : $(srcdir)/%.hs-boot","\t$(GHC) $(GHC_OPTS) -c $< -o $@ -ohi $(basename $@).$(way_)hi-boot","","$(odir_)%.$(osuf)-boot : $(srcdir)/%.lhs-boot","\t$(GHC) $(GHC_OPTS) -c $< -o $@ -ohi $(basename $@).$(way_)hi-boot","","%.$(hisuf) : %.$(osuf)","\t@if [ ! -f $@ ] ; then \\","\t echo Panic! $< exists, but $@ does not.; \\","\t exit 1; \\","\telse exit 0 ; \\","\tfi","","%.$(way_)hi-boot : %.$(osuf)-boot","\t@if [ ! -f $@ ] ; then \\","\t echo Panic! $< exists, but $@ does not.; \\","\t exit 1; \\","\telse exit 0 ; \\","\tfi","","$(odir_)%.$(hisuf) : %.$(way_)hc","\t@if [ ! -f $@ ] ; then \\","\t echo Panic! $< exists, but $@ does not.; \\","\t exit 1; \\","\telse exit 0 ; \\","\tfi","","show:","\t@echo '$(VALUE)=\"$($(VALUE))\"'","","clean ::","\t$(RM) $(HS_OBJS) $(C_OBJS) $(LIB) $(GHCI_LIB) $(HS_IFS) .depend","\t$(RM) -rf $(wildcard $(patsubst %.$(osuf), %_split, $(HS_OBJS)))","\t$(RM) $(wildcard $(patsubst %.$(osuf), %.o-boot, $(HS_OBJS)))","\t$(RM) $(wildcard $(patsubst %.$(osuf), %.hi-boot, $(HS_OBJS)))","\t$(RM) $(wildcard $(patsubst %.$(osuf), %_stub.o, $(HS_OBJS)))","","ifneq \"$(strip $(WAYS))\" \"\"","ifeq \"$(way)\" \"\"","all clean ::","# Don't rely on -e working, instead we check exit return codes from sub-makes.","\t@case '${MFLAGS}' in *-[ik]*) x_on_err=0;; *-r*[ik]*) x_on_err=0;; *) x_on_err=1;; esac; \\","\tfor i in $(WAYS) ; do \\","\t echo \"== $(MAKE) way=$$i -f $(MAKEFILE) $@;\"; \\","\t $(MAKE) way=$$i -f $(MAKEFILE) --no-print-directory $(MFLAGS) $@ ; \\","\t if [ $$? -eq 0 ] ; then true; else exit $$x_on_err; fi; \\","\tdone","\t@echo \"== Finished recursively making \\`$@' for ways: $(WAYS) ...\"","endif","endif",""]
}
{-# OPTIONS -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.GHCPackageConfig
-- Module : Distribution.Simple.GHC.PackageConfig
-- Copyright : (c) The University of Glasgow 2004
--
-- Maintainer : libraries@haskell.org
......@@ -12,7 +12,7 @@
-- ghc-pkg. Creates a GHC package config file. See also
-- 'Distribution.Simple.GHC.build', etc.
module Distribution.Simple.GHCPackageConfig (
module Distribution.Simple.GHC.PackageConfig (
GHCPackageConfig(..),
mkGHCPackageConfig,
defaultGHCPackageConfig,
......@@ -26,7 +26,7 @@ import Distribution.PackageDescription (PackageDescription(..), BuildInfo(..), L
import Distribution.Package (PackageIdentifier(..), showPackageId)
import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..), absoluteInstallDirs)
import Distribution.Simple.InstallDirs (InstallDirs(..))
import Distribution.Setup (CopyDest(..))
import Distribution.Simple.Setup (CopyDest(..))
#ifndef __NHC__
import Control.Exception (try)
......
......@@ -51,11 +51,11 @@ import Distribution.Compat.ReadP(readP_to_S)
import Distribution.Package (showPackageId)
import Distribution.PackageDescription
import Distribution.ParseUtils(Field(..), readFields, parseCommaList, parseFilePathQ)
import Distribution.Program(ConfiguredProgram(..), requireProgram, programPath,
import Distribution.Simple.Program(ConfiguredProgram(..), requireProgram, programPath,
hscolourProgram, haddockProgram, rawSystemProgram)
import Distribution.PreProcess (ppCpp', ppUnlit, preprocessSources,
import Distribution.Simple.PreProcess (ppCpp', ppUnlit, preprocessSources,
PPSuffixHandler, runSimplePreProcessor)
import Distribution.Setup
import Distribution.Simple.Setup
import Distribution.Simple.InstallDirs (InstallDirTemplates(..),
PathTemplateVariable(..),
toPathTemplate, fromPathTemplate,
......
......@@ -50,13 +50,13 @@ import Distribution.PackageDescription
withLib,
Executable(..), withExe, Library(..),
libModules, hcOptions, autogenModuleName )
import Distribution.Compiler ( Compiler(..), CompilerFlavor(..), Flag )
import Distribution.Program ( ProgramConfiguration, userMaybeSpecifyPath,
import Distribution.Simple.Compiler ( Compiler(..), CompilerFlavor(..), Flag )
import Distribution.Simple.Program ( ProgramConfiguration, userMaybeSpecifyPath,
requireProgram, rawSystemProgram,
ffihugsProgram, hugsProgram )
import Distribution.Version ( Version(..), VersionRange(AnyVersion) )
import Distribution.PreProcess ( ppCpp, runSimplePreProcessor )
import Distribution.PreProcess.Unlit
import Distribution.Simple.PreProcess ( ppCpp, runSimplePreProcessor )
import Distribution.Simple.PreProcess.Unlit
( unlit )
import Distribution.Simple.LocalBuildInfo
( LocalBuildInfo(..), autogenModulesDir )
......
......@@ -66,8 +66,8 @@ import Distribution.Simple.LocalBuildInfo (
import Distribution.Simple.Utils (createDirectoryIfMissingVerbose,
copyFileVerbose, die,
copyDirectoryRecursiveVerbose)
import Distribution.Compiler (CompilerFlavor(..), Compiler(..))
import Distribution.Setup (CopyFlags(..), CopyDest(..))
import Distribution.Simple.Compiler (CompilerFlavor(..), Compiler(..))
import Distribution.Simple.Setup (CopyFlags(..), CopyDest(..))
import qualified Distribution.Simple.GHC as GHC
import qualified Distribution.Simple.JHC as JHC
......
......@@ -71,9 +71,9 @@ import Distribution.Package (PackageIdentifier(..), showPackageId)
import Distribution.PackageDescription (PackageDescription(package))
import Data.Version (showVersion)
import Distribution.System (OS(..), os)
import Distribution.Compiler (CompilerFlavor(..))
import Distribution.Simple.Compiler (CompilerFlavor(..))
-- TODO: move CopyDest to this module
import Distribution.Setup (CopyDest(..))
import Distribution.Simple.Setup (CopyDest(..))
#if mingw32_HOST_OS || mingw32_TARGET_OS
import Foreign
......
......@@ -52,10 +52,10 @@ import Distribution.PackageDescription
import Distribution.Simple.LocalBuildInfo
( LocalBuildInfo(..),
autogenModulesDir )
import Distribution.Compiler ( Compiler(..), CompilerFlavor(..), Flag,
import Distribution.Simple.Compiler ( Compiler(..), CompilerFlavor(..), Flag,
extensionsToFlags )
import Language.Haskell.Extension (Extension(..))
import Distribution.Program ( ConfiguredProgram(..), jhcProgram,
import Distribution.Simple.Program ( ConfiguredProgram(..), jhcProgram,
ProgramConfiguration, userMaybeSpecifyPath,
requireProgram, rawSystemProgram )
import Distribution.Version ( VersionRange(AnyVersion) )
......
......@@ -61,11 +61,11 @@ module Distribution.Simple.LocalBuildInfo (
import Distribution.Simple.InstallDirs hiding (absoluteInstallDirs,
prefixRelativeInstallDirs)
import qualified Distribution.Simple.InstallDirs as InstallDirs
import Distribution.Setup (CopyDest(..))
import Distribution.Program (ProgramConfiguration)
import Distribution.Simple.Setup (CopyDest(..))
import Distribution.Simple.Program (ProgramConfiguration)
import Distribution.PackageDescription (PackageDescription(..))
import Distribution.Package (PackageIdentifier(..))
import Distribution.Compiler (Compiler(..))
import Distribution.Simple.Compiler (Compiler(..))
import System.FilePath (FilePath, (</>))
-- |Data cached after configuration step. See also
......
......@@ -50,10 +50,10 @@ import Distribution.PackageDescription
Library(..), libModules, hcOptions)
import Distribution.Simple.LocalBuildInfo
( LocalBuildInfo(..) )
import Distribution.Compiler ( Compiler(..), CompilerFlavor(..), Flag,
import Distribution.Simple.Compiler ( Compiler(..), CompilerFlavor(..), Flag,
extensionsToFlags )
import Language.Haskell.Extension (Extension(..))
import Distribution.Program ( ProgramConfiguration, userMaybeSpecifyPath,
import Distribution.Simple.Program ( ProgramConfiguration, userMaybeSpecifyPath,
requireProgram, hmakeProgram,
rawSystemProgram )
import Distribution.Version ( VersionRange(AnyVersion) )
......
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.PreProcess
-- Module : Distribution.Simple.PreProcess
--
-- Maintainer : Isaac Jones <ijones@syntaxpolice.org>
-- Stability : alpha
......@@ -46,7 +46,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -}
module Distribution.PreProcess (preprocessSources, knownSuffixHandlers,
module Distribution.Simple.PreProcess (preprocessSources, knownSuffixHandlers,
ppSuffixes, PPSuffixHandler, PreProcessor,
runSimplePreProcessor,
removePreprocessed, removePreprocessedPackage,
......@@ -56,15 +56,15 @@ module Distribution.PreProcess (preprocessSources, knownSuffixHandlers,
where
import Distribution.PreProcess.Unlit (unlit)
import Distribution.Simple.PreProcess.Unlit (unlit)
import Distribution.PackageDescription (setupMessage, PackageDescription(..),
BuildInfo(..), Executable(..), withExe,
Library(..), withLib, libModules)
import Distribution.Compiler (CompilerFlavor(..), Compiler(..), compilerVersion)
import Distribution.Simple.Compiler (CompilerFlavor(..), Compiler(..), compilerVersion)
import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..))
import Distribution.Simple.Utils (createDirectoryIfMissingVerbose, die,
moduleToFilePath, moduleToFilePath2)
import Distribution.Program (Program(..), ConfiguredProgram(..), lookupProgram,
import Distribution.Simple.Program (Program(..), ConfiguredProgram(..), lookupProgram,
rawSystemProgramConf, rawSystemProgram,
greencardProgram, cpphsProgram, hsc2hsProgram,
c2hsProgram, happyProgram, alexProgram,
......
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.PreProcess.Unlit
-- Module : Distribution.Simple.PreProcess.Unlit
-- Copyright : ...
--
-- Maintainer : Malcolm Wallace <Malcolm.Wallace@cs.york.ac.uk>
......@@ -14,7 +14,7 @@
-- /Report on the Programming Language Haskell/,
-- version 1.2, appendix C.
module Distribution.PreProcess.Unlit(unlit,plain) where
module Distribution.Simple.PreProcess.Unlit(unlit,plain) where
import Data.Char
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment