summaryrefslogtreecommitdiff
path: root/ghc/compiler/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* [project @ 1999-09-17 09:11:20 by simonpj]simonpj1999-09-171-251/+0
| | | | Remove SST.lhs
* [project @ 1999-07-14 15:28:08 by simonmar]simonmar1999-07-141-3/+3
| | | | pre-4.03 didn't have __HASKELL98__, use something else.
* [project @ 1999-07-14 14:40:20 by simonpj]simonpj1999-07-142-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main things: * Add splitProductType_maybe to DataCon.lhs, with type splitProductType_maybe :: Type -- A product type, perhaps -> Maybe (TyCon, -- The type constructor [Type], -- Type args of the tycon DataCon, -- The data constructor [Type]) -- Its *representation* arg types Then use it in many places (e.g. worker-wrapper places) instead of a pile of junk * Clean up various uses of dataConArgTys, which were plain wrong because they weren't passed the existential type arguments. Most of these calls are eliminated by using splitProductType_maybe above. I hope I correctly squashed the others. This fixes a bug that Meurig's programs showed up. module FailGHC (killSustainer) where import Weak import IOExts data Sustainer = forall a . Sustainer (IORef (Maybe a)) (IO ()) killSustainer :: Sustainer -> IO () killSustainer (Sustainer _ act) = act The above program used to kill the compiler. * A fairly concerted attack on the Dreaded Space Leak. - Add Type.seqType, CoreSyn.seqExpr, CoreSyn.seqRules - Add some seq'ing when building Ids and IdInfos These reduce the space usage a lot - Add CoreSyn.coreBindsSize, which is pretty strict in the program, and call it when we have -dshow-passes. - Do not put the inlining in an Id that is being plugged into the result-expression of the simplifier. This cures a the 'wedge' in the space profile for reasons I don't understand fully Together, these things reduce the max space usage when compiling PrelNum from 17M to about 7Mbytes. I think there are now *too many* seqs, and they waste work, but I don't have time to find which ones. Furthermore, we aren't done. For some reason, some of the stuff allocated by the simplifier makes it through all during code generation and I don't see why. There's a should-be-unnecessary call to coreBindsSize in Main.main which zaps some, but not all of this space. -dshow-passes reduces space usage a bit, but I don't think it should really. All the measurements were made on a compiler compiled with profiling by GHC 3.03. I hope they carry over to other builds! * One trivial thing: changed all variables 'label' to 'lbl', becuase the former is a keyword with -fglagow-exts in GHC 3.03 (which I was compiling with). Something similar in StringBuffer.
* [project @ 1999-07-01 12:30:06 by simonmar]simonmar1999-07-011-2/+1
| | | | Make this more Haskell 1.3-insensitive
* [project @ 1999-06-28 15:16:59 by simonmar]simonmar1999-06-281-0/+2
| | | | writeHandle has been removed.
* [project @ 1999-06-23 10:44:59 by simonmar]simonmar1999-06-231-1/+1
| | | | Don't inline strLength, it causes gcc to run out of registers.
* [project @ 1999-06-22 07:59:54 by simonpj]simonpj1999-06-221-10/+9
| | | | Many small tuning changes
* [project @ 1999-06-14 10:36:51 by simonmar]simonmar1999-06-141-4/+6
| | | | Don't chop off the last character of the buffer.
* [project @ 1999-06-14 09:49:26 by simonmar]simonmar1999-06-141-6/+6
| | | | Oops, forgot that the memory returned from realloc could have moved.
* [project @ 1999-06-04 13:04:17 by simonmar]simonmar1999-06-041-26/+58
| | | | Make the new file-slurping code work with 3.02.
* [project @ 1999-06-03 08:25:43 by simonmar]simonmar1999-06-031-0/+10
| | | | Comment out some stuff we don't use.
* [project @ 1999-06-03 08:19:13 by simonmar]simonmar1999-06-031-0/+6
| | | | oops, better export it too.
* [project @ 1999-06-03 08:18:15 by simonmar]simonmar1999-06-031-1/+2
| | | | Fix bug in compat version of bracket.
* [project @ 1999-06-01 16:40:41 by simonmar]simonmar1999-06-013-38/+151
| | | | | | | | | | | | | | | | | | | | | | | | | This commit replaces the old yacc parser with a Happy-generated one. Notes: - The generated .hs file is *big*. Best to use a recent version of Happy, and even better to add the -c flag to use unsafeCoerce# with ghc (versions 4.02+ please). - The lexer has grown all sorts of unsightly growths and should be put down as soon as possible. - Parse errors may result in strange diagnostics. I'm looking into this. - HsSyn now contains a few extra constructors due to the way patterns are parsed as expressions in the parser. - The layout rule is implemented according to the Haskell report. I found a couple of places in the libraries where we previously weren't adhering to this - in particular the rule about "nested contexts must be more indented than outer contexts". The rule is necessary to disambiguate in the presence of empty declaration lists.
* [project @ 1999-05-26 14:12:07 by simonmar]simonmar1999-05-262-1/+12
| | | | Several bugfixes (from SLPJ's tree).
* [project @ 1999-05-21 12:52:28 by simonmar]simonmar1999-05-211-2/+2
| | | | A bunch of patches from SLPJ to fix various things.
* [project @ 1999-05-18 15:03:54 by simonpj]simonpj1999-05-183-11/+35
| | | | RULES-NOTES
* [project @ 1999-05-05 11:39:09 by keithw]keithw1999-05-051-4/+4
| | | | Add a space to panic message from zipWith*Equal.
* [project @ 1999-04-27 17:26:09 by keithw]keithw1999-04-271-1/+1
| | | | glasgow-haskell-{bugs,users} has moved.
* [project @ 1999-04-27 12:34:49 by simonm]simonm1999-04-271-1/+8
| | | | | | | | | | | | | | | | | - Fix the tagToEnum# support in the code generator - Make isDeadBinder work on case binders - Fix compiling of case x `op` y of z { True -> ... z ... False -> ... z ... - Clean up CgCase a little. - Don't generate specialised tag2con functions for derived Enum/Ix instances; use tagToEnum# instead.
* [project @ 1999-03-24 18:19:08 by sof]sof1999-03-241-11/+8
| | | | tidied up the error handling defs.
* [project @ 1999-03-04 13:26:48 by simonm]simonm1999-03-041-0/+16
| | | | | Make type substitution strict. This partially fixes the space leak, and seems to improve performance marginally.
* [project @ 1999-03-01 09:44:05 by sof]sof1999-03-011-2/+2
| | | | import list tweak
* [project @ 1999-03-01 09:43:37 by sof]sof1999-03-011-14/+1
| | | | Remove unused defns, forall and exists.
* [project @ 1999-02-18 17:55:40 by simonm]simonm1999-02-181-1/+1
| | | | Eliminate an unnecessary pattern match on J#.
* [project @ 1999-02-10 16:01:17 by simonpj]simonpj1999-02-101-1/+1
| | | | Tiny error-message hacks
* [project @ 1999-01-27 14:51:14 by simonpj]simonpj1999-01-271-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Finally! This commits the ongoing saga of Simon's hygiene sweep FUNCTIONALITY ~~~~~~~~~~~~~ a) The 'unused variable' warnings from the renamer work. b) Better error messages here and there, esp type checker c) Fixities for Haskell 98 (maybe I'd done that before) d) Lazy reporting of name clashes for Haskell 98 (ditto) HYGIENE ~~~~~~~ a) type OccName has its own module. OccNames are represented by a single FastString, not three as in the last round. This string is held in Z-encoded form; a decoding function decodes for printing in user error messages. There's a nice tight encoding for (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) b) type Module is a proper ADT, in module OccName c) type RdrName is a proper ADT, in its own module d) type Name has a new, somwhat tidier, representation e) much grunting in the renamer to get Provenances right. This makes error messages look better (no spurious qualifiers)
* [project @ 1999-01-14 16:55:16 by sof]sof1999-01-141-0/+13
| | | | | | Added indexFS, indexFS :: FastString -> Int -> Char
* [project @ 1999-01-07 17:49:47 by kw217]kw2171999-01-071-1/+1
| | | | Add missing export of warnPprTrace (for WARN macro).
* [project @ 1999-01-07 12:47:34 by simonpj]simonpj1999-01-071-0/+8
| | | | Add debug macro WARN
* [project @ 1998-12-22 17:00:11 by simonm]simonm1998-12-221-2/+0
| | | | Remove overlapped case correctly spotted by GHC.
* [project @ 1998-12-22 16:31:28 by simonpj]simonpj1998-12-221-1/+1
| | | | | | | | | | | | | | | | 1. Add primOpStrictness to PrimOp.lhs, and use it in - the strictness analyser - the simplifier to deal correctly with PrimOps that are non-strict. ToDo: use this new facility to clean up SeqOp, ParOp. 2. Fix the instance-decl-import bug, but printing de-synonym'd types in interface files. 3. Make the simplifier treat applications with an unlifted-type arg in the same way it would if the function was strict (in rebuild_strict)
* [project @ 1998-12-21 10:45:36 by simonpj]simonpj1998-12-211-0/+35
| | | | Add utils/Panic.lhs
* [project @ 1998-12-18 17:40:31 by simonpj]simonpj1998-12-184-57/+43
| | | | | | | | | | | | | | | | | | | | | Another big commit from Simon. Actually, the last one didn't all go into the main trunk; because of a CVS glitch it ended up in the wrong branch. So this commit includes: * Scoped type variables * Warnings for unused variables should work now (they didn't before) * Simplifier improvements: - Much better treatment of strict arguments - Better treatment of bottoming Ids - No need for w/w split for fns that are merely strict - Fewer iterations needed, I hope * Less gratuitous renaming in interface files and abs C * OccName is a separate module, and is an abstract data type I think the whole Prelude and Exts libraries compile correctly. Something isn't quite right about typechecking existentials though.
* [project @ 1998-12-02 13:17:09 by simonm]simonm1998-12-0215-61/+199
| | | | Move 4.01 onto the main trunk.
* [project @ 1998-08-19 07:47:46 by sof]sof1998-08-191-1/+1
| | | | oops, one branch of an #ifdef had been de-activated by accident
* [project @ 1998-08-18 13:45:20 by sof]sof1998-08-181-1/+8
| | | | Some more 3.03 ForeignObj adjustments
* [project @ 1998-08-18 13:36:58 by sof]sof1998-08-181-0/+4
| | | | 3.03 update: Foreign now exports ForeignObj abstractly..
* [project @ 1998-08-15 17:56:59 by sof]sof1998-08-151-1/+1
| | | | use shiftRL# instead of shiftRA#, since the latter primop is no more.
* [project @ 1998-08-15 17:51:25 by sof]sof1998-08-151-5/+5
| | | | reformatted
* [project @ 1998-08-14 17:52:20 by sof]sof1998-08-141-1/+1
| | | | Oops, left out filePtr when compiling with 3.02. Bad Idea
* [project @ 1998-08-14 17:40:00 by sof]sof1998-08-141-8/+8
| | | | Clean up PrelIOBase import lists some more
* [project @ 1998-08-14 16:44:55 by sof]sof1998-08-141-1/+5
| | | | Some more cpp'ery
* [project @ 1998-08-14 16:34:14 by sof]sof1998-08-141-1/+1
| | | | Remove flushBuf from PrelHandle import list; not used
* [project @ 1998-08-14 11:15:07 by sof]sof1998-08-141-2/+21
| | | | If possible, use new IO support for doing block IO
* [project @ 1998-08-14 11:13:09 by sof]sof1998-08-141-4/+5
| | | | new exported function: pprCode
* [project @ 1998-08-14 11:12:32 by sof]sof1998-08-141-412/+410
| | | | Remove fromRational junk, use Numeric.fromRat instead
* [project @ 1998-08-14 11:11:15 by sof]sof1998-08-141-52/+58
| | | | Make use of new IO implementation, if possible
* [project @ 1998-08-14 11:10:37 by sof]sof1998-08-141-0/+4
| | | | abstract away the real home of trace, and re-export it from here
* [project @ 1998-07-08 09:52:32 by sof]sof1998-07-081-0/+4
| | | | post 3.02 export indexAddrOffAddr from Addr, not ByteArray