summaryrefslogtreecommitdiff
path: root/ghc
Commit message (Collapse)AuthorAgeFilesLines
* [project @ 2001-05-22 10:38:57 by simonmar]simonmar2001-05-221-2/+2
| | | | | - Recurse on 'distclean', otherwise we don't get to remove hsc2hs-inplace - Remove 'veryclean' target which doesn't exist any more
* [project @ 2001-05-21 16:34:22 by sewardj]sewardj2001-05-211-6/+26
| | | | Implement opcodes bci_TESTLT_F and case bci_TESTEQ_F. (Duh.)
* [project @ 2001-05-21 15:25:24 by simonmar]simonmar2001-05-2126-69/+103
| | | | More test reorganisation - most of these tests work now.
* [project @ 2001-05-21 14:09:52 by sewardj]sewardj2001-05-211-1/+1
| | | | update expected output
* [project @ 2001-05-21 14:08:36 by simonmar]simonmar2001-05-212-7/+14
| | | | Make it a bit clearer which output goes with which test.
* [project @ 2001-05-21 14:07:31 by simonmar]simonmar2001-05-212-56/+76
| | | | | | Move topHandler and friends into a module on their own. They can't go in PrelMain, because PrelMain isn't included in HSstd.o (because PrelMain depends on Main, which doesn't exist yet...)
* [project @ 2001-05-21 14:05:04 by simonmar]simonmar2001-05-211-5/+5
| | | | minor performance improvement
* [project @ 2001-05-21 14:04:15 by simonmar]simonmar2001-05-211-4/+2
| | | | GC unused imports
* [project @ 2001-05-21 14:03:05 by simonmar]simonmar2001-05-211-105/+10
| | | | | - remove support for GHC < 4.00 - fixed to work with GHC 5.01 (new I/O system)
* [project @ 2001-05-21 14:00:40 by simonmar]simonmar2001-05-211-108/+1
| | | | Remove support for GHC < 4.00
* [project @ 2001-05-21 13:57:49 by simonmar]simonmar2001-05-211-15/+15
| | | | fix typos in the welcome message and help text.
* [project @ 2001-05-21 11:02:50 by simonmar]simonmar2001-05-211-14/+1
| | | | file locking works.
* [project @ 2001-05-21 11:02:15 by simonmar]simonmar2001-05-211-2/+15
| | | | | | | | | | | | Re-instate the missing fstat call. By some bizarre coincidence, this function declared a 'struct stat', and failed to initialize it, but in practice the uninitialized memory was in the exact same place on the stack as the struct stat from a previous call to fstat, which meant all the tests worked :-) Also, apparently gcc doesn't warn about uninitialised use of structure fields.
* [project @ 2001-05-21 10:03:36 by simonpj]simonpj2001-05-211-176/+73
| | | | Documentation for scoped type variables
* [project @ 2001-05-21 09:19:14 by simonpj]simonpj2001-05-218-157/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------- Improve pattern type-signatures ------------------------------- The main effect of this commit is to implement the idea (originally Marcin's suggestion) that type variables in pattern type signatures are simply names for types; they don't have to name a type that is itself a type variable. For example f :: Int -> Int f (x::a) = let y::a y = x in x+y is fine. Here 'a' is a name for the type 'Int', and does not have to be universally quantified. I also took the opportunity to modularise the implementation of pattern type-checking, mainly in TcMatches. As a result pattern type signatures should work in do-notation (which they didn't before). ToDo: update documentation
* [project @ 2001-05-19 20:20:56 by qrczak]qrczak2001-05-192-19/+55
| | | | | | | | | | | | | | | | | | | Make ghc compilable with itself after the implementation of handle IO changed, by changing an ugly mess of #ifdefs and low-level ghc-internals-specific kludges into a yet uglier mess with more #ifdefs and kludges. Wouldn't Haskell 98 implementation of a lexer be fast enough? :-) This won't compile with older versions of ghc-5.01. You may temporarily change 501 to 502 in #ifdefs here, or use an older ghc. The compiler still doesn't work at all when compiled with itself: it writes complete nonsense into .hc files. A remaining error: ghc/lib/std doesn't link PrelHandle_hsc.o into libHSstd.a. Function read_wrap is inline but for some reason it's needed for linking some programs (e.g. ghc itself).
* [project @ 2001-05-19 08:02:37 by qrczak]qrczak2001-05-191-4/+16
| | | | Implementation of locking in cbits is bogus. Disable it for now.
* [project @ 2001-05-18 22:40:52 by qrczak]qrczak2001-05-182-62/+14
| | | | I'm too young to remember times when ghc didn't use gmp...
* [project @ 2001-05-18 22:34:42 by qrczak]qrczak2001-05-181-1/+6
| | | | Install lockFile.h.
* [project @ 2001-05-18 22:13:28 by qrczak]qrczak2001-05-181-4/+1
| | | | Remove bogus comment.
* [project @ 2001-05-18 21:57:30 by qrczak]qrczak2001-05-181-2/+2
| | | | s'/n -> /r/n'\n -> \r\n' in a comment.
* [project @ 2001-05-18 21:46:58 by qrczak]qrczak2001-05-181-4/+3
| | | | Put back importing Monad, as it doesn't need Prelude anymore.
* [project @ 2001-05-18 21:45:43 by qrczak]qrczak2001-05-181-2/+1
| | | | Don't export throwErrnoIfRetry_ twice.
* [project @ 2001-05-18 21:19:11 by qrczak]qrczak2001-05-183-325/+1
| | | | Remove and don't install: stgio.h, stgerror.h, fileObject.h.
* [project @ 2001-05-18 21:18:17 by qrczak]qrczak2001-05-181-1/+2
| | | | Make stg_gc_unpt_r1 known to the linker.
* [project @ 2001-05-18 18:27:20 by qrczak]qrczak2001-05-181-7/+12
| | | | Prelude isn't available yet.
* [project @ 2001-05-18 16:54:04 by simonmar]simonmar2001-05-18179-6867/+3277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I/O library rewrite ------------------- This commit replaces the old C/Haskell I/O implementation with a new Haskell-only one using the new FFI & hsc2hs. main points: - lots of code deleted: we're about 3000 lines of C lighter, but the amount of Haskell code is about the same. - performance is ok: some operations are faster, others are slower. There's still some tuning to do, though. - the new library is designed to handle read/write streams much better: a read/write stream gets a special kind of handle internally called a "DuplexHandle", which actually contains two separate handles, one for writing and one for reading. The upshot is that you can do simultaneous reading and writing to/from a socket or FIFO without any locking problems. The effect is similar to calling socketToHandle twice, except that finalization works properly (creating two separate Handles could lead to the socket being closed too early when one of the Handles is GC'd). - hConnectTo and withHandleFor are gone (no one responded to my mail on GHC users, but we can always bring 'em back if necessary). - I made a half-hearted attempt at keeping the system-specific code in one place: see PrelPosix.hsc. - I've rearranged the I/O tests and added lots more. ghc/tests/lib/IO now contains Haskell 98-only IO tests, ghc/test/lib/{IOExts, Directory, Time} now contain tests for the relevant libraries. I haven't quite finished in here yet, the IO tests work but the others don't yet. - I haven't done anything about Unicode yet, but now we can start to discuss what needs doing here. The new library is using MutableByteArrays for its buffers because that turned out to be a *lot* easier (and quicker) than malloc'd buffers - I hope this won't cause trouble for unicode translations though. WARNING: Windows users refrain from updating until we've had a chance to fix any issues that arise. Testing: the basic H98 stuff has been pretty thoroughly tested, but the new duplex handle stuff is still a little green.
* [project @ 2001-05-18 14:18:34 by simonmar]simonmar2001-05-182-28/+57
| | | | Allow unboxing strict fields through newtypes.
* [project @ 2001-05-18 09:18:05 by simonmar]simonmar2001-05-182-25/+1
| | | | Remove more ugen droppings.
* [project @ 2001-05-18 08:49:27 by simonpj]simonpj2001-05-183-1/+25
| | | | Add a test for -funbox-strict-fields
* [project @ 2001-05-18 08:46:18 by simonpj]simonpj2001-05-1832-388/+294
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------- Get unbox-strict-fields right ----------------------------- The problem was that when a library was compiled *without* -funbox-strict-fields, and the main program was compiled *with* that flag, we were wrongly treating the fields of imported data types as unboxed. To fix this I added an extra constructor to StrictnessMark to express whether the "!" annotation came from an interface file (don't fiddle) or a source file (decide whether to unbox). On the way I tided things up: * StrictnessMark moves to Demand.lhs, and doesn't have the extra DataCon fields that kept it in DataCon before. * HsDecls.BangType has one constructor, not three, with a StrictnessMark field. * DataCon keeps track of its strictness signature (dcRepStrictness), but not its "user strict marks" (which were never used) * All the functions, like getUniquesDs, that used to take an Int saying how many uniques to allocate, now return an infinite list. This saves arguments and hassle. But it involved touching quite a few files. * rebuildConArgs takes a list of Uniques to use as its unique supply. This means I could combine DsUtils.rebuildConArgs with MkId.rebuildConArgs (hooray; the main point of the previous change) I also tidied up one or two error messages
* [project @ 2001-05-18 07:51:42 by simonpj]simonpj2001-05-181-6/+6
| | | | | | | | **** MERGE WITH 5.00.1 BRANCH ***** Fix an obscure core-to-stg bug. Type arguments were being counted as value arguments when computing whether a function was saturated, with consequent confusion.
* [project @ 2001-05-16 12:49:59 by simonmar]simonmar2001-05-161-1/+4
| | | | | | | Fix a bug in the unfolding for a record selector which caused problems with -funbox-strict-fields. MERGE with 5.00 (after testing etc. etc.)
* [project @ 2001-05-16 12:44:20 by simonpj]simonpj2001-05-162-24/+41
| | | | Import Double when necessary to make defaulting work
* [project @ 2001-05-16 11:36:05 by simonmar]simonmar2001-05-161-2/+2
| | | | | | | Fix for a bug which affects record updates when the record has strict unboxed fields (i.e. -funbox-strict-fields is on). MERGE with 5.00 (after testing, and if it can be done before the release)
* [project @ 2001-05-16 09:40:11 by sewardj]sewardj2001-05-161-9/+41
| | | | | | | Add enough entries to RTS_MINGW_ONLY_SYMBOLS to make packages {std lang concurrent util data text} work. Also add a proper fix to this using GetModuleHandle(NULL); unfortunately it doesn't work for some unknown reason.
* [project @ 2001-05-15 19:57:08 by sof]sof2001-05-152-2/+2
| | | | -fglasgow-exts doesn't seem to imply -package data anymore -- add it to HC_OPTS
* [project @ 2001-05-15 19:54:46 by sof]sof2001-05-151-1/+1
| | | | Use LD_OPTS when linking the test binary
* [project @ 2001-05-15 15:29:03 by sewardj]sewardj2001-05-151-51/+165
| | | | | | | | | | | | | Fix up the PEi386 linker well enough for ghci to start and function on Win32. Two potential problems still to be fixed properly: * ocGetNames_PEi386 doesn't copy local syms into oc's local symtab, and it probably should (since the ELF one does). Easy to fix. * I can't figure out how to read syms in the executable itself on Win32. This problem is solved properly for Unix-ELF by doing dlopen(NULL). Here I have kludged it using RTS_MINGW_ONLY_SYMBOLS, but this is not a good long-term solution.
* [project @ 2001-05-15 15:01:48 by sewardj]sewardj2001-05-151-1/+10
| | | | Handle leading underscores correctly, for ghci on Win32.
* [project @ 2001-05-14 16:40:54 by sewardj]sewardj2001-05-141-2/+8
| | | | Record-selector unfolding fix #2
* [project @ 2001-05-14 12:55:31 by simonpj]simonpj2001-05-141-1/+1
| | | | comment wibble
* [project @ 2001-05-14 12:55:11 by simonpj]simonpj2001-05-143-3/+17
| | | | Add DEBUG code for CgInfo field of IdInfo
* [project @ 2001-05-14 12:03:41 by simonpj]simonpj2001-05-141-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **** MERGE WITH 5.00 BRANCH ******** ----------------------------------------------- Expose record selectors with correct unfoldings ----------------------------------------------- The problem was that there was that with "ghc --make" we were passing on record selectors to importing modules in their un-tidied form. The idea was that they have very stylised bindings so they don't need tidying. But they do, because they may mention error messages that get floated out. Here's the comment from CoreTidy.lhs -- MINOR-HACK ALERT: we *do* tidy record selectors. Reason: they mention error -- messages, which may be floated out: -- x_field pt = case pt of -- Rect x y -> y -- Pol _ _ -> error "buggle wuggle" -- The error message will be floated out so we'll get -- lvl5 = error "buggle wuggle" -- x_field pt = case pt of -- Rect x y -> y -- Pol _ _ -> lvl5 -- -- When this happens, it's vital that the Id exposed to importing modules -- (by ghci) mentions lvl5 in its unfolding, not the un-tidied version. -- -- What about the Id in the TyCon? It probably shouldn't be in the TyCon at -- all, but in any case it will have the error message inline so it won't matter.
* [project @ 2001-05-14 10:20:58 by sewardj]sewardj2001-05-141-1/+5
| | | | | | | | Change wording of panic message on encountering unboxed tuples to: Bytecode generator can't handle unboxed tuples. Possibly due to foreign import/export decls in source. Workaround: compile this module to a .o file, then restart session.
* [project @ 2001-05-10 09:51:28 by rrt]rrt2001-05-101-5/+31
| | | | Enhanced. Probably not to be used now, though.
* [project @ 2001-05-10 09:00:28 by simonmar]simonmar2001-05-101-1/+1
| | | | typo in error msg, pointed out by Alastair Reid.
* [project @ 2001-05-09 13:48:18 by simonmar]simonmar2001-05-092-0/+7
| | | | | Add test for pattern parse errors, in particular getting the line number right (4.08.2 didn't).
* [project @ 2001-05-09 13:46:29 by simonpj]simonpj2001-05-091-11/+11
| | | | Fix bug in spec-constr rule generation [Sergei2]
* [project @ 2001-05-09 13:28:11 by simonpj]simonpj2001-05-091-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | **** MERGE WITH 5.00 BRANCH ******** ------------------------------- Fix a rather obscure rule bogon ------------------------------- The problem was that there was class Foo a where op :: a -> a {-# RULES "op" op x = x #-} or something like that. We attach locally defined rules, like this one, to the local binding, in SimplCore.prepareRules. Alas op doesn't reply "True" to isLocalId, because it's a class selector (so it's a GlobalId throughout). Result: we treated the rule as an imported rule, and therefore gave 'op' a fresh unique (becuase it looked as if it was already in scope). This only blew up in ghc --make or --interactive. The handling of local vs global rules is rather unsatisfactory. Something to muse on.