| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
- Recurse on 'distclean', otherwise we don't get to remove hsc2hs-inplace
- Remove 'veryclean' target which doesn't exist any more
|
|
|
|
| |
Implement opcodes bci_TESTLT_F and case bci_TESTEQ_F. (Duh.)
|
|
|
|
| |
More test reorganisation - most of these tests work now.
|
|
|
|
| |
update expected output
|
|
|
|
| |
Make it a bit clearer which output goes with which test.
|
|
|
|
|
|
| |
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...)
|
|
|
|
| |
minor performance improvement
|
|
|
|
| |
GC unused imports
|
|
|
|
|
| |
- remove support for GHC < 4.00
- fixed to work with GHC 5.01 (new I/O system)
|
|
|
|
| |
Remove support for GHC < 4.00
|
|
|
|
| |
fix typos in the welcome message and help text.
|
|
|
|
| |
file locking works.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Documentation for scoped type variables
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-------------------------------
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
Implementation of locking in cbits is bogus. Disable it for now.
|
|
|
|
| |
I'm too young to remember times when ghc didn't use gmp...
|
|
|
|
| |
Install lockFile.h.
|
|
|
|
| |
Remove bogus comment.
|
|
|
|
| |
s'/n -> /r/n'\n -> \r\n' in a comment.
|
|
|
|
| |
Put back importing Monad, as it doesn't need Prelude anymore.
|
|
|
|
| |
Don't export throwErrnoIfRetry_ twice.
|
|
|
|
| |
Remove and don't install: stgio.h, stgerror.h, fileObject.h.
|
|
|
|
| |
Make stg_gc_unpt_r1 known to the linker.
|
|
|
|
| |
Prelude isn't available yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Allow unboxing strict fields through newtypes.
|
|
|
|
| |
Remove more ugen droppings.
|
|
|
|
| |
Add a test for -funbox-strict-fields
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-----------------------------
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
|
|
|
|
|
|
|
|
| |
**** 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.
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
| |
Import Double when necessary to make defaulting work
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
-fglasgow-exts doesn't seem to imply -package data anymore -- add it to HC_OPTS
|
|
|
|
| |
Use LD_OPTS when linking the test binary
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Handle leading underscores correctly, for ghci on Win32.
|
|
|
|
| |
Record-selector unfolding fix #2
|
|
|
|
| |
comment wibble
|
|
|
|
| |
Add DEBUG code for CgInfo field of IdInfo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
**** 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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Enhanced. Probably not to be used now, though.
|
|
|
|
| |
typo in error msg, pointed out by Alastair Reid.
|
|
|
|
|
| |
Add test for pattern parse errors, in particular getting the line
number right (4.08.2 didn't).
|
|
|
|
| |
Fix bug in spec-constr rule generation [Sergei2]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
**** 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.
|