1. 18 Mar, 1999 4 commits
  2. 17 Mar, 1999 8 commits
    • sewardj's avatar
      [project @ 1999-03-17 16:28:34 by sewardj] · 8f05bdd5
      sewardj authored
      Make mut_link field be NULL when removing CAF_{UN}ENTERED from
      mut_once_list.  Convention is to have the field be NULL iff
      the caf is not on a mut_once_list.  This gives a O(1) cost way
      to avoid putting a caf onto a mut_once_list more than once.
      8f05bdd5
    • sewardj's avatar
      [project @ 1999-03-17 16:25:07 by sewardj] · bbe9289a
      sewardj authored
      Add missing semicolon
      bbe9289a
    • simonm's avatar
      [project @ 1999-03-17 13:19:19 by simonm] · d9eb68cf
      simonm authored
      - Stack overflow now generates an (AsyncException StackOverflow)
        exception, which can be caught as normal.
      
      - Add a stack overflow handler to the top-level mainIO handler, with
        the standard behaviour (i.e. call the stack overflow hook and then
        exit).
      
      - Add a test for stack overflow catching.
      
      - Fix a couple of bugs in async exception support.
      d9eb68cf
    • simonm's avatar
      [project @ 1999-03-17 11:03:36 by simonm] · e28f99fd
      simonm authored
      Ignore type lambdas for the purposes of occurrence analysis.
      e28f99fd
    • simonm's avatar
      [project @ 1999-03-17 11:02:35 by simonm] · 27f395a7
      simonm authored
      Print (ICanSafelyBeINLINEd InsideLam _) as "__Ul".
      27f395a7
    • simonpj's avatar
      [project @ 1999-03-17 10:06:21 by simonpj] · fc7b70af
      simonpj authored
      Make it so that Local (i.e. non-top-level) names record
      whether they originally came from an interface file.  This
      means that when unifying two type variables we can readily
      choose one that occurred in the source, rather than one
      imported from an interface file.  That in turn improves 
      compiler error messages.  E.g.
      
        rd :: (RealFloat a, RealFrac b) => b -> Transformation a
        rd degrees  = r ((degrees / 180.0) * pi)
      
      used to say
      
          Could not deduce `Floating a'
      	(arising from use of `pi' at Foo.hs:11)
      	from the context: (RealFloat a1, RealFrac a)
          Probable cause: missing `Floating a' in type signature for `rd'
      
      [here the 'a' came from the signature for 'pi' in PrelBase;
       the 'a1' is a renamed version of the 'a' in the source pgm]
      
      but now says
      
          Could not deduce `Floating b'
      	(arising from use of `pi' at Foo.hs:11)
      	from the context: (RealFloat a, RealFrac b)
          Probable cause: missing `Floating b' in type signature for `rd'
      fc7b70af
    • simonm's avatar
      [project @ 1999-03-17 09:50:08 by simonm] · 32e46064
      simonm authored
      When resizing a stack, set the Sp and Su of the old, dead, TSO to be just
      beyond the end of its stack so we don't attempt to scavenge any part of
      the stack in case we come across this TSO during GC.
      32e46064
    • simonpj's avatar
      [project @ 1999-03-17 08:26:30 by simonpj] · 41d098e3
      simonpj authored
      Complete the hack that lets us give 'error' the type
      
      	error :: forall a:?. String -> a
      
      The kind '?' (also known as 'Type AnyBox') means that
      error can be applied to unboxed types too.  unsafeCoerce is
      similar.  But the 'real' type of error is:
      
      	error :: forall bv. forall a:Type bv. String -> a
      
      That is, it's really polymorphic in the boxity of a; that's
      different to saying that the type bound to 'a' must have
      kind '?'.  
      
      The fix was in TcType.inst_tyvar, where we look for the kind '?'
      and generate a boxity variable instead.  Sigh.
      41d098e3
  3. 16 Mar, 1999 4 commits
    • simonm's avatar
      [project @ 1999-03-16 17:07:21 by simonm] · e1a83341
      simonm authored
      - Document the pragmas we support
      - Fix some lies in the vs. Haskell section.
      e1a83341
    • simonm's avatar
      [project @ 1999-03-16 13:20:07 by simonm] · 456eca73
      simonm authored
      Improvements to the threading model.
      
         - asynchronous exceptions supported.
      
      	- killThread# can now raise an exception in the specified
      	  thread.  It's new type is
      
      		killThread# :: ThreadId# -> Exception -> IO ()
      
      	  High-level versions:
      
      		killThread :: ThreadId -> IO ()
      		raiseInThread :: ThreadId -> Exception -> IO ()
      
      	  (killThread raises a 'ThreadKilled' exception in the
      	   specified thread).
      
      	  If the thread has no exception handler, it is killed
      	  as before.  Otherwise, the exception is passed to
      	  the innermost CATCH_FRAME and the thread is woken up
      	  if it was blocked.  The current computation is
      	  suspended, instead of being replaced by the exception
      	  (as is the case with throw).
      
      	  Sending an exception to the current thread works too.
      
         - new primitive: myThreadId# :: IO ThreadId# and corresponding
           high-level version myThreadId :: IO ThreadId.
      
         - new primitive: yield# :: IO (), and yield :: IO ().
      
         - the TSO now contains a pointer to the resource currently blocked
           on (MVAR or BLACKHOLE_BQ).
      
        - Add a giant comment to TSO.h about what the various link fields
          are supposed to do, and invariants etc.
      456eca73
    • simonpj's avatar
      [project @ 1999-03-16 12:36:15 by simonpj] · 8306cc58
      simonpj authored
      Bring up to 4.02 interface file syntax
      8306cc58
    • simonpj's avatar
      [project @ 1999-03-16 12:31:55 by simonpj] · 831297f1
      simonpj authored
      Make it only a warning if you have a type like this:
      
      	forall a. Int -> Int
      
      These show up in interface files occasionally, just because
      the simplifier is a bit blase about adding type arguments.
      
      But it's an error to have
      
      	forall a. Eq a => Int -> Int
      
      The flag -fwarn-unused-matches reports a warning for these
      redundant for-alls.
      831297f1
  4. 15 Mar, 1999 6 commits
    • simonm's avatar
      [project @ 1999-03-15 17:11:27 by simonm] · ce55bf9c
      simonm authored
      Remove a couple of stgcasts.
      ce55bf9c
    • simonm's avatar
      [project @ 1999-03-15 16:53:10 by simonm] · 2349db9a
      simonm authored
      Specialise STATIC_LINK() for {FUN,THUNK,IND}_STATIC.
      2349db9a
    • simonm's avatar
      [project @ 1999-03-15 16:31:02 by simonm] · e18e743b
      simonm authored
      Reduce alignment for info tables on x86 to 1 word.  It was previously
      4 words, which meant that the entry code was wrongly aligned all the
      time (because info tables are either 2 or 3 words).  At least this way
      we've got a 1 in 4 chance of being properly aligned.
      e18e743b
    • simonm's avatar
      [project @ 1999-03-15 16:30:24 by simonm] · 030a1217
      simonm authored
      Remove flags field from info tables; create a separate table of flags
      indexed by the closure type in the RTS.
      030a1217
    • simonpj's avatar
      [project @ 1999-03-15 15:11:03 by simonpj] · 42a51e93
      simonpj authored
      Make clear in HsType whether a for-all is explicit
      in the source program or not.  Implicit for-alls now
      look like 
      	HsForAllTy Nothing ctxt ty
      while explicit ones look like
      	HsForAllTy (Just tvs) ctxt ty
      
      Before this, the scope analysis stuff in RnSource was
      actually wrong (not that anyone had noticed), but Alex Ferguson
      did notice a bogus (sort-of-duplicate) error message on types
      like
      	f :: Eq a => Int -> Int
      which led me to spot the deeper problem.  Anyway, it's all 
      cool now.
      42a51e93
    • simonm's avatar
      [project @ 1999-03-15 13:25:04 by simonm] · 1c52a209
      simonm authored
      Move mkdependHS to lib.
      1c52a209
  5. 11 Mar, 1999 7 commits
  6. 10 Mar, 1999 4 commits
  7. 09 Mar, 1999 5 commits
  8. 08 Mar, 1999 2 commits