1. 23 Dec, 2014 7 commits
    • 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
      a6f0f5ab
    • Simon Peyton Jones's avatar
      Add a small comment · 625dd7b6
      Simon Peyton Jones authored
      625dd7b6
    • joehillen's avatar
      always use 'mkdir -p' and fix missing dir (fixes #9876) · 9fc3aebd
      joehillen authored
      Summary: Signed-off-by: Joe Hillenbrand <joehillen@gmail.com>
      
      Reviewers: thomie, austin
      
      Reviewed By: thomie, austin
      
      Subscribers: carter, thomie
      
      Differential Revision: https://phabricator.haskell.org/D566
      
      GHC Trac Issues: #9876
      9fc3aebd
    • Sergei Trofimovich's avatar
      dwarf: sync getIdFromTrivialExpr with exprIsTrivial (test break028 and others) · 30fdf86e
      Sergei Trofimovich authored
      Summary:
      The bug manifests when built with
          EXTRA_HC_OPTS += -g
      
      +++ ./ghci.debugger/scripts/break028.run.stderr 2014-12-19 23:08:46.199876621 +0000
      @@ -0,0 +1,11 @@
      +ghc-stage2: panic! (the 'impossible' happened)
      +  (GHC version 7.9.20141219 for x86_64-unknown-linux):
      +       getIdFromTrivialExpr x_alJ
      +
      +Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
      
      
      +
      +
      +<interactive>:3:1: Not in scope: ‘g’
      +
      +<interactive>:3:3: Not in scope: data constructor ‘False’
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
      
      Reviewers: simonmar, austin, scpmw
      
      Reviewed By: scpmw
      
      Subscribers: carter, thomie
      
      Differential Revision: https://phabricator.haskell.org/D580
      30fdf86e
    • thomasw's avatar
      Rename NamedWildcards flag to NamedWildCards · 089222c9
      thomasw authored
      Summary:
      Mind the capital C. As there is already a flag RecordWildCards with a capital
      C, we should at least try to be consistent in the spelling of WildCards.
      
      Test Plan: validate
      
      Reviewers: goldfire, simonpj, austin
      
      Reviewed By: simonpj, austin
      
      Subscribers: carter, thomie
      
      Differential Revision: https://phabricator.haskell.org/D584
      089222c9
    • thomasw's avatar
      Fix panic on :kind _ in GHCi (Trac #9879) · 6eb86a56
      thomasw authored
      Summary:
      Running `:kind _` in GHCi produced a panic, fix it by extracting the
      wildcards. Now, `:kind _` produces `_ :: k0`. Unfortunately, a `0` is
      added after the kind is tidied and I haven't found a way to get rid of
      it...
      
      This does not fix the other panic involving TemplateHaskell mentioned
      in #9879.
      
      Test Plan: new test GHCiWildcardKind should pass
      
      Reviewers: austin, simonpj
      
      Reviewed By: austin
      
      Subscribers: simonpj, carter, thomie, monoidal
      
      Differential Revision: https://phabricator.haskell.org/D572
      
      GHC Trac Issues: #9879
      6eb86a56
    • Austin Seipp's avatar
      docs: create 7.12.1 relnotes · e435a094
      Austin Seipp authored
      
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      e435a094
  2. 22 Dec, 2014 12 commits
  3. 21 Dec, 2014 2 commits
  4. 20 Dec, 2014 6 commits
  5. 19 Dec, 2014 13 commits