1. 13 Aug, 2004 1 commit
  2. 12 Aug, 2004 3 commits
  3. 21 Jul, 2004 1 commit
  4. 24 Jun, 2004 2 commits
  5. 20 Jun, 2004 1 commit
  6. 19 May, 2004 1 commit
  7. 09 May, 2004 1 commit
  8. 06 May, 2004 2 commits
  9. 30 Apr, 2004 2 commits
  10. 27 Apr, 2004 1 commit
    • simonpj's avatar
      [project @ 2004-04-27 12:47:13 by simonpj] · 74e0bdb6
      simonpj authored
      ----------------------------------------
           1. Make primOpIsCheap do something sensible
           2. Make the state hack work better
           ----------------------------------------
      
      1.  In March 2001, we changed primOpIsCheap to
      	primOpIsCheap op = False
      thereby making *no* primops seem cheap.  But this killed eta
      expansion on case (x ==# y) of True -> \s -> ...
      which is bad.  In particular a loop like
        doLoop n = loop 0
          where
            loop i | i == n    = return ()
                   | otherwise = bar i >> loop (i+1)
      allocated a closure every time round because it didn't eta expand.
      
      The problem that made us set primOpIsCheap to False was
      		let x = a +# b *# c in x +# x
      where we don't want to inline x. But primopIsCheap doesn't control
      that (it's exprIsDupable that does) so the problem doesn't occur
      even if primOpIsCheap sometimes says 'True'.  I think that perhaps
      something changed since March 2001.
      
      
      2.  Consider this
      	case x of
      	  True  -> \(s:RealWorld) -> e
      	  False -> foo
      where foo has arity 1.  If we are using the "state hack" we want to
      eta expand here.  This commit fixes arityType in the Var case (for foo)
      to take account of foo's type.
      
      Also add -fno-state-hack to the static flags, to allow the state hack to
      be switched off.
      74e0bdb6
  11. 05 Apr, 2004 1 commit
  12. 02 Apr, 2004 2 commits
    • simonpj's avatar
      [project @ 2004-04-02 16:46:57 by simonpj] · 40888e1d
      simonpj authored
      Extend the "newtype deriving" feature a little bit more
      (at the request of Wolfgang Jeltsch)
      
      Here's the example:
          class C a b
          instance C [a] Char
          newtype T = T Char deriving( C [a] )
      
      Perfectly sensible, and no reason it should not work.
      Fixing this required me to generalise the abstract syntax of
      a 'deriving' item, hence the non-local effects.
      40888e1d
    • simonpj's avatar
      [project @ 2004-04-02 13:34:42 by simonpj] · 52276d81
      simonpj authored
      Add a flag -fno-state-hack, which switches off the "state hack".
      
      It's claims that every function over realWorldStatePrimTy is a
      one-shot function.  This is pretty true in practice, and makes a big
      difference.  For example, consider
      	a `thenST` \ r -> ...E...
      The early full laziness pass, if it doesn't know that r is one-shot
      will pull out E (let's say it doesn't mention r) to give
      	let lvl = E in a `thenST` \ r -> ...lvl...
      When `thenST` gets inlined, we end up with
      	let lvl = E in \s -> case a s of (r, s') -> ...lvl...
      and we don't re-inline E.
      52276d81
  13. 24 Mar, 2004 1 commit
  14. 16 Mar, 2004 1 commit
    • simonmar's avatar
      [project @ 2004-03-16 11:39:50 by simonmar] · 72f7be33
      simonmar authored
      Remove all known hacks in rawSystem:
      
        - no splitting of the program name using toArgs
      
        - no avoiding translate when the string already appears to be quoted
      
        - no avoiding translate for the command name
      
      We now keep separate program name & args for various SysTools
      programs: gcc, as, ld, mkdll.
      
      MERGE TO STABLE
      72f7be33
  15. 10 Mar, 2004 1 commit
  16. 05 Mar, 2004 2 commits
  17. 25 Feb, 2004 3 commits
  18. 24 Feb, 2004 3 commits
    • simonmar's avatar
      [project @ 2004-02-24 17:33:32 by simonmar] · cd20fd58
      simonmar authored
      Experimental support for RTS-only "ways"
      
      HEADS UP!  This changes the way that the threaded RTS is used, and
      also the use of debugging RTSs:
      
        - We always build threaded and debugging variants of the RTS now.
          The --enable-threaded-rts configure option is ignored (and will
          be removed at some point).
      
        - New option:  -debug     enables the debugging RTS
      
        - New option:  -threaded  enables the threaded RTS.  When the threaded
          RTS is stable enough, we might make it the default.
      
      The new options just cause a different variant of the RTS to be linked
      in, and they cause one or two extra options to be enabled too.  The
      implementation is via the usual ways machinery in the compiler, except
      that these ways are labelled as RTS-only, and so don't require
      rebuilding all the libraries too.
      
      All of this means we can ship threaded and debugging RTSs with GHC, so
      that users don't need to fetch and build a GHC source tree to use
      them.
      
      I'd like to get this functionality into 6.2.1 if possible, so please
      test (I'm willing to stretch the definition of "interface change" to
      accomodate this, since having a threaded RTS available without having
      to build GHC will be a big win for the Visual Studio project).
      cd20fd58
    • simonpj's avatar
      [project @ 2004-02-24 15:57:52 by simonpj] · 53fe9413
      simonpj authored
      ---------------------------------------
        	 Record dependency on Template Haskell package
      	  ---------------------------------------
      
      An unforseen consequence of making the Template Haskell package separate
      is that we need to record dependency on the package, even if no TH module
      is imported.  So we carry round (another) mutable variable tcg_th_used in
      the tyepchecker monad, and zap it when $(...) and [| ... |] are used.
      
      I did a little tidy-up and documentation in ListSetOps too
      53fe9413
    • simonmar's avatar
      [project @ 2004-02-24 12:39:12 by simonmar] · fa167f5b
      simonmar authored
      New version of translate for mingw32, which correctly (allegedly)
      reverses the command-line translation done by the standard C runtime
      on Windows.
      fa167f5b
  19. 12 Feb, 2004 1 commit
  20. 02 Feb, 2004 1 commit
  21. 28 Jan, 2004 1 commit
    • simonpj's avatar
      [project @ 2004-01-28 10:04:25 by simonpj] · 4a9c5b7e
      simonpj authored
      ---------------------------------------
        	 Fix the WinME/98/95 double-backslash bug
      	  ---------------------------------------
      
      		Merge to stable branch, at least
      		once we are sure it's right
      
      Backslashes should not be escaped in command-line arguments for rawSystem,
      on Win32.  This only actually causes failures on WinME/98/95, and we can't
      test that since we don't have it.  But this fix seems right regardless.
      
      There are extensive new comments in libraries/base/System/Cmd.hs which
      describe the issues.
      4a9c5b7e
  22. 27 Jan, 2004 2 commits
  23. 26 Jan, 2004 1 commit
  24. 23 Jan, 2004 1 commit
    • simonmar's avatar
      [project @ 2004-01-23 13:55:28 by simonmar] · 29da2cf3
      simonmar authored
      Some small steps in the direction of making GHC useable as a library:
      
        - The ErrMsg type is now richer: we keep the location info and the
          PrintUnqualified separate until the message is printed out, and
          messages have a short summary and "extra info", where the extra
          info is used for things like the context info in the typechecker
          (stuff that you don't normally want to see in a more visual setting,
          where the context is obvious because you're looking at the code).
      
        - hscMain now takes an extra argument of type (Messages -> IO ()),
          which says what to do with the error messages.  In normal usage,
          we just pass ErrUtils.printErrorsAndWarnings, but eg. a development
          environment will want to do something different.  The direction we
          need to head in is for hscMain to *never* do any output to
          stdout/stderr except via abstractions like this.
      29da2cf3
  25. 15 Jan, 2004 1 commit
  26. 12 Jan, 2004 1 commit
  27. 09 Jan, 2004 1 commit
  28. 05 Jan, 2004 1 commit
    • simonmar's avatar
      [project @ 2004-01-05 14:54:06 by simonmar] · 2ae018a0
      simonmar authored
      Fix bug in genOutputFilenameFunc: the -keep-blah-files options weren't
      being considered for the final phase.  Upshot: -keep-hc-files wasn't
      working in --make mode (see driver060 & driver061 tests).
      
      MERGE TO STABLE
      2ae018a0