1. 03 Jan, 2012 3 commits
    • Simon Marlow's avatar
      Don't record outputFile in the hashed flags · f283c391
      Simon Marlow authored
      We don't want
      
          ghc --make M -o <file>
      
      to force recompilation of all modules when <file> changes.  The -o
      value is already taken into account by the recompilation machinery
      when we check the modification time on the object file or the
      executable.
      f283c391
    • Simon Peyton Jones's avatar
      Be less verbose when printing out Vars · b2223682
      Simon Peyton Jones authored
      For some reason we were printing every occurrence with its type
      and that is far too much.
      b2223682
    • Simon Peyton Jones's avatar
      Major refactoring of CoAxioms · 98a642cf
      Simon Peyton Jones authored
      This patch should have no user-visible effect.  It implements a
      significant internal refactoring of the way that FC axioms are
      handled.  The ultimate goal is to put us in a position to implement
      "pattern-matching axioms".  But the changes here are only does
      refactoring; there is no change in functionality.
      
      Specifically:
      
       * We now treat data/type family instance declarations very,
         very similarly to types class instance declarations:
      
         - Renamed InstEnv.Instance as InstEnv.ClsInst, for symmetry with
           FamInstEnv.FamInst.  This change does affect the GHC API, but
           for the better I think.
      
         - Previously, each family type/data instance declaration gave rise
           to a *TyCon*; typechecking a type/data instance decl produced
           that TyCon.  Now, each type/data instance gives rise to
           a *FamInst*, by direct analogy with each class instance
           declaration giving rise to a ClsInst.
      
         - Just as each ClsInst contains its evidence, a DFunId, so each FamInst
           contains its evidence, a CoAxiom.  See Note [FamInsts and CoAxioms]
           in FamInstEnv.  The CoAxiom is a System-FC thing, and can relate any
           two types, whereas the FamInst relates directly to the Haskell source
           language construct, and always has a function (F tys) on the LHS.
      
         - Just as a DFunId has its own declaration in an interface file, so now
           do CoAxioms (see IfaceSyn.IfaceAxiom).
      
         These changes give rise to almost all the refactoring.
      
       * We used to have a hack whereby a type family instance produced a dummy
         type synonym, thus
            type instance F Int = Bool -> Bool
         translated to
            axiom FInt :: F Int ~ R:FInt
            type R:FInt = Bool -> Bool
         This was always a hack, and now it's gone.  Instead the type instance
         declaration produces a FamInst, whose axiom has kind
            axiom FInt :: F Int ~ Bool -> Bool
         just as you'd expect.
      
       * Newtypes are done just as before; they generate a CoAxiom. These
         CoAxioms are "implicit" (do not generate an IfaceAxiom declaration),
         unlike the ones coming from family instance declarations.  See
         Note [Implicit axioms] in TyCon
      
      On the whole the code gets significantly nicer.  There were consequential
      tidy-ups in the vectoriser, but I think I got them right.
      98a642cf
  2. 02 Jan, 2012 1 commit
    • Ian Lynagh's avatar
      Fix typo in Makefile · dc6f3a48
      Ian Lynagh authored
      sdist output was being redirected to $src_log, which presumably
      evaluated to rc_log.
      dc6f3a48
  3. 29 Dec, 2011 2 commits
  4. 28 Dec, 2011 1 commit
  5. 23 Dec, 2011 13 commits
  6. 22 Dec, 2011 4 commits
  7. 21 Dec, 2011 1 commit
  8. 20 Dec, 2011 8 commits
  9. 19 Dec, 2011 7 commits
    • Ross Paterson's avatar
      fix #5022: polymorphic definitions inside arrow rec · 4c8e0307
      Ross Paterson authored
      This is quite tricky, with examples like this:
      
      import Control.Arrow
      
      pRepeat :: a -> [a]
      pRepeat =
          proc x -> do
            rec
              s <- returnA -< f_rec x:s       -- f_rec is monomorphic here
              let f_later y = y               -- f_later is polymorphic here
              _ <- returnA -< (f_later True, f_later 'a')
              let f_rec y = y                 -- f_rec is polymorphic here
            returnA -< f_later s              -- f_later is monomorphic here
      
      Fixed the typechecking of arrow RecStmt to track changes to the monad
      version.  It was simplest to add a field recS_later_rets corresponding
      to recS_rec_rets.  It's only used for the arrow version, and always
      empty for the monad version.  But I think it would be cleaner to put
      the rec_ids and later_ids in a single list with supplementary info
      saying how they're used.
      
      Also fixed several glitches in the desugaring of arrow RecStmt.  The fact
      that the monomorphic variables shadow their polymorphic counterparts is a
      major pain.  Also a bit of general cleanup of DsArrows while I was there.
      4c8e0307
    • Ian Lynagh's avatar
      44e18534
    • Simon Peyton Jones's avatar
    • Simon Peyton Jones's avatar
      Tidy up pretty-printing for variables · c492e50b
      Simon Peyton Jones authored
      We already have a class OutputableBndr; this patch adds
      methods pprInfixOcc and pprPrefixOcc, so that we can get
      rid of the hideous hack (the old) Outputable.pprHsVar.
      
      The hack was exposed by Trac #5657, which is thereby fixed.
      c492e50b
    • Ian Lynagh's avatar
      b442c077
    • Ian Lynagh's avatar
      Add a class HasDynFlags(getDynFlags) · 06c6d970
      Ian Lynagh authored
      We no longer have many separate, clashing getDynFlags functions
      
      I've given each GhcMonad its own HasDynFlags instance, rather than
      using UndecidableInstances to make a GhcMonad m => HasDynFlags m
      instance.
      06c6d970
    • Ian Lynagh's avatar
      Remove an old hack for bad FilePath behaviour · 0c047a83
      Ian Lynagh authored
      We now require GHC >= 7.0, which has the behaviour we want.
      0c047a83