ghc-hetmet.git
14 years agoTemplate Haskell: allow type splices
simonpj@microsoft.com [Wed, 27 May 2009 18:12:42 +0000 (18:12 +0000)]
Template Haskell: allow type splices

At last!  Trac #1476 and #3177

This patch extends Template Haskell by allowing splices in
types.  For example

  f :: Int -> $(burble 3)

A type splice should work anywhere a type is expected.  This feature
has been long requested, and quite a while ago I'd re-engineered the
type checker to make it easier, but had never got around to finishing
the job.  With luck, this does it.

There's a ToDo in the HsSpliceTy case of RnTypes.rnHsType, where I
am not dealing properly with the used variables; but that's awaiting
the refactoring of the way we report unused names.

14 years agoTemplate Haskell: improve lifting for strings
simonpj@microsoft.com [Wed, 27 May 2009 18:08:40 +0000 (18:08 +0000)]
Template Haskell: improve lifting for strings

When you have a (\s::String -> ....[| s |]....), the string
's' is lifted.  We used to get a chain of single-character
Cons nodes, correct but lots and lots of code.

This patch arranges to optimise that to a string literal. It does
so in two places:
  a) In TcExpr, if we know that s::String, we generate liftString directly
  b) In DsMeta, if we find a list of character literals, we convert to
     a string.  This catches a few cases that (a) does not

There an accompanying  patch in the template-haskell package,
adding Language.Haskell.TH.Syntax.liftString

14 years agoRename conDeclsNames to hsConDeclsNames, and export it
simonpj@microsoft.com [Wed, 27 May 2009 18:00:32 +0000 (18:00 +0000)]
Rename conDeclsNames to hsConDeclsNames, and export it

14 years agoComments about wiredInIds
simonpj@microsoft.com [Wed, 27 May 2009 17:56:03 +0000 (17:56 +0000)]
Comments about wiredInIds

14 years agoWibble some comments to avoid haddock parse errors
Ian Lynagh [Tue, 26 May 2009 19:29:53 +0000 (19:29 +0000)]
Wibble some comments to avoid haddock parse errors

14 years agoAdd a haddock target, for just building the haddock docs
Ian Lynagh [Tue, 26 May 2009 19:04:59 +0000 (19:04 +0000)]
Add a haddock target, for just building the haddock docs

14 years agoAdd some more $s to rules/haddock.mk for consistency
Ian Lynagh [Tue, 26 May 2009 18:41:27 +0000 (18:41 +0000)]
Add some more $s to rules/haddock.mk for consistency

14 years agoFix haddocking
Ian Lynagh [Tue, 26 May 2009 18:40:34 +0000 (18:40 +0000)]
Fix haddocking
We were looking at HADDOCK_DOCS instead of $$(HADDOCK_DOCS)

14 years agoMake the sed in configure.ac more portable
Ian Lynagh [Mon, 25 May 2009 12:00:21 +0000 (12:00 +0000)]
Make the sed in configure.ac more portable

14 years agoRemove legacy code that isn't used now that we require GHC >= 6.8
Ian Lynagh [Sun, 24 May 2009 20:44:12 +0000 (20:44 +0000)]
Remove legacy code that isn't used now that we require GHC >= 6.8

14 years agoRemove unused variables
Ian Lynagh [Sun, 24 May 2009 13:53:50 +0000 (13:53 +0000)]
Remove unused variables

14 years agoRemove unused variables
Ian Lynagh [Sun, 24 May 2009 13:47:53 +0000 (13:47 +0000)]
Remove unused variables

14 years agoBe more precise about munging compiler/stage1/inplace-pkg-config
Ian Lynagh [Sun, 24 May 2009 13:34:39 +0000 (13:34 +0000)]
Be more precise about munging compiler/stage1/inplace-pkg-config
We were removing ".$(ProjectPatchLevel)" from anywhere in the file.
However, it included absolute paths, so if you untar a source
tarball into its default directory name, e.g.
"6.11.$(ProjectPatchLevel)", then the sed would break the paths.

