ghc-hetmet.git
23 years ago[project @ 2000-10-10 04:55:28 by chak]
chak [Tue, 10 Oct 2000 04:55:28 +0000 (04:55 +0000)]
[project @ 2000-10-10 04:55:28 by chak]
Just for fun, perl v5.6.0 version info has a different syntax.

23 years ago[project @ 2000-10-09 16:53:49 by rrt]
rrt [Mon, 9 Oct 2000 16:53:49 +0000 (16:53 +0000)]
[project @ 2000-10-09 16:53:49 by rrt]
Added a tip about using <Para> inside <ListItem>s.

23 years ago[project @ 2000-10-09 16:51:01 by rrt]
rrt [Mon, 9 Oct 2000 16:51:01 +0000 (16:51 +0000)]
[project @ 2000-10-09 16:51:01 by rrt]
Many fixes to make it DocBook friendly.

23 years ago[project @ 2000-10-09 11:42:49 by simonmar]
simonmar [Mon, 9 Oct 2000 11:42:49 +0000 (11:42 +0000)]
[project @ 2000-10-09 11:42:49 by simonmar]
Fill in some gaps; add Float# and Double# reps

23 years ago[project @ 2000-10-09 11:41:43 by simonmar]
simonmar [Mon, 9 Oct 2000 11:41:43 +0000 (11:41 +0000)]
[project @ 2000-10-09 11:41:43 by simonmar]
fix heap check bogons in mci_make_constr*

23 years ago[project @ 2000-10-09 11:18:46 by daan]
daan [Mon, 9 Oct 2000 11:21:41 +0000 (11:21 +0000)]
[project @ 2000-10-09 11:18:46 by daan]
Lots of changes for Xmlambda. all changes are between
#ifdef XMLAMBDA blocks.

- new bytecodes for Inj constructors and witnesses
- new primops for rows
- code for calling foreign functions. This only works with
'dynamic.c' but that is not checked in yet.

23 years ago[project @ 2000-10-09 10:58:38 by simonmar]
simonmar [Mon, 9 Oct 2000 10:58:38 +0000 (10:58 +0000)]
[project @ 2000-10-09 10:58:38 by simonmar]
import Linker ( linkPrelude )

23 years ago[project @ 2000-10-09 10:28:33 by daan]
daan [Mon, 9 Oct 2000 10:28:33 +0000 (10:28 +0000)]
[project @ 2000-10-09 10:28:33 by daan]
removed references to 'splim' in code for the INTERPRETER.

23 years ago[project @ 2000-10-09 09:19:16 by simonmar]
simonmar [Mon, 9 Oct 2000 09:19:16 +0000 (09:19 +0000)]
[project @ 2000-10-09 09:19:16 by simonmar]
Re-add -fwarn-hi-shadowing now that we mostly remove duplicates from
the import path.

23 years ago[project @ 2000-10-06 15:50:44 by simonmar]
simonmar [Fri, 6 Oct 2000 15:50:44 +0000 (15:50 +0000)]
[project @ 2000-10-06 15:50:44 by simonmar]
Link the compiled prelude in, for testing the interpreter.

23 years ago[project @ 2000-10-06 15:49:41 by simonmar]
simonmar [Fri, 6 Oct 2000 15:49:41 +0000 (15:49 +0000)]
[project @ 2000-10-06 15:49:41 by simonmar]
Hack about in a major way, and get this thing linking interpreted code
to a compiled prelude.

23 years ago[project @ 2000-10-06 15:48:30 by simonmar]
simonmar [Fri, 6 Oct 2000 15:48:30 +0000 (15:48 +0000)]
[project @ 2000-10-06 15:48:30 by simonmar]
- Add Linker.lhs, an interface to the underlying RTS object linker
- Split off the interpreter's abstract syntax into InterpSyn.lhs
- Some minor updates to the compilation manager stuff.

23 years ago[project @ 2000-10-06 15:38:06 by simonmar]
simonmar [Fri, 6 Oct 2000 15:38:06 +0000 (15:38 +0000)]
[project @ 2000-10-06 15:38:06 by simonmar]
The GC needs to be cleverer about which address ranges are in
text/data space if we're dynamically loading modules.

(BTW, this linking stuff is mostly ported from code written by Julian
Seward for STG Hugs).

23 years ago[project @ 2000-10-06 15:35:47 by simonmar]
simonmar [Fri, 6 Oct 2000 15:35:47 +0000 (15:35 +0000)]
[project @ 2000-10-06 15:35:47 by simonmar]
Initialise the object linker if we're in GHCi.

23 years ago[project @ 2000-10-06 15:35:09 by simonmar]
simonmar [Fri, 6 Oct 2000 15:35:09 +0000 (15:35 +0000)]
[project @ 2000-10-06 15:35:09 by simonmar]
Add a debug flag for the object linker.

23 years ago[project @ 2000-10-06 15:34:29 by simonmar]
simonmar [Fri, 6 Oct 2000 15:34:29 +0000 (15:34 +0000)]
[project @ 2000-10-06 15:34:29 by simonmar]
Extend the hash table implementation to support string-indexed dynamic
hash tables.

23 years ago[project @ 2000-10-06 15:33:27 by simonmar]
simonmar [Fri, 6 Oct 2000 15:33:27 +0000 (15:33 +0000)]
[project @ 2000-10-06 15:33:27 by simonmar]
Object file linker for GHCi.

