1. 25 Jul, 2005 8 commits
  2. 22 Jul, 2005 4 commits
  3. 21 Jul, 2005 3 commits
  4. 19 Jul, 2005 3 commits
    • simonpj's avatar
      [project @ 2005-07-19 22:55:10 by simonpj] · c2cc00b0
      simonpj authored
      remove RnSource.lhs-boot and add RnExpr.lhs-boot
    • simonpj's avatar
      [project @ 2005-07-19 22:53:37 by simonpj] · 2b71126c
      simonpj authored
    • simonpj's avatar
      [project @ 2005-07-19 16:44:50 by simonpj] · a7ecdf96
      simonpj authored
      WARNING: this is a big commit.  You might want 
      	to wait a few days before updating, in case I've 
      	broken something.
      	However, if any of the changes are what you wanted,
      	please check it out and test!
      This commit does three main things:
      1. A re-organisation of the way that GHC handles bindings in HsSyn.
         This has been a bit of a mess for quite a while.  The key new
         types are
      	-- Bindings for a let or where clause
      	data HsLocalBinds id
      	  = HsValBinds (HsValBinds id)
      	  | HsIPBinds  (HsIPBinds id)
      	  | EmptyLocalBinds
      	-- Value bindings (not implicit parameters)
      	data HsValBinds id
      	  = ValBindsIn  -- Before typechecking
      		(LHsBinds id) [LSig id]	-- Not dependency analysed
      					-- Recursive by default
      	  | ValBindsOut	-- After typechecking
      		[(RecFlag, LHsBinds id)]-- Dependency analysed
      2. Implement Mark Jones's idea of increasing polymoprhism
         by using type signatures to cut the strongly-connected components
         of a recursive group.  As a consequence, GHC no longer insists
         on the contexts of the type signatures of a recursive group
         being identical.
         This drove a significant change: the renamer no longer does dependency
         analysis.  Instead, it attaches a free-variable set to each binding,
         so that the type checker can do the dep anal.  Reason: the typechecker
         needs to do *two* analyses:
      	one to find the true mutually-recursive groups
      		(which we need so we can build the right CoreSyn)
      	one to find the groups in which to typecheck, taking
      		account of type signatures
      3. Implement non-ground SPECIALISE pragmas, as promised, and as
         requested by Remi and Ross.  Certainly, this should fix the 
         current problem with GHC, namely that if you have
      	g :: Eq a => a -> b -> b
         then you can now specialise thus
      	SPECIALISE g :: Int -> b -> b
          (This didn't use to work.)
         However, it goes further than that.  For example:
      	f :: (Eq a, Ix b) => a -> b -> b
         then you can make a partial specialisation
      	SPECIALISE f :: (Eq a) => a -> Int -> Int
          In principle, you can specialise f to *any* type that is
          "less polymorphic" (in the sense of subsumption) than f's 
          actual type.  Such as
      	SPECIALISE f :: Eq a => [a] -> Int -> Int
          But I haven't tested that.
          I implemented this by doing the specialisation in the typechecker
          and desugarer, rather than leaving around the strange SpecPragmaIds,
          for the specialiser to find.  Indeed, SpecPragmaIds have vanished 
          altogether (hooray).
          Pragmas in general are handled more tidily.  There's a new
          data type HsBinds.Prag, which lives in an AbsBinds, and carries
          pragma info from the typechecker to the desugarer.
      Smaller things
      - The loop in the renamer goes via RnExpr, instead of RnSource.
        (That makes it more like the type checker.)
      - I fixed the thing that was causing 'check_tc' warnings to be 
  5. 18 Jul, 2005 2 commits
  6. 14 Jul, 2005 2 commits
    • simonmar's avatar
      [project @ 2005-07-14 15:14:33 by simonmar] · 834e8207
      simonmar authored
      - -package P picks the latest version of P, instead of complaining
          if P is ambiguous.
        - -hide-package P hides all versions of P, instead of complaining
          if P is ambiguous.
    • simonmar's avatar
      [project @ 2005-07-14 15:12:20 by simonmar] · efbbd977
      simonmar authored
      - -package P hides all other versions of P (this was advertised
          in the documentation, but wasn't actually implemented in 6.4)
        - if multiple packages with the same name are still exposed after
          the flags have been processed, then all except the latest version
          are hidden.
  7. 13 Jul, 2005 1 commit
    • simonpj's avatar
      [project @ 2005-07-13 10:16:11 by simonpj] · 6a6653c0
      simonpj authored
      Switch the order of equations generated by FunDeps.improve,
      so that the error messages are more perspicuous.
      This fixes SourceForge [ ghc-Bugs-1234239 ]
        "Bad location for violation of functional dependency"
      tcfail143 tests.
  8. 12 Jul, 2005 8 commits
    • simonpj's avatar
      [project @ 2005-07-12 16:30:01 by simonpj] · c8502561
      simonpj authored
      Try MERGE to STABLE
      When TH splices in code, it was previously decorated with noLoc.  If
      there were any type errors in it, we got a very unhelpful message.
      Now we propagate the splice location everywhere into the spliced code.
      The location isn't very exact, because it refers to the splice site,
      but it's better than before.
    • simonpj's avatar
      [project @ 2005-07-12 14:50:10 by simonpj] · dc442241
      simonpj authored
      An earlier commit, liberalising the defaulting rules for ghci,
      messed up the handling of defaulting at the top level.  This
      commit fixes it.
      The current story is that if there's an ambiguous top-level
      multi-parameter constraint (C a b), then a,b won't be defaulted,
      regardless of how a,b are used otherwise.  A type variable is
      defaulted only if it's constrained by single-parameter type classes,
      even in the more-liberal GHCi.
      tcfail142 tests this case.
    • simonmar's avatar
      [project @ 2005-07-12 14:41:00 by simonmar] · 55f1fadd
      simonmar authored
      Give a more helpful error message on platforms for which FFI support
      isn't implemented in GHCi (namely x86_64 at the moment).
    • simonpj's avatar
      [project @ 2005-07-12 13:38:08 by simonpj] · 2f6d1e5e
      simonpj authored
      Check for an unboxed tuple binding
      	f = (# True, False #)
      A fairly recent change, that treats specially non-recursive bindings of a
      single variable, failed to take this into account.
      tcfail141 tests this case.  (Was simpl008.)
    • simonpj's avatar
      [project @ 2005-07-12 13:36:49 by simonpj] · 24c6342c
      simonpj authored
      Comment only
    • simonmar's avatar
      [project @ 2005-07-12 13:01:44 by simonmar] · 995e2f4e
      simonmar authored
      handle PrimTyCons in pprTyConHdr (fixes :i GHC.Base.Int# in GHCi)
    • simonmar's avatar
      [project @ 2005-07-12 12:56:36 by simonmar] · cc1c19ab
      simonmar authored
      export some more bits
    • simonmar's avatar
      [project @ 2005-07-12 11:55:17 by simonmar] · 71306307
      simonmar authored
      Use stgMallocBytesRWX for allocating info tables, since the memory
      needs to be executable (not sure how this is working on OpenBSD right
      now, but it definitely breaks on x86_64/Linux).
  9. 11 Jul, 2005 9 commits
    • simonmar's avatar
      [project @ 2005-07-11 15:34:07 by simonmar] · 86024676
      simonmar authored
      make_constr_itbls: 64-bit fix (size of info table was hardcoded)
    • simonmar's avatar
      [project @ 2005-07-11 14:21:54 by simonmar] · cab13f0f
      simonmar authored
      byte code info tables for x86_64 (same as i386)
    • simonpj's avatar
      [project @ 2005-07-11 10:47:20 by simonpj] · 65785a09
      simonpj authored
      Wibbles to unifyFunTy error messages
    • simonpj's avatar
      [project @ 2005-07-11 10:46:42 by simonpj] · 1360bef3
      simonpj authored
      Improvements to speakN, define speakNOf, move plural from TcSimplify
    • simonmar's avatar
      [project @ 2005-07-11 10:25:43 by simonmar] · b4ab2c41
      simonmar authored
      mingw32: ignore isDoesNotExistError failure from
      Submitted-by: Brian Smith <brianlsmith at gmail.com>
    • simonpj's avatar
      [project @ 2005-07-11 09:54:43 by simonpj] · 9fe510d1
      simonpj authored
      Improve the error message from unifyFunTys.  Previously we got a really
      horrible message from this:
      	  t = ((\Just x -> x) :: Maybe a -> a) (Just 1)
          Couldn't match the rigid variable `a' against `t -> t1'
            Expected type: a
            Inferred type: t -> t1
      Now it's much better:
          The lambda expression `\ Just x -> ...' has two arguments,
          but its type `Maybe a -> a' has only one
          In the expression: (\ Just x -> x) :: Maybe a -> a
      tcfail140 tests some cases
    • simonpj's avatar
      [project @ 2005-07-11 09:48:57 by simonpj] · a6f3a1f8
      simonpj authored
      Fix a bug in the renamer for parallel list comprehensions
      It's surprinsingly tricky to combine 
        a) The parallel scopes for par-list-comps
        b) The general form of the renamer types, whereby
           scoped constructs work like
      	 rnPat :: Pat -> RnM (thing,FreeVars)
      	       -> RnM ((Pat,thing), FreeVars)
           This general shape neatly allows rnPat to
           extend the envt, report unused variables from
           the 'thing' inside, and return the correct set
           of free variables
      But combining (a) and (b) is tricky, and was plain wrong before.
    • simonpj's avatar
      [project @ 2005-07-11 09:48:19 by simonpj] · 0aaa6c3b
      simonpj authored
      Add speakN, and the ability to set printing depth
    • simonmar's avatar
      [project @ 2005-07-11 09:10:58 by simonmar] · 6869e00c
      simonmar authored
      x86_64: Pass -fno-asynchronous-unwind-tables to gcc, which eliminates
      some unnecessary junk from the via-C generated code and allows
      -split-objs to work.