14 years agoUse the more portable %lu rather than %zu
Ian Lynagh [Sun, 24 May 2009 13:15:04 +0000 (13:15 +0000)]
Use the more portable %lu rather than %zu
We now also need to cast the values to (unsigned long), as on some
platforms sizeof returns (unsigned int).

14 years agoClean libraries/bootstrapping.conf
Ian Lynagh [Sun, 24 May 2009 13:14:54 +0000 (13:14 +0000)]
Clean libraries/bootstrapping.conf

14 years agoFix warnings
Ian Lynagh [Sat, 23 May 2009 23:14:38 +0000 (23:14 +0000)]
Fix warnings

14 years agoFix warnings in genprimopcode
Ian Lynagh [Sat, 23 May 2009 22:27:15 +0000 (22:27 +0000)]
Fix warnings in genprimopcode

14 years agoFix warnings in mkDerivedConstants
Ian Lynagh [Sat, 23 May 2009 21:58:36 +0000 (21:58 +0000)]
Fix warnings in mkDerivedConstants

14 years agoFix warnings in ghc-cabal
Ian Lynagh [Sat, 23 May 2009 21:35:18 +0000 (21:35 +0000)]
Fix warnings in ghc-cabal

14 years agoTurn on warnings when validating
Ian Lynagh [Sat, 23 May 2009 21:34:51 +0000 (21:34 +0000)]
Turn on warnings when validating

14 years agoFix configure
Ian Lynagh [Sat, 23 May 2009 00:42:31 +0000 (00:42 +0000)]
Fix configure

14 years agoghc_ge_607 is now always true
Ian Lynagh [Sat, 23 May 2009 00:16:43 +0000 (00:16 +0000)]
ghc_ge_607 is now always true

14 years agoSanity check the platforms we are given
Ian Lynagh [Sat, 23 May 2009 00:04:45 +0000 (00:04 +0000)]
Sanity check the platforms we are given

14 years agoChange how we find the host/build/target platforms
Ian Lynagh [Fri, 22 May 2009 23:30:22 +0000 (23:30 +0000)]
Change how we find the host/build/target platforms
Rather than using the autoconf built-in stuff and mangling it, we
now just ask the bootstrapping compiler what platform we are on.

When doing a port of GHC, you need to specify the platform you are
porting to.

The minimum version of GHC required is now 6.8.

14 years agoremove old todo comment
Simon Marlow [Wed, 20 May 2009 22:44:27 +0000 (22:44 +0000)]
remove old todo comment

14 years agodocument -XUnicodeSyntax
Simon Marlow [Wed, 20 May 2009 22:36:47 +0000 (22:36 +0000)]
document -XUnicodeSyntax

15 years agoexport sysErrorBelch
Simon Marlow [Sat, 28 Mar 2009 19:13:55 +0000 (19:13 +0000)]
export sysErrorBelch

14 years ago rm package.conf.inplace in distclean, not clean
Simon Marlow [Wed, 6 May 2009 19:52:16 +0000 (19:52 +0000)]
 rm package.conf.inplace in distclean, not clean

14 years ago#2197: try to detect when GHCi is compiled with -prof and emit an error message
Simon Marlow [Wed, 6 May 2009 19:48:02 +0000 (19:48 +0000)]
#2197: try to detect when GHCi is compiled with -prof and emit an error message

15 years agofix typo
Simon Marlow [Sat, 28 Mar 2009 21:15:18 +0000 (21:15 +0000)]
fix typo

