1. 16 Oct, 2017 18 commits
  2. 15 Oct, 2017 1 commit
  3. 13 Oct, 2017 1 commit
    • Ryan Scott's avatar
      Delete obsolete docs on GADT interacton with TypeApplications · 2be55b85
      Ryan Scott authored
      Even since ef26182e, this section of
      the users' guide is wrong, as there are no longer special rules for
      the order of type variables in GADT constructors' type signatures
      vis-à-vis visible type application. As a result, this section can
      simply be deleted, as there is no longer anything interesting to say
      about the topic.
      2be55b85
  4. 12 Oct, 2017 4 commits
    • Simon Peyton Jones's avatar
      Re-apply "Typeable: Allow App to match arrow types" · 3de788c4
      Simon Peyton Jones authored
      This re-applies
       commit cc6be3a2
        Author: Ben Gamari <bgamari.foss@gmail.com>
        Date:   Tue Sep 19 18:57:38 2017 -0400
      
          Typeable: Allow App to match arrow types
      
      which was reverted because of Trac #14270.  Now the latter is
      fixed we can re-apply it.
      
      The original ticket was Trac #14236
      3de788c4
    • Simon Peyton Jones's avatar
      Do not bind coercion variables in SpecConstr rules · fb050a33
      Simon Peyton Jones authored
      Trac #14270 showed that SpecConstr could cause nasty Lint failures
      if it generates a RULE that binds coercion varables.  See
      
       * Note [SpecConstr and casts], and
       * the test simplCore/should_compile/T14270.
      
      This doesn't feel like the final word to me, because somehow the
      specialisation "ought" to work.  So I left in a debug WARN to yell if
      the new check acutally fires.
      
      Meanwhile, it stops the erroneous specialisation.
      
      binding coercion
      fb050a33
    • Simon Peyton Jones's avatar
      Add missing T14325.stderr · 15aefb48
      Simon Peyton Jones authored
      15aefb48
    • Simon Peyton Jones's avatar
      Do not quantify over deriving clauses · 82b77ec3
      Simon Peyton Jones authored
      Trac #14331 showed that in a data type decl like
      
         data D = D deriving (C (a :: k))
      
      we were quantifying D over the 'k' in the deriving clause.  Yikes.
      
      Easily fixed, by deleting code in RnTypes.extractDataDefnKindVars
      
      See the discussion on the ticket, esp comment:8.
      82b77ec3
  5. 11 Oct, 2017 11 commits
    • Simon Peyton Jones's avatar
      Add a missing zonk in TcDerivInfer.simplifyDeriv · 13fdca3d
      Simon Peyton Jones authored
      I'm astonished that anything worked without this!
      
      Fixes Trac #14339
      13fdca3d
    • Simon Peyton Jones's avatar
      Avoid creating dependent types in FloatOut · 4bb54a45
      Simon Peyton Jones authored
      This bug was exposed by Trac #14270.  The problem and its cure
      is described in SetLevels, Note [Floating and kind casts].
      
      It's simple and will affect very few programs.  But the very
      fact that it was so unexpected is discomforting.
      4bb54a45
    • Alan Zimmerman's avatar
      Pretty-printing of derived multi-parameter classes omits parentheses · 6869864e
      Alan Zimmerman authored
      Summary:
      Pretty printing a splice with an HsAppType in the deriving clause, such as
      
          $([d| data Foo a = Foo a deriving (C a) |])
      
      would omit the parens.
      
      Test Plan: ./validate
      
      Reviewers: RyanGlScott, austin, bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #14289
      
      Differential Revision: https://phabricator.haskell.org/D4056
      6869864e
    • Ryan Scott's avatar
      Fix #10816 by renaming FixitySigs more consistently · 9c3f7316
      Ryan Scott authored
      Summary:
      #10816 surfaced because we were renaming top-level fixity
      declarations with a different code path (`rnSrcFixityDecl`) than
      the code path for fixity declarations inside of type classes, which
      is not privy to names that exist in the type namespace. Luckily, the
      fix is simple: use `rnSrcFixityDecl` in both places.
      
      Test Plan: make test TEST=T10816
      
      Reviewers: austin, bgamari, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: simonpj, rwbarton, thomie
      
      GHC Trac Issues: #10816
      
      Differential Revision: https://phabricator.haskell.org/D4077
      9c3f7316
    • Simon Peyton Jones's avatar
      Remove wc_insol from WantedConstraints · f20cf982
      Simon Peyton Jones authored
      This patch is a pure refactoring, which I've wanted to do for
      some time.  The main payload is
      
      * Remove the wc_insol field from WantedConstraints;
        instead put all the insolubles in wc_simple
      
      * Remove inert_insols from InertCans
        Instead put all the insolubles in inert_irreds
      
      * Add a cc_insol flag to CIrredCan, to record that
        the constraint is definitely insoluble
      
      Reasons
      
      * Quite a bit of code gets slightly simpler
      * Fewer concepts to keep separate
      * Insolubles don't happen at all in production code that is
        just being recompiled, so previously there was a lot of
        moving-about of empty sets
      
      A couple of error messages acutally improved.
      f20cf982
    • Simon Peyton Jones's avatar
      Delete two unused functions · 3e44562a
      Simon Peyton Jones authored
      Delete unused functions
             pprArrowChain
             pprPrefixApp
      
      from TyCoRep
      3e44562a
    • Simon Peyton Jones's avatar
      Change "cobox" to "co" in debug output · 79ae03aa
      Simon Peyton Jones authored
      These coercions are /not/ boxed, so "cobox" is positively misleading.
      And it's longer than necessary.
      79ae03aa
    • Simon Peyton Jones's avatar
      Fix over-eager error suppression in TcErrors · c81f66cc
      Simon Peyton Jones authored
      See Note [Given insolubles] in TcRnTypes
      
      Fixes Trac #14325.
      c81f66cc
    • Simon Peyton Jones's avatar
      Minor refactoring · 461c8316
      Simon Peyton Jones authored
      I'm trying to understand Check.hs.  This patch is a very
      minor refactoring.  No change in behaviour.
      461c8316
    • Simon Peyton Jones's avatar
      Typos in comments only · ab1a7583
      Simon Peyton Jones authored
      ab1a7583
    • Simon Peyton Jones's avatar
      Tidy up some convoluted "child/parent" code · 7720c293
      Simon Peyton Jones authored
      In investigating something else (Trac #14307) I encountered the
      wonders of TcRnExports.lookupChildrenExport, and the data
      type ChildLookupResult.
      
      I managed to remove the NameErr constructor from ChildLookupResult,
      and simplify the code significantly at the same time.
      
      This is just refactoring; no change in behaviour.
      7720c293
  6. 10 Oct, 2017 1 commit
    • Tamar Christina's avatar
      Split SysTools up some · e51e565d
      Tamar Christina authored
      Summary:
      SysTools and DriverTools have an annoying mutual dependency.
      They also each contain pieces of the linker. In order for
      changes to be shared between the library and the exe linking
      code this dependency needs to be broken in order to avoid
      using hs-boot files.
      
      Reviewers: austin, bgamari, erikd
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D4071
      e51e565d
  7. 07 Oct, 2017 3 commits
    • Ryan Scott's avatar
      Simply Data instance context for AmbiguousFieldOcc · f337a208
      Ryan Scott authored
      The current, verbose instance context can be compacted into
      `DataId pass`. Indeed, that's what most of the `Data` instances
      in this module already do, so this just makes things consistent.
      f337a208
    • Ryan Scott's avatar
      Fix #14320 by looking through HsParTy in more places · f1d2db68
      Ryan Scott authored
      Summary:
      GHC was needlessly rejecting GADT constructors' type
      signatures that were surrounded in parentheses due to the fact that
      `splitLHsForAllTy` and `splitLHsQualTy` (which are used to check as
      part of checking if GADT constructor return types are correct)
      weren't looking through parentheses (i.e., `HsParTy`). This is
      easily fixed, though.
      
      Test Plan: make test TEST=T14320
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #14320
      
      Differential Revision: https://phabricator.haskell.org/D4072
      f1d2db68
    • Ryan Scott's avatar
      Incorporate changes from #11721 into Template Haskell · 341d3a78
      Ryan Scott authored
      Summary:
      #11721 changed the order of type variables in GADT
      constructor type signatures, but these changes weren't reflected in
      Template Haskell reification of GADTs. Let's do that.
      
      Along the way, I:
      
      * noticed that the `T13885` test was claiming to test TH reification
        of GADTs, but the reified data type wasn't actually a GADT! Since
        this patch touches that part of the codebase, I decided to fix
        this.
      * incorporated some feedback from @simonpj in
        https://phabricator.haskell.org/D3687#113566. (These changes alone
        don't account for any different in behavior.)
      
      Test Plan: make test TEST=T11721_TH
      
      Reviewers: goldfire, austin, bgamari, simonpj
      
      Reviewed By: goldfire, bgamari, simonpj
      
      Subscribers: rwbarton, thomie, simonpj
      
      GHC Trac Issues: #11721
      
      Differential Revision: https://phabricator.haskell.org/D4070
      341d3a78
  8. 06 Oct, 2017 1 commit