ghc.git
12 years agoEagerly raise a blocked exception when entering 'unblock' or exiting 'block'
Simon Marlow [Fri, 5 Jan 2007 13:57:15 +0000 (13:57 +0000)] 
Eagerly raise a blocked exception when entering 'unblock' or exiting 'block'
This fixes #1047

12 years agowrap Main.main in GHC.TopHandler.runIOFastExit
Simon Marlow [Fri, 5 Jan 2007 11:46:08 +0000 (11:46 +0000)] 
wrap Main.main in GHC.TopHandler.runIOFastExit
This is so that exceptions raised by Main.main do exactly the same
thing as they would in a compiled program, including writing the
message to stderr and shutting down with the correct exit code.

12 years agodisable an incorrect ASSERTion in the non-THREADED_RTS case (bug #1067)
Simon Marlow [Fri, 5 Jan 2007 12:34:03 +0000 (12:34 +0000)] 
disable an incorrect ASSERTion in the non-THREADED_RTS case (bug #1067)

12 years agoHsSyn clean up for indexed types
Manuel M T Chakravarty [Fri, 5 Jan 2007 01:26:19 +0000 (01:26 +0000)] 
HsSyn clean up for indexed types
- This patch cleans up the HsSyn representation of type family declarations.
- The new representation is not only less delicate, it also simplified teh code
  a bit.
- I took the opportunity of stream lining the terminology and function names
  at the same time.
- I also updated the description on the wiki at
  <http://hackage.haskell.org/trac/ghc/wiki/TypeFunctionsSyntax>

12 years agoFix and improve deriving for indexed data types
Manuel M T Chakravarty [Thu, 4 Jan 2007 01:31:56 +0000 (01:31 +0000)] 
Fix and improve deriving for indexed data types
- The test for being able to derive the requested classes needs to be made
  with the representation tycon (not the family tycon).
- Standalone deriving for indexed types requires the instance types in the
  derive clause to match a data/newtype instance exactly (modulo alpha).

12 years agoRecord-ise the liberate-case envt, in preparation for new stuff
simonpj@microsoft.com [Wed, 3 Jan 2007 17:59:32 +0000 (17:59 +0000)] 
Record-ise the liberate-case envt, in preparation for new stuff

12 years agoAdd a type synonym for FamInstEnvs
simonpj@microsoft.com [Wed, 3 Jan 2007 17:59:13 +0000 (17:59 +0000)] 
Add a type synonym for FamInstEnvs

12 years agoComments only
simonpj@microsoft.com [Wed, 3 Jan 2007 17:56:38 +0000 (17:56 +0000)] 
Comments only

12 years agoComments only
simonpj@microsoft.com [Wed, 3 Jan 2007 17:55:58 +0000 (17:55 +0000)] 
Comments only

12 years agoBe more relaxed about reporting ambiguous class methods
simonpj@microsoft.com [Wed, 3 Jan 2007 16:07:03 +0000 (16:07 +0000)] 
Be more relaxed about reporting ambiguous class methods
(MERGE to STABLE branch, pls)

This patch makes us a bit more relaxed about ambiguous
class method types.  See tc223 for an example.

Reported by Yitzchak Gale

12 years agoFix bug in cast optimisation; fixes Trac #995
simonpj@microsoft.com [Wed, 3 Jan 2007 15:35:30 +0000 (15:35 +0000)] 
Fix bug in cast optimisation; fixes Trac #995

There was a plain bug in the cast-optimiation code -- a call to
splitCoercionKind_maybe instead of coercionKind!  Result was that
we missed useful opportunities to move casts around.  Trac #995
is an example, but I bet there are more.

12 years agoFix stupid error in rehashing TcRnDriver (fixes TH test errors)
simonpj@microsoft.com [Wed, 3 Jan 2007 12:15:40 +0000 (12:15 +0000)] 
Fix stupid error in rehashing TcRnDriver (fixes TH test errors)

12 years agoFix several bugs related to finding free variables
simonpj@microsoft.com [Wed, 3 Jan 2007 11:50:09 +0000 (11:50 +0000)] 
Fix several bugs related to finding free variables

Now that coercion variables mention types, a type-lambda binder can
have free variables.  This patch adjusts the free-variable finder
to take account of this, by treating Ids and TyVars more uniformly.

In addition, I fixed a bug in the specialiser that was missing a
free type variable in a binder.  And a bug in tyVarsOfInst that
was missing the type variables in the kinds of the quantified tyvars.

12 years agoComments only
simonpj@microsoft.com [Wed, 3 Jan 2007 10:35:24 +0000 (10:35 +0000)] 
Comments only

12 years agoMake warnings come out in deterministic order
simonpj@microsoft.com [Wed, 3 Jan 2007 10:24:38 +0000 (10:24 +0000)] 
Make warnings come out in deterministic order

Fixes Trac #1053

12 years agoChange to Unix line-line-endings
simonpj@microsoft.com [Wed, 3 Jan 2007 10:24:19 +0000 (10:24 +0000)] 
Change to Unix line-line-endings

12 years agoAdd newline at end
simonpj@microsoft.com [Wed, 3 Jan 2007 10:24:08 +0000 (10:24 +0000)] 
Add newline at end

12 years agoBetter error messages for deriving
simonpj@microsoft.com [Wed, 3 Jan 2007 09:54:12 +0000 (09:54 +0000)] 
Better error messages for deriving

12 years agoFix another buglet in HsDoc stuff
simonpj@microsoft.com [Wed, 3 Jan 2007 09:40:58 +0000 (09:40 +0000)] 
Fix another buglet in HsDoc stuff

A 'foreign export' represents an *occurrence* of a Haskell name,
not a *binding* site for the Haskell name.

(This was making cc012 fail; Trac #1054.

12 years agoComments only
simonpj@microsoft.com [Wed, 3 Jan 2007 08:25:17 +0000 (08:25 +0000)] 
Comments only

12 years agoStandalone deriving wibbles: keyword is 'derive' not 'derived'; and add flag document...
simonpj@microsoft.com [Tue, 2 Jan 2007 16:17:52 +0000 (16:17 +0000)] 
Standalone deriving wibbles: keyword is 'derive' not 'derived'; and add flag documentation

12 years agoDocmunent stand-alone deriving
simonpj@microsoft.com [Tue, 2 Jan 2007 16:12:18 +0000 (16:12 +0000)] 
Docmunent stand-alone deriving

I also re-organised the type-system extension section, which has grown rather big.

12 years agoBig tidy-up of deriving code
simonpj@microsoft.com [Tue, 2 Jan 2007 15:46:10 +0000 (15:46 +0000)] 
Big tidy-up of deriving code

This tidy-up, triggered by Trac #1068, re-factors the way that 'deriving'
happens.  It took me way longer than I had intended.  The main changes,
by far are to TcDeriv; everyting else is a minor consequence.

While I was at it, I changed the syntax for standalone deriving, so that
it goes
derive instance Show (T a)

(instead of "derive Show for T").  However, there's still an implicit
context, generated by the deriving code, and I wonder if it shouldn't really
be
derive instance (..) => Show (T a)
but I have left it simple for now.

I also added a function Type.substTyVars, and used it here and there, which
led to some one-line changes otherwise unrelated (sorry).

Loose ends:
  * 'deriving Typeable' for indexed data types is still not right
  * standalone deriving should be documented

12 years agoFixed bug #744 (ghc-pkg lies about location of haddock-interfaces and haddock-html)
sven.panne@aedion.de [Tue, 2 Jan 2007 13:46:22 +0000 (13:46 +0000)] 
Fixed bug #744 (ghc-pkg lies about location of haddock-interfaces and haddock-html)

12 years agoAdded ghc man page to RPM
sven.panne@aedion.de [Tue, 2 Jan 2007 13:45:46 +0000 (13:45 +0000)] 
Added ghc man page to RPM

12 years agoAdded the GHC commentary to the RPM
sven.panne@aedion.de [Tue, 2 Jan 2007 13:42:38 +0000 (13:42 +0000)] 
Added the GHC commentary to the RPM

12 years agoStylistic change: Use %{_prefix} instead of %{prefix}
sven.panne@aedion.de [Tue, 2 Jan 2007 13:40:33 +0000 (13:40 +0000)] 
Stylistic change: Use %{_prefix} instead of %{prefix}

12 years agoThe ghc package is not relocatable (yet), so don't claim that this is the case
sven.panne@aedion.de [Tue, 2 Jan 2007 13:39:23 +0000 (13:39 +0000)] 
The ghc package is not relocatable (yet), so don't claim that this is the case

12 years agoRemoved some trailing spaces
sven.panne@aedion.de [Tue, 2 Jan 2007 13:38:09 +0000 (13:38 +0000)] 
Removed some trailing spaces

12 years agoUpdate reference to configure.in to refer to configure.ac instead
Ian Lynagh [Sun, 31 Dec 2006 14:34:43 +0000 (14:34 +0000)] 
Update reference to configure.in to refer to configure.ac instead

12 years agoWarning police: Added missing #include
sven.panne@aedion.de [Sat, 30 Dec 2006 13:30:57 +0000 (13:30 +0000)] 
Warning police: Added missing #include

12 years agoStandardized Makefile for man page
sven.panne@aedion.de [Sat, 30 Dec 2006 11:56:23 +0000 (11:56 +0000)] 
Standardized Makefile for man page
Use our standard build machinery for building, installing and cleaning the
man page. Do not use deprecated -<num> option for 'head'. Use $(RM) instead
of explicit 'rm -f' for better portability.

Note that we always build/install the man page with the 'install-docs' target
now, this is the usual behaviour. "GhcManpages is dead, Jim..."

This patch should unbreak 'make dist', too.

12 years agoMake dicts for arbitrary type equalities
Manuel M T Chakravarty [Fri, 29 Dec 2006 20:33:00 +0000 (20:33 +0000)] 
Make dicts for arbitrary type equalities

12 years agoEqPred pretty prints as ~ and equalities without brackets
Manuel M T Chakravarty [Fri, 29 Dec 2006 20:17:51 +0000 (20:17 +0000)] 
EqPred pretty prints as ~ and equalities without brackets

12 years agoConstruction of EqPred dictionaries
Manuel M T Chakravarty [Fri, 29 Dec 2006 18:13:57 +0000 (18:13 +0000)] 
Construction of EqPred dictionaries

12 years agodata family declarations are fine without any type arguments
Manuel M T Chakravarty [Fri, 29 Dec 2006 18:11:22 +0000 (18:11 +0000)] 
data family declarations are fine without any type arguments

12 years agoAdd missing case for documented types in the type desugarer
davve@dtek.chalmers.se [Fri, 29 Dec 2006 16:32:24 +0000 (16:32 +0000)] 
Add missing case for documented types in the type desugarer

12 years agoAvoid duplicate error report when renaming HsDoc stuff
simonpj@microsoft.com [Fri, 29 Dec 2006 14:15:57 +0000 (14:15 +0000)] 
Avoid duplicate error report when renaming HsDoc stuff

This patch is a bit of a hack to avoid a duplicate error when checking
class C a where
  op :: a -> a
  op2 x = x
(This is tcfail077)

For reasons I don't understand, the decl of op2 generates an HsDeclEntity,
and that gives a renamer error which duplicates the (better) one that
comes from rnMethodBinds.

A better fix might be to get rid of HsDeclEntities altogether.

12 years agoAdd newline to end of file
simonpj@microsoft.com [Fri, 29 Dec 2006 13:34:56 +0000 (13:34 +0000)] 
Add newline to end of file

12 years agoAdding a GENERATED pragma
andy@galois.com [Fri, 29 Dec 2006 07:29:48 +0000 (07:29 +0000)] 
Adding a GENERATED pragma

Adding a {-# GENERATED "SourceFile" SourceSpan #-} <expr> pragma.
This will be used to generate coverage for tool generated (or quoted) code.
The pragma states the the expression was generated/quoted from the stated
source file and source span.

12 years agoParse and desugar equational constraints
Manuel M T Chakravarty [Thu, 28 Dec 2006 01:03:48 +0000 (01:03 +0000)] 
Parse and desugar equational constraints
- With -findexed-types, equational constraints can appear in contexts
  wherever class predicates are allowed.
- The two argument types need to be boxed and rank 0.

12 years agoRemove a reference to GHC.Exts.Ptr in stage1
Pepe Iborra [Fri, 22 Dec 2006 16:55:41 +0000 (16:55 +0000)] 
Remove a reference to GHC.Exts.Ptr in stage1

Hopefully this will help to restore ability to build HEAD on GHC 5.0x systems

12 years agoHandle LongArg's in the FFI on x86
Ian Lynagh [Fri, 22 Dec 2006 14:15:54 +0000 (14:15 +0000)] 
Handle LongArg's in the FFI on x86

12 years agoImprove documentation about packages
simonpj@microsoft.com [Fri, 22 Dec 2006 14:15:51 +0000 (14:15 +0000)] 
Improve documentation about packages

12 years agoRemove ' in cpp error
Ian Lynagh [Fri, 22 Dec 2006 13:39:40 +0000 (13:39 +0000)] 
Remove ' in cpp error

12 years agoDocumentation for class contexts in data-constructor declarations
simonpj@microsoft.com [Fri, 22 Dec 2006 09:34:31 +0000 (09:34 +0000)] 
Documentation for class contexts in data-constructor declarations

12 years agoAllow a word-sized argument for STKCHECK
Ian Lynagh [Thu, 21 Dec 2006 02:38:25 +0000 (02:38 +0000)] 
Allow a word-sized argument for STKCHECK

12 years agoParse and use ghci nofib output
Ian Lynagh [Wed, 20 Dec 2006 22:07:15 +0000 (22:07 +0000)] 
Parse and use ghci nofib output

12 years agoAdd hook to fam inst consistency check to GHCi/--make
Manuel M T Chakravarty [Thu, 21 Dec 2006 00:40:58 +0000 (00:40 +0000)] 
Add hook to fam inst consistency check to GHCi/--make

12 years agoFix import lists
Pepe Iborra [Wed, 20 Dec 2006 04:24:17 +0000 (04:24 +0000)] 
Fix import lists

12 years agoDeriving for indexed newtypes
Manuel M T Chakravarty [Tue, 19 Dec 2006 21:30:17 +0000 (21:30 +0000)] 
Deriving for indexed newtypes
- The isomorphism-based newtype-deriving isn't very useful for indexed types
  right now as it rejects all recursive declarations, and we have to mark
  all indexed type instances as recurrsive as we can't guarantee that future
  instances aren't going to make them part of a recursive group.

12 years agoFixed uninitialised FunBind fun_tick field
Manuel M T Chakravarty [Tue, 19 Dec 2006 19:25:06 +0000 (19:25 +0000)] 
Fixed uninitialised FunBind fun_tick field

12 years agoAdd HscTypes.hi-boot-6 so builds with older GHCs succeed
Ian Lynagh [Tue, 19 Dec 2006 15:59:54 +0000 (15:59 +0000)] 
Add HscTypes.hi-boot-6 so builds with older GHCs succeed

12 years agoDeriving for indexed data types
Manuel M T Chakravarty [Mon, 18 Dec 2006 21:12:05 +0000 (21:12 +0000)] 
Deriving for indexed data types
- This patch implements deriving clauses for data instance declarations
  (toplevel and associated)
- Doesn't support standalone deriving.  This could be easily supported,
  but requires an extension of the syntax of standalone deriving clauses.
  Björn, fancy adding this?
- We cannot derive Typeable.  This seems a problem of notation, more than
  anything else.  Why?  For a binary vanilla data type "T a b", we would
  generate an instance Typeable2 T; ie, the instance is for the constructor
  alone.  In the case of a family instance, such as (S [a] (Maybe b)), we
  simply have no means to denote the associated constuctor.  It appears to
  require type level lambda - something like (/\a b. S [a] (Maybe b).
- Derivings are for *individual* family *instances*, not for entire families.
  Currently, I know of no simple translation of class instances for entire
  families to System F_C.  This actually seems to be similar to implementing
  open data types à la Löh & Hinze.
- This patch only covers data types, not newtypes.

12 years agoDon't overwrite old memory with 0xaa when doing a realloc
Ian Lynagh [Mon, 18 Dec 2006 15:24:23 +0000 (15:24 +0000)] 
Don't overwrite old memory with 0xaa when doing a realloc

12 years agoReplace association list in AddressEnv for a FiniteMap
Pepe Iborra [Mon, 18 Dec 2006 14:17:15 +0000 (14:17 +0000)] 
Replace association list in AddressEnv for a FiniteMap

12 years agoRemove uses of Data.Traversable to fix stage1 on pre ghc-6.6 systems
Pepe Iborra [Mon, 18 Dec 2006 09:53:43 +0000 (09:53 +0000)] 
Remove uses of Data.Traversable to fix stage1 on pre ghc-6.6 systems

12 years agoPropagate the DEBUGGER flag to the Makefile for stage 2
Pepe Iborra [Sun, 17 Dec 2006 00:11:50 +0000 (00:11 +0000)] 
Propagate the DEBUGGER flag to the Makefile for stage 2

12 years agoMerge DynFlags changes 2006-12-17
Ian Lynagh [Sat, 16 Dec 2006 17:39:57 +0000 (17:39 +0000)] 
Merge DynFlags changes

12 years agoFix an overlapping of uniques in PrelNames
Pepe Iborra [Sat, 16 Dec 2006 11:46:24 +0000 (11:46 +0000)] 
Fix an overlapping of uniques in PrelNames

12 years agoFix the build
Ian Lynagh [Sat, 16 Dec 2006 02:25:35 +0000 (02:25 +0000)] 
Fix the build

12 years agoToggle whether the RTS gets build with debugger support for ghci
Pepe Iborra [Mon, 11 Dec 2006 18:13:07 +0000 (18:13 +0000)] 
Toggle whether the RTS gets build with debugger support for ghci

Specifically, this disables the special support in the RTS for looking up the datacon name corresponding to an address.
Correspondingly, the debugging commads in GHCi will not be available, and neither will the '-fdebugging' flag

12 years agoAdjust code from manual merges
Pepe Iborra [Mon, 11 Dec 2006 16:20:27 +0000 (16:20 +0000)] 
Adjust code from manual merges

12 years agoFix an issue with lazyness in the closure viewer
Pepe Iborra [Mon, 11 Dec 2006 15:34:53 +0000 (15:34 +0000)] 
Fix an issue with lazyness in the closure viewer

12 years agoClosure inspection in GHCi
Pepe Iborra [Sun, 10 Dec 2006 23:20:18 +0000 (23:20 +0000)] 
Closure inspection in GHCi

The :print, :sprint and :force commands for GHCi.
This set of commands allows inspection of heap structures of the bindings in the interactive environment.
This is useful to observe lazyness and specially to inspect things with undespecified polymorphic types, as happens often in breakpoints.

12 years agoDynamic breakpoints in GHCi
Pepe Iborra [Sun, 10 Dec 2006 23:15:51 +0000 (23:15 +0000)] 
Dynamic breakpoints in GHCi

This patch adds dynamic breakpoints to GHCi

There is a new ':breakpoint' command to manage breakpoints.
GHCi simply uses the breakpoint api functions in ghc-api to install itself as a client.
The mechanism used by GHCi to keep track of enabled breakpoints is a simple table.

When a breakpoint is hit, a new interactive session is launched and the bindings in the breakpoint are injected. Some commands are disabled in this sub session

12 years agoSplit the GHCi monad apart from InteractiveUI, together with some related functions
Pepe Iborra [Sun, 10 Dec 2006 23:05:53 +0000 (23:05 +0000)] 
Split the GHCi monad apart from InteractiveUI, together with some related functions

I found this convenient while I was extending ghci with the debugger. I wanted to put all the debugger stuff in a separate module, but I would need a huge hs-boot file to break the circular dependencies. This option seemed better

12 years agoAdd the debugger related modules to package.conf
Pepe Iborra [Sun, 10 Dec 2006 22:32:17 +0000 (22:32 +0000)] 
Add the debugger related modules to package.conf

12 years agoPrevent breakpoint instrumentation of spliced code
Pepe Iborra [Sun, 10 Dec 2006 22:31:02 +0000 (22:31 +0000)] 
Prevent breakpoint instrumentation of spliced code

12 years agoCapturing and keeping track of local bindins in the desugarer
Pepe Iborra [Sun, 10 Dec 2006 22:25:40 +0000 (22:25 +0000)] 
Capturing and keeping track of local bindins in the desugarer

Used in the desugaring of the breakpoint primitive

12 years agoHandle breakpoint jumps while splicing TH functions in ghci
Pepe Iborra [Sun, 10 Dec 2006 22:24:24 +0000 (22:24 +0000)] 
Handle breakpoint jumps while splicing TH functions in ghci

The dynamic linker has been modified so that it won't panic if one of the breakpointJump functions fails to resolve.
Now, if the dynamic linker fails to find a HValue for a Name, before looking for a static symbol it will ask to

Breakpoints.lookupBogusBreakpointVal :: Name -> Maybe HValue

which returns an identity function for the Jump names or Nothing else.

A TH function might contain a call to a breakpoint function. So if it is compiled to bytecodes, the breakpoints will be desugared to 'jumps'. Whenever this code is spliced, the linker will fail to find the jumpfunctions unless there is a default.

12 years agoBreakpoint code instrumentation
Pepe Iborra [Sun, 10 Dec 2006 20:49:34 +0000 (20:49 +0000)] 
Breakpoint code instrumentation

Instrumentation gets activated by the '-fdebugging' dynflag.

All the instrumentation occurrs in the desugarer; it consists of inserting 'breakpoint' combinators at a number of places in the AST, namely:
 - Binding sites
 - Do-notation statements
These 'breakpoint' combinators will later be further desugared (at DsExpr) into ___Jump functions.
For more info about this and all the ghci.debugger see the page at the GHC wiki:

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

12 years agoThe breakpoint primitive
Pepe Iborra [Sun, 10 Dec 2006 20:37:29 +0000 (20:37 +0000)] 
The breakpoint primitive

12 years agoGHCi debugger documentation
Pepe Iborra [Sun, 10 Dec 2006 18:41:23 +0000 (18:41 +0000)] 
GHCi debugger documentation

12 years agoExtend the GHC API with breakpoints and breakpoint handlers
Pepe Iborra [Sun, 10 Dec 2006 18:40:27 +0000 (18:40 +0000)] 
Extend the GHC API with breakpoints and breakpoint handlers

The entry point is:
setBreakpointHandler :: Session -> BkptHandler Module -> IO ()

12 years agoPlaying with closures
Pepe Iborra [Sun, 10 Dec 2006 17:30:05 +0000 (17:30 +0000)] 
Playing with closures

RtClosureInspect includes a bunch of stuff for playing with closures:

- the datatype Closure is the low level representation type
- the datatype Term is the high level representation type
- cvObtainTerm is the main entry point, providing the Term representation of an arbitrary closure

12 years agoRetrieving the datacon of an arbitrary closure
Pepe Iborra [Sun, 10 Dec 2006 11:29:44 +0000 (11:29 +0000)] 
Retrieving the datacon of an arbitrary closure

This patch extends the RTS linker and the dynamic linker so that it is possible to find out the datacon of a closure in heap at runtime:
- The RTS linker now carries a hashtable 'Address->Symbol' for data constructors
- The Persistent Linker State in the dynamic linker is extended in a similar way.

Finally, these two sources of information are consulted by:

> Linker.recoverDataCon :: a -> TcM Name

12 years agoTwo new prim ops to access the Info Table and Payload of a closure:
Pepe Iborra [Sat, 9 Dec 2006 17:38:23 +0000 (17:38 +0000)] 
Two new prim ops to access the Info Table and Payload of a closure:

- infoPtr# :: a -> Addr#
- closurePayload# :: a -> (# Array b, ByteArr# #)

These prim ops provide the magic behind the ':print' command

12 years agoFree more things that we allocate 2006-12-16
Ian Lynagh [Fri, 15 Dec 2006 21:44:30 +0000 (21:44 +0000)] 
Free more things that we allocate

12 years agoFree all tasks on exit, not just those on the task_free_list
Ian Lynagh [Fri, 15 Dec 2006 17:26:17 +0000 (17:26 +0000)] 
Free all tasks on exit, not just those on the task_free_list

12 years agoGive cap its correct type, rather than void
Ian Lynagh [Fri, 15 Dec 2006 17:25:58 +0000 (17:25 +0000)] 
Give cap its correct type, rather than void

12 years agoPut the task on the free list in workerTaskStop
Ian Lynagh [Fri, 15 Dec 2006 16:42:10 +0000 (16:42 +0000)] 
Put the task on the free list in workerTaskStop

12 years agoFree various things we allocate
Ian Lynagh [Fri, 15 Dec 2006 13:45:07 +0000 (13:45 +0000)] 
Free various things we allocate

12 years agoUpdating rix output to new standard.
andy@galois.com [Thu, 14 Dec 2006 23:52:10 +0000 (23:52 +0000)] 
Updating rix output to new standard.

12 years agoupdate, and add some more build flavours (inc. dons's fast build)
Simon Marlow [Thu, 14 Dec 2006 11:09:47 +0000 (11:09 +0000)] 
update, and add some more build flavours (inc. dons's fast build)

12 years agoRework the block allocator
Simon Marlow [Thu, 14 Dec 2006 11:09:01 +0000 (11:09 +0000)] 
Rework the block allocator

The main goal here is to reduce fragmentation, which turns out to be
the case of #743.  While I was here I found some opportunities to
improve performance too.  The code is rather more complex, but it also
contains a long comment describing the strategy, so please take a look
at that for the details.

12 years agofix wibble in memory leak error dump
Simon Marlow [Thu, 14 Dec 2006 10:11:02 +0000 (10:11 +0000)] 
fix wibble in memory leak error dump

12 years agoRemoving explicit Binary Tick Boxes; using Case instead.
andy@galois.com [Wed, 13 Dec 2006 18:45:02 +0000 (18:45 +0000)] 
Removing explicit Binary Tick Boxes; using Case instead.

12 years agoAdd left-to-right impredicative instantiation
simonpj@microsoft.com [Wed, 13 Dec 2006 16:29:15 +0000 (16:29 +0000)] 
Add left-to-right impredicative instantiation

People keep complaining, with some justification, that

runST $ foo

doesn't work.  So I've finally caved in.  The difficulty with the above
is that we need to decide how to instantiate ($)'s type arguments based
on the first argument (runST), and then use that info to check the second
argumnent.  There is a left-to-right flow of information.

It's not hard to implement this, and it's clearly useful.  The main
change is in TcExpr.tcArgs, with some knock-on effects elsewhere.

I was finally provoked into this by Trac #981, which turned out, after some
head-scratching, to be another instance of the same problem.

(There was some bug-fixing too; a type like ((?x::Int) => ...) is a polytype
even though it has no leading for-alls, but the new TcUnify code was not
treating it right.)

Test for this is tc222

12 years agoRemoving unused argument to a printf.
andy@galois.com [Wed, 13 Dec 2006 16:06:51 +0000 (16:06 +0000)] 
Removing unused argument to a printf.

12 years agofixing obvious typo in darwin_HOST_OS code (currently does not compile).
andy@galois.com [Wed, 13 Dec 2006 16:06:01 +0000 (16:06 +0000)] 
fixing obvious typo in darwin_HOST_OS code (currently does not compile).

12 years agoPowerPC NCG: support conditional branches outside +-32KB
wolfgang.thaller@gmx.net [Wed, 13 Dec 2006 13:38:08 +0000 (13:38 +0000)] 
PowerPC NCG: support conditional branches outside +-32KB

Work around the PowerPC architecture's +-32KB limitation for conditional
branches by conditionally skipping an unconditional branch instead
(unconditional branches have a +-32MB range).

This requires an extra pass over the basic blocks for each CmmTop after
block sequencing, to determine which branches are "far".

Fixes ticket #709, "Fixup too large" error with -fasm on PowerPC

12 years agoFix allocation debugger to handle allocations in con/destructors
Ian Lynagh [Wed, 13 Dec 2006 13:35:18 +0000 (13:35 +0000)] 
Fix allocation debugger to handle allocations in con/destructors
conc021 is an example of a program that broke.
It doesn't handle them particularly well still, but it doesn't crash at
least.

12 years agoDon't free sched_mutex until freeTaskManager has finished with it
Simon Marlow [Tue, 12 Dec 2006 15:33:53 +0000 (15:33 +0000)] 
Don't free sched_mutex until freeTaskManager has finished with it
Also move closeMutex() etc. into freeTaskManager, this is a free-ish thing

12 years agoGive a better panic if the allocation debugger is used uninitialised
Ian Lynagh [Wed, 13 Dec 2006 12:26:02 +0000 (12:26 +0000)] 
Give a better panic if the allocation debugger is used uninitialised

12 years agoMisc Hpc improvement to dynamic tracer output
andy@galois.com [Wed, 13 Dec 2006 00:19:17 +0000 (00:19 +0000)] 
Misc Hpc improvement to dynamic tracer output

 - Added HPCRIX support for passing tracer filename.
 - Added thread tracing support.
 - Cleaned up use of HsFFI.h

12 years agoAdding tracing support
andy@galois.com [Sat, 9 Dec 2006 05:03:34 +0000 (05:03 +0000)] 
Adding tracing support

12 years agoMisc unsigned printing issues; adding magicTixNumber.
andy@galois.com [Thu, 30 Nov 2006 00:30:24 +0000 (00:30 +0000)] 
Misc unsigned printing issues; adding magicTixNumber.

12 years agoTurn -Wall on
Ian Lynagh [Tue, 12 Dec 2006 20:11:27 +0000 (20:11 +0000)] 
Turn -Wall on

12 years agoFix more warnings
Ian Lynagh [Tue, 12 Dec 2006 20:04:22 +0000 (20:04 +0000)] 
Fix more warnings