14 years agoRemove hacky on-demand building of libraries/*/ghc.mk, put it back in sh boot
Simon Marlow [Fri, 22 May 2009 08:33:51 +0000 (08:33 +0000)]
Remove hacky on-demand building of libraries/*/ghc.mk, put it back in sh boot
Now that the clean rules don't require libraries/*/ghc.mk, we don't
have to build them on demand.  And having them built on demand
introduced a failure mode (where some libraries have ghc.mk and some
don't).

14 years agoFix unregisterised bindists
Ian Lynagh [Thu, 21 May 2009 22:35:19 +0000 (22:35 +0000)]
Fix unregisterised bindists

14 years agoPass CFLAGS and LDFLAGS to libffi's configure
Ian Lynagh [Thu, 21 May 2009 16:02:10 +0000 (16:02 +0000)]
Pass CFLAGS and LDFLAGS to libffi's configure

14 years agoDon't overwrite the *OPTS/*Opts variables in mk/validate-settings.mk
Ian Lynagh [Thu, 21 May 2009 14:19:38 +0000 (14:19 +0000)]
Don't overwrite the *OPTS/*Opts variables in mk/validate-settings.mk
Overwriting means we lose the -m64 on OS X 64.

14 years agoBuild and install gmp.h
Ian Lynagh [Thu, 21 May 2009 13:36:14 +0000 (13:36 +0000)]
Build and install gmp.h

14 years agoClean gmp.h
Ian Lynagh [Thu, 21 May 2009 13:36:06 +0000 (13:36 +0000)]
Clean gmp.h

14 years agoNeed to pass gcc -m64 on amd64 OSX
Ian Lynagh [Wed, 20 May 2009 17:05:08 +0000 (17:05 +0000)]
Need to pass gcc -m64 on amd64 OSX

14 years agoSet C compiler and linker flags correctly for OS X 64
Ian Lynagh [Thu, 21 May 2009 12:44:59 +0000 (12:44 +0000)]
Set C compiler and linker flags correctly for OS X 64

14 years agoFix #3201: "ar: Bad file number" build error with MSYS and SplitObjs=YES
Simon Marlow [Thu, 21 May 2009 10:31:31 +0000 (10:31 +0000)]
Fix #3201: "ar: Bad file number" build error with MSYS and SplitObjs=YES

14 years agofix warning (and validate)
Simon Marlow [Thu, 21 May 2009 08:19:32 +0000 (08:19 +0000)]
fix warning (and validate)

14 years agodon't clean GMP before validating (it rarely changes, and is slow to build)
Simon Marlow [Thu, 21 May 2009 07:48:40 +0000 (07:48 +0000)]
don't clean GMP before validating (it rarely changes, and is slow to build)

14 years agoremove a todo item (bug #2966 is fixed)
Simon Marlow [Wed, 20 May 2009 13:05:04 +0000 (13:05 +0000)]
remove a todo item (bug #2966 is fixed)

14 years agoWhen linking a shared library with --make, always do the link step
Duncan Coutts [Tue, 19 May 2009 12:11:49 +0000 (12:11 +0000)]
When linking a shared library with --make, always do the link step
Without -shared, the default target is a binary and in that case
it makes sense for --make to not try and link a binary when there
is no Main module. But for a shared library the user already has
to specify -shared and there's no reason a shared lib should
contain any Main module or main function.

14 years agoPass --enable-shared and --with-hscolour to ghc-cabal configure
Duncan Coutts [Tue, 19 May 2009 12:09:53 +0000 (12:09 +0000)]
Pass --enable-shared and --with-hscolour to ghc-cabal configure
It tried to do this already, but the make variable name was wrong.

14 years agoUse shared lib mode -dynload deploy to build the rts and core shared libs
Duncan Coutts [Tue, 19 May 2009 12:08:01 +0000 (12:08 +0000)]
Use shared lib mode -dynload deploy to build the rts and core shared libs
This is now the same as the old default. Currently we cannot embed
rpaths because they would point to the build tree. We should embed
rpaths relative to the $ORIGIN in future.

14 years agoMake -dynload sysdep mean to embed rpaths in shared libs as well as binaries
Duncan Coutts [Tue, 19 May 2009 12:05:33 +0000 (12:05 +0000)]
Make -dynload sysdep mean to embed rpaths in shared libs as well as binaries
Previously it only did it for binaries. This was presumably on the
theory that the binary could specify the rpath for all the libs.
However when it is the shared lib that is the final product (ie to
link into a bigger project) then we need the rpaths for the shared
lib to be self-contianed.

14 years agoSwitch the default -dynload mode to SystemDependent
Duncan Coutts [Sun, 17 May 2009 00:36:30 +0000 (00:36 +0000)]
Switch the default -dynload mode to SystemDependent
The previous default was Deployable though it was being
overridden to Wrapper in the ghc shell script wrapper.

14 years agoSet the soname when creating a shared lib
Duncan Coutts [Fri, 15 May 2009 20:37:30 +0000 (20:37 +0000)]
Set the soname when creating a shared lib
It's still possible to override it, just use -optl-Wl,-soname, eg:
ghc -shared -dynamic foo.o -o libfoo.so -optl-Wl,-soname,libbar.so

14 years agoKeep C main separate from rts lib and link it in for standalone progs
Duncan Coutts [Fri, 15 May 2009 16:08:14 +0000 (16:08 +0000)]
Keep C main separate from rts lib and link it in for standalone progs
Previously the object code for the C main function lived in the rts
lib, however this is a problem when the rts is built as a shared lib.
With Windows DLLs it always causes problems while on ELF systems it's a
problem when the user decides to use their own C main function rather
than a Haskell Main.main. So instead we now put main in it's own tiny
little static lib libHSrtsmain.a which we install next to the rts libs.
Whenever ghc links a program (without -no-hs-main) then it also links
in -lHSrtsmain. For consistency we always do it this way now rather
than trying to do it differently for static vs shared libraries.

14 years agoRemove old Windows-only implementation of keeping main outside the rts
Duncan Coutts [Thu, 14 May 2009 18:35:50 +0000 (18:35 +0000)]
Remove old Windows-only implementation of keeping main outside the rts
We now do it for all ways and for all platforms. This was a Windows-only
version that only kept a separate Main.dyn_o for the dynamic linking case.
It had to do that because Windows DLLs are stricter about unresolved symbols
where as for ELF platforms we only run into the problem when we're not using
a Haskell main function.

14 years agoFix silly make macro mistake in a rule used in the --enable-shared case
Duncan Coutts [Thu, 14 May 2009 18:42:16 +0000 (18:42 +0000)]
Fix silly make macro mistake in a rule used in the --enable-shared case

14 years agoWindows: load msvcrt and kernel32 manually
Simon Marlow [Wed, 20 May 2009 12:43:10 +0000 (12:43 +0000)]
Windows: load msvcrt and kernel32 manually

14 years agoNeed to pass gcc -m64 on amd64 OSX
Ian Lynagh [Wed, 20 May 2009 22:40:20 +0000 (22:40 +0000)]
Need to pass gcc -m64 on amd64 OSX

14 years agoOS X / amd64 fixes
Ian Lynagh [Wed, 20 May 2009 22:36:10 +0000 (22:36 +0000)]
OS X / amd64 fixes

14 years agoFix the unregisterised build
Ian Lynagh [Wed, 20 May 2009 22:10:46 +0000 (22:10 +0000)]
Fix the unregisterised build

14 years agoBuild fix for amd64/OSX
Ian Lynagh [Wed, 20 May 2009 21:17:05 +0000 (21:17 +0000)]
Build fix for amd64/OSX

14 years agoFix building with the HEAD
Ian Lynagh [Wed, 20 May 2009 20:25:32 +0000 (20:25 +0000)]
Fix building with the HEAD

14 years agoNeed to pass gcc -m64 on amd64 OSX
Ian Lynagh [Wed, 20 May 2009 17:05:08 +0000 (17:05 +0000)]
Need to pass gcc -m64 on amd64 OSX

14 years agoUse machdepCCOpts when running "as"
Ian Lynagh [Wed, 20 May 2009 16:58:11 +0000 (16:58 +0000)]
Use machdepCCOpts when running "as"

14 years agoUse SRC_HC_OPTS when making ghc-cabal and ghc-pkg
Ian Lynagh [Wed, 20 May 2009 13:00:09 +0000 (13:00 +0000)]
Use SRC_HC_OPTS when making ghc-cabal and ghc-pkg

14 years agoFix building ghc-pkg when bootstrapping
Ian Lynagh [Wed, 20 May 2009 12:22:41 +0000 (12:22 +0000)]
Fix building ghc-pkg when bootstrapping

14 years agoSimplify ghc-pkg's ghc.mk slightly
Ian Lynagh [Wed, 20 May 2009 12:19:40 +0000 (12:19 +0000)]
Simplify ghc-pkg's ghc.mk slightly

14 years agoSet CLEANING=YES for the clean_% targets
Ian Lynagh [Wed, 20 May 2009 11:43:12 +0000 (11:43 +0000)]
Set CLEANING=YES for the clean_% targets

14 years agoUse SRC_CC_OPTS when making HSffi.o
Ian Lynagh [Tue, 19 May 2009 19:57:42 +0000 (19:57 +0000)]
Use SRC_CC_OPTS when making HSffi.o

14 years agomake [123] omits phases 1,2, and 3
Simon Marlow [Tue, 19 May 2009 08:34:19 +0000 (08:34 +0000)]
make [123] omits phases 1,2, and 3

14 years agoallow phases to be omitted by setting OMIT_PHASE_[123]=YES
Simon Marlow [Tue, 19 May 2009 08:33:50 +0000 (08:33 +0000)]
allow phases to be omitted by setting OMIT_PHASE_[123]=YES

14 years agofix a dependency: Makefile -> includes/Makefile
Simon Marlow [Tue, 19 May 2009 08:33:17 +0000 (08:33 +0000)]
fix a dependency: Makefile -> includes/Makefile

14 years agoMake -Odph imply -fsimplifier-phases=3
Roman Leshchinskiy [Tue, 19 May 2009 05:58:07 +0000 (05:58 +0000)]
Make -Odph imply -fsimplifier-phases=3

14 years agoAdd missing word, spotted by Tom Lokhorst
Max Bolingbroke [Mon, 18 May 2009 15:33:14 +0000 (15:33 +0000)]
Add missing word, spotted by Tom Lokhorst

14 years agofix typo: TH.ModName -> TH.PkgName
Simon Marlow [Mon, 18 May 2009 12:04:57 +0000 (12:04 +0000)]
fix typo: TH.ModName -> TH.PkgName

14 years agoFix #3236: emit a helpful error message when the RTS has not been initialised
Simon Marlow [Mon, 18 May 2009 10:41:08 +0000 (10:41 +0000)]
Fix #3236: emit a helpful error message when the RTS has not been initialised

14 years agoFix #3207: add has_side_effects = True for lots of primops
Simon Marlow [Fri, 15 May 2009 14:36:08 +0000 (14:36 +0000)]
Fix #3207: add has_side_effects = True for lots of primops
and document primOpHasSideEffects

14 years agoBootstrapping fixes
Ian Lynagh [Sun, 17 May 2009 13:05:58 +0000 (13:05 +0000)]
Bootstrapping fixes

14 years agoBootstrapping fixes
Ian Lynagh [Sun, 17 May 2009 00:11:46 +0000 (00:11 +0000)]
Bootstrapping fixes

14 years agoBootstrapping fixes
Ian Lynagh [Sat, 16 May 2009 18:30:20 +0000 (18:30 +0000)]
Bootstrapping fixes

14 years agoRemove a done TODO item
Ian Lynagh [Sat, 16 May 2009 17:58:36 +0000 (17:58 +0000)]
Remove a done TODO item

14 years agoAdd libraries/dph/LICENSE to bindists
Ian Lynagh [Sat, 16 May 2009 13:00:16 +0000 (13:00 +0000)]
Add libraries/dph/LICENSE to bindists

14 years agoTweak bindist creation
Ian Lynagh [Sat, 16 May 2009 12:55:27 +0000 (12:55 +0000)]
Tweak bindist creation
libraries built by stage2 need all their bits in the bindist too.
We were testing (stage == 1) rather than (stage /= 0).

14 years agoMove the fixed paths out of config.mk, so cleaning works without configuring
Ian Lynagh [Sat, 16 May 2009 12:12:48 +0000 (12:12 +0000)]
Move the fixed paths out of config.mk, so cleaning works without configuring

14 years agoRemove an incorrect comment
Ian Lynagh [Sat, 16 May 2009 12:02:55 +0000 (12:02 +0000)]
Remove an incorrect comment

14 years agoHide more make rules when cleaning
Ian Lynagh [Sat, 16 May 2009 11:45:11 +0000 (11:45 +0000)]
Hide more make rules when cleaning

14 years agoRemove some $(TOP)s that cause problems on Windows (as they contain ':')
Ian Lynagh [Sat, 16 May 2009 00:11:18 +0000 (00:11 +0000)]
Remove some $(TOP)s that cause problems on Windows (as they contain ':')

14 years agoDisable suffix rules when cleaning
Ian Lynagh [Fri, 15 May 2009 23:19:47 +0000 (23:19 +0000)]
Disable suffix rules when cleaning

14 years agoDon't require the library ghc.mk files in order to clean
Ian Lynagh [Fri, 15 May 2009 23:15:16 +0000 (23:15 +0000)]
Don't require the library ghc.mk files in order to clean

14 years agoAdd a maintainer-clean rule
Ian Lynagh [Fri, 15 May 2009 22:56:59 +0000 (22:56 +0000)]
Add a maintainer-clean rule

14 years agoMake dph required
Ian Lynagh [Fri, 15 May 2009 20:51:22 +0000 (20:51 +0000)]
Make dph required

14 years agoRemove --extra flag from darcs-all
Ian Lynagh [Fri, 15 May 2009 20:36:46 +0000 (20:36 +0000)]
Remove --extra flag from darcs-all

14 years agoRemove nofib-analyse
Ian Lynagh [Fri, 15 May 2009 20:02:41 +0000 (20:02 +0000)]
Remove nofib-analyse
It's now in the nofib repo.

14 years agoMove hasktags out of the GHC repo
Ian Lynagh [Fri, 15 May 2009 13:57:55 +0000 (13:57 +0000)]
Move hasktags out of the GHC repo
Now configure looks for it as an installed program instead.

14 years agoFurther fixes to the stage1 version hack; fix validate.
Simon Marlow [Fri, 15 May 2009 11:11:09 +0000 (11:11 +0000)]
Further fixes to the stage1 version hack; fix validate.
I'm less convinced this is a good idea now.  But it does avoid
rebuilding most of stage1 when you pull and reconfigure.  Better
solutions welcome.

14 years agoremove warning settings; we already have warnings turned on everywhere
Simon Marlow [Fri, 15 May 2009 09:40:46 +0000 (09:40 +0000)]
remove warning settings; we already have warnings turned on everywhere

14 years agodisable all docs in the "quick" and "devel" builds
Simon Marlow [Fri, 15 May 2009 09:35:00 +0000 (09:35 +0000)]
disable all docs in the "quick" and "devel" builds

14 years agoremove XmlDocWays relic
Simon Marlow [Fri, 15 May 2009 09:44:52 +0000 (09:44 +0000)]
remove XmlDocWays relic

14 years agocleanup: remove reference to $1_$2_CONFIGURE_FLAGS, which is never used
Simon Marlow [Fri, 15 May 2009 09:28:58 +0000 (09:28 +0000)]
cleanup: remove reference to $1_$2_CONFIGURE_FLAGS, which is never used
we also have $1_$2_CONFIGURE_OPTS, which is used.

14 years agofix cut-and-pasto in mkWeakForeignEnv#, causing random segfaults
Simon Marlow [Fri, 15 May 2009 09:23:56 +0000 (09:23 +0000)]
fix cut-and-pasto in mkWeakForeignEnv#, causing random segfaults

14 years agoFix maintainer-clean for library/dph
Manuel M T Chakravarty [Fri, 15 May 2009 02:48:12 +0000 (02:48 +0000)]
Fix maintainer-clean for library/dph

14 years agouse StgWord for the lock (fixes valgrind complaint on 64-bit machines)
Simon Marlow [Thu, 14 May 2009 14:55:24 +0000 (14:55 +0000)]
use StgWord for the lock (fixes valgrind complaint on 64-bit machines)

14 years agodon't rebuild the whole of stage 1 just because the date has changed
Simon Marlow [Thu, 14 May 2009 09:36:36 +0000 (09:36 +0000)]
don't rebuild the whole of stage 1 just because the date has changed

14 years agoRemove left-over bits of extralib support
Ian Lynagh [Thu, 14 May 2009 12:58:04 +0000 (12:58 +0000)]
Remove left-over bits of extralib support

14 years agoClean the right directory in bindisttest
Ian Lynagh [Thu, 14 May 2009 12:50:44 +0000 (12:50 +0000)]
Clean the right directory in bindisttest