23 years ago[project @ 2000-10-06 14:48:13 by sewardj]
sewardj [Fri, 6 Oct 2000 14:48:13 +0000 (14:48 +0000)]
[project @ 2000-10-06 14:48:13 by sewardj]
Implement a few more dull bits of code for the Compilation Manager.

23 years ago[project @ 2000-10-06 13:07:32 by sewardj]
sewardj [Fri, 6 Oct 2000 13:07:32 +0000 (13:07 +0000)]
[project @ 2000-10-06 13:07:32 by sewardj]
Commit half-implemented CM, and supporting changes.

23 years ago[project @ 2000-10-06 11:05:57 by rrt]
rrt [Fri, 6 Oct 2000 11:05:57 +0000 (11:05 +0000)]
[project @ 2000-10-06 11:05:57 by rrt]
Mucho fixes for Windows MM timers.

23 years ago[project @ 2000-10-06 09:31:45 by simonpj]
simonpj [Fri, 6 Oct 2000 09:31:45 +0000 (09:31 +0000)]
[project @ 2000-10-06 09:31:45 by simonpj]
Allow finite number of (!) fields in constructors :-)

23 years ago[project @ 2000-10-06 00:18:07 by andy]
andy [Fri, 6 Oct 2000 00:18:07 +0000 (00:18 +0000)]
[project @ 2000-10-06 00:18:07 by andy]
Adding depend info

23 years ago[project @ 2000-10-05 22:50:18 by andy]
andy [Thu, 5 Oct 2000 22:50:18 +0000 (22:50 +0000)]
[project @ 2000-10-05 22:50:18 by andy]
Fixing the order that labeled fields appear in datatypes. Currently
they are reversed, which breaks the prelude badly.

[From Haskell report:

The arguments to the positional constructor occur in the same order as the labeled fields. For example, the declaration

  data C = F { f1,f2 :: Int, f3 :: Bool}

defines a type and constructor identical to the one produced by

  data C = F Int Int Bool

]

23 years ago[project @ 2000-10-05 16:45:07 by simonpj]
simonpj [Thu, 5 Oct 2000 16:45:07 +0000 (16:45 +0000)]
[project @ 2000-10-05 16:45:07 by simonpj]
wibble

23 years ago[project @ 2000-10-05 16:18:03 by simonpj]
simonpj [Thu, 5 Oct 2000 16:18:03 +0000 (16:18 +0000)]
[project @ 2000-10-05 16:18:03 by simonpj]
Add test for generics

23 years ago[project @ 2000-10-05 16:04:36 by simonpj]
simonpj [Thu, 5 Oct 2000 16:04:36 +0000 (16:04 +0000)]
[project @ 2000-10-05 16:04:36 by simonpj]
Add a test to reject things like:

instance Ord a => Ord (forall s. T s a)

g :: T s (forall b.b)

The for-alls are illegal in type arguments!

23 years ago[project @ 2000-10-05 16:03:22 by simonpj]
simonpj [Thu, 5 Oct 2000 16:03:22 +0000 (16:03 +0000)]
[project @ 2000-10-05 16:03:22 by simonpj]
Add test for for-all types in arguments

23 years ago[project @ 2000-10-05 15:42:30 by simonpj]
simonpj [Thu, 5 Oct 2000 15:42:30 +0000 (15:42 +0000)]
[project @ 2000-10-05 15:42:30 by simonpj]
Parser changes to support type constructor operators; part of the generics stuff

23 years ago[project @ 2000-10-05 15:33:03 by simonpj]
simonpj [Thu, 5 Oct 2000 15:33:03 +0000 (15:33 +0000)]
[project @ 2000-10-05 15:33:03 by simonpj]
Add a bit more documentation of generics

23 years ago[project @ 2000-10-05 13:27:54 by simonmar]
simonmar [Thu, 5 Oct 2000 13:27:54 +0000 (13:27 +0000)]
[project @ 2000-10-05 13:27:54 by simonmar]
let's touch the *right* .o file, shall we?

23 years ago[project @ 2000-10-05 13:25:03 by simonmar]
simonmar [Thu, 5 Oct 2000 13:25:03 +0000 (13:25 +0000)]
[project @ 2000-10-05 13:25:03 by simonmar]
oops, need to touch the .o file if compilation was NOT required

23 years ago[project @ 2000-10-05 11:18:52 by simonmar]
simonmar [Thu, 5 Oct 2000 11:18:52 +0000 (11:18 +0000)]
[project @ 2000-10-05 11:18:52 by simonmar]
test -fgenerics before generating the generic datatype.

23 years ago[project @ 2000-10-05 11:15:20 by simonmar]
simonmar [Thu, 5 Oct 2000 11:15:20 +0000 (11:15 +0000)]
[project @ 2000-10-05 11:15:20 by simonmar]
add -fgenerics

23 years ago[project @ 2000-10-05 10:05:53 by sewardj]
sewardj [Thu, 5 Oct 2000 10:05:53 +0000 (10:05 +0000)]
[project @ 2000-10-05 10:05:53 by sewardj]
Add finder, summariser, part of CM, to repo.

