1. 14 Mar, 2017 7 commits
    • Tamar Christina's avatar
      Fix Windows GCC driver · 4b673e80
      Tamar Christina authored
      In Windows 10 Insiders build 15019+ which will probably be released
      mainstream somewhere this year Microsoft seems to have started being
      stricter with API calls.
      
      The call to `FreeConsole` just after `CreateProcess` is making Windows
      treat the process
      as an interactive process. In which case it tries to use the `Desktop
      session` but fails resulting
      in the cryptic error reported.
      
      I don't understand why the call to `FreeConsole` was there and it
      doesn't seem to be needed,
      so removed.
      
      This fixes #13411
      
      Test Plan: ./validate, alternative just do anything with ghc which
      requires compilation.
      
      Reviewers: austin, bgamari, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D3319
      4b673e80
    • Ryan Scott's avatar
      Allow associated types to pattern-match in non-class-bound variables · 67345ccf
      Ryan Scott authored
      Summary:
      After 8136a5cb (#11450), if you have
      a class with an associated type:
      
      ```
      class C a where
        type T a b
      ```
      
      And you try to create an instance of `C` like this:
      
      ```
      instance C Int where
        type T Int Char = Bool
      ```
      
      Then it is rejected, since you're trying to instantiate the variable ``b`` with
      something other than a type variable. But this restriction proves quite
      onerous in practice, as it prevents you from doing things like this:
      
      ```
      class C a where
        type T a (b :: Identity c) :: c
      
      instance C Int where
        type T Int ('Identity x) = x
      ```
      
      You have to resort to an auxiliary type family in order to define this now,
      which becomes extremely tiring. This lifts this restriction and fixes #13398,
      in which it was discovered that adding this restriction broke code in the wild.
      
      Test Plan: ./validate
      
      Reviewers: simonpj, bgamari, austin
      
      Reviewed By: simonpj
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3302
      67345ccf
    • Ryan Scott's avatar
      Further document :type +v's role in analyzing -XTypeApplications in GHCi · b335f506
      Ryan Scott authored
      Summary:
      The section on `-XTypeApplications` in the users' guide isn't terribly
      clear on how to view the visibility of a function type signature's type
      variables in GHCi properly (i.e., using the `:type +v` GHCi command). This
      adds some more exposition that demonstrates how to use `:type +v` (and why you
      don't want to use `:type`).
      
      Fixes #13401.
      
      Test Plan: Eyeball it
      
      Reviewers: bgamari, austin, goldfire, crockeea
      
      Reviewed By: goldfire, crockeea
      
      Subscribers: rwbarton, thomie, crockeea
      
      Differential Revision: https://phabricator.haskell.org/D3310
      b335f506
    • Ben Gamari's avatar
      testsuite: Bump allocations for T4029 · 34f9172f
      Ben Gamari authored
      Both the OS X build machine and my local builds have been failing.
      Unfortunately, our x86_64 Linux machine has been succeeding.
      34f9172f
    • Ben Gamari's avatar
      Introduce and use mkLetRec, mkLetNonRec · 1217df48
      Ben Gamari authored
      Test Plan: Validate
      
      Reviewers: austin
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3303
      1217df48
    • Simon Peyton Jones's avatar
      Fix CaseIdentity optimisation AGAIN · 82b40598
      Simon Peyton Jones authored
      In this commit
          commit 02ac2974
          Author: Simon Peyton Jones <simonpj@microsoft.com>
          Date:   Wed Nov 16 10:37:47 2011 +0000
      
          Fix CaseIdentity optimisaion
      
          In fixing one bug I'd introduced another;
             case x of { T -> T; F -> F }
          wasn't getting optmised!  Trivial to fix.
      
      I introduced yet another!  This line of code in SimplUtils.mkCase1
      
          check_eq (Var v)    (DataAlt con) []   = v == dataConWorkId con
                                                   -- Optimisation only
      
      is patently false when arg_tys is non-empty.  Astonishing that it
      has not shown up before now.
      
      Easily fixed though.  This was all shown up by Trac #13417, which is
      now fixed.
      
      Merge to 8.0, 8.2.
      82b40598
    • Gabor Greif's avatar
      Typos in manual and comments · 50512c6b
      Gabor Greif authored
      50512c6b
  2. 13 Mar, 2017 14 commits
  3. 12 Mar, 2017 2 commits
  4. 11 Mar, 2017 3 commits
  5. 10 Mar, 2017 13 commits
    • Edward Z. Yang's avatar
      Fix bkpcabal03 test. · 3ca252b1
      Edward Z. Yang authored
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      3ca252b1
    • Ben Gamari's avatar
      Bump time submodule · 8db79493
      Ben Gamari authored
      Fixes 32-bit validation
      8db79493
    • Ben Gamari's avatar
      testsuite: Bump T10359 allocations · 18d94e9c
      Ben Gamari authored
      18d94e9c
    • Simon Peyton Jones's avatar
      Comments only · 2209d5e6
      Simon Peyton Jones authored
      2209d5e6
    • Simon Peyton Jones's avatar
      Drop redundant import · 4eeb3273
      Simon Peyton Jones authored
      4eeb3273
    • Simon Peyton Jones's avatar
      Define TcSimplify.simplifyTopImplic and use it · 2d3cb34a
      Simon Peyton Jones authored
      A very small refactoring
      2d3cb34a
    • Simon Peyton Jones's avatar
      Fix constraint simplification in rules · af6ed4a6
      Simon Peyton Jones authored
      Trac #13381 showed that we were losing track of a wanted constraint
      when simplifying the LHS constraints for a RULE.
      
      This patch fixes it, makes the code a bit simpler, and better
      documented.
      af6ed4a6
    • Simon Peyton Jones's avatar
      Improve error messages for skolems · 48d1866e
      Simon Peyton Jones authored
      In error messages like this
          • Couldn't match type ‘c’ with ‘f0 (a -> b)’
            ‘c’ is a rigid type variable bound by
              the type signature for:
                f :: ((a -> b) -> b) -> forall c. c -> a
      
      we need to take case both to actually show that 'forall c',
      and to make sure that its name lines with the 'c' in the
      error message.
      
      This has been shaky for some time, and this commit puts it on solid
      ground.  See TcRnTypes: Note [SigSkol SkolemInfo]
      
      The main changes are
      
      * SigSkol gets an extra field that records the way in which the
        type signature was skolemised.
      
      * The type in SigSkol is now the /un/-skolemised version
      
      * pprSkolemInfo uses the info to make the tidy type line up
        nicely
      
      Lots of error message wibbles!
      48d1866e
    • Simon Peyton Jones's avatar
      Fix TcSimplify.decideQuantification for kind variables · 7e96526a
      Simon Peyton Jones authored
      TcSimplify.decideQuantification was doing the Wrong Thing when
      "growing" the type variables to quantify over. We were trying to do
      this on a tyvar set where we'd split off the dependent type varaibles;
      and we just got it wrong.  A kind variable wasn't being generalised
      properly, with confusing knock on consequences.
      
      All this led to Trac #13371 and Trac #13393.
      
      This commit tidies it all up:
      
      * The type TcDepVars is renamed as CandidateQTvs;
        and splitDepVarsOfType to candidateQTyVarsOfType
      
      * The code in TcSimplify.decideQuantification is simpler.
        It no longer does the tricky "grow" stuff over TcDepVars.
        Instead it use ordinary VarSets (thereby eliminating the
        nasty growThetaTyVarsDSet) and uses that to filter the
        result of candidateQTyVarsOfType.
      
      * I documented that candidateQTyVarsOfType returns the type
        variables in a good order in which to quantify, and rewrote
        it to use an accumulator pattern, so that we would predicatably
        get left-to-right ordering.
      
      In doing all this I also made UniqDFM behave a little more nicely:
      
      * When inserting an element that is there already, keep the old tag,
        while still overwriting with the new value.
      
      * This means that when doing udfmToList we get back elements in the
        order they were originally inserted, rather than in reverse order.
      
      It's not a big deal, but in a subsequent commit I use it to improve
      the order of type variables in inferred types.
      
      All this led to a lot of error message wibbles:
       - changing the order of quantified variables
       - changing the order in which instances are listed in GHCi
       - changing the tidying of variables in typechecker erors
      
      There's a submodule update for 'array' because one of its tests
      has an error-message change.
      
      I may not have associated all of them with the correct commit.
      7e96526a
    • Simon Peyton Jones's avatar
      Deal with JoinIds before void types · bc0f3abd
      Simon Peyton Jones authored
      Trac #13394, comment:4 showed up another place where we were testing
      for the representation of of a type; and it turned out to be a JoinId
      which can be rep-polymorphic.
      
      Just putting the test in the right places solves this easily.
      bc0f3abd
    • Simon Peyton Jones's avatar
      Do not generate a data-con wrapper for !Int# · 900cfdc2
      Simon Peyton Jones authored
      See Note [Data con wrappers and unlifted types] in MkId.
      We were being totally stupid!
      
      See Trac #1600 comment:66
      900cfdc2
    • Sergei Trofimovich's avatar
      implement missing Fabs{32,64} on i386 NCG and UNREG · 46246a6d
      Sergei Trofimovich authored
      Noticed breakage as build failure on i386 freebsd build bot:
        http://haskell.inf.elte.hu/builders/freebsd-i386-head/1267/10.html
      
        ghc-stage1: panic! (the 'impossible' happened)
          (GHC version 8.1.20170310 for i386-portbld-freebsd):
            outOfLineCmmOp: MO_F64_Fabs not supported here
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      46246a6d
    • Ben Gamari's avatar
      configure.ac: Bump version to 8.3 · a6e06c7b
      Ben Gamari authored
      Bumps haddock submodule
      a6e06c7b
  6. 09 Mar, 2017 1 commit