Skip to content
Snippets Groups Projects
  1. Mar 10, 2017
    • 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
      ghc-8.3-start
      a6e06c7b
  2. Mar 09, 2017
  3. Mar 08, 2017
  4. Mar 07, 2017
  5. Mar 06, 2017
    • Ben Gamari's avatar
      testsuite: Disable linkwhole test on Windows · 5dddf354
      Ben Gamari authored
      It relies on System.Posix.DynamicLinker, which is not available.
      5dddf354
    • Ben Gamari's avatar
      primops: Add comment describing type of atomicModifyMutVar# · d91b1045
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      This resolves #13130. It's not entirely clear to me why we don't use an
      unboxed tuple here but this is at least better than the status quo.
      
      [skip ci]
      
      Test Plan: Read it
      
      Reviewers: simonmar, austin, dfeuer
      
      Reviewed By: dfeuer
      
      Subscribers: dfeuer, rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3288
      d91b1045
    • Moritz Angermann's avatar
      Mangle .subsections_via_symbols away. · 1686f309
      Moritz Angermann authored and Ben Gamari's avatar Ben Gamari committed
      This is a rather stupid mangler hack. However, when using prefix data
      with llvm, on systems that support -dead_strip (macOS, iOS), the prefix
      data is stipped.
      
      llvm generiously adds .subsections_via_symbols for macho in any case.
      
      Thus we use our trusted mangler to drop the .subsections_via_symbols
      line from the assembly.
      
      This ultimately means that for (macOS, llvm), and (iOS, llvm) will not
      benefit from -dead_strip. Yet, this patch will allow building ghc on
      macOS again.
      
      Test Plan: build ghc with llvm on macOS
      
      Reviewers: rwbarton, bgamari, austin
      
      Reviewed By: rwbarton, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3287
      1686f309
Loading