23 years ago[project @ 2000-10-04 16:47:39 by simonmar]
simonmar [Wed, 4 Oct 2000 16:47:39 +0000 (16:47 +0000)]
[project @ 2000-10-04 16:47:39 by simonmar]
Turn off generics for the nightly build; I'll add a flag to disable it
selectively tomorrow.

23 years ago[project @ 2000-10-04 11:23:01 by sewardj]
sewardj [Wed, 4 Oct 2000 11:23:01 +0000 (11:23 +0000)]
[project @ 2000-10-04 11:23:01 by sewardj]
Update packages stuff to track yesterday's changes to @data Package = ...@.

23 years ago[project @ 2000-10-03 18:25:28 by andy]
andy [Tue, 3 Oct 2000 18:25:29 +0000 (18:25 +0000)]
[project @ 2000-10-03 18:25:28 by andy]
Addding the Galois Connections ray tracer as an example for GHC.

23 years ago[project @ 2000-10-03 16:51:57 by sewardj]
sewardj [Tue, 3 Oct 2000 16:51:57 +0000 (16:51 +0000)]
[project @ 2000-10-03 16:51:57 by sewardj]
Change representation of Package so it contains the package's name.
(This makes GHCI a bit more convenient).

23 years ago[project @ 2000-10-03 14:35:31 by qrczak]
qrczak [Tue, 3 Oct 2000 14:35:31 +0000 (14:35 +0000)]
[project @ 2000-10-03 14:35:31 by qrczak]
Added eqString_RDR to implicitFVs.

23 years ago[project @ 2000-10-03 12:47:44 by keithw]
keithw [Tue, 3 Oct 2000 12:47:44 +0000 (12:47 +0000)]
[project @ 2000-10-03 12:47:44 by keithw]
Correct some minor typos and a forward reference or two.

23 years ago[project @ 2000-10-03 10:20:07 by rrt]
rrt [Tue, 3 Oct 2000 10:20:07 +0000 (10:20 +0000)]
[project @ 2000-10-03 10:20:07 by rrt]
Backed out bogon (last commit was completely nonsensical).

23 years ago[project @ 2000-10-03 09:56:58 by rrt]
rrt [Tue, 3 Oct 2000 09:56:58 +0000 (09:56 +0000)]
[project @ 2000-10-03 09:56:58 by rrt]
Add $(FPTOOLS_TOP)/dll to PATH when running GHC_INPLACE. This is to make the
inplace compiler pick up the right set of DLLs under Windows, and won't have
any effect on other platforms (where the dll directory is empty).

23 years ago[project @ 2000-10-03 09:20:42 by simonpj]
simonpj [Tue, 3 Oct 2000 09:20:42 +0000 (09:20 +0000)]
[project @ 2000-10-03 09:20:42 by simonpj]
First cut at documenting generic classes

23 years ago[project @ 2000-10-03 08:43:00 by simonpj]
simonpj [Tue, 3 Oct 2000 08:43:05 +0000 (08:43 +0000)]
[project @ 2000-10-03 08:43:00 by simonpj]
--------------------------------------
Adding generics SLPJ Oct 2000
--------------------------------------

This big commit adds Hinze/PJ-style generic class definitions, based
on work by Andrei Serjantov.  For example:

  class Bin a where
    toBin   :: a -> [Int]
    fromBin :: [Int] -> (a, [Int])

    toBin {| Unit |}    Unit   = []
    toBin {| a :+: b |} (Inl x)   = 0 : toBin x
    toBin {| a :+: b |} (Inr y)   = 1 : toBin y
    toBin {| a :*: b |} (x :*: y) = toBin x ++ toBin y

    fromBin {| Unit |}    bs      = (Unit, bs)
    fromBin {| a :+: b |} (0:bs)  = (Inl x, bs')    where (x,bs') = fromBin bs
    fromBin {| a :+: b |} (1:bs)  = (Inr y, bs')    where (y,bs') = fromBin bs
    fromBin {| a :*: b |} bs     = (x :*: y, bs'') where (x,bs' ) = fromBin bs
  (y,bs'') = fromBin bs'

Now we can say simply

  instance Bin a => Bin [a]

and the compiler will derive the appropriate code automatically.

(About 9k lines of diffs.  Ha!)

Generic related things
~~~~~~~~~~~~~~~~~~~~~~

* basicTypes/BasicTypes: The EP type (embedding-projection pairs)

* types/TyCon:
An extra field in an algebraic tycon (genInfo)

* types/Class, and hsSyn/HsBinds:
Each class op (or ClassOpSig) carries information about whether
it   a) has no default method
b) has a polymorphic default method
c) has a generic default method
There's a new data type for this: Class.DefMeth

* types/Generics:
A new module containing good chunk of the generic-related code
It has a .hi-boot file (alas).

* typecheck/TcInstDcls, typecheck/TcClassDcl:
Most of the rest of the generics-related code

* hsSyn/HsTypes:
New infix type form to allow types of the form
data a :+: b = Inl a | Inr b

* parser/Parser.y, Lex.lhs, rename/ParseIface.y:
Deal with the new syntax

* prelude/TysPrim, TysWiredIn:
Need to generate generic stuff for the wired-in TyCons

* rename/RnSource RnBinds:
A rather gruesome hack to deal with scoping of type variables
from a generic patterns.  Details commented in the ClassDecl
case of RnSource.rnDecl.

Of course, there are many minor renamer consequences of the
other changes above.

