ghc-hetmet.git
22 years ago[project @ 2001-07-02 12:00:44 by simonmar]
simonmar [Mon, 2 Jul 2001 12:00:44 +0000 (12:00 +0000)]
[project @ 2001-07-02 12:00:44 by simonmar]
oops, cut-n-paste removed tabs

22 years ago[project @ 2001-07-02 10:08:52 by simonmar]
simonmar [Mon, 2 Jul 2001 10:08:52 +0000 (10:08 +0000)]
[project @ 2001-07-02 10:08:52 by simonmar]
The hc-file bundle should contain the .hs files generated from .hsc
files because of a chicken-egg problem with building hsc2hs.

22 years ago[project @ 2001-06-30 22:57:20 by qrczak]
qrczak [Sat, 30 Jun 2001 22:57:20 +0000 (22:57 +0000)]
[project @ 2001-06-30 22:57:20 by qrczak]
Don't add leading space to libdir (was harmful for drivers).

Don't add $(ProjectNameShort)-$(ProjectVersion) to libdir if
$(ProjectNameShort) is empty; I hope it's correct.

22 years ago[project @ 2001-06-30 11:21:12 by simonmar]
simonmar [Sat, 30 Jun 2001 11:21:12 +0000 (11:21 +0000)]
[project @ 2001-06-30 11:21:12 by simonmar]
sigh, the split script broke due to changes in gcc on FreeBSD (again).

22 years ago[project @ 2001-06-30 00:12:52 by sof]
sof [Sat, 30 Jun 2001 00:12:52 +0000 (00:12 +0000)]
[project @ 2001-06-30 00:12:52 by sof]
FPTOOLS_CC_FLAG: Save and restore CFLAGS

22 years ago[project @ 2001-06-30 00:00:49 by sof]
sof [Sat, 30 Jun 2001 00:00:49 +0000 (00:00 +0000)]
[project @ 2001-06-30 00:00:49 by sof]
Tidy up the handling of -mno-cygwin.

22 years ago[project @ 2001-06-29 16:58:06 by sewardj]
sewardj [Fri, 29 Jun 2001 16:58:06 +0000 (16:58 +0000)]
[project @ 2001-06-29 16:58:06 by sewardj]
Test for mingw32_TARGET_OS and cygwin32_TARGET_OS instead of WIN32.

22 years ago[project @ 2001-06-29 16:17:28 by sewardj]
sewardj [Fri, 29 Jun 2001 16:17:28 +0000 (16:17 +0000)]
[project @ 2001-06-29 16:17:28 by sewardj]
Let the PEi386 machinery recognise .rodata sections.

22 years ago[project @ 2001-06-29 15:37:52 by simonmar]
simonmar [Fri, 29 Jun 2001 15:37:52 +0000 (15:37 +0000)]
[project @ 2001-06-29 15:37:52 by simonmar]
The "Warning: deleting non-existent foo" message should only be
printed in verbose mode.

22 years ago[project @ 2001-06-29 15:30:49 by simonmar]
simonmar [Fri, 29 Jun 2001 15:30:49 +0000 (15:30 +0000)]
[project @ 2001-06-29 15:30:49 by simonmar]
reformat & add a comment

22 years ago[project @ 2001-06-29 15:30:14 by simonmar]
simonmar [Fri, 29 Jun 2001 15:30:14 +0000 (15:30 +0000)]
[project @ 2001-06-29 15:30:14 by simonmar]
Copy was ignoring its 'purpose' argument

22 years ago[project @ 2001-06-29 15:10:14 by simonmar]
simonmar [Fri, 29 Jun 2001 15:10:14 +0000 (15:10 +0000)]
[project @ 2001-06-29 15:10:14 by simonmar]
Change a '>' to '>=' when comparing the modification times of object &
source files, to match make's behaviour and eliminate some unnecessary
recompiles.

This introduces some potential unsafety, but it was felt that the
benefits in terms of unsurprising behaviour were worth it.

22 years ago[project @ 2001-06-29 14:47:58 by sewardj]
sewardj [Fri, 29 Jun 2001 14:47:58 +0000 (14:47 +0000)]
[project @ 2001-06-29 14:47:58 by sewardj]
Fix up package util.

22 years ago[project @ 2001-06-29 14:47:20 by sewardj]
sewardj [Fri, 29 Jun 2001 14:47:20 +0000 (14:47 +0000)]
[project @ 2001-06-29 14:47:20 by sewardj]
package util: don't include readline on Win32

22 years ago[project @ 2001-06-29 13:57:08 by sewardj]
sewardj [Fri, 29 Jun 2001 13:57:08 +0000 (13:57 +0000)]
[project @ 2001-06-29 13:57:08 by sewardj]
Remove spurious "return ()" from WIN32 hSetBinaryMode.  Why this didn't
cause a syntax error before now completely escapes me.

