ghc-hetmet.git
13 years agoGive the inferred type when warning of a missing type-signature (Trac #1256)
simonpj@microsoft.com [Wed, 25 Apr 2007 07:47:19 +0000 (07:47 +0000)]
Give the inferred type when warning of a missing type-signature (Trac #1256)

13 years agoMake ticky work, at least partly, on 64-bit machines
simonpj@microsoft.com [Tue, 24 Apr 2007 13:30:11 +0000 (13:30 +0000)]
Make ticky work, at least partly, on 64-bit machines

The ticky StgEntCounter structure was trying to be clever by using a
fixed-width 32-bit field for the registeredp value.  But the code generators
are not up to handling structures packed tightly like this (on a 64-bit
architecture); result seg-fault on 64-bit.

Really there should be some complaint from the code generators, not simply
a seg fault.

Anyway I switched to using native words for StgEntCounter fields, and
now at least it works.

13 years agoAdd WAY_debug_t_NAME and WAY_debug_t_HC_OPTS
simonpj@microsoft.com [Tue, 24 Apr 2007 13:29:18 +0000 (13:29 +0000)]
Add WAY_debug_t_NAME and WAY_debug_t_HC_OPTS

13 years agoFix bug in boxySplitTyConApp
simonpj@microsoft.com [Tue, 24 Apr 2007 12:43:34 +0000 (12:43 +0000)]
Fix bug in boxySplitTyConApp

Merge to STABLE branch

This bug was discovered by Nicolas Frisby.  It's an egregious missing guard
in boxySplitTyConApp.

Test is tcfail180

13 years agorevert previous fix until I can find out why it was wrong
Simon Marlow [Mon, 23 Apr 2007 13:05:45 +0000 (13:05 +0000)]
revert previous fix until I can find out why it was wrong
should fix recent GHCi problems in the HEAD

13 years agoFixes to datacon wrappers for indexed data types
simonpj@microsoft.com [Sun, 22 Apr 2007 21:35:03 +0000 (21:35 +0000)]
Fixes to datacon wrappers for indexed data types

nominolo@gmail.com pointed out (Trac #1204) that indexed data types
aren't quite right. I investigated and found that the wrapper
functions for indexed data types, generated in MkId, are really very
confusing.  In particular, we'd like these combinations to work
newtype + indexed data type
GADT + indexted data type
The wrapper situation gets a bit complicated!

I did a bit of refactoring, and improved matters, I think.  I am not
certain that I have gotten it right yet, but I think it's better.
I'm committing it now becuase it's been on my non-backed-up laptop for
a month and I want to get it into the repo. I don't think I've broken
anything, but I don't regard it as 'done'.

13 years agoPart 2 of: Fix corner case of useless constraint in SPECIALISE pragma
simonpj@microsoft.com [Sun, 22 Apr 2007 21:32:23 +0000 (21:32 +0000)]
Part 2 of: Fix corner case of useless constraint in SPECIALISE pragma

MERGE TO STABLE

I forgot to include this in the previous patch and Darcs
crashes if I try 'amend-record' or 'unrecord' because I
have a partial repo.  Sigh.

13 years agoFix corner case of useless constraint in SPECIALISE pragma
simonpj@microsoft.com [Sun, 22 Apr 2007 21:29:11 +0000 (21:29 +0000)]
Fix corner case of useless constraint in SPECIALISE pragma

MERGE TO STABLE

This patch fixes Trac #1287.

The problem is described in Note [Unused spec binders] in DsBinds.

At the same time I realised that the error messages in DsBinds.dsPrag
were being given the location of the *binding* not the *pragma*.
So I've fixed that too.

13 years agoWarning police
simonpj@microsoft.com [Sun, 22 Apr 2007 21:19:37 +0000 (21:19 +0000)]
Warning police

13 years agoPut the default value for -dppr-user-length in the manual
simonpj@microsoft.com [Sun, 22 Apr 2007 21:14:42 +0000 (21:14 +0000)]
Put the default value for -dppr-user-length in the manual

MERGE TO STABLE

Incidentally, this flag should probably be renamed -dppr-user-depth

13 years agoImprove depth-cutoff for printing HsSyn in error messages
simonpj@microsoft.com [Sun, 22 Apr 2007 21:10:49 +0000 (21:10 +0000)]
Improve depth-cutoff for printing HsSyn in error messages

MERGE TO STABLE

The "user style" in Outputable allows us to elide large expressions
when printing HsSyn, printing "..." instead.  This is done by calling
Outputable.pprDeeper.

But there was no mechanism for trimming very long lists, which
occur when using do-notation or explicit lists.  This patch fixes
the problem, by adding Outputable.pprDeeperList.

I also made some of the pretty-printing in HsExpr rather more
vigorous about increasing the depth; in particular, pprParendExpr.
This should make debug prints shorter.

13 years agoComments only (concerning rewrite rules)
simonpj@microsoft.com [Sun, 22 Apr 2007 21:06:14 +0000 (21:06 +0000)]
Comments only (concerning rewrite rules)

13 years agoFix the GHC.Base.inline builtin rule
simonpj@microsoft.com [Fri, 20 Apr 2007 21:10:23 +0000 (21:10 +0000)]
Fix the GHC.Base.inline builtin rule

The BuiltIn rule for GHC.Base.inline wasn't working for two reasons:

 a) inlineIdName wasn't in basicKnownKeyNames
 b) The rule function wasn't taking into account the type argument

Thanks to Brian Alliet for spotting this bug.

13 years agoHaskell list syntax for the :print command
Pepe Iborra [Fri, 20 Apr 2007 17:02:06 +0000 (17:02 +0000)]
Haskell list syntax for the :print command

I did quite a bit of clean up in the Term pretty printer code too.
Support for infix constructors is still on the TODO list

13 years agoOutputable.cparen
Pepe Iborra [Fri, 20 Apr 2007 16:18:28 +0000 (16:18 +0000)]
Outputable.cparen

13 years agowibbles
Pepe Iborra [Fri, 20 Apr 2007 16:15:31 +0000 (16:15 +0000)]
wibbles

13 years agobreakpoints: fix the in-scope set for 'where' clauses
Simon Marlow [Fri, 20 Apr 2007 14:53:54 +0000 (14:53 +0000)]
breakpoints: fix the in-scope set for 'where' clauses

13 years agoremove unused imports
Simon Marlow [Fri, 20 Apr 2007 10:55:48 +0000 (10:55 +0000)]
remove unused imports

13 years agoremove a ToDo
Simon Marlow [Fri, 20 Apr 2007 10:35:23 +0000 (10:35 +0000)]
remove a ToDo

13 years agonew commnad :abandon, discards the current computation (used to be :break stop)
Simon Marlow [Fri, 20 Apr 2007 10:35:16 +0000 (10:35 +0000)]
new commnad :abandon, discards the current computation (used to be :break stop)

13 years agosplit off :ctags and :etags support into a separate file
Simon Marlow [Fri, 20 Apr 2007 10:25:36 +0000 (10:25 +0000)]
split off :ctags and :etags support into a separate file

13 years agoexport SrcSpan & utils from GHC
Simon Marlow [Fri, 20 Apr 2007 10:25:11 +0000 (10:25 +0000)]
export SrcSpan & utils from GHC

13 years agoThe prompt now shows the current breakpoint
Simon Marlow [Thu, 19 Apr 2007 15:20:13 +0000 (15:20 +0000)]
The prompt now shows the current breakpoint

when stopped at a breakpoint we now get:

  [Test3.hs:2:17-30] *Main>

when there is a stack of breakpoints, we get:

  ... [Test3.hs:2:17-30] *Main>

showing just the topmost one.  Better suggestions are welcome, but
this seems not too bad to me.

13 years agofix padding calculation in listAround
Simon Marlow [Thu, 19 Apr 2007 14:40:05 +0000 (14:40 +0000)]
fix padding calculation in listAround

13 years agoimprove the heuristics to pick the best breakpoint on a given line
Simon Marlow [Thu, 19 Apr 2007 14:39:54 +0000 (14:39 +0000)]
improve the heuristics to pick the best breakpoint on a given line

13 years agoMore debugger improvements
Simon Marlow [Thu, 19 Apr 2007 14:23:58 +0000 (14:23 +0000)]
More debugger improvements

":list" shows the code around the current breakpoint.  Also it
highlights the current expression in bold (the bold/unbold codes are
hardwired to the ANSI codes right now, I'll provide a way to change
them later).

":set stop <cmd>" causes <cmd> to be run each time we stop at a
breakpoint.  In particular, ":set stop :list" is particularly useful.

13 years agowe weren't adding breakpoints on parenthesised expressions
Simon Marlow [Thu, 19 Apr 2007 14:19:05 +0000 (14:19 +0000)]
we weren't adding breakpoints on parenthesised expressions

13 years agoGet the InteractiveContext right when stopped at a breakpoint
Simon Marlow [Thu, 19 Apr 2007 09:49:09 +0000 (09:49 +0000)]
Get the InteractiveContext right when stopped at a breakpoint
we shouldn't be binding 'it' until the computation has actually finished.

13 years agomore layering cleanup: BreakArray should come from GHC
Simon Marlow [Thu, 19 Apr 2007 09:48:06 +0000 (09:48 +0000)]
more layering cleanup: BreakArray should come from GHC

13 years agoupdate the help text
Simon Marlow [Wed, 18 Apr 2007 14:42:01 +0000 (14:42 +0000)]
update the help text

13 years agoadd some DEBUG assertions
Pepe Iborra [Thu, 19 Apr 2007 11:53:37 +0000 (11:53 +0000)]
add some DEBUG assertions

13 years agoWhen possible, replace unification by matching in the RTTI steps
Pepe Iborra [Thu, 19 Apr 2007 11:52:20 +0000 (11:52 +0000)]
When possible, replace unification by matching in the RTTI steps
(RTTI is used in the :print command)
This gives a decent efficiency improvement

13 years ago:print command - Do not compute all the custom printers, only the first one matching
Pepe Iborra [Sat, 14 Apr 2007 17:30:46 +0000 (17:30 +0000)]
:print command - Do not compute all the custom printers, only the first one matching

13 years agoAdd GhciMonad to the package.conf.in Modules list
Pepe Iborra [Fri, 30 Mar 2007 09:19:18 +0000 (09:19 +0000)]
Add GhciMonad to the package.conf.in Modules list

When I factored the GhciMonad out of InteractiveUI.hs, I forgot to expose it in the ghc package

13 years agoFix bat-script generation for MSys
simonpj@microsoft.com [Wed, 18 Apr 2007 16:05:19 +0000 (16:05 +0000)]
Fix bat-script generation for MSys

The bat-script generation was using the wrong paths, in
ghc-inplace
ghc-pkg
hsc2hs
plus there was a double-backslah in the latter two which was wrong.
This patch fixes both.  See "MSys Note 3" in compiler/Makefile

13 years agoPass configure arguments to the library configure scripts
Ian Lynagh [Wed, 18 Apr 2007 15:55:22 +0000 (15:55 +0000)]
Pass configure arguments to the library configure scripts

13 years agoAdd support for breaking by function name: ':break foo'
Simon Marlow [Wed, 18 Apr 2007 14:22:17 +0000 (14:22 +0000)]
Add support for breaking by function name: ':break foo'
This is a bit hacky; it grabs the source location from the Name and
tries to set a breakpoint at that location, which in most cases
should be the breakpoint covering the whole definition.

13 years agoimprove completion for debugger commands
Simon Marlow [Wed, 18 Apr 2007 14:20:36 +0000 (14:20 +0000)]
improve completion for debugger commands

13 years agounused import
Simon Marlow [Wed, 18 Apr 2007 14:20:08 +0000 (14:20 +0000)]
unused import

13 years agoRestore the interactive context when resuming a breakpoint
Simon Marlow [Wed, 18 Apr 2007 13:41:16 +0000 (13:41 +0000)]
Restore the interactive context when resuming a breakpoint
So that we don't accumulate bindings from previous breakpoints, which
could lead to a space leak.

13 years agoremove dead code
Simon Marlow [Wed, 18 Apr 2007 13:40:51 +0000 (13:40 +0000)]
remove dead code

13 years agoadd ':show context' which lists the current stack of breakpoint contexts
Simon Marlow [Wed, 18 Apr 2007 13:38:56 +0000 (13:38 +0000)]
add ':show context' which lists the current stack of breakpoint contexts

13 years agohandle out-of-range lines in :break more gracefully
Simon Marlow [Wed, 18 Apr 2007 13:38:24 +0000 (13:38 +0000)]
handle out-of-range lines in :break more gracefully

13 years agosmall cleanup: showForUser -> printForUser, eliminate some duplicate code
Simon Marlow [Wed, 18 Apr 2007 12:49:48 +0000 (12:49 +0000)]
small cleanup: showForUser -> printForUser, eliminate some duplicate code

13 years agoCheck we have all the corelibs when we boot
Ian Lynagh [Wed, 18 Apr 2007 12:45:36 +0000 (12:45 +0000)]
Check we have all the corelibs when we boot

13 years agoadd missing module
Simon Marlow [Wed, 18 Apr 2007 12:41:24 +0000 (12:41 +0000)]
add missing module

13 years agoVarious cleanups and improvements to the breakpoint support
Simon Marlow [Wed, 18 Apr 2007 11:47:00 +0000 (11:47 +0000)]
Various cleanups and improvements to the breakpoint support

  - move parts of the debugger implementation below the GHC API where
    they belong.  There is still more in Debugger that violates the
    layering, hopefully I'll get to that later.

  - instead of returning an IO action from runStmt for resuming,
    return a ResumeHandle that is passed to GHC.resume.

  - breakpoints now return [Name] which is displayed in the same
    way as when a binding statement is executed.

  - :load, :add, :reload now clear the active breakpoints and context

  - :break gives a sensible error when used on a non-interpreted module

  - export breakpoint-related types from GHC

  - remove a bunch of layer-violating imports from InteractiveUI

  - remove some more vestiges of the old breakpoint code (topLevel in
    the GHCi state).

  - remove TickTree and use a simple array instead, cached per module

13 years agoadd module header
Simon Marlow [Wed, 18 Apr 2007 11:25:11 +0000 (11:25 +0000)]
add module header

13 years agoremove extraneous "+1"; column numbers start at zero
Simon Marlow [Tue, 17 Apr 2007 14:35:12 +0000 (14:35 +0000)]
remove extraneous "+1"; column numbers start at zero

13 years agoAdd distclean target for libraries/ (== clean target)
Ian Lynagh [Wed, 18 Apr 2007 11:31:22 +0000 (11:31 +0000)]
Add distclean target for libraries/ (== clean target)

13 years agoDistinguish between userError (i.e., deliberate failure) and other immediate and...
Tyson Whitehead [Tue, 10 Apr 2007 14:17:09 +0000 (14:17 +0000)]
Distinguish between userError (i.e., deliberate failure) and other immediate and embedded exceptions for TH splices for trac #1265

13 years agoRe-working of the breakpoint support
Simon Marlow [Tue, 17 Apr 2007 14:24:58 +0000 (14:24 +0000)]
Re-working of the breakpoint support

This is the result of Bernie Pope's internship work at MSR Cambridge,
with some subsequent improvements by me.  The main plan was to

 (a) Reduce the overhead for breakpoints, so we could enable
     the feature by default without incurrent a significant penalty
 (b) Scatter more breakpoint sites throughout the code

Currently we can set a breakpoint on almost any subexpression, and the
overhead is around 1.5x slower than normal GHCi.  I hope to be able to
get this down further and/or allow breakpoints to be turned off.

This patch also fixes up :print following the recent changes to
constructor info tables.  (most of the :print tests now pass)

We now support single-stepping, which just enables all breakpoints.

  :step <expr>     executes <expr> with single-stepping turned on
  :step            single-steps from the current breakpoint

The mechanism is quite different to the previous implementation.  We
share code with the HPC (haskell program coverage) implementation now.
The coverage pass annotates source code with "tick" locations which
are tracked by the coverage tool.  In GHCi, each "tick" becomes a
potential breakpoint location.

Previously breakpoints were compiled into code that magically invoked
a nested instance of GHCi.  Now, a breakpoint causes the current
thread to block and control is returned to GHCi.

See the wiki page for more details and the current ToDo list:

  http://hackage.haskell.org/trac/ghc/wiki/NewGhciDebugger

13 years agoremove the ITBL_SIZE constants which were wrong, but fortunately unused
Simon Marlow [Tue, 17 Apr 2007 09:25:59 +0000 (09:25 +0000)]
remove the ITBL_SIZE constants which were wrong, but fortunately unused

13 years agocon_desc should be an OFFSET_FIELD
Simon Marlow [Tue, 17 Apr 2007 09:25:26 +0000 (09:25 +0000)]
con_desc should be an OFFSET_FIELD

13 years agofix building with pre-6.4
Simon Marlow [Mon, 16 Apr 2007 08:27:32 +0000 (08:27 +0000)]
fix building with pre-6.4

13 years agoChange tabs to spaces in string literals
Ian Lynagh [Mon, 16 Apr 2007 21:13:42 +0000 (21:13 +0000)]
Change tabs to spaces in string literals

13 years agoRemove whitespace, mostly tabs, from string literals
Ian Lynagh [Mon, 16 Apr 2007 19:15:24 +0000 (19:15 +0000)]
Remove whitespace, mostly tabs, from string literals

13 years agoMERGE: another attempt at a workaround for #1110 (Vista bug)
Simon Marlow [Mon, 16 Apr 2007 14:22:23 +0000 (14:22 +0000)]
MERGE: another attempt at a workaround for #1110 (Vista bug)
now instead of setting GCC_EXEC_PREFIX, we just add the appropriate
gcc-lib directory to the front of PATH before invoking gcc.

13 years agoMERGE: Fix a few uses of the wrong return convention for the scheduler
Simon Marlow [Mon, 16 Apr 2007 14:19:02 +0000 (14:19 +0000)]
MERGE: Fix a few uses of the wrong return convention for the scheduler
We changed the convention a while ago so that BaseReg is returned to
the scheduler in R1, because BaseReg may change during the run of a
thread, e.g. during a foreign call.  A few places got missed,
mostly for very rare events.

Should fix concprog001, although I'm not able to reliably reproduce
the failure.

13 years agostm doesn't need to be a core-package
Ian Lynagh [Mon, 16 Apr 2007 13:24:21 +0000 (13:24 +0000)]
stm doesn't need to be a core-package

13 years agoSplit objects when building libraries (if SplitObjs is YES)
Ian Lynagh [Mon, 16 Apr 2007 13:23:32 +0000 (13:23 +0000)]
Split objects when building libraries (if SplitObjs is YES)

13 years agotab, verttab, formfeed, and CR are not allowed in strings
Simon Marlow [Mon, 16 Apr 2007 11:04:33 +0000 (11:04 +0000)]
tab, verttab, formfeed, and CR are not allowed in strings
See #1277

13 years agoAdd missing special case for GHC.Prim
Simon Marlow [Mon, 16 Apr 2007 13:04:57 +0000 (13:04 +0000)]
Add missing special case for GHC.Prim
The special cases for GHC.Prim are a bit fragile.  We were relying on
(a) the base package to be already registered and (b) the base package
not to be hidden.  These used to be true with the old library build
system, but aren't true now.  I'm still not sure why we aren't seeing
failures at the moment, but this patch at least fixes the build with
'setup makefile'.

13 years agoDon't try to install docs stuff if NO_HADDOCK_DOCS=YES
Ian Lynagh [Sun, 15 Apr 2007 16:27:17 +0000 (16:27 +0000)]
Don't try to install docs stuff if NO_HADDOCK_DOCS=YES

13 years agoImplement ifBuildable
Ian Lynagh [Sun, 15 Apr 2007 16:23:15 +0000 (16:23 +0000)]
Implement ifBuildable
ifBuildable only runs a command it is given if the library in . either
must be built (core-package - readline) or is buildable.

13 years agomake opt_HiVersion an Integer instead of Int to prevent overflow
wolfgang.thaller@gmx.net [Sat, 14 Apr 2007 21:40:27 +0000 (21:40 +0000)]
make opt_HiVersion an Integer instead of Int to prevent overflow

When a snapshot version number is included, opt_HiVersion tends to exceed the range of a 32bit Int.

MERGE TO STABLE

13 years agoAllow ProjectTags to be specified in mk/build.mk
Ian Lynagh [Fri, 13 Apr 2007 23:05:55 +0000 (23:05 +0000)]
Allow ProjectTags to be specified in mk/build.mk
ProjectTags is expected to be of the form -tag1-tag2 (i.e. the same as
Cabal tags). These are appended to the GHC version number.

13 years agoFix a typo related to i386 PIC code generation
wolfgang.thaller@gmx.net [Thu, 12 Apr 2007 21:47:01 +0000 (21:47 +0000)]
Fix a typo related to i386 PIC code generation

A recent patch accidentally had x86_TARGET_ARCH instead of i386_TARGET_ARCH.

13 years agoDarwin/x86_64 linker support
wolfgang.thaller@gmx.net [Thu, 12 Apr 2007 21:45:15 +0000 (21:45 +0000)]
Darwin/x86_64 linker support

Initial support for loading x86_64 Mach-O files

13 years agoautoreconf -> sh boot
Ian Lynagh [Thu, 12 Apr 2007 22:36:36 +0000 (22:36 +0000)]
autoreconf -> sh boot

13 years agoDarwin/i386 NCG: fix assembly syntax in symbol stubs
wolfgang.thaller@gmx.net [Thu, 12 Apr 2007 21:53:13 +0000 (21:53 +0000)]
Darwin/i386 NCG: fix assembly syntax in symbol stubs

In i386 position-independent symbol stubs, the NCG used to print
jmp %edx
instead of
jmp *%edx

Apple's assembler used to silently accept this, but has recently started to print warnings about it.

MERGE TO STABLE.

13 years agoDarwin Linker: Do not add local symbols to lochash
wolfgang.thaller@gmx.net [Thu, 12 Apr 2007 21:17:12 +0000 (21:17 +0000)]
Darwin Linker: Do not add local symbols to lochash
... so that GHCi doesn't complain about duplicate symbols when two C modules define the same static variable.

MERGE TO STABLE.

13 years agoHandle Weak Definitions in the Darwin Linker
wolfgang.thaller@gmx.net [Thu, 12 Apr 2007 21:01:55 +0000 (21:01 +0000)]
Handle Weak Definitions in the Darwin Linker

The __i686.get_pc_thunk symbols generated by gcc's PIC code generator are weak definitions that appear in every object file, so we need to deal with them.

MERGE TO STABLE.

13 years agoCheck boot seems to have been run before we let make proceed
Ian Lynagh [Thu, 12 Apr 2007 22:30:14 +0000 (22:30 +0000)]
Check boot seems to have been run before we let make proceed

13 years agowibble to prep-bin-dist-mingw target
Simon Marlow [Thu, 12 Apr 2007 13:21:15 +0000 (13:21 +0000)]
wibble to prep-bin-dist-mingw target

13 years agotidy up the binary-dist targets a bit more
Simon Marlow [Thu, 12 Apr 2007 13:17:02 +0000 (13:17 +0000)]
tidy up the binary-dist targets a bit more

13 years agofurther tweak the comments
Simon Marlow [Wed, 11 Apr 2007 14:57:36 +0000 (14:57 +0000)]
further tweak the comments

13 years agofix comment
Simon Marlow [Wed, 11 Apr 2007 14:51:55 +0000 (14:51 +0000)]
fix comment

13 years agodo the right thing by default with a current mingw
Simon Marlow [Wed, 11 Apr 2007 14:48:25 +0000 (14:48 +0000)]
do the right thing by default with a current mingw
and hopefully be a bit cleverer about finding things automatically.

13 years agoMERGE: add prep-bin-dist-mingw to binary-dist target, and add a separate target for
Simon Marlow [Thu, 12 Apr 2007 13:13:27 +0000 (13:13 +0000)]
MERGE: add prep-bin-dist-mingw to binary-dist target, and add a separate target for
 publish-binary-dist

13 years agoMERGE: fixes to prep-bin-dist-mingw, and add separate rule to tar the bindist
Simon Marlow [Thu, 12 Apr 2007 13:10:12 +0000 (13:10 +0000)]
MERGE: fixes to prep-bin-dist-mingw, and add separate rule to tar the bindist

13 years agocall prep-bin-dist-mingw as part of binary-dist, before we make the tarball
Simon Marlow [Wed, 11 Apr 2007 14:52:35 +0000 (14:52 +0000)]
call prep-bin-dist-mingw as part of binary-dist, before we make the tarball

13 years agoRemove redundant import
Ian Lynagh [Wed, 11 Apr 2007 21:38:33 +0000 (21:38 +0000)]
Remove redundant import

13 years agoRationalise GhcMode, HscTarget and GhcLink
Simon Marlow [Wed, 11 Apr 2007 10:18:02 +0000 (10:18 +0000)]
Rationalise GhcMode, HscTarget and GhcLink

This patch cleans up the GHC API, and adds some functionality: we can
now compile to object code inside GHCi.

Previously we had:

  data GhcMode
    = BatchCompile
    | Interactive
    | OneShot
    | JustTypecheck
    | MkDepend

  data HscTarget
    = HscC
    | HscAsm
    | HscJava
    | HscInterpreted
    | HscNothing

There was redundancy here; if GhcMode is Interactive, then only
HscInterpreted makes sense, and JustTypecheck required HscNothing.
Now we have:

  data GhcMode
    = CompManager       -- ^ --make, GHCi, etc.
    | OneShot           -- ^ ghc -c Foo.hs
    | MkDepend          -- ^ ghc -M, see Finder for why we need this

and HscTarget remains as before.

Previously GhcLink looked like this:

  data GhcLink = NoLink | StaticLink

Now we have:

  data GhcLink = NoLink | LinkBinary | LinkInMemory

The idea being that you can have an HscTarget of HscAsm (for example)
and still link in memory.

There are two new flags:

  -fobject-code selects object code as the target (selects
                either -fasm or -fvia-C, whichever is the default)
                This can be usd with ':set' in GHCi, or on the command line.

  -fbyte-code   sets byte-code as the target.  Only works in GHCi.
                One day maybe this could save the byte code in a file
                when used outside GHCi.

  (names chosen for consistency with -fno-code).

Changes to the GHC API: newSession no longer takes the GhcMode
argument.  The GhcMode defaults to CompManager, which is usually what
you want.  To do JustTypecheck now, just set hscTarget to HscNothing.

13 years agoUse "$@" rather than $* when calling things in darcs-all
Ian Lynagh [Wed, 11 Apr 2007 01:22:58 +0000 (01:22 +0000)]
Use "$@" rather than $* when calling things in darcs-all

13 years agoBuild library Setup.hs's with -Wall
Ian Lynagh [Wed, 11 Apr 2007 00:25:16 +0000 (00:25 +0000)]
Build library Setup.hs's with -Wall

13 years agoparsec, regex-base, regex-compat, regex-posix are no longer core-packages
Ian Lynagh [Tue, 10 Apr 2007 22:03:06 +0000 (22:03 +0000)]
parsec, regex-base, regex-compat, regex-posix are no longer core-packages

13 years agoReplace genprimopcode's parsec parser with an alex+happy parser
Ian Lynagh [Tue, 10 Apr 2007 22:00:15 +0000 (22:00 +0000)]
Replace genprimopcode's parsec parser with an alex+happy parser
This use was the only thing keeping parsec in core-packages, and
we already have a dependency on alex+happy anyway.

13 years agoDon't use regexps in the GHC sources
Ian Lynagh [Tue, 10 Apr 2007 21:56:47 +0000 (21:56 +0000)]
Don't use regexps in the GHC sources
3 small regexps were responsible for pulling 3 packages into core-packages.

The new code should also do a better job of hiding
"call-clobbered register used" warnings.

13 years agoUse a boot script instead of having autoreconf recurse
Ian Lynagh [Tue, 10 Apr 2007 21:52:52 +0000 (21:52 +0000)]
Use a boot script instead of having autoreconf recurse
It used to be the case that
    autoreconf
in the root would also autoreconf in any libraries that need it, and
    ./configure
in the root would also configure all the libraries.

However, cabal now configures the libraries, so they were getting
configured twice.

Thus now a small shellscript, boot, autoreconfs the root and all libraries
that need it, and ./configure in the root doesn't configure the libraries.

13 years agoTweak AC_MSG_RESULTs
Ian Lynagh [Mon, 9 Apr 2007 13:57:34 +0000 (13:57 +0000)]
Tweak AC_MSG_RESULTs

13 years agoAllow the version date to be overridden with VERSION_DATE
Ian Lynagh [Mon, 9 Apr 2007 13:46:40 +0000 (13:46 +0000)]
Allow the version date to be overridden with VERSION_DATE

13 years agoUse cp -R rather than cp -a for portability reasons
Ian Lynagh [Fri, 6 Apr 2007 19:04:59 +0000 (19:04 +0000)]
Use cp -R rather than cp -a for portability reasons

13 years agoFixes for building the libraries with cabal on Windows
Ian Lynagh [Fri, 6 Apr 2007 15:18:22 +0000 (15:18 +0000)]
Fixes for building the libraries with cabal on Windows
* configure can be told where ld is
* make an hsc2hs-inplace.bat
* tell Setup configure about foo.bar rather than foo on Windows
* tell Setup configure to pass a --with-cc=$(CC) argument to ./configure

14 years agoFix external core syntax (though not full compilation)
Aaron Tomb [Mon, 13 Nov 2006 23:01:32 +0000 (23:01 +0000)]
Fix external core syntax (though not full compilation)

This patch updates the External Core creator, pretty-printer, and parser to
agree on a concrete syntax for External Core, including the constructs
required by the change to System FC. Code to create valid ASTs from External
Core files will come later, as will bits for renaming, typechecking, and
desugaring.

13 years agoRemove code that is dead, as we require __GLASGOW_HASKELL__ >= 504
Ian Lynagh [Fri, 6 Apr 2007 00:11:37 +0000 (00:11 +0000)]
Remove code that is dead, as we require __GLASGOW_HASKELL__ >= 504

13 years agoDon't break when asked to install-docs
Ian Lynagh [Fri, 16 Mar 2007 17:00:03 +0000 (17:00 +0000)]
Don't break when asked to install-docs
(we don't actually do anything useful either, because Cabal doesn't have
an install-docs option).

13 years agoAdd a comment
Ian Lynagh [Fri, 16 Mar 2007 16:59:57 +0000 (16:59 +0000)]
Add a comment

13 years agoMake building binary dists work with cabalised libraries
Ian Lynagh [Sat, 10 Mar 2007 01:25:58 +0000 (01:25 +0000)]
Make building binary dists work with cabalised libraries

13 years agoBuild the libraries with cabal
Ian Lynagh [Thu, 8 Mar 2007 16:32:47 +0000 (16:32 +0000)]
Build the libraries with cabal