1. 12 Jan, 2014 1 commit
    • Gabor Greif's avatar
      fix a mistyped label that caused a stray reference · a924debc
      Gabor Greif authored
      Richard, you may want to regenerate the PDF
      as I get
      
      ! LaTeX Error: File `stmaryrd.sty' not found.
      
      with my setup and do not want to mess things up.
      
      Also for me ?? appear twice on top of the page 13
      and I have tp 'rm core-spec.pdf; make' to get it
      right.
      a924debc
  2. 11 Jan, 2014 2 commits
  3. 10 Jan, 2014 9 commits
  4. 09 Jan, 2014 8 commits
    • Simon Peyton Jones's avatar
      Comments only · 15a3de12
      Simon Peyton Jones authored
      15a3de12
    • Simon Peyton Jones's avatar
      Re-work the naming story for the GHCi prompt (Trac #8649) · 73c08ab1
      Simon Peyton Jones authored
      The basic idea here is simple, and described in Note [The interactive package]
      in HscTypes, which starts thus:
      
          Note [The interactive package]
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          Type and class declarations at the command prompt are treated as if
          they were defined in modules
             interactive:Ghci1
             interactive:Ghci2
             ...etc...
          with each bunch of declarations using a new module, all sharing a
          common package 'interactive' (see Module.interactivePackageId, and
          PrelNames.mkInteractiveModule).
      
          This scheme deals well with shadowing.  For example:
      
             ghci> data T = A
             ghci> data T = B
             ghci> :i A
             data Ghci1.T = A  -- Defined at <interactive>:2:10
      
          Here we must display info about constructor A, but its type T has been
          shadowed by the second declaration.  But it has a respectable
          qualified name (Ghci1.T), and its source location says where it was
          defined.
      
          So the main invariant continues to hold, that in any session an original
          name M.T only refers to oe unique thing.  (In a previous iteration both
          the T's above were called :Interactive.T, albeit with different uniques,
          which gave rise to all sorts of trouble.)
      
      This scheme deals nicely with the original problem.  It allows us to
      eliminate a couple of grotseque hacks
        - Note [Outputable Orig RdrName] in HscTypes
        - Note [interactive name cache] in IfaceEnv
      (both these comments have gone, because the hacks they describe are no
      longer necessary). I was also able to simplify Outputable.QueryQualifyName,
      so that it takes a Module/OccName as args rather than a Name.
      
      However, matters are never simple, and this change took me an
      unreasonably long time to get right.  There are some details in
      Note [The interactive package] in HscTypes.
      73c08ab1
    • Simon Peyton Jones's avatar
      Further improve the "same-occurrence" error messages (Trac #8278) · 322b48b9
      Simon Peyton Jones authored
      Sometimes we actually have a good SrcSpan for the type constructor
      and reporting that is better than just reporting which module it
      was defined on
      322b48b9
    • Simon Peyton Jones's avatar
    • Simon Peyton Jones's avatar
      Improve documentation of :module etc (Trac #8622) · 0ec53020
      Simon Peyton Jones authored
      I did quite a bit of restructuring, as well as adding
      the note specifically referred to in #8622
      0ec53020
    • Simon Peyton Jones's avatar
      Comment typo · 0f737cef
      Simon Peyton Jones authored
      0f737cef
    • Simon Peyton Jones's avatar
      Further refine the test for 'given' equalities · 5d2fb2ee
      Simon Peyton Jones authored
      Trac #8651 revealed that my previous fix (itself in response to #8644)
      wasn't quite right.  The plan, using the CtOrigin to identify
      constraints arising from flattening, is described in TcSimplify,
      Note [When does an implication have given equalities?]
      5d2fb2ee
    • Austin Seipp's avatar
      Document Proxy# (#8658) · d4f0fcf3
      Austin Seipp authored
      
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      d4f0fcf3
  5. 08 Jan, 2014 1 commit
  6. 07 Jan, 2014 12 commits
  7. 03 Jan, 2014 6 commits
    • Benno Fünfstück's avatar
      Fix #5209: Reset GHCi prompt in multiline mode · 4d70840d
      Benno Fünfstück authored
      GHCi didn't reset the multiline prompt when an exception (in particular,
      the UserInterrupt exception) occured. This commit uses `finally` to
      reset the prompt in all cases.
      4d70840d
    • Simon Peyton Jones's avatar
      Improve the equality-floating story (again), to fix Trac #8644 · 9e10d188
      Simon Peyton Jones authored
      We float equalities out of implications whose 'givens' include equalities.
      But it's a bit tricky knowing whether some givens do or do not include
      equalities, as #8644 shows.  There the given has type 'c' (which might
      have equalities), but we discover that 'c ~ ()', which definitely doesn't.
      
      In short, we must look at the givens *after* normalisation, not before.
      Moreover, something similar happens in approximateWC, where we need
      to ask whether an implication has given equalities.
      
      This patch does the job:
      
      * Add a Boolean field inert_no_eqs to InertCans, which records
        whether we've added a non-constant equality
      
      * Add a field ic_no_eqs to Implication, which records whether the
        ic_given binders include any equalities
      
      * Get rid of Inst.hasEqualities altogether
      
      On the way I did some un-forced refactoring
      
      * Introduce the auxiliary function TcCanonical.flattenNestedFamApp
      
      * Kill off FamHeadMap and PredMap in favour of
        the new FunEqMap and DictMap respectively
      9e10d188
    • Simon Peyton Jones's avatar
      Refactor the way shadowing in handled in GHCi · 5dffb4ac
      Simon Peyton Jones authored
      If you say
        ghci> import Foo( T )
        ghci> data T = MkT
        ghci> data T = XXX
      then the second 'data T' should shadow the first.  But the qualified
      Foo.T should still be available.  We really weren't handling this
      correctly at all, resulting in Trac #8639 and #8628 among others
      
      This patch:
      
      * Add RdrName.extendGlobalRdrEnv, which does shadowing properly
      
      * Change HscTypes.icExtendGblRdrEnv (was badly-named icPlusGblRdrEnv)
        to use the new function
      
      * Change RnNames.extendGobalRdrEnvRn to use the new function
      
      * Move gresFrom Avails into RdrName
      * Better pprGlobalRdrEnv function in RdrName
      5dffb4ac
    • Simon Peyton Jones's avatar
      Improve error message when using qualified names in GHCi · e60a841b
      Simon Peyton Jones authored
      When you say
        ghci> :i Foo.x
      GHCi tries to find module Foo and get 'x' from it.  But
      if Foo doesn't exist we don't want to say:
        Attempting to use module ‛Foo’ which is not loaded
      
      This is a bit confusing. Rather we just want to say that
      Foo.x is not in scope.
      e60a841b
    • Simon Peyton Jones's avatar
      Add alterOccEnv · 5c4265f2
      Simon Peyton Jones authored
      5c4265f2
    • Simon Peyton Jones's avatar
      Use the GlobalRdrEnv when renaming the axuiliary bindings in 'deriving' · 4853be24
      Simon Peyton Jones authored
      I'm not sure why were were using bindLocalNames before, but it triggers
      an assert failure that checks that local names are Internal.  This
      change makes things more uniform and straightforward.
      4853be24
  8. 02 Jan, 2014 1 commit