Ian Lynagh [Tue, 23 Jun 2009 22:45:16 +0000 (22:45 +0000)]
Add boot-pkgs and packages to the source dists
Ian Lynagh [Tue, 23 Jun 2009 00:19:46 +0000 (00:19 +0000)]
Fix the GHCi debugger so that it can recognise Integers again
Ian Lynagh [Mon, 22 Jun 2009 22:44:23 +0000 (22:44 +0000)]
Follow Integer changes
Ian Lynagh [Mon, 22 Jun 2009 22:17:16 +0000 (22:17 +0000)]
Add the integer package
integer-gmp's Integer is now wrapped by an Integer type in integer.
Simon Marlow [Mon, 22 Jun 2009 14:07:24 +0000 (14:07 +0000)]
follow change in System.Posix.Internals.c_open
Simon Marlow [Wed, 17 Jun 2009 14:06:57 +0000 (14:06 +0000)]
fix 'make 1'
Simon Marlow [Wed, 3 Jun 2009 14:33:48 +0000 (14:33 +0000)]
remove unused cruft
Ian Lynagh [Mon, 22 Jun 2009 14:44:43 +0000 (14:44 +0000)]
Add a couple more symbols to the Linker.c table
Fixes ghci loading gmp on Windows
Ian Lynagh [Wed, 17 Jun 2009 12:17:11 +0000 (12:17 +0000)]
makefile tweak
Ian Lynagh [Tue, 16 Jun 2009 23:17:50 +0000 (23:17 +0000)]
Add an _EXTRA_OBJS variable when linking packages
Ian Lynagh [Tue, 16 Jun 2009 17:37:12 +0000 (17:37 +0000)]
Remove more GMP bits
Ian Lynagh [Tue, 16 Jun 2009 17:04:17 +0000 (17:04 +0000)]
Add a #endif back that was accidentally removed from package.conf.in
Ian Lynagh [Mon, 15 Jun 2009 21:47:58 +0000 (21:47 +0000)]
Make sure we aren't passing -Werror in the CFLAGS for configure scripts
When configure tests for a feature it may not generate warning-free C
code, and thus may think that the feature doesn't exist if -Werror is
on.
Ian Lynagh [Mon, 15 Jun 2009 20:16:04 +0000 (20:16 +0000)]
Pass CFLAGS and LDFLAGS to configure scripts
Ian Lynagh [Mon, 15 Jun 2009 13:33:57 +0000 (13:33 +0000)]
.cmm rules need to depend on $$($1_$2_HC_DEP), not $$($1_$2_HC)
Ian Lynagh [Sun, 14 Jun 2009 18:31:50 +0000 (18:31 +0000)]
Move gmp into libraries/integer-gmp
Duncan Coutts [Sat, 13 Jun 2009 19:19:56 +0000 (19:19 +0000)]
Stop building the rts against gmp
Nothing from gmp is used in the rts anymore.
Duncan Coutts [Sat, 13 Jun 2009 19:18:51 +0000 (19:18 +0000)]
Remove the implementation of gmp primops from the rts
Duncan Coutts [Sat, 13 Jun 2009 16:58:41 +0000 (16:58 +0000)]
Stop setting the gmp memory functions in the rts
and remove the implementations of stg(Alloc|Realloc|Dealloc)ForGMP
Duncan Coutts [Sat, 13 Jun 2009 14:24:10 +0000 (14:24 +0000)]
Remove the gmp/Integer primops from the compiler
The implementations are still in the rts.
Ian Lynagh [Thu, 11 Jun 2009 16:20:38 +0000 (16:20 +0000)]
Put the CMM objects in the GHCi library too
Ian Lynagh [Thu, 11 Jun 2009 13:40:57 +0000 (13:40 +0000)]
Add rules for building .cmm files in libraries
Duncan Coutts [Sat, 13 Jun 2009 17:06:22 +0000 (17:06 +0000)]
Exports a few rts things we need for cmm code in external packages
In particular we need alloc_blocks and alloc_blocks_lim for MAYBE_GC.
The gmp cmm primops also use stg_ARR_WORDS_info.
Duncan Coutts [Fri, 12 Jun 2009 11:41:56 +0000 (11:41 +0000)]
Add and export rts_unsafeGetMyCapability from rts
We need this, or something equivalent, to be able to implement
stgAllocForGMP outside of the rts. That's because we want to use
allocateLocal which allocates from the given capability without
having to take any locks. In the gmp primops we're basically in
an unsafe foreign call, that is a context where we hold a current
capability. So it's safe for us to use allocateLocal. We just
need a way to get the current capability. The method to get the
current capability varies depends on whether we're using the
threaded rts or not. When stgAllocForGMP is built inside the rts
that's ok because we can do it conditionally on THREADED_RTS.
Outside the rts we need a single api we can call without knowing
if we're talking to a threaded rts or not, hence this addition.
Duncan Coutts [Thu, 11 Jun 2009 20:26:47 +0000 (20:26 +0000)]
Require GHCForeignImportPrim for "foreign import prim"
In practise currently you also need UnliftedFFITypes, however
the restriction to just unlifted types may be lifted in future.
Duncan Coutts [Thu, 11 Jun 2009 16:59:05 +0000 (16:59 +0000)]
Add missing StgPrimCallOp case in repCCallConv
We don't handle "foreign import prim" in TH stuff.
Ian Lynagh [Thu, 11 Jun 2009 12:27:27 +0000 (12:27 +0000)]
Add missing StgPrimCallOp case to isSimpleOp
Duncan Coutts [Thu, 11 Jun 2009 11:52:43 +0000 (11:52 +0000)]
Reverse the safe/unsafe requirement on foreign import prim
The safe/unsafe annotation doesn't currently mean anything for prim.
Just in case we decide it means something later it's better to stick
to using one or the other consistently. We decided that using safe
is the better one to require (and it's also the default).
Duncan Coutts [Tue, 9 Jun 2009 15:11:55 +0000 (15:11 +0000)]
Add PrimCall to the STG layer and update Core -> STG translation
It adds a third case to StgOp which already hold StgPrimOp and StgFCallOp.
The code generation for the new StgPrimCallOp case is almost exactly the
same as for out-of-line primops. They now share the tailCallPrim function.
In the Core -> STG translation we map foreign calls using the "prim"
calling convention to the StgPrimCallOp case. This is because in Core we
represent prim calls using the ForeignCall stuff. At the STG level however
the prim calls are really much more like primops than foreign calls.
Duncan Coutts [Tue, 9 Jun 2009 10:59:45 +0000 (10:59 +0000)]
Desugaring for "foreign import prim"
Unlike normal foreign imports which desugar into a separate worker and
wrapper, we use just a single wrapper decleration. The representation
in Core of the call is currently as a foreign call. This means the
args are all treated as fully strict. This is ok at the moment because
we restrict the types for foreign import prim to be of unboxed types,
however in future we may want to make prim imports be the normal cmm
calling convention for Haskell functions, in which case we would not
be able to assume all args are strict. At that point it may make more
sense to represent cmm/prim calls distinct from foreign calls, and
more like the we the existing PrimOp calls are handled.
Duncan Coutts [Tue, 9 Jun 2009 10:48:26 +0000 (10:48 +0000)]
Typechecking for "foreign import prim"
The main restriction is that all args and results must be unboxed types.
In particular we allow unboxed tuple results (which is a primary
motivation for the whole feature). The normal rules apply about
"void rep" result types like State#. We only allow "prim" calling
convention for import, not export. The other forms of import, "dynamic",
"wrapper" and data label are banned as a conseqence of checking that the
imported name is a valid C string. We currently require prim imports to
be marked unsafe, though this is essentially arbitrary as the safety
information is unused.
Duncan Coutts [Tue, 9 Jun 2009 10:45:36 +0000 (10:45 +0000)]
Lexing and parsing for "foreign import prim"
We only allow simple function label imports, not the normal complicated
business with "wrapper" "dynamic" or data label "&var" imports.
Duncan Coutts [Tue, 9 Jun 2009 10:44:03 +0000 (10:44 +0000)]
Add new FFI calling convention "prim"
First in a series of patches to add the feature.
This patch just adds PrimCallConv to the CCallConv type.
Ian Lynagh [Sat, 20 Jun 2009 15:51:54 +0000 (15:51 +0000)]
The IO type has moved to GHC.Types in ghc-prim
Ian Lynagh [Sat, 20 Jun 2009 14:26:00 +0000 (14:26 +0000)]
Fix the way in the +RTS --info output
Ian Lynagh [Wed, 17 Jun 2009 12:18:06 +0000 (12:18 +0000)]
Set DELETE_ON_ERROR in ghc.mk
Ian Lynagh [Tue, 16 Jun 2009 18:25:01 +0000 (18:25 +0000)]
Fix the ghci wrapper
The ${1+"$@"} was being evaluated by make, rather than being escaped.
Simon Marlow [Thu, 18 Jun 2009 09:07:18 +0000 (09:07 +0000)]
Fix #3132: a case of bogus code generation
Simon Marlow [Tue, 16 Jun 2009 15:24:55 +0000 (15:24 +0000)]
Fix #3279, #3288: fix crash encountered when calling unblock inside unsafePerformIO
See comments for details
Simon Marlow [Mon, 18 May 2009 12:09:57 +0000 (12:09 +0000)]
drop packedstring; it is no longer required by template-haskell
Simon Marlow [Tue, 16 Jun 2009 08:57:08 +0000 (08:57 +0000)]
suggest "cd <dir>; make help"
Simon Marlow [Tue, 16 Jun 2009 08:53:41 +0000 (08:53 +0000)]
Add support for 'make help' in subdirectories
Including help for directory-specific targets, such as 'make 1' in ghc
Simon Marlow [Tue, 16 Jun 2009 08:53:02 +0000 (08:53 +0000)]
mention 'make {html,ps,pdf}'
Simon Marlow [Tue, 16 Jun 2009 08:44:51 +0000 (08:44 +0000)]
eliminate "warning: overriding commnds..." from make when we're cleaning
Simon Marlow [Mon, 15 Jun 2009 14:00:08 +0000 (14:00 +0000)]
Add 'make help', displaying a list of useful make targets
Simon Marlow [Mon, 15 Jun 2009 13:58:01 +0000 (13:58 +0000)]
Add 'make fast' which omits deps (for a library) and some of the phases
Simon Marlow [Mon, 15 Jun 2009 13:57:16 +0000 (13:57 +0000)]
add the missing final row of dashes in the success message
Simon Marlow [Mon, 15 Jun 2009 13:56:51 +0000 (13:56 +0000)]
'make 1' in libraries builds just the stage1 libs
i.e. not dph, and hence not stage2
Simon Marlow [Mon, 15 Jun 2009 13:55:32 +0000 (13:55 +0000)]
add 'make stage1_libs', to make just the stage 1 libs
i.e. not dph, and hence not the stage 2 compiler.
Simon Marlow [Mon, 15 Jun 2009 11:05:45 +0000 (11:05 +0000)]
copyFileWithHeader: use binary Handles
Fixes failure when Haddocking Data.Monoid in libraries/base
Ian Lynagh [Sat, 13 Jun 2009 16:17:07 +0000 (16:17 +0000)]
Include runghc and unlit in bindists
Ian Lynagh [Sat, 13 Jun 2009 16:15:16 +0000 (16:15 +0000)]
Improve bindist testing
We now also test runghc and unlit
Ian Lynagh [Fri, 12 Jun 2009 23:58:23 +0000 (23:58 +0000)]
Remove the haskeline-specific hacks from ghc-cabal
Now that base does -liconv when it is necessary, it is no longer
necessary for haskeline to do it as well, as haskeline depends on base.
Thus we don't need the haskeline-specific hacks in ghc-cabal any more.
Ian Lynagh [Fri, 12 Jun 2009 23:38:18 +0000 (23:38 +0000)]
Remove library buildinfo files when cleaning
Ian Lynagh [Fri, 12 Jun 2009 19:40:29 +0000 (19:40 +0000)]
Update symbol names; fixes the build on OSX
Simon Marlow [Wed, 10 Jun 2009 10:47:48 +0000 (10:47 +0000)]
don't check for stack underflow if we just had an overflow
Simon Marlow [Mon, 8 Jun 2009 08:27:05 +0000 (08:27 +0000)]
pprExpr: don't add extra parens around [a..b] in an argument position
test is tcfail205
Simon Marlow [Fri, 29 May 2009 13:18:22 +0000 (13:18 +0000)]
Changes for the new IO library, mainly base-package modules moving around
Ian Lynagh [Fri, 12 Jun 2009 10:48:27 +0000 (10:48 +0000)]
Fix the compiler-hs-dependency's
We needed some more $s to delay evaluation until the values are
available, and the calls needed to be later in the ghc.mk so that
compiler_stage2_WAYS etc are defined.
Ian Lynagh [Thu, 11 Jun 2009 16:28:58 +0000 (16:28 +0000)]
Doc building is now controlled by sensible variables
Ian Lynagh [Thu, 11 Jun 2009 16:27:56 +0000 (16:27 +0000)]
HC bootstrapping now works
Ian Lynagh [Thu, 11 Jun 2009 16:27:30 +0000 (16:27 +0000)]
bindists are now done
Ian Lynagh [Thu, 11 Jun 2009 13:01:44 +0000 (13:01 +0000)]
Add some $s to rules/build-package.mk for consistency
Duncan Coutts [Thu, 11 Jun 2009 12:34:41 +0000 (12:34 +0000)]
Deprecate the threadsafe kind of foreign import
Duncan Coutts [Thu, 11 Jun 2009 15:48:52 +0000 (15:48 +0000)]
Remove __encodeDouble and __encodeFloat from the rts
They now live in the integer-gmp package.
Duncan Coutts [Thu, 11 Jun 2009 11:28:24 +0000 (11:28 +0000)]
Add recently added lib dirs to the darcs boring file
Duncan Coutts [Thu, 4 Jun 2009 12:16:52 +0000 (12:16 +0000)]
Fix the flag used to force linking when we are making a shared library
This is a correction to the patch:
* When linking a shared library with --make, always do the link step
which used the wrong flag in making the decision. It used -dynamic
whereas the correct flag is -shared.
Duncan Coutts [Mon, 8 Jun 2009 14:55:09 +0000 (14:55 +0000)]
Check we're not using stdcall in foreign export on unsupported platforms
It's already checked for foreign import, but was missing for export.
Duncan Coutts [Wed, 10 Jun 2009 17:36:09 +0000 (17:36 +0000)]
Remove the various mp registers from the StgRegTable
No longer need them as temp vars in the cmm primop implementations.
Duncan Coutts [Wed, 10 Jun 2009 17:30:26 +0000 (17:30 +0000)]
Convert the gmp cmm primops to use local stack allocation
Using global temp vars is really ugly and in the threaded case it
needs slots in the StgRegTable. It'd also be pretty silly once we
move the cmm primops out of the rts, into the integer-gmp package.
Duncan Coutts [Wed, 10 Jun 2009 17:22:15 +0000 (17:22 +0000)]
Make killThread# cmm primop use local stack allocation
It using the mp_tmp_w register/global as a convenient temporary
variable. This is naughty because those vars are supposed to be
for gmp. Also, we want to remove the gmp temp vars so we must
now use a local stack slot instead.
Ian Lynagh [Wed, 10 Jun 2009 18:18:25 +0000 (18:18 +0000)]
Make Windows bindists and installers work in the new build system
Ian Lynagh [Wed, 10 Jun 2009 12:46:11 +0000 (12:46 +0000)]
Change GHC_OPTIONS to OPTIONS_GHC
Ian Lynagh [Tue, 9 Jun 2009 12:17:05 +0000 (12:17 +0000)]
Define _BSD_SOURCE in Stg.h
This means that, on Linux, we get functions like gamma defined when we
#include math.h
Ian Lynagh [Mon, 8 Jun 2009 20:39:35 +0000 (20:39 +0000)]
Put "%expect 0" directives in the .y files
With the exception of GHC's main Parser.y(.pp), which has 2
reduce/reduce conflicts
Ian Lynagh [Fri, 5 Jun 2009 17:17:04 +0000 (17:17 +0000)]
Update to libffi 3.0.8; fixes trac #3119
Ian Lynagh [Fri, 5 Jun 2009 16:05:38 +0000 (16:05 +0000)]
Fix the libffi Makefile
Ian Lynagh [Fri, 5 Jun 2009 16:04:31 +0000 (16:04 +0000)]
Add a README saying where libffi tarballs come from
Ian Lynagh [Fri, 5 Jun 2009 15:15:44 +0000 (15:15 +0000)]
ghc-pkg now takes a verbosity argument
Ian Lynagh [Fri, 5 Jun 2009 13:13:24 +0000 (13:13 +0000)]
Follow Cabal changes
Ian Lynagh [Fri, 5 Jun 2009 12:29:29 +0000 (12:29 +0000)]
Update the docs on how you bind unlifted types in let/where clauses
Ian Lynagh [Fri, 5 Jun 2009 12:23:48 +0000 (12:23 +0000)]
Document -fwarn-lazy-unlifted-bindings
Ian Lynagh [Fri, 5 Jun 2009 12:20:48 +0000 (12:20 +0000)]
Fix typo
simonpj@microsoft.com [Fri, 5 Jun 2009 14:00:09 +0000 (14:00 +0000)]
Mention that generalised list comprehensions are enabled with -XTransformListComp
Ian Lynagh [Fri, 5 Jun 2009 11:43:16 +0000 (11:43 +0000)]
Make a proper Opt_WarnLazyUnliftedBindings warning, with a flag etc
Ian Lynagh [Thu, 4 Jun 2009 12:45:01 +0000 (12:45 +0000)]
Fix ghc-cabal, so that GHC.Prim gets registered when we install
Simon Marlow [Thu, 4 Jun 2009 09:35:39 +0000 (09:35 +0000)]
fix a warning
Simon Marlow [Thu, 4 Jun 2009 09:05:53 +0000 (09:05 +0000)]
Lock the StablePtr table during GC
Allows hs_free_fun_ptr() to be called by a separate thread
Simon Marlow [Thu, 4 Jun 2009 08:48:24 +0000 (08:48 +0000)]
fix $(TOP)
Simon Marlow [Thu, 4 Jun 2009 08:47:49 +0000 (08:47 +0000)]
remove a prototype that shouldn't be here
Ian Lynagh [Wed, 3 Jun 2009 12:12:09 +0000 (12:12 +0000)]
Merge the TODO lists in ghc.mk
Simon Marlow [Wed, 3 Jun 2009 10:12:44 +0000 (10:12 +0000)]
Tighten up the DocBook XSL stylesheet test
It wasn't failing even when the DTD was not found.
Simon Marlow [Wed, 3 Jun 2009 09:23:13 +0000 (09:23 +0000)]
fix logic for BUID_DOCBOOK_HTML
simonpj@microsoft.com [Wed, 3 Jun 2009 09:29:56 +0000 (09:29 +0000)]
Allow RULES for seq, and exploit them
Roman found situations where he had
case (f n) of _ -> e
where he knew that f (which was strict in n) would terminate if n did.
Notice that the result of (f n) is discarded. So it makes sense to
transform to
case n of _ -> e
Rather than attempt some general analysis to support this, I've added
enough support that you can do this using a rewrite rule:
RULE "f/seq" forall n. seq (f n) e = seq n e
You write that rule. When GHC sees a case expression that discards
its result, it mentally transforms it to a call to 'seq' and looks for
a RULE. (This is done in Simplify.rebuildCase.) As usual, the
correctness of the rule is up to you.
This patch implements the extra stuff. I have not documented it explicitly
in the user manual yet... let's see how useful it is first.
The patch looks bigger than it is, because
a) Comments; see esp MkId Note [seqId magic]
b) Some refactoring. Notably, I moved the special desugaring for
seq from MkCore back into DsUtils where it properly belongs.
(It's really a desugaring thing, not a CoreSyn invariant.)
c) Annoyingly, in a RULE left-hand side we need to be careful that
the magical desugaring done in MkId Note [seqId magic] item (c)
is *not* done on the LHS of a rule. Or rather, we arrange to
un-do it, in DsBinds.decomposeRuleLhs.
Ian Lynagh [Tue, 2 Jun 2009 18:22:11 +0000 (18:22 +0000)]
Remove the unused remains of __decodeFloat
Simon Marlow [Tue, 2 Jun 2009 14:02:33 +0000 (14:02 +0000)]
Remove old GUM/GranSim code
Simon Marlow [Tue, 2 Jun 2009 13:49:43 +0000 (13:49 +0000)]
tidy up autoconfiguration of docbook stuff
* use --nonet, so xmllint and co don't go off trying to download
stuff from the web
* use the http:// reference for the stylesheet, so we don't have to
search the filesystem for it (should speedup ./configure)
Simon Marlow [Tue, 2 Jun 2009 12:16:18 +0000 (12:16 +0000)]
fix 'make sdist'
Ian Lynagh [Tue, 2 Jun 2009 12:47:00 +0000 (12:47 +0000)]
Add a comment about why RM and RM_OPTS are not in config.mk
Ian Lynagh [Tue, 2 Jun 2009 12:46:44 +0000 (12:46 +0000)]
Follow the change in RM's definition in distrib/Makefile-bin-vars.in