1. 15 Mar, 2002 2 commits
  2. 14 Mar, 2002 10 commits
    • simonmar's avatar
      [project @ 2002-03-14 17:10:14 by simonmar] · c228a724
      simonmar authored
      No need to compile Printf.lhs with -fvia-c now.
      c228a724
    • simonmar's avatar
      [project @ 2002-03-14 17:09:46 by simonmar] · 6f288c6f
      simonmar authored
      The foreign declaration for snprintf was wrong, because we need to
      give the type of the C function after applying C's type promotion
      rules.  Hence the Float argument should be a Double, because it
      occurs in the vararg section of the function type.
      6f288c6f
    • simonmar's avatar
      [project @ 2002-03-14 17:05:13 by simonmar] · ab73ca61
      simonmar authored
      Back out previous fix, it was wrong.
      ab73ca61
    • simonmar's avatar
      [project @ 2002-03-14 16:22:31 by simonmar] · 0e8e53db
      simonmar authored
      Misc cleanup: remove the iface pretty-printing style, and clean up
      bits of StringBuffer that aren't required any more.
      0e8e53db
    • simonmar's avatar
      [project @ 2002-03-14 15:52:13 by simonmar] · 8c845163
      simonmar authored
      undo accidental commits
      8c845163
    • simonpj's avatar
      [project @ 2002-03-14 15:49:36 by simonpj] · 71f50414
      simonpj authored
      Documentation about type system extensions
      71f50414
    • simonmar's avatar
      [project @ 2002-03-14 15:47:52 by simonmar] · b9312420
      simonmar authored
      Remove the interface file parser, and move .hi-boot parsing into the
      main parser.  The syntax of .hi-boot files is now greatly improved in
      terms of readability; here's an example:
      
      	module M where
      	data T
      	f :: T -> GHC.Base.Int
      
      note that
      	(a) layout can be used
      	(b) there's no explcit export list; everything declared
      	    is implicitly exported
      	(c) Z-encoding of names is no longer required
      	(d) Any identifier not declared in the current module must
      	    still be quailified with the module which originally
      	    defined it (eg. GHC.Base.Int above).
      
      We'd like to relax (d), but that will come later.
      b9312420
    • simonpj's avatar
      [project @ 2002-03-14 15:27:15 by simonpj] · 1553c778
      simonpj authored
      ------------------------
      	Change
      		GlobalName --> ExternalName
      		LocalName  ->  InternalName
      	------------------------
      
      For a long time there's been terminological confusion between
      
      	GlobalName vs LocalName	 (property of a Name)
      	GlobalId vs LocalId	 (property of an Id)
      
      I've now changed the terminology for Name to be
      
      	ExternalName vs InternalName
      
      I've also added quite a bit of documentation in the Commentary.
      1553c778
    • simonpj's avatar
      [project @ 2002-03-14 15:26:53 by simonpj] · 057e3f0d
      simonpj authored
      Lots of stuff about external and internal names
      057e3f0d
    • simonmar's avatar
      [project @ 2002-03-14 11:23:42 by simonmar] · 09f96da1
      simonmar authored
      Turn "return e" into "return $! e" in several places to improve
      performance.
      09f96da1
  3. 13 Mar, 2002 7 commits
  4. 12 Mar, 2002 12 commits
    • simonmar's avatar
      [project @ 2002-03-12 16:48:52 by simonmar] · c50d5acc
      simonmar authored
      Fix a bug in the native code generator's handling of floating-point
      arguments to ccalls: it wasn't correctly promoting float arguments to
      doubles.  Amazingly this has gone undetected for quite a while.
      
      Fixes bug #523996.
      c50d5acc
    • simonmar's avatar
      [project @ 2002-03-12 16:45:59 by simonmar] · d0bf18ef
      simonmar authored
      Forced commit: note that the previous revision also improved the error
      message for a compiler stack overflow slightly.
      d0bf18ef
    • simonmar's avatar
      [project @ 2002-03-12 16:40:57 by simonmar] · 2bc259ae
      simonmar authored
      eek!  Somehow, I managed to make -fvia-C the default on the HEAD and
      nobody noticed for two months.
      2bc259ae
    • simonpj's avatar
      [project @ 2002-03-12 15:55:26 by simonpj] · 72c2f581
      simonpj authored
      ------------------------
      	Fix a type-invariant bug
      	------------------------
      
      We need to call Type.mkGenTyConApp from Type.mkAppTy, in
      case there's a partially applied type synonym.  Explanation
      with Type.mkAppTy.  All part of GHC's rather liberal treatment
      of type synonyms.
      
      Shown up by a program from Ralf Laemmel:
      
      	type Generic i o = forall x. i x -> o x
      	type Id x = x
      	comb :: Generic Id Id
      
      Test is typecheck/should_compile/tc149.hs
      72c2f581
    • simonmar's avatar
      [project @ 2002-03-12 15:28:25 by simonmar] · a03714e2
      simonmar authored
      Add a magic number to the beginning of interface files (0x1face :-) to
      avoid trying to read old text-style interfaces as binary (the usual
      result is an attempt to allocate a ByteArray larger than the available
      memory size and an obscure crash).
      a03714e2
    • simonmar's avatar
      [project @ 2002-03-12 13:57:11 by simonmar] · 5eedab2c
      simonmar authored
      If we are in a deadlock situation but there are signal handlers
      installed, pause() instead of reporting deadlock.  One of the signal
      handlers may allow the process to continue after being triggered.
      
      Fixes bug #525772.
      
      I've made a half-hearted attempt to clean up the deadlock code in the
      scheduler, it now looks slightly better.
      5eedab2c
    • simonmar's avatar
      [project @ 2002-03-12 11:50:02 by simonmar] · f762be1b
      simonmar authored
      Main threads are now not kept alive artificially, so it is possible
      for a main thread to be sent the BlockedOnDeadMVar exception.  Main
      threads are no longer GC roots.
      
      This involved cleaning up the weak pointer processing somewhat, and
      separating the processing of real weak pointers from the processing of
      the all_threads list (which can be thought of as "weaker pointers": a
      finalizer can keep a blocked thread alive, but not vice-versa).  The
      new story is described in a detailed comment in GC.c.
      
      One interesting consequence is that it's much harder to get a Deadlock
      exception now - many deadlock situations involving main threads will
      turn into BlockedOnDeadMVar situations instead.  For example, if there
      are a group of threads in a circular deadlock, then they will all be
      sent BlockedOnDeadMVar simultaneously, whereas before if one of them
      was the main thread it would be sent Deadlock.  It's really hard to
      get Deadlock now - you have to somehow keep an MVar independently
      reachable, eg. by using a StablePtr.
      f762be1b
    • simonmar's avatar
      [project @ 2002-03-12 10:41:48 by simonmar] · 44aa6bcb
      simonmar authored
      When deciding whether the source for a module is unchanged, don't look
      at the file referred to in the argument of '-o' unless it really is
      the object file for this compilation (it might be the binary instead).
      
      MERGE TO STABLE
      44aa6bcb
    • simonmar's avatar
      [project @ 2002-03-12 10:37:31 by simonmar] · 81834778
      simonmar authored
      - Fix brokenness in foreign export.
      - Remove some unused imports.
      81834778
    • simonmar's avatar
      [project @ 2002-03-12 09:23:01 by simonmar] · 9bd50a0d
      simonmar authored
      - Add quotes around invocation of ${WithGhc-ghc}, in case the pathname
        has spaces in (bug #528810).
      
      - remove now-unused definition of is_gcc_v3.
      9bd50a0d
    • simonpj's avatar
      [project @ 2002-03-12 09:13:08 by simonpj] · 65f44e38
      simonpj authored
      -----------
      	Fix mkSynTy
      	-----------
      
      Fix a nasty and long-lived bug in mkSynTy which meant that in:
      
      	newtype A a = A a
      	type B = A
      	f :: B Double
      
      the type (B Double) wasn't regarded properly as (A Double).  This bug
      has lasted for a long time because the type inference engine is fairly
      forgiving about missing the invariant that a TyConApp always looks
      like one right at the top level.  In fact, it's so forgiving that I
      don't know how to tickle this bug into showing up.  (It showed up in
      5.02, becuase the context-simplification for 'deriving' is done by a
      different engine as all the other context simplification.)
      
      Still, the invariant should hold, and this fix makes it so.
      65f44e38
    • simonpj's avatar
      [project @ 2002-03-12 09:12:57 by simonpj] · 49c84dec
      simonpj authored
      Comments
      49c84dec
  5. 11 Mar, 2002 3 commits
    • simonmar's avatar
      [project @ 2002-03-11 13:56:49 by simonmar] · 4ba40d2d
      simonmar authored
      import openFileEx and IOModeEx(..)
      4ba40d2d
    • simonmar's avatar
      [project @ 2002-03-11 11:17:01 by simonmar] · 4d46f8cc
      simonmar authored
      Add a warning about booting from .hc files on GHC 5.xx, and recommend
      using 4.08.2 instead.
      4d46f8cc
    • simonmar's avatar
      [project @ 2002-03-11 10:55:11 by simonmar] · b274236c
      simonmar authored
      Re-instate ifeq "$(way)" "" around the rule for recursively descending
      into SUBDIRS that I removed a while back.  This will fix a bug in
      nofib whereby if NoFibWays is set to anything then we do O(n^2)
      traversals of the tree, but it also means you can't sit at the top of
      the tree and say 'make way=p' to just build profiling libraries (which
      was the reason I made the change in the first place).  We'll have to
      find another way to do this.
      b274236c
  6. 08 Mar, 2002 6 commits
    • simonpj's avatar
      [project @ 2002-03-08 16:03:13 by simonpj] · 7fc19edc
      simonpj authored
      Documentation for more liberal class-method types
      7fc19edc
    • simonmar's avatar
      [project @ 2002-03-08 16:00:39 by simonmar] · e9acdb5b
      simonmar authored
      Make this compile with various GHC versions (hopefully)
      e9acdb5b
    • simonpj's avatar
      [project @ 2002-03-08 15:51:19 by simonpj] · 3b6febd6
      simonpj authored
      wibble
      3b6febd6
    • simonpj's avatar
      [project @ 2002-03-08 15:50:53 by simonpj] · a170160c
      simonpj authored
      --------------------------------------
      	Lift the class-method type restriction
      	--------------------------------------
      
      Haskell 98 prohibits class method types to mention constraints on the
      class type variable, thus:
      
        class Seq s a where
          fromList :: [a] -> s a
          elem     :: Eq a => a -> s a -> Bool
      
      The type of 'elem' is illegal in Haskell 98, because it contains the
      constraint 'Eq a', which constrains only the class type variable (in
      this case 'a').
      
      This commit lifts the restriction.  The way we do that is to do a full
      context reduction (tcSimplifyCheck) step for each method separately in
      TcClassDcl.tcMethodBind, rather than doing a single context reduction
      for the whole group of method bindings.
      
      As a result, I had to reorganise the code a bit, and tidy up.
      a170160c
    • simonpj's avatar
      [project @ 2002-03-08 15:47:18 by simonpj] · 4593b105
      simonpj authored
      ------------------------
      	Kill Type.splitRepFunTys
      	------------------------
      
      splitRepFunTys was a Bad Function that split up a function type
      looking through even recursive newtypes.  Alas, it diverged if
      when we had a recursive newtype with a function whose result was
      the newtype itself.
      
      I've replaced it with ordinary splitFunTys, plus a new function
      Type.dropForAlls, which does what you would expect.
      4593b105
    • simonpj's avatar
      [project @ 2002-03-08 15:42:12 by simonpj] · 354f17ec
      simonpj authored
      Read and write interfaces in binary mode; important for Win32
      354f17ec