* lib/std/PrelBase.lhs
Data type declarations for Unit, :+:, :*:

Slightly unrelated housekeeping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* hsSyn/HsDecls:
ClassDecls now carry the Names for their implied declarations
(superclass selectors, tycon, etc) in a list, rather than
laid out one by one.  This simplifies code between the parser
and the type checker.

* prelude/PrelNames, TysWiredIn:
All the RdrNames are now together in PrelNames.

* utils/ListSetOps:
Add finite mappings based on equality and association lists (Assoc a b)
Move stuff from List.lhs that is related

23 years ago[project @ 2000-10-03 08:29:30 by simonpj]
simonpj [Tue, 3 Oct 2000 08:29:30 +0000 (08:29 +0000)]
[project @ 2000-10-03 08:29:30 by simonpj]
Remove dead code mkLookupFun

23 years ago[project @ 2000-10-02 16:06:48 by simonpj]
simonpj [Mon, 2 Oct 2000 16:06:48 +0000 (16:06 +0000)]
[project @ 2000-10-02 16:06:48 by simonpj]
Add check for unboxed function arguments

23 years ago[project @ 2000-10-02 15:16:06 by sewardj]
sewardj [Mon, 2 Oct 2000 15:16:06 +0000 (15:16 +0000)]
[project @ 2000-10-02 15:16:06 by sewardj]
First shot at the summariser.  Doesn't know how to unlit or cppify
source yet.

23 years ago[project @ 2000-10-02 14:39:57 by sewardj]
sewardj [Mon, 2 Oct 2000 14:39:57 +0000 (14:39 +0000)]
[project @ 2000-10-02 14:39:57 by sewardj]
@ModSummary@ wibble.