22 years ago[project @ 2001-06-29 13:53:55 by simonmar]
simonmar [Fri, 29 Jun 2001 13:53:55 +0000 (13:53 +0000)]
[project @ 2001-06-29 13:53:55 by simonmar]
Uncomment part of this test that works properly now.

22 years ago[project @ 2001-06-29 13:42:19 by simonmar]
simonmar [Fri, 29 Jun 2001 13:42:19 +0000 (13:42 +0000)]
[project @ 2001-06-29 13:42:19 by simonmar]
Test that openFile in WriteMode doesn't truncate the file if an error
occurs.

22 years ago[project @ 2001-06-29 13:41:43 by simonmar]
simonmar [Fri, 29 Jun 2001 13:41:43 +0000 (13:41 +0000)]
[project @ 2001-06-29 13:41:43 by simonmar]
Fix bug where openFile in WriteMode truncates the file even if the
open fails because of a locking violation.

22 years ago[project @ 2001-06-29 13:40:50 by simonmar]
simonmar [Fri, 29 Jun 2001 13:40:50 +0000 (13:40 +0000)]
[project @ 2001-06-29 13:40:50 by simonmar]
Test that readFile doesn't leave the file locked after its output has
been forced completely.

22 years ago[project @ 2001-06-29 13:18:18 by sewardj]
sewardj [Fri, 29 Jun 2001 13:18:18 +0000 (13:18 +0000)]
[project @ 2001-06-29 13:18:18 by sewardj]
Test for __MINGW32__, not __MINGW__.

22 years ago[project @ 2001-06-29 12:58:20 by rrt]
rrt [Fri, 29 Jun 2001 12:58:20 +0000 (12:58 +0000)]
[project @ 2001-06-29 12:58:20 by rrt]
Change the way that IO exceptions are handled and some associated details:

1. In the top-level exception handler, don't treat IO exceptions as a panic,
just print them out and stop.

2. In the slurping routines SysTools.copy and the fake cpp in
DriverPipeline, don't catch IO exceptions, just let them propagate.

22 years ago[project @ 2001-06-29 12:45:39 by simonmar]
simonmar [Fri, 29 Jun 2001 12:45:39 +0000 (12:45 +0000)]
[project @ 2001-06-29 12:45:39 by simonmar]
Fix a bug in hGetContents, namely that it wasn't closing the handle
when the end of file was reached.  Also tried to tidy the code up a
bit while I was here.

22 years ago[project @ 2001-06-29 11:40:48 by simonpj]
simonpj [Fri, 29 Jun 2001 11:40:48 +0000 (11:40 +0000)]
[project @ 2001-06-29 11:40:48 by simonpj]
Share handles with creator so that error messages come out

22 years ago[project @ 2001-06-29 11:35:14 by simonpj]
simonpj [Fri, 29 Jun 2001 11:35:14 +0000 (11:35 +0000)]
[project @ 2001-06-29 11:35:14 by simonpj]
Add comments

22 years ago[project @ 2001-06-29 10:35:09 by rrt]
rrt [Fri, 29 Jun 2001 10:35:09 +0000 (10:35 +0000)]
[project @ 2001-06-29 10:35:09 by rrt]
Stop copy adding a newline to the end of the copy

22 years ago[project @ 2001-06-28 18:05:48 by rrt]
rrt [Thu, 28 Jun 2001 18:05:48 +0000 (18:05 +0000)]
[project @ 2001-06-28 18:05:48 by rrt]
Split up win32 tests so CPP is only updated after cpp is found

22 years ago[project @ 2001-06-28 17:56:10 by rrt]
rrt [Thu, 28 Jun 2001 17:56:10 +0000 (17:56 +0000)]
[project @ 2001-06-28 17:56:10 by rrt]
Set C and CPP flags before finding gcc

22 years ago[project @ 2001-06-28 16:44:18 by rrt]
rrt [Thu, 28 Jun 2001 16:44:18 +0000 (16:44 +0000)]
[project @ 2001-06-28 16:44:18 by rrt]
Fix getCPUTime on Windows

22 years ago[project @ 2001-06-28 16:44:07 by rrt]
rrt [Thu, 28 Jun 2001 16:44:07 +0000 (16:44 +0000)]
[project @ 2001-06-28 16:44:07 by rrt]
Improve comment

22 years ago[project @ 2001-06-28 15:45:49 by rrt]
rrt [Thu, 28 Jun 2001 15:45:49 +0000 (15:45 +0000)]
[project @ 2001-06-28 15:45:49 by rrt]
Remove debugging statements^Wexpressions

22 years ago[project @ 2001-06-28 15:11:07 by simonpj]
simonpj [Thu, 28 Jun 2001 15:11:07 +0000 (15:11 +0000)]
[project @ 2001-06-28 15:11:07 by simonpj]
Fix a missing case in kcHsType.

