1. 06 Jan, 2015 1 commit
    • Simon Peyton Jones's avatar
      Make the location in TcLclEnv and CtLoc into a RealSrcSpan · d2b6e767
      Simon Peyton Jones authored
      Previously it was a SrcSpan, which can be an UnhelpulSrcSpan,
      but actually for TcLclEnv and CtLoc we always know it is
      a real source location, and it's good to make the types
      reflect that fact.
      There is a continuing slight awkwardness (not new with this
      patch) about what "file name" to use for GHCi code.  Current
      we say "<interactive>" which seems just about OK.
  2. 05 Jan, 2015 1 commit
  3. 03 Jan, 2015 4 commits
  4. 31 Dec, 2014 2 commits
    • Simon Peyton Jones's avatar
      When solving one Given from another, use the depth to control which way round · d8d00318
      Simon Peyton Jones authored
      See Note [Replacement vs keeping].
      There's a bit further to go with this change (to report unused givens).
      But it's already an improvement; see the latent bug described in the Note.
    • Simon Peyton Jones's avatar
      Eliminate the final two calls to xCtEvidence · fd97d2a7
      Simon Peyton Jones authored
      I always found calls to TcCanonical.xCtEvidence hard to grok; and I
      found that we only had two left. This patch eliminates them, along
      with xCtEvidence, its accompanying comments, and the auxiliary
      XEvTerm type.
      The two remaining calls were these:
       * One was in newSCWorkFromFlavored, where we'd already done
         case-splitting for given/wanted/derived.  So inlining the xCtEvidence
         made the code simpler, clearer, and faster.
       * The other was in canTuple; here all of xCtEvidence's functionality
         was needed, but inlining again made a net gain in code size and
  5. 30 Dec, 2014 5 commits
  6. 29 Dec, 2014 4 commits
  7. 28 Dec, 2014 5 commits
  8. 27 Dec, 2014 7 commits
  9. 25 Dec, 2014 1 commit
  10. 24 Dec, 2014 1 commit
    • rwbarton's avatar
      Fix linker interaction between Template Haskell and HPC (#9762) · 3e3aa925
      rwbarton authored
      I'm not really happy about perpetuating the hackish fix for #8696,
      but at least in the context of building with -fhpc, the performance
      cost should be negligible.
      I'm suspicious about PlainModuleInitLabel and the Windows stuff too,
      but I don't know what it does / can't test it (respectively) so I'll
      leave those alone for now.
      Hopefully out-of-process TH will save us from these hacks some day.
      The test is an adaptation of T8696. It's a bit more awkward since
      I couldn't think of a way to get cross-module tickbox references
      without optimizations (inlining), but ghci doesn't permit -O for
      some reason.
      Test Plan: harbormaster; validate
      Reviewers: austin
      Reviewed By: austin
      Subscribers: carter, thomie
      Differential Revision: https://phabricator.haskell.org/D583
      GHC Trac Issues: #9762
  11. 23 Dec, 2014 9 commits
    • rwbarton's avatar
      Make ghc -e fail on invalid declarations · cc510b46
      rwbarton authored
      Note: This commit includes an API change to GhciMonad.runDecls
      to allow the caller to determine whether the declarations were
      run successfully or not.
      Test Plan: harbormaster
      Reviewers: austin
      Reviewed By: austin
      Subscribers: carter, thomie
      Differential Revision: https://phabricator.haskell.org/D582
    • rwbarton's avatar
      Make ghc -e not exit on valid import commands (#9905) · 878910e1
      rwbarton authored
      Some Trues and Falses were mixed up due to Bool being used in
      different senses in different parts of GHCi.
      Test Plan: harbormaster; validate
      Reviewers: austin
      Reviewed By: austin
      Subscribers: carter, thomie
      Differential Revision: https://phabricator.haskell.org/D581
      GHC Trac Issues: #9905
    • Herbert Valerio Riedel's avatar
      Fixup edd233ac (T9032 test) · 7a2c9dde
      Herbert Valerio Riedel authored
      This is not a proper fix as the `x` in `make[x]: ...` changes depending on how
      the testsuite was called. So this probably only works when invoked via ./validate.
    • Simon Peyton Jones's avatar
      Test earlier for self-import (Trac #9032) · edd233ac
      Simon Peyton Jones authored
      This patch makes the renamer check for self-import, especially when
      dependencies change, because the typechecker can fall over if that
      I'm still uneasy about *indirect* self-import, but I'll leave that for
      another day
    • Simon Peyton Jones's avatar
      Attempt to improve cleaning · c3394e0d
      Simon Peyton Jones authored
      I found several tests that failed when the interface file format changed,
      due to leftover .hi file droppings.
      I'm not sure I've done this right, but it should be a bit better
    • Simon Peyton Jones's avatar
      A bit of refactoring to TcErrors · 679a6618
      Simon Peyton Jones authored
      This replaces a bunch of boolean flags in ReportErrCtxt with
      an algebraic data type to say how to handle expression holes
      and type holes
      No change in functionality; I just found myself unable to understand
      the code easily, when thinking about something else.  Result is
      quite nice, I think.
    • Simon Peyton Jones's avatar
      Comments only · c407b5a6
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
    • Simon Peyton Jones's avatar
      Eliminate so-called "silent superclass parameters" · a6f0f5ab
      Simon Peyton Jones authored
      The purpose of silent superclass parameters was to solve the
      awkward problem of superclass dictinaries being bound to bottom.
      See THE PROBLEM in Note [Recursive superclasses] in TcInstDcls
      Although the silent-superclass idea worked,
        * It had non-local consequences, and had effects even in Haddock,
          where we had to discard silent parameters before displaying
          instance declarations
        * It had unexpected peformance costs, shown up by Trac #3064 and its
          test case.  In monad-transformer code, when constructing a Monad
          dictionary you had to pass an Applicative dictionary; and to
          construct that you neede a Functor dictionary. Yet these extra
          dictionaries were often never used.  (All this got much worse when
          we added Applicative as a superclass of Monad.) Test T3064
          compiled *far* faster after silent superclasses were eliminated.
        * It introduced new bugs.  For example SilentParametersOverlapping,
          T5051, and T7862, all failed to compile because of instance overlap
          directly because of the silent-superclass trick.
      So this patch takes a new approach, which I worked out with Dimitrios
      in the closing hours before Christmas.  It is described in detail
      in THE PROBLEM in Note [Recursive superclasses] in TcInstDcls.
      Seems to work great!
      Quite a bit of knock-on effect
       * The main implementation work is in tcSuperClasses in TcInstDcls
         Everything else is fall-out
       * IdInfo.DFunId no longer needs its n-silent argument
         * Ditto IDFunId in IfaceSyn
         * Hence interface file format changes
       * Now that DFunIds do not have silent superclass parameters, printing
         out instance declarations is simpler. There is tiny knock-on effect
         in Haddock, so that submodule is updated
       * I realised that when computing the "size of a dictionary type"
         in TcValidity.sizePred, we should be rather conservative about
         type functions, which can arbitrarily increase the size of a type.
         Hence the new datatype TypeSize, which has a TSBig constructor for
         "arbitrarily big".
       * instDFunType moves from TcSMonad to Inst
       * Interestingly, CmmNode and CmmExpr both now need a non-silent
         (Ord r) in a couple of instance declarations. These were previously
         silent but must now be explicit.
       * Quite a bit of wibbling in error messages