1. 23 Jan, 2004 2 commits
  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 4 commits
    • simonpj's avatar
      [project @ 2003-12-30 20:51:24 by simonpj] · 4ab2b24e
      simonpj authored
      Fix imports
      4ab2b24e
    • simonpj's avatar
      [project @ 2003-12-30 20:24:21 by simonpj] · c5a65b17
      simonpj authored
      Typo
      c5a65b17
    • simonpj's avatar
      [project @ 2003-12-30 16:29:17 by simonpj] · f714e6b6
      simonpj authored
      ----------------------------
              Re-do kind inference (again)
      	----------------------------
      
         [WARNING: interface file binary representation has
         (as usual) changed slightly; recompile your libraries!]
      
      Inspired by the lambda-cube, for some time GHC has used
      	type Kind = Type
      That is, kinds were represented by the same data type as types.
      
      But GHC also supports unboxed types and unboxed tuples, and these
      complicate the kind system by requiring a sub-kind relationship.
      Notably, an unboxed tuple is acceptable as the *result* of a
      function but not as an *argument*.  So we have the following setup:
      
      		 ?
      		/ \
      	       /   \
      	      ??   (#)
      	     /  \
                  *   #
      
      where	*    [LiftedTypeKind]   means a lifted type
      	#    [UnliftedTypeKind] means an unlifted type
      	(#)  [UbxTupleKind]     means unboxed tuple
      	??   [ArgTypeKind]      is the lub of *,#
      	?    [OpenTypeKind]	means any type at all
      
      In particular:
      
        error :: forall a:?. String -> a
        (->)  :: ?? -> ? -> *
        (\(x::t) -> ...)	Here t::?? (i.e. not unboxed tuple)
      
      All this has beome rather difficult to accommodate with Kind=Type, so this
      commit splits the two.
      
        * Kind is a distinct type, defined in types/Kind.lhs
      
        * IfaceType.IfaceKind disappears: we just re-use Kind.Kind
      
        * TcUnify.unifyKind is a distinct unifier for kinds
      
        * TyCon no longer needs KindCon and SuperKindCon variants
      
        * TcUnify.zapExpectedType takes an expected Kind now, so that
          in TcPat.tcMonoPatBndr we can express that the bound variable
          must have an argTypeKind (??).
      
      The big change is really that kind inference is much more systematic and
      well behaved.  In particular, a kind variable can unify only with a
      "simple kind", which is built from * and (->).  This deals neatly
      with awkward questions about how we can combine sub-kinding with type
      inference.
      
      Lots of small consequential changes, especially to the kind-checking
      plumbing in TcTyClsDecls.  (We played a bit fast and loose before, and
      now we have to be more honest, in particular about how kind inference
      works for type synonyms.  They can have kinds like (* -> #), so
      
      This cures two long-standing SourceForge bugs
      
      * 753777 (tcfail115.hs), which used erroneously to pass,
        but crashed in the code generator
            type T a = Int -> (# Int, Int #)
            f :: T a -> T a
            f t = \x -> case t x of r -> r
      
      * 753780 (tc167.hs), which used erroneously to fail
            f :: (->) Int# Int#
      
      
      Still, the result is not entirely satisfactory.  In particular
      
      * The error message from tcfail115 is pretty obscure
      
      * SourceForge bug 807249 (Instance match failure on openTypeKind)
        is not fixed.  Alas.
      f714e6b6
    • simonpj's avatar
      [project @ 2003-12-30 14:05:46 by simonpj] · 9e90a28e
      simonpj authored
      Import trimming
      9e90a28e