[Could be merged into 5.00.3, but we probably
 aren't going to have such a thind.]

22 years ago[project @ 2001-06-28 15:06:47 by lewie]
lewie [Thu, 28 Jun 2001 15:06:47 +0000 (15:06 +0000)]
[project @ 2001-06-28 15:06:47 by lewie]
Here ya go!

22 years ago[project @ 2001-06-28 14:51:57 by rrt]
rrt [Thu, 28 Jun 2001 14:51:57 +0000 (14:51 +0000)]
[project @ 2001-06-28 14:51:57 by rrt]
Fix mangling of -B path.

22 years ago[project @ 2001-06-28 14:41:19 by simonmar]
simonmar [Thu, 28 Jun 2001 14:41:19 +0000 (14:41 +0000)]
[project @ 2001-06-28 14:41:19 by simonmar]
fix the ghc-inplace script w.r.t. the latest changes to SysTools.hs

22 years ago[project @ 2001-06-28 14:26:58 by sewardj]
sewardj [Thu, 28 Jun 2001 14:26:58 +0000 (14:26 +0000)]
[project @ 2001-06-28 14:26:58 by sewardj]
Add enough syms to get packages  lang text concurrent  into GHCi.

22 years ago[project @ 2001-06-28 14:15:01 by simonmar]
simonmar [Thu, 28 Jun 2001 14:15:04 +0000 (14:15 +0000)]
[project @ 2001-06-28 14:15:01 by simonmar]
First cut of the Haskell Core Libraries
=======================================

NOTE: it's not meant to be a working snapshot.  The code is just here
to look at and so the NHC/Hugs guys can start playing around with it.

There is no build system.  For GHC, the libraries tree is intended to
be grafted onto an existing fptools/ tree, and the Makefile in
libraries/core is a quick hack for that setup.  This won't work at the
moment without the other changes needed in fptools/ghc, which I
haven't committed because they'll cause breakage.  However, with the
changes required these sources build a working Prelude and libraries.

The layout mostly follows the one we agreed on, with one or two minor
changes; in particular the Data/Array layout probably isn't final
(there are several choices here).

The document is in libraries/core/doc as promised.

The cbits stuff is just a copy of ghc/lib/std/cbits and has
GHC-specific stuff in it.  We should really separate the
compiler-specific C support from any compiler-independent C support
there might be.

Don't pay too much attention to the portability or stability status
indicated in the header of each source file at the moment - I haven't
gone through to make sure they're all consistent and make sense.

I'm using non-literate source outside of GHC/.  Hope that's ok with
everyone.

We need to discuss how the build system is going to work...

22 years ago[project @ 2001-06-28 13:48:32 by rrt]
rrt [Thu, 28 Jun 2001 13:48:32 +0000 (13:48 +0000)]
[project @ 2001-06-28 13:48:32 by rrt]
Fix Unix copy (now same as Windows: slow, but working).

22 years ago[project @ 2001-06-28 11:51:52 by simonmar]
simonmar [Thu, 28 Jun 2001 11:51:52 +0000 (11:51 +0000)]
[project @ 2001-06-28 11:51:52 by simonmar]
clean up remove_suffix:

  - only use it when getExecDir works (i.e. on Windows)
  - therefore, don't require that the build-tree TOPDIR has a
    /ghc/compiler suffix.
  - fix a bug with the installed build, where the binary lives
    in $libdir/bin not $libdir.

ghci-inplace should work again now.

22 years ago[project @ 2001-06-28 11:47:03 by simonmar]
simonmar [Thu, 28 Jun 2001 11:47:03 +0000 (11:47 +0000)]
[project @ 2001-06-28 11:47:03 by simonmar]
revert a change from SOF that looks like it sneaked in accidentally
(and broke happy configuration).

22 years ago[project @ 2001-06-28 11:34:42 by simonmar]
simonmar [Thu, 28 Jun 2001 11:34:42 +0000 (11:34 +0000)]
[project @ 2001-06-28 11:34:42 by simonmar]
ghci may take multiple modules on the command line.

22 years ago[project @ 2001-06-28 11:33:24 by simonmar]
simonmar [Thu, 28 Jun 2001 11:33:24 +0000 (11:33 +0000)]
[project @ 2001-06-28 11:33:24 by simonmar]
document :add and multiple arguments to :load

22 years ago[project @ 2001-06-28 11:29:26 by simonmar]
simonmar [Thu, 28 Jun 2001 11:29:26 +0000 (11:29 +0000)]
[project @ 2001-06-28 11:29:26 by simonmar]
:add and :load take multiple arguments.

22 years ago[project @ 2001-06-28 10:39:54 by rrt]
rrt [Thu, 28 Jun 2001 10:39:54 +0000 (10:39 +0000)]
[project @ 2001-06-28 10:39:54 by rrt]
Reimplement copy as a slurp in Haskell to avoid problems with pesky
Windows command-line tools. Grr.

22 years ago[project @ 2001-06-28 10:25:30 by sewardj]
sewardj [Thu, 28 Jun 2001 10:25:30 +0000 (10:25 +0000)]
[project @ 2001-06-28 10:25:30 by sewardj]
Add comment referring to horrible hack to do with HSstd splitting/merging.

22 years ago[project @ 2001-06-28 10:19:48 by sewardj]
sewardj [Thu, 28 Jun 2001 10:19:48 +0000 (10:19 +0000)]
[project @ 2001-06-28 10:19:48 by sewardj]
For Win32 only: institute a totally horrible, temporary hack
in getPackageLibraries, which merges HSstd1 and HSstd2 back into
HSstd.  TEMPORARY!

22 years ago[project @ 2001-06-28 09:57:32 by simonmar]
simonmar [Thu, 28 Jun 2001 09:57:33 +0000 (09:57 +0000)]
[project @ 2001-06-28 09:57:32 by simonmar]
include version.mk before boilerplate.mk, so that boilerplate.mk has
the project name and version available.

Override libdir and datadir in fptools/mk/config.mk to add the project
name and version.

Suggested by: Manuel

22 years ago[project @ 2001-06-28 09:49:40 by simonmar]
simonmar [Thu, 28 Jun 2001 09:49:40 +0000 (09:49 +0000)]
[project @ 2001-06-28 09:49:40 by simonmar]

22 years ago[project @ 2001-06-28 08:36:30 by simonpj]
simonpj [Thu, 28 Jun 2001 08:36:30 +0000 (08:36 +0000)]
[project @ 2001-06-28 08:36:30 by simonpj]
Comment and import wibbles

22 years ago[project @ 2001-06-27 19:42:19 by reid]
reid [Wed, 27 Jun 2001 19:42:19 +0000 (19:42 +0000)]
[project @ 2001-06-27 19:42:19 by reid]
Inching closer to making the HGL part of the standard build.

This commit is mostly to remove bits of xlib and greencard whch had
crept into the source tree.

ToDo:

- make greencard part of standard build (waiting for response from
  simonM)
- make greencard install libHSgreencard when it builds
- find a autoconf-respecting way of installing the package
- only build xlib and HGL if you have X11 installed
- merge all these changes into HEAD
- should the demos/ tests be built as part of the standard build?
  what's the convention here?
  (Note that the tests can't be used in batch more - you gotta click
  on the window.)
- a little debugging - the tests aren't quite working.

22 years ago[project @ 2001-06-27 17:00:44 by simonmar]
simonmar [Wed, 27 Jun 2001 17:00:44 +0000 (17:00 +0000)]
[project @ 2001-06-27 17:00:44 by simonmar]
Clean up the hierarchical-module-name lexical analysis and fix a
couple of bugs at the same time.

22 years ago[project @ 2001-06-27 16:38:17 by simonmar]
simonmar [Wed, 27 Jun 2001 16:38:17 +0000 (16:38 +0000)]
[project @ 2001-06-27 16:38:17 by simonmar]
When we're in --interactive or --make mode, we don't even *look* for
interface files in the home package.

This means that cd'ing into fptools/ghc/lib/std and starting up GHCi
Just Works, which is a good thing.  It also subsumes the previous hack
about checking whether we're renaming a command-line expression before
allowing a home interface to be loaded.

The downside is that if you try to use a qualified name for a home
module that's not loaded, you'll get a slightly less informative error
message: "interface file not found" rather than "module not loaded",
but this could be improved.

22 years ago[project @ 2001-06-27 16:34:55 by simonmar]
simonmar [Wed, 27 Jun 2001 16:34:55 +0000 (16:34 +0000)]
[project @ 2001-06-27 16:34:55 by simonmar]
Allow a module to be found on the package path only, by adding

  findPackageModule :: ModuleName -> IO (Maybe (Module,ModuleLocation))

22 years ago[project @ 2001-06-27 16:33:59 by simonmar]
simonmar [Wed, 27 Jun 2001 16:33:59 +0000 (16:33 +0000)]
[project @ 2001-06-27 16:33:59 by simonmar]
Print the contents of opt_InPackage rather than "<THIS>" for the home
package.

22 years ago[project @ 2001-06-27 16:33:10 by simonmar]
simonmar [Wed, 27 Jun 2001 16:33:10 +0000 (16:33 +0000)]
[project @ 2001-06-27 16:33:10 by simonmar]
PrelGHC is package 'std'

22 years ago[project @ 2001-06-27 15:26:56 by chak]
chak [Wed, 27 Jun 2001 15:26:56 +0000 (15:26 +0000)]
[project @ 2001-06-27 15:26:56 by chak]
And removed bin/ from $(GHCBIN) again *sigh*

[Yeah, I tested the previous commit before committing and it worked for me
due to a not-clean build tree.]

I don't think that it is a good idea to redefine execlibdir in
`ghc/mk/boilerplate.mk'.  Makes already complicated scripts even harder to
understand...

22 years ago[project @ 2001-06-27 15:03:35 by sewardj]
sewardj [Wed, 27 Jun 2001 15:03:35 +0000 (15:03 +0000)]
[project @ 2001-06-27 15:03:35 by sewardj]
wibble to do with findOnPackagePath

22 years ago[project @ 2001-06-27 14:26:36 by sewardj]
sewardj [Wed, 27 Jun 2001 14:26:36 +0000 (14:26 +0000)]
[project @ 2001-06-27 14:26:36 by sewardj]
mingw ghci linking wibble.

22 years ago[project @ 2001-06-27 13:56:01 by sewardj]
sewardj [Wed, 27 Jun 2001 13:56:01 +0000 (13:56 +0000)]
[project @ 2001-06-27 13:56:01 by sewardj]
Clean up Win32 linking a bit, by fishing symbols out of msvcrt.dll
as needed.  This reduces the size of but unfortunately does not
eliminate the RTS_MINGW_ONLY_SYMBOLS hack.

22 years ago[project @ 2001-06-27 13:42:32 by chak]
chak [Wed, 27 Jun 2001 13:42:32 +0000 (13:42 +0000)]
[project @ 2001-06-27 13:42:32 by chak]
Added bin/ to $(GHCBIN)

22 years ago[project @ 2001-06-27 13:16:59 by rrt]
rrt [Wed, 27 Jun 2001 13:16:59 +0000 (13:16 +0000)]
[project @ 2001-06-27 13:16:59 by rrt]
use xcopy, as copy is a cmd.exe built-in

22 years ago[project @ 2001-06-27 13:16:30 by rrt]
rrt [Wed, 27 Jun 2001 13:16:30 +0000 (13:16 +0000)]
[project @ 2001-06-27 13:16:30 by rrt]
Tidy up formatting

22 years ago[project @ 2001-06-27 13:13:57 by rrt]
rrt [Wed, 27 Jun 2001 13:13:57 +0000 (13:13 +0000)]
[project @ 2001-06-27 13:13:57 by rrt]
Fix comment typo

22 years ago[project @ 2001-06-27 11:39:54 by simonmar]
simonmar [Wed, 27 Jun 2001 11:39:54 +0000 (11:39 +0000)]
[project @ 2001-06-27 11:39:54 by simonmar]
- take into account the extra_ghc_opts field in a package spec.
- 80-columnize
- remove unused imports.

22 years ago[project @ 2001-06-27 11:29:10 by sewardj]
sewardj [Wed, 27 Jun 2001 11:29:10 +0000 (11:29 +0000)]
[project @ 2001-06-27 11:29:10 by sewardj]
Reinstate the no-duplicates ASSERTion.  This was perfectly correct
and the GHCi-on-windows bug which triggered it is elsewhere.

22 years ago[project @ 2001-06-27 11:18:26 by simonmar]
simonmar [Wed, 27 Jun 2001 11:18:26 +0000 (11:18 +0000)]
[project @ 2001-06-27 11:18:26 by simonmar]
add a commented out trace that was useful for debugging.

22 years ago[project @ 2001-06-27 11:17:47 by simonmar]
simonmar [Wed, 27 Jun 2001 11:17:47 +0000 (11:17 +0000)]
[project @ 2001-06-27 11:17:47 by simonmar]
GHCi may now have multiple targets, from the command line or via the
:a command.

22 years ago[project @ 2001-06-27 11:16:28 by simonmar]
simonmar [Wed, 27 Jun 2001 11:16:28 +0000 (11:16 +0000)]
[project @ 2001-06-27 11:16:28 by simonmar]
QCONID may now contain multiple dots.

22 years ago[project @ 2001-06-27 11:15:34 by simonmar]
simonmar [Wed, 27 Jun 2001 11:15:34 +0000 (11:15 +0000)]
[project @ 2001-06-27 11:15:34 by simonmar]
modid may be a QCONID, and make sure we use modid in an import spec.

22 years ago[project @ 2001-06-27 11:14:07 by simonmar]
simonmar [Wed, 27 Jun 2001 11:14:08 +0000 (11:14 +0000)]
[project @ 2001-06-27 11:14:07 by simonmar]
Allow multiple targets to be specified on the command line for ghc
--make and GHCi.  Also implement :a command in GHCi (untested and
undocumented so far).

22 years ago[project @ 2001-06-27 11:11:31 by simonmar]
simonmar [Wed, 27 Jun 2001 11:11:31 +0000 (11:11 +0000)]
[project @ 2001-06-27 11:11:31 by simonmar]
fix hierarchical modules in a package

22 years ago[project @ 2001-06-27 11:11:03 by simonmar]
simonmar [Wed, 27 Jun 2001 11:11:03 +0000 (11:11 +0000)]
[project @ 2001-06-27 11:11:03 by simonmar]
allow '.' in a module name

22 years ago[project @ 2001-06-27 11:04:33 by sewardj]
sewardj [Wed, 27 Jun 2001 11:04:33 +0000 (11:04 +0000)]
[project @ 2001-06-27 11:04:33 by sewardj]
On mingw32, package std for ghci is split into HSstd1.o and HSstd2.o.

22 years ago[project @ 2001-06-27 10:35:48 by simonpj]
simonpj [Wed, 27 Jun 2001 10:35:48 +0000 (10:35 +0000)]
[project @ 2001-06-27 10:35:48 by simonpj]
Add comment

22 years ago[project @ 2001-06-27 10:14:13 by rrt]
rrt [Wed, 27 Jun 2001 10:14:13 +0000 (10:14 +0000)]
[project @ 2001-06-27 10:14:13 by rrt]
Close file after reading OPTIONS pragma

22 years ago[project @ 2001-06-27 06:52:16 by reid]
reid [Wed, 27 Jun 2001 06:52:16 +0000 (06:52 +0000)]
[project @ 2001-06-27 06:52:16 by reid]
[After fumbling around in the makefile forest for a while, Sigbjorn
enlightened me as to where one registers new hslib packages.  Golly,
never thought of looking over here.  I'd kinda expected that it would
be in the makeforest since makefiles seem to contain all (or almost
all) the information needed to install a package.  (Any chance this
stuff could be moved into the makeforest in the new library
infrastructure?)  It seems that'd be more effective since it'd be able
to benefit from all that good information that autoconf spent so long
figuring out about your X installation, your platform, your
internationalisation library, etc.]

Oh, yeah, the change... Added xlib to the package list.  Result looks
plausible.

22 years ago[project @ 2001-06-27 06:18:40 by sof]
sof [Wed, 27 Jun 2001 06:18:40 +0000 (06:18 +0000)]
[project @ 2001-06-27 06:18:40 by sof]
mingw: derive plat-specific HSC2HS_EXTRA settings from the default SRC_CC_OPTS

22 years ago[project @ 2001-06-27 06:17:22 by sof]
sof [Wed, 27 Jun 2001 06:17:22 +0000 (06:17 +0000)]
[project @ 2001-06-27 06:17:22 by sof]
try to get rid off a special case for mingw, where CC_OPTS was forced to always contain '-mno-cygwin -mwin32'

22 years ago[project @ 2001-06-26 23:22:37 by sof]
sof [Tue, 26 Jun 2001 23:22:37 +0000 (23:22 +0000)]
[project @ 2001-06-26 23:22:37 by sof]
wibble

22 years ago[project @ 2001-06-26 23:12:19 by sof]
sof [Tue, 26 Jun 2001 23:12:19 +0000 (23:12 +0000)]
[project @ 2001-06-26 23:12:19 by sof]
Test whether $(CC) supports -mwin32 + have configure script set SRC_CC_OPTS

22 years ago[project @ 2001-06-26 16:32:03 by rrt]
rrt [Tue, 26 Jun 2001 16:32:03 +0000 (16:32 +0000)]
[project @ 2001-06-26 16:32:03 by rrt]
Get rid of quotes around arguments to -D and -U. These get stripped by the
Unix shell, but not by Windows's system, which upsets gcc.

22 years ago[project @ 2001-06-26 16:31:07 by rrt]
rrt [Tue, 26 Jun 2001 16:31:07 +0000 (16:31 +0000)]
[project @ 2001-06-26 16:31:07 by rrt]
Make system.c get compiled properly

22 years ago[project @ 2001-06-26 16:30:50 by rrt]
rrt [Tue, 26 Jun 2001 16:30:50 +0000 (16:30 +0000)]
[project @ 2001-06-26 16:30:50 by rrt]
Fix typos

22 years ago[project @ 2001-06-26 15:51:55 by rrt]
rrt [Tue, 26 Jun 2001 15:51:55 +0000 (15:51 +0000)]
[project @ 2001-06-26 15:51:55 by rrt]
Make stage two getExecDir for Windows work again. Where did it go before?

22 years ago[project @ 2001-06-26 11:07:55 by simonpj]
simonpj [Tue, 26 Jun 2001 11:07:55 +0000 (11:07 +0000)]
[project @ 2001-06-26 11:07:55 by simonpj]
Add #include for SysTools

22 years ago[project @ 2001-06-26 11:07:42 by simonpj]
simonpj [Tue, 26 Jun 2001 11:07:42 +0000 (11:07 +0000)]
[project @ 2001-06-26 11:07:42 by simonpj]
Add comments

22 years ago[project @ 2001-06-26 08:13:04 by reid]
reid [Tue, 26 Jun 2001 08:13:05 +0000 (08:13 +0000)]
[project @ 2001-06-26 08:13:04 by reid]
NOTE: new configure.in - remember to autoconf and reconfig

I'm moving X.gc and Xlib.gc from hslibs/graphics/lib/x11 to
hslibs/xlib and integrating them into the hslibs maketree.  This lib
now lives at the same place in the hierarchy as win32 - probably not
perfect for the new library story but good enough for the old hslibs I
think.

I'm not converting them from GreenCard to hsc2hs but I think that
would be a good medium term goal.  I'd like to do it myself because
I'd like to try using hsc2hs but I can't imagine when I'll get the
time so if someone feels like doing it, go right ahead.  (The HGL
(hslibs/graphics/lib/x11) is probably the only code that depends on
the Xlib interface - so mild changes to the Xlib API would be fairly
easy to fix up.)

It all seems to build and compile (not sure about linking yet) but,
for the life of me, I can't figure out what part of the makefile calls
ghc-pkg -a so that isn't quite working yet.  (I _think_ the makefile
does this - but could be wrong.)

If someone could either point me at the relevant part of the makefile
docs or just fix it for me, I could move onto getting the graphics lib
integrated into the hslibs maketree - which would leave me with just
the Hugs part of the HGL distribution to fix before the next Hugs
release.  (If I was a good Haggis, I'd beat up on Hugs' ffi too - but
I'm a very overworked Haggis at the moment so I'm not sure I'll get
that far.)

22 years ago[project @ 2001-06-25 21:08:01 by sof]
sof [Mon, 25 Jun 2001 21:08:01 +0000 (21:08 +0000)]
[project @ 2001-06-25 21:08:01 by sof]
sorry - prev. commit didn't take into account that the ghc version scheme isn't just a.bb[.c], but also a.bb[.yyyymmdd]. This broke the nightly build, my bad

22 years ago[project @ 2001-06-25 17:28:30 by sof]
sof [Mon, 25 Jun 2001 17:28:30 +0000 (17:28 +0000)]
[project @ 2001-06-25 17:28:30 by sof]
Replace GHC version testing with something a bit more sturdy

22 years ago[project @ 2001-06-25 14:50:22 by simonpj]
simonpj [Mon, 25 Jun 2001 14:50:22 +0000 (14:50 +0000)]
[project @ 2001-06-25 14:50:22 by simonpj]
Keep pgm paths in native format

22 years ago[project @ 2001-06-25 14:36:04 by simonpj]
simonpj [Mon, 25 Jun 2001 14:36:06 +0000 (14:36 +0000)]
[project @ 2001-06-25 14:36:04 by simonpj]
Import wibbles

22 years ago[project @ 2001-06-25 13:13:58 by simonpj]
simonpj [Mon, 25 Jun 2001 13:13:58 +0000 (13:13 +0000)]
[project @ 2001-06-25 13:13:58 by simonpj]
In nubBy, put argument to eq in the standard order

22 years ago[project @ 2001-06-25 11:11:16 by rrt]
rrt [Mon, 25 Jun 2001 11:11:16 +0000 (11:11 +0000)]
[project @ 2001-06-25 11:11:16 by rrt]
Fix so that it compiles on both pre and post 5.00 series compilers.

22 years ago[project @ 2001-06-25 09:49:59 by rrt]
rrt [Mon, 25 Jun 2001 09:49:59 +0000 (09:49 +0000)]
[project @ 2001-06-25 09:49:59 by rrt]
Comment out an uncomfortable ASSERT for now.

22 years ago[project @ 2001-06-25 09:44:10 by rrt]
rrt [Mon, 25 Jun 2001 09:44:10 +0000 (09:44 +0000)]
[project @ 2001-06-25 09:44:10 by rrt]
Add more symbols for mingwin version to get it to work. This still needs
tidying up.

22 years ago[project @ 2001-06-25 09:34:11 by rrt]
rrt [Mon, 25 Jun 2001 09:34:11 +0000 (09:34 +0000)]
[project @ 2001-06-25 09:34:11 by rrt]
Remove hacked-in definition of system for mingwin; instead we now just link
against the new version of systemCmd from lib/std/cbits/system.c.

22 years ago[project @ 2001-06-25 08:09:57 by simonpj]
simonpj [Mon, 25 Jun 2001 08:10:03 +0000 (08:10 +0000)]
[project @ 2001-06-25 08:09:57 by simonpj]
----------------
Squash newtypes
----------------

This commit squashes newtypes and their coerces, from the typechecker
onwards.  The original idea was that the coerces would not get in the
way of optimising transformations, but despite much effort they continue
to do so.   There's no very good reason to retain newtype information
beyond the typechecker, so now we don't.

Main points:

* The post-typechecker suite of Type-manipulating functions is in
types/Type.lhs, as before.   But now there's a new suite in types/TcType.lhs.
The difference is that in the former, newtype are transparent, while in
the latter they are opaque.  The typechecker should only import TcType,
not Type.

* The operations in TcType are all non-monadic, and most of them start with
"tc" (e.g. tcSplitTyConApp).  All the monadic operations (used exclusively
by the typechecker) are in a new module, typecheck/TcMType.lhs

* I've grouped newtypes with predicate types, thus:
data Type = TyVarTy Tyvar | ....
  | SourceTy SourceType

data SourceType = NType TyCon [Type]
| ClassP Class [Type]
| IParam Type

[SourceType was called PredType.]  This is a little wierd in some ways,
because NTypes can't occur in qualified types.   However, the idea is that
a SourceType is a type that is opaque to the type checker, but transparent
to the rest of the compiler, and newtypes fit that as do implicit parameters
and dictionaries.

* Recursive newtypes still retain their coreces, exactly as before. If
they were transparent we'd get a recursive type, and that would make
various bits of the compiler diverge (e.g. things which do type comparison).

* I've removed types/Unify.lhs (non-monadic type unifier and matcher),
merging it into TcType.

Ditto typecheck/TcUnify.lhs (monadic unifier), merging it into TcMType.

22 years ago[project @ 2001-06-25 08:08:32 by simonpj]
simonpj [Mon, 25 Jun 2001 08:08:32 +0000 (08:08 +0000)]
[project @ 2001-06-25 08:08:32 by simonpj]
---------------------------
Add a new case optimisation
---------------------------

I found that lib/std/PrelCError had a case-expression that was
generating terrible code.   Something like this

x | p `is` 1 -> e1
  | p `is` 2 -> e2
...etc...

where @is@ was something like

p `is` n = p /= (-1) && p == n

This gave rise to a horrible sequence of cases

case p of
  (-1) -> $j p
  1    -> e1
  DEFAULT -> $j p

and similarly in cascade for all the join points!

Solution: add the following transformation:

case e of =====>     case e of
  C _ -> <expr>      D v -> ....v....
  D v -> ....v....      DEFAULT -> <expr>
  DEFAULT -> <expr>

The point is that we merge common RHSs, at least for the DEFAULT case.
[One could do something more elaborate but I've never seen it needed.]

This transformation is implemented in SimplUtils.mkCase

*** WARNING ***
To make this transformation easy, I have switched the convention
for DEFAULT clauses.  They must now occur FIRST in the list of
alternatives for a Core case expression.  (The semantics is
unchanged: they still are a catch-all case.)

The reason is that DEFAULT clauses sometimes need special treatment,
and it's a lot easier to find them at the front.

The easiest way to be insensitive to this change is to use
CoreUtils.findDefault to pull the default clause out.

I've made the (surprisingly few) changes consequent on this changed
of convention, but they aren't in this commit.  Instead they are part
of the big commit on newtypes I'm doing at the same time.

22 years ago[project @ 2001-06-25 08:01:16 by simonpj]
simonpj [Mon, 25 Jun 2001 08:01:16 +0000 (08:01 +0000)]
[project @ 2001-06-25 08:01:16 by simonpj]
----------------------------------
Fix a predicate-simplification bug
----------------------------------

Fixes a bug pointed out by Marcin

    data R = R {f :: Int}
    foo:: (?x :: Int) => R -> R
    foo r = r {f = ?x}

    Test.hs:4:
Could not deduce `?x :: Int' from the context ()
arising from use of implicit parameter `?x' at Test.hs:4
In the record update: r {f = ?x}
In the definition of `foo': r {f = ?x}

The predicate simplifier was declining to 'inherit' an
implicit parameter.  This is right for a let-binding, but
wrong for an expression binding.  For example, a simple
expression type signature:

(?x + 1) :: Int

This was rejected because the ?x constraint could not be
floated out -- but that's wrong for expressions.

22 years ago[project @ 2001-06-25 05:25:31 by sof]
sof [Mon, 25 Jun 2001 05:25:31 +0000 (05:25 +0000)]
[project @ 2001-06-25 05:25:31 by sof]
One RCS  will do

22 years ago[project @ 2001-06-25 01:35:07 by sof]
sof [Mon, 25 Jun 2001 01:35:07 +0000 (01:35 +0000)]
[project @ 2001-06-25 01:35:07 by sof]
With -no-hs-main, don't force PrelMain.o to be linked (=> Main.o)