23 years ago[project @ 2000-10-02 14:05:22 by sewardj]
sewardj [Mon, 2 Oct 2000 14:05:22 +0000 (14:05 +0000)]
[project @ 2000-10-02 14:05:22 by sewardj]
Partially back out changes mistakenly included in last commit :-(

23 years ago[project @ 2000-10-02 13:58:51 by sewardj]
sewardj [Mon, 2 Oct 2000 13:58:51 +0000 (13:58 +0000)]
[project @ 2000-10-02 13:58:51 by sewardj]
Implement initial-state (emptyTy :: Ty) functions.

23 years ago[project @ 2000-10-02 13:51:36 by simonmar]
simonmar [Mon, 2 Oct 2000 13:51:36 +0000 (13:51 +0000)]
[project @ 2000-10-02 13:51:36 by simonmar]
Names of mpz routines in GMP 3 now have a "__g" prefix (untested, but
should fix the NCG).

23 years ago[project @ 2000-10-02 11:06:19 by simonmar]
simonmar [Mon, 2 Oct 2000 11:06:19 +0000 (11:06 +0000)]
[project @ 2000-10-02 11:06:19 by simonmar]
- move readMVar and swapMVar from PrelConc to concurrent

- add the following exception-safe MVar operations:

withMVar    :: MVar a -> (a -> IO b) -> IO b
modifyMVar  :: MVar a -> (a -> IO (a,b)) -> IO b
modifyMVar_ :: MVar a -> (a -> IO a) -> IO ()

- re-implement readMVar and swapMVar in an exception-safe way.

- re-implement the Chan operations using withMVar et al.

23 years ago[project @ 2000-10-02 10:09:58 by simonpj]
simonpj [Mon, 2 Oct 2000 10:09:58 +0000 (10:09 +0000)]
[project @ 2000-10-02 10:09:58 by simonpj]
Add tc107

23 years ago[project @ 2000-09-29 15:59:28 by sewardj]
sewardj [Fri, 29 Sep 2000 15:59:29 +0000 (15:59 +0000)]
[project @ 2000-09-29 15:59:28 by sewardj]
New modules for GHCI.

23 years ago[project @ 2000-09-29 15:57:59 by sewardj]
sewardj [Fri, 29 Sep 2000 15:57:59 +0000 (15:57 +0000)]
[project @ 2000-09-29 15:57:59 by sewardj]
A few more internal consistency fixes seen when making new modules in
ghc/compiler/ghci.

23 years ago[project @ 2000-09-29 15:27:37 by rrt]
rrt [Fri, 29 Sep 2000 15:27:37 +0000 (15:27 +0000)]
[project @ 2000-09-29 15:27:37 by rrt]
Changed *do* to <Emphasis>do</Emphasis>

23 years ago[project @ 2000-09-29 12:18:22 by sewardj]
sewardj [Fri, 29 Sep 2000 12:18:22 +0000 (12:18 +0000)]
[project @ 2000-09-29 12:18:22 by sewardj]
Internal consistency wibble: @LinkState@ --> @PLS@.

23 years ago[project @ 2000-09-28 16:49:36 by simonpj]
simonpj [Thu, 28 Sep 2000 16:49:36 +0000 (16:49 +0000)]
[project @ 2000-09-28 16:49:36 by simonpj]
Another wibble

23 years ago[project @ 2000-09-28 16:17:07 by sewardj]
sewardj [Thu, 28 Sep 2000 16:17:07 +0000 (16:17 +0000)]
[project @ 2000-09-28 16:17:07 by sewardj]
wibbles

23 years ago[project @ 2000-09-28 15:50:04 by sewardj]
sewardj [Thu, 28 Sep 2000 15:50:04 +0000 (15:50 +0000)]
[project @ 2000-09-28 15:50:04 by sewardj]
Fill in details about how CM works.

23 years ago[project @ 2000-09-28 15:16:20 by simonpj]
simonpj [Thu, 28 Sep 2000 15:16:20 +0000 (15:16 +0000)]
[project @ 2000-09-28 15:16:20 by simonpj]
Simon's log file; I don't want to lose this!

23 years ago[project @ 2000-09-28 15:15:48 by simonpj]
simonpj [Thu, 28 Sep 2000 15:15:48 +0000 (15:15 +0000)]
[project @ 2000-09-28 15:15:48 by simonpj]
Wibbles

23 years ago[project @ 2000-09-28 13:04:14 by simonpj]
simonpj [Thu, 28 Sep 2000 13:04:18 +0000 (13:04 +0000)]
[project @ 2000-09-28 13:04:14 by simonpj]
------------------------------------
   Mainly PredTypes (28 Sept 00)
------------------------------------

Three things in this commit:

1.  Main thing: tidy up PredTypes
2.  Move all Keys into PrelNames
3.  Check for unboxed tuples in function args

1. Tidy up PredTypes
~~~~~~~~~~~~~~~~~~~~
The main thing in this commit is to modify the representation of Types
so that they are a (much) better for the qualified-type world.  This
should simplify Jeff's life as he proceeds with implicit parameters
and functional dependencies.  In particular, PredType, introduced by
Jeff, is now blessed and dignified with a place in TypeRep.lhs:

data PredType  = Class  Class [Type]
       | IParam Name  Type

Consider these examples:
f :: (Eq a) => a -> Int
g :: (?x :: Int -> Int) => a -> Int
h :: (r\l) => {r} => {l::Int | r}

Here the "Eq a" and "?x :: Int -> Int" and "r\l" are all called
*predicates*, and are represented by a PredType.  (We don't support
TREX records yet, but the setup is designed to expand to allow them.)

In addition, Type gains an extra constructor:

data Type = .... | PredTy PredType

so that PredType is injected directly into Type.  So the type
p => t
is represented by
PredType p `FunTy` t

I have deleted the hackish IPNote stuff; predicates are dealt with entirely
through PredTys, not through NoteTy at all.

2.  Move Keys into PrelNames
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is just a housekeeping operation. I've moved all the pre-assigned Uniques
(aka Keys) from Unique.lhs into PrelNames.lhs.  I've also moved knowKeyRdrNames
from PrelInfo down into PrelNames.  This localises in PrelNames lots of stuff
about predefined names.  Previously one had to alter three files to add one,
now only one.

3.  Unboxed tuples
~~~~~~~~~~~~~~~~~~
Add a static check for unboxed tuple arguments.  E.g.
data T = T (# Int, Int #)
is illegal

23 years ago[project @ 2000-09-28 12:19:46 by sewardj]
sewardj [Thu, 28 Sep 2000 12:19:46 +0000 (12:19 +0000)]
[project @ 2000-09-28 12:19:46 by sewardj]
Define relationship between what CM implements and the HEP interface.
Start on saying how CM behaves.

23 years ago[project @ 2000-09-27 16:13:09 by sewardj]
sewardj [Wed, 27 Sep 2000 16:13:09 +0000 (16:13 +0000)]
[project @ 2000-09-27 16:13:09 by sewardj]
Further cleanups, and add defs for ModDetails, ModIFace and Ifaces.

23 years ago[project @ 2000-09-27 15:09:56 by sewardj]
sewardj [Wed, 27 Sep 2000 15:09:56 +0000 (15:09 +0000)]
[project @ 2000-09-27 15:09:56 by sewardj]
Big reorganisation, to put CM, compile, link into seperate sections.
Ongoing.

23 years ago[project @ 2000-09-27 14:03:12 by simonpj]
simonpj [Wed, 27 Sep 2000 14:03:12 +0000 (14:03 +0000)]
[project @ 2000-09-27 14:03:12 by simonpj]
Remove Addr2IntegerOp reference

23 years ago[project @ 2000-09-26 16:45:33 by simonpj]
simonpj [Tue, 26 Sep 2000 16:45:35 +0000 (16:45 +0000)]
[project @ 2000-09-26 16:45:33 by simonpj]
* Remove all traces of addr2Integer.  Big integer literals are now
  done by multiplying up small integers.

* As a result, we can remove PrelNum.hi-boot altogether.

* Correct the default method for (==) in PrelBase.  (It simply
  returned True, which seems bogus to me!)

* Add a type signature for PrelBase.mapFB

23 years ago[project @ 2000-09-26 16:29:59 by sewardj]
sewardj [Tue, 26 Sep 2000 16:29:59 +0000 (16:29 +0000)]
[project @ 2000-09-26 16:29:59 by sewardj]
Rearrange the Linker section a bit, in line with upcoming rearrangement
of Compiler and CM sections.

23 years ago[project @ 2000-09-26 15:58:25 by simonpj]
simonpj [Tue, 26 Sep 2000 15:58:25 +0000 (15:58 +0000)]
[project @ 2000-09-26 15:58:25 by simonpj]
Document the new behaviour of -fno-implicit-prelude.

(I havn't checked that the new document builds right because
my build tree doesn't seem to build documentation.  Reuben,
could you check, please.)

23 years ago[project @ 2000-09-26 15:31:19 by simonmar]
simonmar [Tue, 26 Sep 2000 15:31:19 +0000 (15:31 +0000)]
[project @ 2000-09-26 15:31:19 by simonmar]
linker spec updates

23 years ago[project @ 2000-09-26 13:46:31 by sewardj]
sewardj [Tue, 26 Sep 2000 13:46:31 +0000 (13:46 +0000)]
[project @ 2000-09-26 13:46:31 by sewardj]
Add the GHCi design document to CVS.

23 years ago[project @ 2000-09-26 01:54:56 by chak]
chak [Tue, 26 Sep 2000 01:54:56 +0000 (01:54 +0000)]
[project @ 2000-09-26 01:54:56 by chak]
Added missing !

23 years ago[project @ 2000-09-25 13:09:31 by simonpj]
simonpj [Mon, 25 Sep 2000 13:09:31 +0000 (13:09 +0000)]
[project @ 2000-09-25 13:09:31 by simonpj]
Suck in plus/timesInteger for integer literals

23 years ago[project @ 2000-09-25 13:09:02 by simonpj]
simonpj [Mon, 25 Sep 2000 13:09:02 +0000 (13:09 +0000)]
[project @ 2000-09-25 13:09:02 by simonpj]
Fix slightly bogus error message

23 years ago[project @ 2000-09-25 12:58:39 by simonpj]
simonpj [Mon, 25 Sep 2000 12:58:39 +0000 (12:58 +0000)]
[project @ 2000-09-25 12:58:39 by simonpj]
--------------------------------------------------
Tidying up HsLit, and making it possible to define
your own numeric library

Simon PJ 22 Sept 00
--------------------------------------------------

I forgot to commit changes to the libraries!  The main thing
is to define monomorphic plusInteger, timesInteger etc, in PrelNum.

23 years ago[project @ 2000-09-25 12:30:44 by simonmar]
simonmar [Mon, 25 Sep 2000 12:30:44 +0000 (12:30 +0000)]
[project @ 2000-09-25 12:30:44 by simonmar]
Fix a couple of problems with the recompilation avoidance stuff.

23 years ago[project @ 2000-09-25 11:34:27 by simonmar]
simonmar [Mon, 25 Sep 2000 11:34:27 +0000 (11:34 +0000)]
[project @ 2000-09-25 11:34:27 by simonmar]
arguments of StgLam should be bndrs, not Id.

23 years ago[project @ 2000-09-25 11:32:55 by simonmar]
simonmar [Mon, 25 Sep 2000 11:32:55 +0000 (11:32 +0000)]
[project @ 2000-09-25 11:32:55 by simonmar]
INLINE is_ctype, otherwise charType gets inlined in the RHS by virtue
of only being used once, and we lose the opportunity to inline is_ctype.

23 years ago[project @ 2000-09-25 11:31:22 by simonmar]
simonmar [Mon, 25 Sep 2000 11:31:22 +0000 (11:31 +0000)]
[project @ 2000-09-25 11:31:22 by simonmar]
remove unused imports

23 years ago[project @ 2000-09-25 10:51:04 by simonmar]
simonmar [Mon, 25 Sep 2000 10:51:04 +0000 (10:51 +0000)]
[project @ 2000-09-25 10:51:04 by simonmar]
Make flushFile and flushBuffer consistent.  This code looked wrong
before, and it looks more correct now.

I can't see any need for flushFile at all.

flushBuffer still doesn't do the lseek thing that flushReadBuffer
does.

23 years ago[project @ 2000-09-25 10:48:50 by simonmar]
simonmar [Mon, 25 Sep 2000 10:48:50 +0000 (10:48 +0000)]
[project @ 2000-09-25 10:48:50 by simonmar]
Don't blindly flush the buffer just because it is writeable.  It might
be a RW handle with a read buffer.

23 years ago[project @ 2000-09-22 16:00:08 by simonpj]
simonpj [Fri, 22 Sep 2000 16:00:08 +0000 (16:00 +0000)]
[project @ 2000-09-22 16:00:08 by simonpj]
Forgot to remove HsBasic and add HsLit

23 years ago[project @ 2000-09-22 15:56:12 by simonpj]
simonpj [Fri, 22 Sep 2000 15:56:16 +0000 (15:56 +0000)]
[project @ 2000-09-22 15:56:12 by simonpj]
--------------------------------------------------
Tidying up HsLit, and making it possible to define
your own numeric library

Simon PJ 22 Sept 00
--------------------------------------------------

** NOTE: I did these changes on the aeroplane.  They should compile,
 and the Prelude still compiles OK, but it's entirely
 possible that I've broken something

The original reason for this many-file but rather shallow
commit is that it's impossible in Haskell to write your own
numeric library.  Why?  Because when you say '1' you get
(Prelude.fromInteger 1), regardless of what you hide from the
Prelude, or import from other libraries you have written.  So the
idea is to extend the -fno-implicit-prelude flag so that
in addition to no importing the Prelude, you can rebind
fromInteger -- Applied to literal constants
fromRational -- Ditto
negate -- Invoked by the syntax (-x)
the (-) used when desugaring n+k patterns

After toying with other designs, I eventually settled on a simple,
crude one: rather than adding a new flag, I just extended the
semantics of -fno-implicit-prelude so that uses of fromInteger,
fromRational and negate are all bound to "whatever is in scope"
rather than "the fixed Prelude functions".  So if you say

{-# OPTIONS -fno-implicit-prelude #-}
module M where
  import MyPrelude( fromInteger )

x = 3

the literal 3 will use whatever (unqualified) "fromInteger" is in scope,
in this case the one gotten from MyPrelude.

On the way, though, I studied how HsLit worked, and did a substantial tidy
up, deleting quite a lot of code along the way.  In particular.

* HsBasic.lhs is renamed HsLit.lhs.  It defines the HsLit type.

* There are now two HsLit types, both defined in HsLit.
HsLit for non-overloaded literals (like 'x')
HsOverLit for overloaded literals (like 1 and 2.3)

* HsOverLit completely replaces Inst.OverloadedLit, which disappears.
  An HsExpr can now be an HsOverLit as well as an HsLit.

* HsOverLit carries the Name of the fromInteger/fromRational operation,
  so that the renamer can help with looking up the unqualified name
  when -fno-implicit-prelude is on.  Ditto the HsExpr for negation.
  It's all very tidy now.

* RdrHsSyn contains the stuff that handles -fno-implicit-prelude
  (see esp RdrHsSyn.prelQual).  RdrHsSyn also contains all the "smart constructors"
  used by the parser when building HsSyn.  See for example RdrHsSyn.mkNegApp
  (previously the renamer (!) did the business of turning (- 3#) into -3#).

* I tidied up the handling of "special ids" in the parser.  There's much
  less duplication now.

* Move Sven's Horner stuff to the desugarer, where it belongs.
  There's now a nice function DsUtils.mkIntegerLit which brings together
  related code from no fewer than three separate places into one single
  place.  Nice!

* A nice tidy-up in MatchLit.partitionEqnsByLit became possible.

* Desugaring of HsLits is now much tidier (DsExpr.dsLit)

* Some stuff to do with RdrNames is moved from ParseUtil.lhs to RdrHsSyn.lhs,
  which is where it really belongs.

* I also removed
many unnecessary imports from modules
quite a bit of dead code
  in divers places

23 years ago[project @ 2000-09-22 15:47:14 by simonpj]
simonpj [Fri, 22 Sep 2000 15:47:14 +0000 (15:47 +0000)]
[project @ 2000-09-22 15:47:14 by simonpj]
msg1

23 years ago[project @ 2000-09-14 14:24:02 by simonmar]
simonmar [Thu, 14 Sep 2000 14:24:03 +0000 (14:24 +0000)]
[project @ 2000-09-14 14:24:02 by simonmar]
rename blockAsyncExceptions and unblockAsyncExceptions to block and
unblock repectively, to match all the literature.  DEPRECATE the old
names.

23 years ago[project @ 2000-09-14 13:46:39 by simonpj]
simonpj [Thu, 14 Sep 2000 13:46:42 +0000 (13:46 +0000)]
[project @ 2000-09-14 13:46:39 by simonpj]
---------------------------------------
Simon's tuning changes: early Sept 2000
---------------------------------------

Library changes
~~~~~~~~~~~~~~~
* Eta expand PrelShow.showLitChar.  It's impossible to compile this well,
  and it makes a big difference to some programs (e.g. gen_regexps)

* Make PrelList.concat into a good producer (in the foldr/build sense)

Flag changes
~~~~~~~~~~~~
* Add -ddump-hi-diffs to print out changes in interface files.  Useful
  when watching what the compiler is doing

* Add -funfolding-update-in-place to enable the experimental optimisation
  that makes the inliner a bit keener to inline if it's in the RHS of
  a thunk that might be updated in place.  Sometimes this is a bad idea
  (one example is in spectral/sphere; see notes in nofib/Simon-nofib-notes)

Tuning things
~~~~~~~~~~~~~
* Fix a bug in SetLevels.lvlMFE.  (change ctxt_lvl to dest_level)
  I don't think this has any performance effect, but it saves making
  a redundant let-binding that is later eliminated.

* Desugar.dsProgram and DsForeign
  Glom together all the bindings into a single Rec.  Previously the
  bindings generated by 'foreign' declarations were not glommed together, but
  this led to an infelicity (i.e. poorer code than necessary) in the modules
  that actually declare Float and Double (explained a bit more in Desugar.dsProgram)

* OccurAnal.shortMeOut and IdInfo.shortableIdInfo
  Don't do the occurrence analyser's shorting out stuff for things which
  have rules.  Comments near IdInfo.shortableIdInfo.
  This is deeply boring, and mainly to do with making rules work well.
  Maybe rules should have phases attached too....

* CprAnalyse.addIdCprInfo
  Be a bit more willing to add CPR information to thunks;
  in particular, if the strictness analyser has just discovered that this
  is a strict let, then the let-to-case transform will happen, and CPR is fine.
  This made a big difference to PrelBase.modInt, which had something like
modInt = \ x -> let r = ... -> I# v in
...body strict in r...
  r's RHS isn't a value yet; but modInt returns r in various branches, so
  if r doesn't have the CPR property then neither does modInt

* MkId.mkDataConWrapId
  Arrange that vanilla constructors, like (:) and I#, get unfoldings that are
  just a simple variable $w:, $wI#.  This ensures they'll be inlined even into
  rules etc, which makes matching a bit more reliable.  The downside is that in
  situations like (map (:) xs), we'll end up with (map (\y ys. $w: y ys) xs.
  Which is tiresome but it doesn't happen much.

* SaAbsInt.findStrictness
  Deal with the case where a thing with no arguments is bottom.  This is Good.
  E.g.   module M where { foo = error "help" }
  Suppose we have in another module
case M.foo of ...
  Then we'd like to do the case-of-error transform, without inlining foo.

Tidying up things
~~~~~~~~~~~~~~~~~
* Reorganised Simplify.completeBinding (again).

* Removed the is_bot field in CoreUnfolding (is_cheap is true if is_bot is!)
  This is just a tidy up

* HsDecls and others
  Remove the NewCon constructor from ConDecl.  It just added code, and nothing else.
  And it led to a bug in MkIface, which though that a newtype decl was always changing!

* IdInfo and many others
  Remove all vestiges of UpdateInfo (hasn't been used for years)

23 years ago[project @ 2000-09-14 12:12:23 by simonpj]
simonpj [Thu, 14 Sep 2000 12:12:23 +0000 (12:12 +0000)]
[project @ 2000-09-14 12:12:23 by simonpj]
Improve the kind-inference test

23 years ago[project @ 2000-09-14 09:58:00 by simonmar]
simonmar [Thu, 14 Sep 2000 09:58:00 +0000 (09:58 +0000)]
[project @ 2000-09-14 09:58:00 by simonmar]
don't forget to bail out when "compilation IS NOT required"

23 years ago[project @ 2000-09-14 09:10:35 by simonmar]
simonmar [Thu, 14 Sep 2000 09:10:35 +0000 (09:10 +0000)]
[project @ 2000-09-14 09:10:35 by simonmar]
extend the scope of #ifdef GHCI so we can compile this with pre-4.08 compilers.

23 years ago[project @ 2000-09-14 08:17:54 by simonpj]
simonpj [Thu, 14 Sep 2000 08:17:54 +0000 (08:17 +0000)]
[project @ 2000-09-14 08:17:54 by simonpj]
Fix bug in the driver that led to

Fail: system error
Action: getFileStatus

It was due to Simon M's recent addition of modification-time
checking.  You forgot to check whether the file M.o existed!

23 years ago[project @ 2000-09-13 09:54:27 by sewardj]
sewardj [Wed, 13 Sep 2000 09:54:27 +0000 (09:54 +0000)]
[project @ 2000-09-13 09:54:27 by sewardj]
Only import MCI_make_constr if building GHCI.

23 years ago[project @ 2000-09-12 13:19:20 by simonmar]
simonmar [Tue, 12 Sep 2000 13:19:20 +0000 (13:19 +0000)]
[project @ 2000-09-12 13:19:20 by simonmar]
- Add in support for -recomp, which I forgot.
- force -fvia-C if the -C flag is specified on the cmd line

23 years ago[project @ 2000-09-12 13:13:55 by rrt]
rrt [Tue, 12 Sep 2000 13:13:55 +0000 (13:13 +0000)]
[project @ 2000-09-12 13:13:55 by rrt]
Numerous fixes (thanks to Peter Achten for most of them) to the Windows
instructions to make them more accurate and clearer.

23 years ago[project @ 2000-09-12 10:15:09 by sewardj]
sewardj [Tue, 12 Sep 2000 10:15:09 +0000 (10:15 +0000)]
[project @ 2000-09-12 10:15:09 by sewardj]
Get rid of version number in the .hi-boot file, and wrap the entire
contents of StgInterp with #ifdef GHCI, so it isn't built unless you
want it to be.

23 years ago[project @ 2000-09-11 15:04:08 by rrt]
rrt [Mon, 11 Sep 2000 15:04:08 +0000 (15:04 +0000)]
[project @ 2000-09-11 15:04:08 by rrt]
Implemented gettimeofday on Windows by calling GetTickCount(). This
only seems to have a resolution of 1/100s, but that's just about OK
for threadDelay, which only needs 50 ticks per second.

23 years ago[project @ 2000-09-11 15:02:51 by rrt]
rrt [Mon, 11 Sep 2000 15:02:51 +0000 (15:02 +0000)]
[project @ 2000-09-11 15:02:51 by rrt]
Pass --target to configure of GMP, so that building for mingwin under
cygwin works properly.

23 years ago[project @ 2000-09-11 14:56:17 by rrt]
rrt [Mon, 11 Sep 2000 14:56:17 +0000 (14:56 +0000)]
[project @ 2000-09-11 14:56:17 by rrt]
Make sure windows.h is always checked for, not just when HOpenGL is present.

23 years ago[project @ 2000-09-11 14:11:25 by rrt]
rrt [Mon, 11 Sep 2000 14:11:25 +0000 (14:11 +0000)]
[project @ 2000-09-11 14:11:25 by rrt]
Revised GHC installer size downwards.

23 years ago[project @ 2000-09-11 13:56:22 by rrt]
rrt [Mon, 11 Sep 2000 13:56:22 +0000 (13:56 +0000)]
[project @ 2000-09-11 13:56:22 by rrt]
Removed Windows FAQ about -static no longer being supported (it is).