1. 09 Mar, 2005 6 commits
    • simonpj's avatar
      [project @ 2005-03-09 17:51:03 by simonpj] · 95daf246
      simonpj authored
      Comments
      95daf246
    • simonpj's avatar
      [project @ 2005-03-09 16:58:15 by simonpj] · f1fd0522
      simonpj authored
      Add parser support for infix type-variable operators
      f1fd0522
    • simonpj's avatar
      [project @ 2005-03-09 14:26:56 by simonpj] · aca101dd
      simonpj authored
      Fix the superclass translation for instance decls
      			Merge to STABLE
      
      There is a long-standing difficulty whereby it's surprisingly easy 
      to accidentally generate an entirely-bogus recursive dictionary when 
      generating the definitions for the superclasses of an instance decl.
      
      The problem arises because the default story is that whenever we
      add a constraint to our pile of solved constraints, we automatically
      add all its superclasses.  But that is simply wrong when we are trying
      to generate superclasses. 
      
      Solution: do no auto-superclass addition when solving the superclass
      constraints of an instance declaration.  I think should fix it once and
      for all.  
      
      	tcrun021, tcrun033 are test cases
      
      tcrun033 showed up the bug; thanks to Simon Foster and Ralf Laemmel.
      aca101dd
    • simonpj's avatar
      [project @ 2005-03-09 10:56:09 by simonpj] · 0d197643
      simonpj authored
      Add missing provenance for mfix; pls merge
      0d197643
    • simonmar's avatar
      [project @ 2005-03-09 10:38:17 by simonmar] · d04c4288
      simonmar authored
      Use a different magic number (0x1face64) for 64-bit interface files.
      This will prevent us trying to read the dictionary out of a 32-bit
      interface file on a 64-bit machine.
      d04c4288
    • simonmar's avatar
      [project @ 2005-03-09 10:36:38 by simonmar] · 1c63991c
      simonmar authored
      revert previous change, it didn't work
      1c63991c
  2. 08 Mar, 2005 7 commits
  3. 07 Mar, 2005 6 commits
    • simonpj's avatar
      [project @ 2005-03-07 17:46:24 by simonpj] · a1636622
      simonpj authored
      -----------------------------------------
             Make sure that LiberateCase only binds Internal Names
      	-----------------------------------------
      
      	Merge to STABLE
      
      The nested bindings generated by LiberateCase should be Internal as
      well as not-exported.  Otherwise an External Name can float to top level,
      where it might name-clash with another one.
      a1636622
    • simonpj's avatar
      [project @ 2005-03-07 16:46:08 by simonpj] · 36d22a1c
      simonpj authored
      -----------------------------------------
             Fix a long-standing indirection-zapping bug
      	-----------------------------------------
      
      	Merge to STABLE
      
      Up to now we zap indirections as part of the occurence analyser.
      But this is bogus.  The indirection zapper does the following:
      
      	x_local = <expression>
      	...bindings...
      	x_exported = x_local
      
      where x_exported is exported, and x_local is not, then we
      replace it with this:
      
      	x_exported = <expression>
      	x_local = x_exported
      	...bindings...
      
      But this is plain wrong if x_exported has a RULE that mentions
      something (f, say) in ...bindings.., because 'f' will then die.
      
      After hacking a few solutions, I've eventually simply made the indirection
      zapping into a separate pass (which is cleaner anyway), which wraps the
      entire program back into a single Rec if the bad thing can happen.
      
      On the way I've made indirection-zapping work in Recs too, which wasn't the
      case before.
      
      * Move the zapper from OccurAnal into SimplCore
      * Tidy up the printing of pragmas (PprCore and friends)
      * Add a new function Rules.addRules
      * Merge rules in the indirection zapper (previously one set was discarded)
      36d22a1c
    • simonmar's avatar
      [project @ 2005-03-07 15:59:27 by simonmar] · 30d8d383
      simonmar authored
      Include WORD_SIZE_IN_BITS in the interface header, and test it when
      reading.  Fixes a problem whereby GHC on a 64-bit platform will crash
      if it tries to read an interface file generated by the same version of
      GHC on a 32-bit platform.
      30d8d383
    • simonpj's avatar
      [project @ 2005-03-07 15:16:58 by simonpj] · bcacf0b7
      simonpj authored
      -----------------------------------------
             Fix scoping bug for quantified type variables
      	-----------------------------------------
      
      	Merge to STABLE
      
      When instantiating a declaration type signature, make sure to instantiate
      fresh names for non-scoped type variables, else they may be spuriously shared.
      Turns out that the test lib/Generics/reify tests this, which is good.
      
      Comments are with TcMType.tcInstSigType
      bcacf0b7
    • simonmar's avatar
      [project @ 2005-03-07 15:16:41 by simonmar] · 57f94a24
      simonmar authored
      Try once more to get this #include right, and add a comment
      57f94a24
    • simonmar's avatar
      [project @ 2005-03-07 14:52:20 by simonmar] · 0c7c7de8
      simonmar authored
      ghc_boot_platform.h is the right way to get hold of the platform
      defines inside the compiler.
      0c7c7de8
  4. 04 Mar, 2005 2 commits
    • sof's avatar
      [project @ 2005-03-04 19:19:56 by sof] · 75d52d81
      sof authored
      Since MachDeps.h doesn't include ghcconfig.h, include it specifically here
      (for the benefit of mingw). That may not be the right file to use in the
      grander scheme of things tho.
      
      Merge to STABLE (or something equivalent; as-is STABLE doesn't build on mingw.)
      75d52d81
    • simonmar's avatar
      [project @ 2005-03-04 12:04:00 by simonmar] · caa7c91d
      simonmar authored
      We shouldn't be including ghcconfig.h here
      caa7c91d
  5. 03 Mar, 2005 1 commit
    • chak's avatar
      [project @ 2005-03-03 11:48:02 by chak] · 706ebc79
      chak authored
      Merge to STABLE
      
      Fixed two bugs:
      * #1035575 from SourceForge (by adding smart constructors for source tuple
        construction at value and type level)
      * Parallel array comprehensions were handled wrongly
        - The singleton expression-pattern pair `()'-`[:():]' is the neutral element
          for cross products (comma notation in comprehensions), but not for
          parallel comprehensions.
        - Now groups of parallel statements are handled separately (which is more
          like the vanilla list comprehension case).
        - The code is too general in that it correctly handles cross-products of
          groups of parallel qualifiers.  As this is correctly handled in the
          list and the array comprehension case, the syntax may be generalised to
          allow arbitrary nesting of cross-products and parallel qualifiers.
      706ebc79
  6. 02 Mar, 2005 2 commits
  7. 01 Mar, 2005 3 commits
    • simonpj's avatar
      [project @ 2005-03-01 21:40:40 by simonpj] · ff818166
      simonpj authored
      Type signatures and skolem constants (again)
      		Merge to STABLE
      
      This commit lays to rest the vexed question of skolem constants
      and type signatures.  My fix last week made type-signature variables
      into ordinary meta type variables, because they can be unified
      together (see Note [Signature skolems] in TcType).  But that was wrong
      becuase GADTs will only refine skolems.
      
      So this commit extends TcTyVarDetails with a new constructors, SigSkolTv,
      which is a skolem (like SkolemTv) but is unifiable (like MetaTv).  It's
      a bit of a hack, but the code came out quite nicely.
      
      Now the GADT tests work.
      ff818166
    • simonmar's avatar
      [project @ 2005-03-01 11:51:14 by simonmar] · 24f3d678
      simonmar authored
      More dependencies required by 'make -j8'
      24f3d678
    • simonpj's avatar
      [project @ 2005-03-01 05:49:43 by simonpj] · 6d36af4a
      simonpj authored
      Make desugaring of pattern-matching much more civilised.
      
      Before this change we wrapped new bindings around the
      right hand side; but that meant they ended up wrapped
      in reverse order.  Now we accumulate the bindings
      separately, in the eqn_wrap field of an EqnInfo.
      
      This cures a desugaring bug encountered by Akos Korosmezey
      immortalised as ds055
      6d36af4a
  8. 28 Feb, 2005 5 commits
  9. 25 Feb, 2005 6 commits
    • simonpj's avatar
      [project @ 2005-02-25 14:15:53 by simonpj] · 9ced2b59
      simonpj authored
      -----------------------------------------
      	Improve ambiguity reporting in TcSimplify
      	-----------------------------------------
      
      	Merge to STABLE
      
      The test for ambiguity in tcSimplifyTop caused us to say thing like
      	No instance for (Show c)
      which is a bit confusing -- and in fact exposed a separate buglet in
      the fix-reporting code.
      
      This commit deals with the origial problem.  tcfail133 tests it.
      9ced2b59
    • simonpj's avatar
      [project @ 2005-02-25 13:57:05 by simonpj] · 57983d16
      simonpj authored
      Wibble to last commit
      57983d16
    • simonpj's avatar
      [project @ 2005-02-25 13:54:41 by simonpj] · a42ead96
      simonpj authored
      Prevent a crash; reason the situation arises in the first place is still unclear
      a42ead96
    • simonpj's avatar
      [project @ 2005-02-25 13:06:31 by simonpj] · 8e67f550
      simonpj authored
      ---------------------------------------------
      Type signatures are no longer instantiated with skolem constants
      	---------------------------------------------
      
      	Merge to STABLE
      
      Consider
      
        p :: a
        q :: b
        (p,q,r) = (r,r,p)
      
      Here, 'a' and 'b' end up being the same, because they are both bound
      to the type for 'r', which is just a meta type variable.  So 'a' and 'b'
      can't be skolems.
      
      Sigh.  This commit goes back to an earlier way of doing things, by
      arranging that type signatures get instantiated with *meta* type
      variables; then at the end we must check that they have not been
      unified with types, nor with each other.
      
      This is a real bore.  I had to do quite a bit of related fiddling around
      to make error messages come out right.  Improved one or two.
      
      Also a small unrelated fix to make
      	:i (:+)
      print with parens in ghci.  Sorry this got mixed up in the same commit.
      8e67f550
    • simonpj's avatar
      [project @ 2005-02-25 12:50:48 by simonpj] · d9fd6a66
      simonpj authored
      Profiling addition
      d9fd6a66
    • simonpj's avatar
      [project @ 2005-02-25 12:49:47 by simonpj] · 5dfcae0c
      simonpj authored
      Spelling
      5dfcae0c
  10. 23 Feb, 2005 2 commits