1. 23 Jan, 2004 5 commits
    • 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
    • simonmar's avatar
      [project @ 2004-01-23 13:46:49 by simonmar] · 433d69e5
      simonmar authored
      typo
      433d69e5
    • simonmar's avatar
      [project @ 2004-01-23 13:44:52 by simonmar] · 0df411c8
      simonmar authored
      Changes to support building GHC as a package(!!)
      0df411c8
    • simonmar's avatar
      [project @ 2004-01-23 13:42:40 by simonmar] · 354011fa
      simonmar authored
      Small simplification
      354011fa
    • simonmar's avatar
      [project @ 2004-01-23 13:37:40 by simonmar] · 4e6498f2
      simonmar authored
      Some tweaks for standalone packages
      4e6498f2
  2. 15 Jan, 2004 2 commits
  3. 12 Jan, 2004 4 commits
  4. 11 Jan, 2004 1 commit
    • panne's avatar
      [project @ 2004-01-11 14:43:14 by panne] · e43235be
      panne authored
      Fixed the previous commit: All lists of Strings in package configuration files
      were split at commas to allow list-based variables, but this broke perfectly
      sensible things like
      
         ["-Wl,-rpath,/usr/lib/jvm-bridge/lib/"]
      
      into
      
         ["-Wl","-rpath","/usr/lib/jvm-bridge/lib/"]
      
      which is plainly wrong. Now we do this *only* when a variable occurs on its own,
      like:
      
         ["${deps}","foo"] => ["base","haskell98","network","foo"]
      
      I have slight doubts about this obscure feature, but Sigbjorn seems to want
      it...
      
      Merge to STABLE
      e43235be
  5. 09 Jan, 2004 6 commits
  6. 08 Jan, 2004 4 commits
    • simonmar's avatar
      [project @ 2004-01-08 15:26:44 by simonmar] · d3ee5202
      simonmar authored
      delayzh: Round *up* to nearest tick, not down
      d3ee5202
    • simonpj's avatar
      [project @ 2004-01-08 11:53:29 by simonpj] · d29520cb
      simonpj authored
      ---------------------------------------
      	Fix a long-standing CSE bug with unboxed tuples
      	  ---------------------------------------
      
      		Merge to stable
      
      Consider
              case f x of
      	  (# a,b #) -> if a>0
      		       then f x -- CSE opportunity
      		       else (# b,a #)
      
       GHC 6.2's CSE pass wrongly optimised this to:
      
      	case f x of t
      	  (# a,b #) -> if a>0 then
      			  t	-- WRONG
      			else (# b,a #)
      
      (Wrong because we aren't allowed to mention a case binder for
      an unboxed-tuple case.)
      
      This commit fixes the problem.
      d29520cb
    • simonmar's avatar
      [project @ 2004-01-08 10:45:33 by simonmar] · c0c05bb3
      simonmar authored
      Fix warning message about missing Main module to refer to take into
      account the -main-is flag.
      c0c05bb3
    • simonmar's avatar
      [project @ 2004-01-08 10:34:02 by simonmar] · 6d015ec9
      simonmar authored
      If a -main-is flag was given, with a module name, use *that* module
      name rather than Main when deciding whether to link in batch mode or
      not.
      
      MERGE TO STABLE
      6d015ec9
  7. 06 Jan, 2004 4 commits
  8. 05 Jan, 2004 9 commits
    • simonmar's avatar
      [project @ 2004-01-05 17:32:35 by simonmar] · 9858bd46
      simonmar authored
      Instead of grabbing the handle to the executable by calling
      dlopen(NULL,...), use RTLD_DEFAULT as the handle to lookup symbols if
      it is available.  It seems that RTLD_DEFAULT may be required on
      certain systems, although I'm not sure it is available everywhere, so
      I've left the old code as fallback in case it isn't available.
      9858bd46
    • igloo's avatar
      [project @ 2004-01-05 15:15:26 by igloo] · 1b1d826f
      igloo authored
      Use pprint rather than show . ppr to get String representations of TH
      datastructures. Also moved pprint out of the class as we never want to
      override it.
      1b1d826f
    • 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
    • simonpj's avatar
      [project @ 2004-01-05 12:11:42 by simonpj] · 3721dd37
      simonpj authored
      ---------------------------------------
      	  Don't expose constructors as vigorously
      	  ---------------------------------------
      
      GHC used to expose the constructors of a data type in the interface file,
      even if (a) we were not optimising, and (b) the constructors are not exported.
      
      In practice this isn't really necessary, and it's bad because it forces too
      much recompilation.  I've been meaning to fix this for some while.
      
      Now the data cons are hidden, even in the interface file, if both (a) and (b)
      are true.  That means less interface file wobbling.
      
      Mind you, the interface file still changes, because the to/from functions for
      generic type classes change their types.  But provided you don't use them, you'll
      get "compilation not required".
      
      We could play the same game for classes (by hiding their class ops) but that'd
      mean we'd have to change the data type for IfaceClassDecl, and I can't be
      bothered to do that today.  It's unusual to have a class which exports none
      of its methods anyway.
      
      
      
      On the way, I changed the representation of tcg_exports and mg_exports (from
      Avails to NameSet), but that should be externally invisible.
      3721dd37
    • simonpj's avatar
      [project @ 2004-01-05 10:41:04 by simonpj] · e802f7a7
      simonpj authored
      Fix globaliseId wibble which was killing ghci
      e802f7a7
    • simonpj's avatar
      [project @ 2004-01-05 10:40:41 by simonpj] · e328afb3
      simonpj authored
      Trim imports
      e328afb3
    • simonpj's avatar
      [project @ 2004-01-05 09:35:39 by simonpj] · 623e5fbb
      simonpj authored
      Buglet in desugaring instance declarations
      623e5fbb
    • simonpj's avatar
      [project @ 2004-01-05 09:35:00 by simonpj] · 8c92ca4a
      simonpj authored
      Pretty-print wibbles following Ians changes to TH libs
      8c92ca4a
    • simonpj's avatar
      [project @ 2004-01-05 08:20:39 by simonpj] · d191be5d
      simonpj authored
      Dont report deprecations arising from uses in the export list
      d191be5d
  9. 04 Jan, 2004 1 commit
    • igloo's avatar
      [project @ 2004-01-04 01:48:04 by igloo] · 6da2fdc8
      igloo authored
      Split the pretty-printer out - pprint will now give you pretty much
      anything you are likely to want to pretty-print as a String. For a Doc
      you need (to_HPJ_Doc . ppr), which could be made nicer if it is widely
      used.
      
      Also took the opportunity to do a bit of module renaming and fixed the
      odd typo here and there.
      6da2fdc8
  10. 31 Dec, 2003 3 commits
    • simonpj's avatar
      [project @ 2003-12-31 16:55:17 by simonpj] · 1b75cf97
      simonpj authored
      point to bash, not sh
      1b75cf97
    • simonpj's avatar
      [project @ 2003-12-31 08:23:25 by simonpj] · 7473349e
      simonpj authored
      -----------------------------
              Improve deprecation reporting
      	-----------------------------
      
      	[PS: the 1.31 commit of basicTypes/RdrName.lhs
      	 also belongs in this commit.]
      
      Up to now, deprecated functions are only reported when imported
      from the module defining them, but not when re-exporting.  This
      seems wrong -- often a "root" module gathers exports from sub-modules.
      
      It turned out that there was a structural problem: the deprectaions
      were getting put in the GlobalRdrEnv, and it simply doesn't have
      the defining-module's interface to hand.
      
      So this commit removes gre_deprec from GRE, and moves deprecation
      reporting from the individual occurrences (RnEnv.lookupGreRn) to
      RnNames.reportUnusedNames.  In many ways this is a better place for it,
      because there we get a global view of the entire module.  For example,
      repeated use of a single deprecated thing will only give rise to one
      warning instead of multiple warnings.
      
      So here's what we now get:
      
        Foo.hs:3:0:
          Warning: Deprecated use of Variable `withObject'
      	     (imported from Foreign.Marshal, but defined in Foreign.Marshal.Utils)
      	     use `with' instead
      7473349e
    • simonpj's avatar
      [project @ 2003-12-31 08:21:52 by simonpj] · 94a28821
      simonpj authored
      Trim imports
      94a28821
  11. 30 Dec, 2003 1 commit