1. 12 Jan, 2004 1 commit
  2. 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
      which is plainly wrong. Now we do this *only* when a variable occurs on its own,
         ["${deps}","foo"] => ["base","haskell98","network","foo"]
      I have slight doubts about this obscure feature, but Sigbjorn seems to want
      Merge to STABLE
  3. 09 Jan, 2004 6 commits
  4. 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
    • 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
              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.
    • 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.
    • 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
  5. 06 Jan, 2004 4 commits
  6. 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.
    • 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.
    • 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).
    • 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.
    • simonpj's avatar
      [project @ 2004-01-05 10:41:04 by simonpj] · e802f7a7
      simonpj authored
      Fix globaliseId wibble which was killing ghci
    • simonpj's avatar
      [project @ 2004-01-05 10:40:41 by simonpj] · e328afb3
      simonpj authored
      Trim imports
    • simonpj's avatar
      [project @ 2004-01-05 09:35:39 by simonpj] · 623e5fbb
      simonpj authored
      Buglet in desugaring instance declarations
    • simonpj's avatar
      [project @ 2004-01-05 09:35:00 by simonpj] · 8c92ca4a
      simonpj authored
      Pretty-print wibbles following Ians changes to TH libs
    • 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
  7. 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
      Also took the opportunity to do a bit of module renaming and fixed the
      odd typo here and there.
  8. 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
    • 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:
          Warning: Deprecated use of Variable `withObject'
      	     (imported from Foreign.Marshal, but defined in Foreign.Marshal.Utils)
      	     use `with' instead
    • simonpj's avatar
      [project @ 2003-12-31 08:21:52 by simonpj] · 94a28821
      simonpj authored
      Trim imports
  9. 30 Dec, 2003 4 commits
    • simonpj's avatar
      [project @ 2003-12-30 20:51:24 by simonpj] · 4ab2b24e
      simonpj authored
      Fix imports
    • simonpj's avatar
      [project @ 2003-12-30 20:24:21 by simonpj] · c5a65b17
      simonpj authored
    • 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
      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.
    • simonpj's avatar
      [project @ 2003-12-30 14:05:46 by simonpj] · 9e90a28e
      simonpj authored
      Import trimming
  10. 28 Dec, 2003 2 commits
  11. 23 Dec, 2003 1 commit
  12. 22 Dec, 2003 1 commit
    • simonmar's avatar
      [project @ 2003-12-22 16:27:10 by simonmar] · 354a661d
      simonmar authored
      Fix threaded RTS problem that is currently causing the conc007 test to
      loop indefinitely.  Comment from the source regarding this change:
      /* Major bogosity:
       * In the threaded RTS, we can't set the virtual timer because the
       * thread which has the virtual timer might be sitting waiting for a
       * capability, and the virtual timer only ticks in CPU time.
       * So, possible solutions:
       * (1) tick in realtime.  Not very good, because this ticker is used for
       *     profiling, and this will give us unreliable time profiling
       *     results.  Furthermore, this requires picking a single OS thread
       *     to be the timekeeper, which is a bad idea because the thread in
       *     question might just be making a temporary call into Haskell land.
       * (2) save/restore the virtual timer around excursions into STG land.
       *     Sounds great, but I tried it and the resolution of the virtual timer
       *     isn't good enough (on Linux) - most of our excursions fall
       *     within the timer's resolution and we never make any progress.
       * (3) have a virtual timer in every OS thread.  Might be reasonable,
       *     because most of the time there is only ever one of these
       *     threads running, so it approximates a single virtual timer.
       *     But still quite bogus (and I got crashes when I tried this).
       * For now, we're using (1), but this needs a better solution. --SDM
  13. 19 Dec, 2003 3 commits
    • simonmar's avatar
      [project @ 2003-12-19 10:41:14 by simonmar] · fdb2b1fd
      simonmar authored
      Fix DEBUG & !RTS_SUPPORTS_THREADS build (bogus assertion failure)
    • simonpj's avatar
      [project @ 2003-12-19 10:39:54 by simonpj] · fc13ed2f
      simonpj authored
      Accept unboxed tuples in type signatures
    • simonpj's avatar
      [project @ 2003-12-19 10:34:51 by simonpj] · 3674a5cc
      simonpj authored
        Precise locations for duplicate imports
      As a displacment activity I added reporting for duplicate imports
      And more precise locations for the imports themselves.  For example:
        module T where
        import Maybe (isJust,isJust)
        import Maybe (isJust)
          Warning: `isJust' is imported more than once:
      	       imported from Maybe at Foo.hs:4:16-21
      	       imported from Maybe at Foo.hs:3:23-28
      	       imported from Maybe at Foo.hs:3:16-21