New patches: [Initial/Incomplete shared library support Clemens Fruhwirth **20070612085007] { hunk ./compiler/cmm/CLabel.hs 868 -pprDynamicLinkerAsmLabel _ _ - = panic "pprDynamicLinkerAsmLabel" +pprDynamicLinkerAsmLabel SymbolPtr lbl + = text ".LC_" <> pprCLabel lbl hunk ./compiler/nativeGen/PositionIndependentCode.hs 134 - | opt_PIC && absoluteLabel lbl = CmmMachOp (MO_Add wordRep) [ + | (opt_PIC || not opt_Static) && absoluteLabel lbl = CmmMachOp (MO_Add wordRep) [ hunk ./compiler/nativeGen/PprMach.hs 649 - SLIT(".section .rodata\n\t.align 4")) + SLIT(".section .data\n\t.align 4")) hunk ./compiler/nativeGen/PprMach.hs 651 - SLIT(".section .rodata\n\t.align 8")) + SLIT(".section .data\n\t.align 8")) hunk ./compiler/nativeGen/PprMach.hs 766 - ppr_item I64 x - | isRelativeReloc x = - [ptext SLIT("\t.long\t") <> pprImm imm, - ptext SLIT("\t.long\t0")] - | otherwise = - [ptext SLIT("\t.quad\t") <> pprImm imm] + ppr_item I64 x = [ptext SLIT("\t.quad\t") <> pprImm imm] hunk ./libraries/Makefile 93 + +ifneq "$(findstring $(space)dyn$(space), $(space)$(GhcLibWays)$(space))" "" +CONFIGURE_OPTS += --enable-shared +CONFIGURE_STAMP_EXTRAS := $(CONFIGURE_STAMP_EXTRAS)-shared +endif + hunk ./mk/config.mk.in 329 -GhcLibWays=p +GhcLibWays=p dyn hunk ./mk/config.mk.in 355 -GhcRTSWays += $(if $(findstring NO, $(GhcUnregisterised)),thr thr_p thr_debug,) +GhcRTSWays += $(if $(findstring NO, $(GhcUnregisterised)),thr thr_p thr_debug dyn,) hunk ./mk/config.mk.in 1183 +# Way 'dyn': build dynamic shared libraries +WAY_dyn_NAME=dyn +WAY_dyn_HC_OPTS=-optc-fPIC -fPIC -dynamic + hunk ./mk/package.mk 147 +ifeq "$(way)" "dyn" +LIBRARY = libHS$(PACKAGE)$(_way).so +else hunk ./mk/package.mk 152 +endif hunk ./mk/target.mk 267 +ifneq "$(way)" "dyn" hunk ./mk/target.mk 276 +$(LD) -Bsymbolic -shared -o $@ $(STUBOBJS) $(LIBOBJS) +endef +endif +else +define BUILD_LIB +$(RM) $@ hunk ./mk/target.mk 1015 -LIB_WAY_TARGETS = $(foreach way,$(WAYS),%_$(way).a %_$(way)) +LIB_WAY_TARGETS = $(foreach way,$(WAYS),$(ifneq $(way) "dyn",%_$(way).a, %_$(way).so) %_$(way)) hunk ./rts/Makefile 128 +ifneq "$(way)" "dyn" hunk ./rts/Makefile 131 -# SRC_HC_OPTS += -fPIC +endif hunk ./rts/Makefile 367 -# Cmm must be compiled via-C for now, because the NCG can't handle loops -SRC_HC_OPTS += -fvia-C - } Context: [remove #if branches for pre-ghc-6.0 Isaac Dupree **20070605235301 I skipped utils/hsc2hs/Main.hs since its ifs also involved checking for old versions of nhc98 (I don't want to figure that out), but removed everything else I found relating to building with pre-6.0 ] [Typo, spotted by Stefan Holdermans Ian Lynagh **20070605194643] [ifBuildable now prints a warning if the package is not buildable Ian Lynagh **20070605174725] [Fix normalisation of path to find Ian Lynagh **20070605145043 The old code didn't work on Mac OS X, as "which" returns successfully when it can't find the program. ] [fix panic in #1379 Simon Marlow **20070605084438] [Add missing newline from ghci :help output bjpop@csse.unimelb.edu.au**20070605020930] [implement FastMutInt in non-GHC using IORefs (#1405) Isaac Dupree **20070601204948 ghc still works, also the module was tested in hugs and ghc ] [FIX #1110: the linker also needs the workaround Simon Marlow **20070601151932] [FIX BUILD: GHC doesn't use filepath (yet) Simon Marlow **20070521141745] [tiny cleanup Simon Marlow **20070525082235] [remove OpenBSD-specific initAdjustor() code that shouldn't be required now Simon Marlow **20070601082648 Submitted by: Matthias Kilian ] [fix locations for uploading src dists Simon Marlow **20070531134113] [FIX unregisterised build Simon Marlow **20070531132842 Can't check $(GhcUnregisterised) eagerly, because it might not have been set yet (it's set in build.mk). ] [FIX: loading package ghc in GHCi (added a couple of missing symbols) Simon Marlow **20070531110506 ] [Fix bogus check for strictness in newtypes simonpj@microsoft.com**20070530141444] [export noSrcLoc, noSrcSpan Simon Marlow **20070530133146] [Fix copy-and-paste-o Ian Lynagh **20070530105629] [Fix bug in tcSimplifyInfer (Trac #1382) simonpj@microsoft.com**20070530081240 When I rejigged constraint simplification when inferring types, I missed a corner case. Somethign that it's distressingly easy to do. Anyway this fixes it; see the comments in tcSimplifyInfer with the second call to partition and extendLIEs. The test is tcfail181. ] [Reject newtypes with strictness annotations; fixes read008 simonpj@microsoft.com**20070530071625 This used to be a parse error, but ! annotations are now handled further downstream in the compiler, and I'd forgotten to check that newtypes do not have strictness annotations. The test read008 is technically in the wrong place (it's a typechecker test now) but that doesn't matter ] [refactor: combine repeated code in file reloading iavor.diatchki@gmail.com**20070525164308] [Changes the behavior of the "edit" command in GHCi. iavor.diatchki@gmail.com**20070525163104 Currently, when the user invokes the GHCi editor without a parameter GHCi chooses the last file that loaded _sucessfully_. This patch changes this behavior to start the editor with the last file that _faild_ (this being what I usually want to edit). Caveat: we use the module graph to determine what happened and so we do not catch errors that occured during dependecy analysis (e.g., a mis-typed module name) but we could fix this later. ] [Update Windows installation docs Ian Lynagh **20070529152848] [#1318: lex negative unboxed literals Isaac Dupree **20070526230045 I reorganized the lexing of numeric literals a bit so the code didn't get too ugly, after trying a few ways, and also considering possible plans to be able to conditionally lex negative _boxed_ literals. ] [#1318: remove negative-prim-literal old hackish implementation Isaac Dupree **20070526215042] [parseInteger->parseUnsignedInteger to clarify meaning Isaac Dupree **20070526212204 I decided against adding parseSignedInteger since octal and hex literals often have junk between the '-' and the digits, but, compare to Util.readRational which does handle signed numbers. Also since Integers - mathematically and in Haskell - can be negative, normally. ] [Build Windows installer when making a bindist if ISCC is set Ian Lynagh **20070529102143 It doesn't work yet, but I'm pretty sure that's because the bindist is broken rather than the installer is broken. ] [don't build the threaded RTS when GhcUnregisterised=YES Simon Marlow **20070529074224] [only comments, spacing, alpha-renaming Isaac Dupree **20070526180800] [Removed defunct compiler/codeGen/CgUsages.hi-boot-6 Michael D. Adams **20070525205126] [-package pretty is required for GHC >= 6.7 Simon Marlow **20070525144216] [add $(ghc_ge_607) Simon Marlow **20070525144202] [System.Directory.Internals is now in package directory Simon Marlow **20070525080944] [Say where we're booting to aid debugging Ian Lynagh **20070524175031] [add a rule for creating makefiles as /CabalMakefile Simon Marlow **20070524135456 Not done by default yet, but useful when hacking on libraries. ] [process is now split off from base Ian Lynagh **20070523190843] [old-locale is now split out Ian Lynagh **20070519132656] [Refactor libraries/Makefile a bit; also, we don't need a bootstrapping pretty Ian Lynagh **20070519121211] [rebuild.library. is now a shorthand for clean then build Ian Lynagh **20070519121134] [directory, old-time and random are now split off from base Ian Lynagh **20070519120715] [Add parallel extralib Ian Lynagh **20070518165411] [We now need a bootstrapping pretty package as Cabal depends on it Ian Lynagh **20070518162504] [wibble Pepe Iborra **20070524114621] [Improve the interaction of 'seq' and associated data types simonpj@microsoft.com**20070523114818 Roman produced programs involving associated types that did not optimise well. His programs were something like this: data family T a data instance T Int = MkT Bool Char bar :: T Int -> Int bar t = t `seq` loop 0 where loop = ... You'd think that the `seq` should unbox 't' outside the loop, since a (T Int) is just a MkT pair. The most robust way to make this happen is for the simplifier to understand a bit about type-family instances. See Note [Improving seq] in Simplify.lhs. We use FamInstEnv.topNormaliseType to do the interesting work. To make this happen I did a bit of refactoring to the simplifier monad. I'd previously done a very similar transformation in LiberateCase, but it was happening too late. So this patch takes it out of LiberateCase as well as adding it to Simplify. ] [In GHCi, bind identifiers at TH level 'impLevel' simonpj@microsoft.com**20070523114253 Consder Trac #1265, which does this in GHCi: Prelude> let doit = fail "Code not written yet" :: ExpQ Prelude> $(doit) Even though 'doit' is defined "in the same module", it's OK to use it in a splice because it'll have been fully compiled to bytecode. (Contrast the situation if these two lines appeared in a single, compiled module.) Hence we want to bind 'doit' at TH's "imported level" (TcRnTypes.impLevel). This used to happen because GHCi-bound Ids were in the *global* type env (and hence at "imported level"). But since SimonM moved GHCi-bound ids to the *local* type env (for good reasons) the above program has been rejected. This patch makes it work again. ] [White-space only simonpj@microsoft.com**20070523114103] [Drop redundant import simonpj@microsoft.com**20070523113955] [Document -fomit-interface-pragmas, -fignore-interface-pragmas simonpj@microsoft.com**20070521093308] [type family normalisation Tom Schrijvers **20070511170928] [Improve error message when 'main' is not defined simonpj@microsoft.com**20070514080215] [Clean up for code conventions & add some comment Pepe Iborra **20070523092622] [OccNames for closure conversion isomorphisms Roman Leshchinskiy **20070511013932] [Modify generation of OccNames for closure conversion Roman Leshchinskiy **20070510015027] [Add data type information to VectInfo Manuel M T Chakravarty **20070522092729] [Keep flattenCgStmts from emitting spurious 'goto' after CmmSwitch Michael D. Adams **20070521112912] [follow removal of Distribtion.Compat.FilePath Simon Marlow **20070521134232] [separate the Windows version of uploading the docs, and fix it Simon Marlow **20070521104534] [use relative dir for uploading to avoid problems on Windows Simon Marlow **20070521083155] [Get the path right for :list Pepe Iborra **20070520232414] [doc: 'import M' is the same as ':module +M' Simon Marlow **20070521085134] [Use -cpp when building installPackage, so we can build the Cabal/filepath code Ian Lynagh **20070520175430] [wibble Pepe Iborra **20070520112252] [Clean up & comments Pepe Iborra **20070520112141] [cvReconstructType: a faster, types-only version of cvObtainTerm Pepe Iborra **20070520110747] [FastMutInt - make #endif be inside \{code} to match #ifdef Isaac Dupree **20070519195029] [FastTypes - delete ugly _signatures, comment on Bool not FastBool where the typechecker will not catch it Isaac Dupree **20070430195944] [FastTypes - note strictness of fast{Or,And} and make the unboxed versions so Isaac Dupree **20070430195810] [fix non-GHC-specific variant of FastTypes Isaac Dupree **20070429191422 I tested FastTypes.lhs with hugs (manually using cpp) as well as ghc. ] [Rewrite the unsafe code dealing with unboxed primitives in RtClosureInspect Pepe Iborra **20070519220526 Closure uses now a list of Words instead of a ByteArray# to store the non ptrs. Term.Prim follows this and keeps the [Word] value instead of storing the Show representation, which wasn't the best idea anyway. This fixes test print022 ] [Avoid the need to rerun configure when we install Ian Lynagh **20070518152017 This also means we don't need to carry around 10s of megs of Setup executables in bindists. ] ['import M' is now the same as ':module +M' at the prompt Simon Marlow **20070518145635 Seemed like a reasonable thing to do, and only 1 line ] [FIX: break011. Simon Marlow **20070518143708 Reset the exception flag before re-throwing the exception unless it was "Interrupted". This avoids needing the double :continue for ordinary exceptions, but still lets us break on ^C. ] [improve break-by-coordinate Simon Marlow **20070518134556 when setting a breakpoint by coordinate, if there are no spans covering the specified coordinate, then we take the leftmost of the spans to the right of the coordinate. This means that ':break c' will work if c is not a function, because the first span will be on c's right hand side. ] [On Windows, don't try to use ANSI bold sequences. Simon Marlow **20070518133543 Instead we identify the active expression with a line of ^^^^^^^ underneath it. ] [rethrow exceptions in sandboxIO Simon Marlow **20070517122147 This gives us a chance to catch asynchronous exceptions (e.g. ^C) and break. ] [eliminate warnings Simon Marlow **20070517122102] [xref to the docs for +RTS -xc Simon Marlow **20070517120037] [FIX #767 (withMVar family have a bug) Simon Marlow **20070518122505 We never want to raise a StackOverflow exception inside Control.Exception.block, because the user has no reasonable way of handling it, and it invalidates some useful guarantees. ] [remove old comments and commented-out code Simon Marlow **20070518122333] [Update the panic msg from #1257 to be an ordinary error, not a panic Simon Marlow **20070518121229 We don't support arbitrary unboxed tuples in GHCi right now. ] [autodetect BINDIST_DOC_WAYS again Simon Marlow **20070518085128] [FIX #1052 (NCG doesn't realise shift instructions trash shifted input) Simon Marlow **20070518115330 See comments with shift_code ] [Add dist/ to $(PublishLocation) Simon Marlow **20070518085811 The docs were going in the wrong place before: ..../dist/docs instead of ..../docs ] [remove _split and autogen dirs for binary-dist Simon Marlow **20070518084656] [fix ordering in :help Simon Marlow **20070517115528] [complete documentation of the GHCi debugger Simon Marlow **20070517115503] [add :cmd Simon Marlow **20070517110555 :cmd executes :: IO String, takes the resulting string and executes it as a sequence of commands. This is useful for doing macro-ish things with ":set stop", for example. ] [Rework the GHCi debugger docs Simon Marlow **20070516141411 I've taken material from Bernie's docs on the wiki, and Pepe's docs in this file, and added some more material of my own. Still to do: document the individual commands. ] [add a comment Simon Marlow **20070516133513] [raise#: break *after* stripping the stack, not before Simon Marlow **20070516133503 This means that thunks under evaluation will have been updated with the exception when we come to inspect them in GHCi. Blackholes are much less friendly. ] [Add a missing semicolon causing publish-binary-dist to fail Ian Lynagh **20070516231615] [FIX BUILD Use the right find on Windows systems; fixes bindist creation Ian Lynagh **20070516121607] [later mingw runtimes have gettimeofday, it seems Simon Marlow **20070516112340] ['let' expressions: fix scope of the binders (see test break014) Simon Marlow **20070516100622] [Avoid some unnecessary ticks in debugging mode Simon Marlow **20070516100544] [comment out unused definition Simon Marlow **20070516100445] [FIX BUILD for way=u in RTS Simon Marlow **20070516083939] [FIX BUILD with ghc-6.2.x Simon Marlow **20070516080749] [Add a missing backslash that was breaking building bindists Ian Lynagh **20070515134734] [GHCi debugger: new flag -fbreak-on-exception Simon Marlow **20070515124554 When -fbreak-on-exception is set, an exception will cause GHCi to suspend the current computation and return to the prompt, where the history of the current evaluation can be inspected (if we are in :trace). This isn't on by default, because the behaviour could be confusing: for example, ^C will cause a breakpoint. It can be very useful for finding the cause of a "head []" or a "fromJust Nothing", though. ] [small performance improvement: unbox some fields Simon Marlow **20070515091109] [result_id should be a GlobalId Simon Marlow **20070514153040] [Fix invalid simplification I made while moving the libraries bindist stuff Ian Lynagh **20070515122545] [Iface representation of synonym family instances Manuel M T Chakravarty **20070515081421 ** This patch changes the interface file format. All libraries etc ** ** need to be compiled from scratch. ** ] [Added -ftype-families to the user's manual Manuel M T Chakravarty **20070515012036 - This adds the option to the flag reference and puts a stub pointing to the Haskell wiki page about type families into the section about type extensions. - Once, the implementation has stabilised, the material from the wiki page will be integreated into the user's manual. ] [Add filepath modules to compat/ Ian Lynagh **20070514172859] [-findexed-types -> -ftype-families Manuel M T Chakravarty **20070514115334 . This change tracks our current terminology. It'll break all programs using the old option, sorry. But this has only been an experimental feature in the HEAD so far. ] [remove accidentally-committed change Simon Marlow **20070514105516] [fix for Vista workaround: "PATH" can be spelt "Path" Simon Marlow **20070514104509] [Revised signature of tcLookupFamInst and lookupFamInstEnv Manuel M T Chakravarty **20070514065234 - This changes the signature of FamInstEnv.lookupFamInstEnv and FamInstEnv.lookupFamInstEnvUnify in a manner similar to SPJ's previous patch for InstEnv.llokupInstEnv - tcLookupFamInst now permits the lookup of instances that are more general than the type instance requested. ] [Remove non-functional uninstall Makefile target Ian Lynagh **20070513173818] [Move the libraries bindist generation code into libraries/Makefile Ian Lynagh **20070513163451 This should mean it works even when some libraries are unbuildable. ] [Cabal now uses filepath, so we need a bootstrapping filepath too Ian Lynagh **20070509142557] [Tweak generation of generated files Ian Lynagh **20070512123736 Use "chmod a-w" rather than "chmod 444", and allow the command used to be overridden. ] [Correct an egregious typo in LiberateCase that emasculated it simonpj@microsoft.com**20070511155507 Somehow in the patch * Record-ise the liberate-case envt, in preparation for new stuff I managed to make lookupLevelEnv do entirely the wrong thing. I think it was just a typo. The result was that LiberateCase essentially never did anything any more. Easily fixed though! ] [don't remove c++ files from Windows binary distribution Simon Marlow **20070511145352] [Support for adding custom commands to an individual breakpoint Simon Marlow **20070511124929 :set stop N runs when breakpoint N is hit. Note that the command to run might be a macro (defined with :def), and the macro can invoke :continue, so it is now possible to do clever things like conditional breakpoints, or ignoring the next K hits of a breakpoint. ] [Fixed copy-and-paste error in the machOps of compiler/cmm/CmmParse.y Michael D. Adams **20070511132557] [Removed UNBOX_FIELD from HsVersions.h since it is not used anywhere. Michael D. Adams **20070511105322] [Fixed a minor redundancy in the C-- lexer Michael D. Adams **20070510151454] [Fixed the C-- lexer to comply with the standard on hex escape sequences. Michael D. Adams **20070510150350 The C-- standard [1] says in Section 3.3.5 "Character literals" that: - the hex escape sequence "must contain at least one and at most two hexdigits." - the octal escape sequence "must contain at least one and at most three octdigits." [1] Norman Ramsey, Simon Peyton Jones, and Christian Lindig. "The C-- Language Specication, Version 2.0 ( CVS Revision 1.128 )" ] [Documented the Unicode tricks that are being played in the lexers Michael D. Adams **20070510145935] [Fixed apparent typo in STRICT1(f) of HsVersions.h Michael D. Adams **20070504142325] [Remove the distinction between data and newtype families Manuel M T Chakravarty **20070511113057 - This patch removes "newtype family" declarations. - "newtype instance" declarations can now be instances of data families - This also fixes bug #1331 ** This patch changes the interface format. All libraries and all of ** ** Stage 2 & 3 need to be re-compiled from scratch. ** ] [FIX BUILD: revert accidentally-committed patch Simon Marlow **20070511072944 ] [Store a SrcSpan instead of a SrcLoc inside a Name Simon Marlow **20070511104926 This has been a long-standing ToDo. ] [improve :abandon, it wasn't properly terminating the computation (see comments) Simon Marlow **20070511090719] [refactoring only Simon Marlow **20070511075505] [Add a warning flag for when the Prelude is implicitly imported (trac #1317) Isaac Dupree **20070511084525 GHC already determines all the implicit (Prelude) imports, so we just need to check whether there are any of those, for each module being compiled. ] [Comments only simonpj@microsoft.com**20070511084017] [FIX #1181: parseStaticFlags should not be required Simon Marlow **20070510154542 - parseStaticFlags is now not required, but if it is called, it should be called only once and before newSession, otherwise you get an error. - parseStaticFlags is exported from GHC ] [FIX: loading the ghc package under GHCi Simon Marlow **20070510144229] [remove now-unused usage information (#1003) Simon Marlow **20070510135007] [FIX #1321: problems with accessing the interpreter's Handles Simon Marlow **20070510133721 I've had to redo the way we turn off buffering and flush the stdin/stdout/stderr Handles in the dynamically-loaded base package. Compiling the expression "hSetBuffering stdout NoBuffering" and then re-using the compiled expression didn't work sometimes (see comments for details). Now, I'm explicitly looking up the address the stdout closure and re-using that. It should be more robust, if somewhat unclean. ] [Warning fix for unused and redundant imports Michael D. Adams **20070510093135] [Fix cloning bugs in SpecConstr simonpj@microsoft.com**20070510093113 These bugs produced a core-lint error when compiling GHC.PArr with -O2. Roman found and fixed them; this patch also includes some type synonyms to make things a bit clearer. ] [Dead code elimination simonpj@microsoft.com**20070510093001] [improve comments about x86-64 relative-offset hackery Simon Marlow **20070510093135] [FIX #1343: regex bug in the x86_64 mangler settings Simon Marlow **20070510092019] [FIX BUILD: remove accidentally committed hunk Simon Marlow **20070510081554] [FIX BUILD with GHC 6.2.x: VectInfo -> HscTypes.VectInfo Simon Marlow **20070510075506] [Two more small bugs in abstractFloats simonpj@microsoft.com**20070509154447] [Remove ghc_ge_504 (it's required to be true now anyway) Ian Lynagh **20070509150508] [fix confusion with return value of runStmt Simon Marlow **20070509132510] [eliminate a crash when trying to use :break on a compiled module (test: break007) Simon Marlow **20070509132424] [Store the constructor name in the info table in UTF-8 Simon Marlow **20070509103834] [FIX: Linker.getHValue should be linking in any dependencies it requires Simon Marlow **20070509103712 Otherwise :print only works for local identifiers, not global ones. In fact it was silently failing, so I fixed that too. ] [Fix a missing prime spotted by -fwarn-unused-binds Simon Marlow **20070509103435] [Tidy up the interface to lookupInstEnv simonpj@microsoft.com**20070509112530 This patch changes the interface to lookupInstEnv, so that it returns a pair (Instance, [Either TyVar Type]) rather than (Inst, TvSubst) There is no functionality change, but the interface is tidier, and closer to lookupFamInstEnv (when Manuel has changed that too). The [Either TyVar Type] gives the type(s) at which the dfun should be instantiated. We need an Either because it might be instantiated freely: see Note [InstTypes: instantiating types] in InstEnv. (This might be a pattern we want to use elsewhere too.) ] [Fix a bug in (the new function) SimplUtils.abstractFloats simonpj@microsoft.com**20070509111919] [Improve full laziness by floating allocations out of value lambdas simonpj@microsoft.com**20070509111812 This patch simplifies the code slightly, and simultaneously improves full laziness by floating allocations (lambdas, constructor apps) out of loops. See Note [Escaping a value lambda] in SetLevels, which explains. There's a test that shows it up: simplrun009 This relevant to SpecConstr, because a call looks like f lvl instead of f (\x. blah) and the latter is easier to match in a robust way. ] [Fixed a badly defined pattern match Pepe Iborra **20070509101854] [Allow you to say :unset -f (see #1328) Simon Marlow **20070508141005] [overhaul :help, group the debugging commands together Simon Marlow **20070508135725] [let you :show things that you can :set (e.g. args, prog etc.) Simon Marlow **20070508135707] [improvements to :history Simon Marlow **20070508133314 :hist displays at most the last steps (default 20). ] [FIX BUILD (non-profiling RTS was broken in previous patch) Simon Marlow **20070508132049] [FIX parsing of Haddock comments (broken by me in the previous patch) Simon Marlow **20070508125530] [FIX: #1227 (biographical profiling broken) Simon Marlow **20070508104551 We were freeing the hash table storage with exitHashTable() before calling endProfiling(), which uses hash tables. ] [FIX crash on exit with biographical profiling Simon Marlow **20070508100908 Seems to be a bug introduced by code to free the memory allocated by the heap profiler. ] [FIX profiling :-( Simon Marlow **20070508100134] [Improved VectInfo Manuel M T Chakravarty **20070508080609 - We need to keep pairs of (f, f_CC) in VectInfo as it is difficult to obtain Names from OccNames (of imported modules) in Core passes. - There is a choice of keeping Names or Vars in VectInfo. We go with Vars for now; mainly to avoid converting between Names and Vars repeatedly for the same VectInfo in other than one-shot mode. Again goes to the HEAD straight away to avoid conflicts down the road. ] [OccNames for closure conversion Roman Leshchinskiy **20070501041404] [add defaultObjectTarget to the GHC API Simon Marlow **20070507134235 We had no way of getting the right value of HscTarget to use to request object files as output. ] [Make let-floating work even if there are big lambdas in the way simonpj@microsoft.com**20070507162422 This patch generalises the let-floating transformation in a way suggested by Roman and Manuel when doing closure conversion. There are extensive comments in Note [Floating and type abstraction], which begins thus. Consider this: x = /\a. C e1 e2 We'd like to float this to y1 = /\a. e1 y2 = /\a. e2 x = /\a. C (y1 a) (y2 a) for the usual reasons: we want to inline x rather vigorously. (Further commennts follow in SimplUtils.) The implementation is not hard; indeed it used to be in GHC years ago. I removed it thinking that full laziness would achieve the same effect, but I'm not sure it does; and in any case it seems more direct to do it here. The transformation should not make anything worse, so yell if you see anything unexpected happening. ] [Fix comments on HsWrapper type simonpj@microsoft.com**20070507161653] [Document -fspec-threshold simonpj@microsoft.com**20070507160032 This size-threshold flag is for both liberate-case and SpecConstr. Replaces -flibereate-case-threshold. ] [FIX Trac #1332: make isStringTy work right simonpj@microsoft.com**20070507104137 For some ancient reason, TcType.isStringTy was treating newtypes as transparent, which is quite consistent with isIntTy, isBoolTy etc. (I think the reason is that isStringTy was written to go with isFFIDotNetTy, which deals in representation types.) Anyway, this inconsistency is Utterly Wrong when called from Inst.shortCutStringLit, and that made tc224 fail. I can't think how it ever succeeded. Maybe it never did! Anyway this fixes it. It may be that .NET FFI calls are not quite as permissive, but they are almost certainly broken in more serious ways, so I'm going to jump that bridge if we come to it. ] [FIX print020: conversion of case expressions of type 'Any' was wrong Simon Marlow **20070507145350 All primitive types were getting PrimAlts, where actually case expressions on 'Any' should get a PolyAlt. The result was that seq on Any compiled into a no-op, which caused :force to go into an infinite loop. ] [FIX: #1253 (Can't use non-layout at top level) Simon Marlow **20070507132514] [properly fix leakage of Haddock comment syntax (see #1091, test: read044) Simon Marlow **20070507113701] [Add VectInfo to HPT Manuel M T Chakravarty **20070507110336 I am putting this patch (as the previous VectInfo patch) straight away into the head to avoid the kind of merging disaster we had with the FC branch. The patch does not interfere with any other functionality and hence should cause no harm in the head. ] [FIX #1155: ghci -debug generates slightly odd message Simon Marlow **20070507102418] [FIX Trac #1329: spelling error simonpj@microsoft.com**20070507084247] [TAG 2007-05-06 Ian Lynagh **20070506122211] Patch bundle hash: 5890337fac391411db33c6beac4b3054bebd4ffa