1. 25 Mar, 2016 11 commits
  2. 24 Mar, 2016 24 commits
    • Herbert Valerio Riedel's avatar
      Remove code-duplication in the PPC NCG · 4dc88356
      Herbert Valerio Riedel authored
      Reviewed By: bgamari, trommler
      
      Differential Revision: https://phabricator.haskell.org/D2020
      4dc88356
    • Herbert Valerio Riedel's avatar
      Add NCG support for AIX/ppc32 · df26b955
      Herbert Valerio Riedel authored
      This extends the previous work to revive the unregisterised GHC build
      for AIX/ppc32. Strictly speaking, AIX runs on POWER4 (and later)
      hardware, but the PPC32 instructions implemented in the PPC NCG
      represent a compatible subset of the POWER4 ISA.
      
      IBM AIX follows the PowerOpen ABI (and shares many similiarites with the
      Linux PPC64 ELF V1 NCG backend) but uses the rather limited XCOFF
      format (compared to ELF).
      
      This doesn't support dynamic libraries yet.
      
      A major limiting factor is that the AIX assembler does not support the
      `@ha`/`@l` relocation types nor the ha16()/lo16() functions Darwin's
      assembler supports. Therefore we need to avoid emitting those. In case
      of numeric literals we simply compute the functions ourselves, while for
      labels we have to use local TOCs and hope everything fits into a 16bit
      offset (for ppc32 this gives us at most 16384 entries per TOC section,
      which is enough to compile GHC).
      
      Another issue is that XCOFF doesn't seem to have a relocation type for...
      df26b955
    • kaiha's avatar
      Add option `no-keep-hi-files` and `no-keep-o-files` (fixes #4114) · 24149528
      kaiha authored
      Summary: Remove `.hi` and `.o` files if the flags `no-keep-hi-files` and
      `no-keep-o-files` are given.
      
      Test Plan: ./validate
      
      Reviewers: austin, thomie, bgamari
      
      Reviewed By: thomie, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2021
      
      GHC Trac Issues: #4114
      24149528
    • bollmann's avatar
      users_guide: small improvements on pattern synonyms. · 173a5d8e
      bollmann authored
      Since the order of required and provided constraint contexts of pattern
      synonyms has been switched recently, I updated a couple places in the
      users guide's pattern synonym section to accommodate for this.
      
      Test Plan: read it :-)
      
      Reviewers: goldfire, thomie, mpickering, simonpj, austin, bgamari
      
      Reviewed By: bgamari
      
      Differential Revision: https://phabricator.haskell.org/D2034
      173a5d8e
    • Ben Gamari's avatar
      users-guide: Add -Wredundant-constraints to flags reference · 8ff6518b
      Ben Gamari authored
      Test Plan: Validate and read
      
      Reviewers: austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2035
      
      GHC Trac Issues: #11741
      8ff6518b
    • Ben Gamari's avatar
      users_guide: Fix various issues · 2cebbe65
      Ben Gamari authored
      Sphinx apparently expects references to anchors that don't accompany a
      header to have a caption.
      
      Test Plan: validate
      
      Reviewers: austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2033
      2cebbe65
    • Herbert Valerio Riedel's avatar
      Avoid local label syntax for assembler on AIX · 343349df
      Herbert Valerio Riedel authored
      Unfortunately (for inline `__asm__()` uses), IBM's `as` doesn't seem to support
      local labels[1] like GNU `as` does so we need to workaround this when on AIX.
      
       [1]: https://sourceware.org/binutils/docs/as/Symbol-Names.html#Symbol-Names
      
      Turns out this also addresses the long-standing bug #485
      
      Reviewed By: bgamari, trommler
      
      Differential Revision: https://phabricator.haskell.org/D2029
      343349df
    • Simon Peyton Jones's avatar
      Tidy up handling of coercion variables · cb08f8da
      Simon Peyton Jones authored
      * Comments to explain that a CoVar, whose IdInfo is CoVarId,
        is always unlifted (but may be nominal or representational role)
      
        And TyCoRep.isCoercionType picks out only those unlifted
        types, NOT the lifted versions
      
      * Introduce Var.NcId for non-co-var Ids
        with predicate isNonCoVarId
      
      * Add assertions in CoreSubst that the Id env is only
        used for NcIds
      
      * Fix lurking bug in CSE which extended the
        CoreSubst Id env with a CoVar
      
      * Fix two bugs in Specialise.spec_call, which wrongly treated
        CoVars like NcIds
          - needed a varToCoreExpr in one place
          - needed extendSubst not extendIdSubst in another
        This was the root cause of Trac #11644
      
      Minor refactoring
      
      * Eliminate unused mkDerivedLocalCoVarM, mkUserLocalCoVar
      * Small refactor in mkSysLocalOrCoVar
      cb08f8da
    • Simon Peyton Jones's avatar
      Comments only · 2b5929cc
      Simon Peyton Jones authored
      2b5929cc
    • Ben Gamari's avatar
      Defer inlining of Eq for primitive types · 0bd0c31e
      Ben Gamari authored
      Summary:
      This is one solution to #11688, wherein (==) was inlined to soon
      defeating a rewrite rule provided by bytestring. Since the RHSs of Eq's
      methods are simple, there is little to be gained and much to be lost by
      inlining them early.
      
      For instance, the bytestring library provides,
      
      ```lang=haskell
      break :: (Word8 -> Bool) -> ByteString -> (ByteString, ByteString)
      breakByte :: Word8 -> ByteString -> (ByteString, ByteString)
      ```
      
      and a rule
      
      ```
      forall x. break ((==) x) = breakByte x
      ```
      
      since `breakByte` implments an optimized version of `break (== x)` for
      known `x :: Word8`. If we allow `(==)` to be inlined too early, we will
      prevent this rule from firing. This was the cause of #11688.
      
      This patch just defers the `Eq` methods, although it's likely worthwhile
      giving `Ord` this same treatment. This regresses compiler allocations
      for T9661 by about 8% due to the additional inlining that we now require
      the simplifier to perform.
      
      Updates the `bytestring` submodul...
      0bd0c31e
    • Ben Gamari's avatar
      Default RuntimeRep variables unless -fprint-explicit-runtime-reps · 371608f1
      Ben Gamari authored
      Summary:
      Addresses #11549 by defaulting `RuntimeRep` variables to `PtrRepLifted`
      and adding a new compiler flag `-fprint-explicit-runtime-reps` to
      disable this behavior.
      
      This is just a guess at the right way to go about this. If it's
      wrong-beyond-any-hope just say so.
      
      Test Plan: Working on a testcase
      
      Reviewers: goldfire, austin
      
      Subscribers: simonpj, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1961
      
      GHC Trac Issues: #11549
      371608f1
    • Ben Gamari's avatar
      Show: Restore redundant parentheses around records · 1448f8ab
      Ben Gamari authored
      As discussed in #2530 we are going to continue to produce parentheses
      here in order to preserve compatibility with previous GHC releases. It
      was found that dropped parentheses would break some testsuites which
      compared against output from Show. This has been documented in the users
      guide.
      
      This reverts commit 5692643c.
      
      Test Plan: Validate
      
      Reviewers: hvr, austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2027
      
      GHC Trac Issues: #2350
      1448f8ab
    • Ben Gamari's avatar
      Revert "Various ticky-related work" · ef653f1f
      Ben Gamari authored
      This reverts commit 6c2c853b which was
      supposed to be merged as individual commits.
      ef653f1f
    • Ben Gamari's avatar
      Add expected output for T9405 · 8335cc73
      Ben Gamari authored
      8335cc73
    • Ben Gamari's avatar
      DsExpr: Rip out static/dynamic check in list desugaring · 0db05941
      Ben Gamari authored
      Previously we would try to break explicit lists into a dynamic prefix
      and static tail and desugar the former into a `build` expression.
      Unfortunately, this heuristic resulted in surprising behavior
      (see #11710) and wasn't pulling its weight. Here we drop it (along with
      the `-fsimple-list-literals` flag), leaving only the list length
      heuristic to determine whether `build` or cons list desugaring should be
      used.
      
      Test Plan: Validate
      
      Reviewers: simonpj, austin
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2023
      
      GHC Trac Issues: #11710
      0db05941
    • kaiha's avatar
      Create empty dump files (fixes #10320) · 9f9345e5
      kaiha authored
      Test Plan: ./validate
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2015
      
      GHC Trac Issues: #10320
      9f9345e5
    • Joachim Breitner's avatar
      Various ticky-related work · 6c2c853b
      Joachim Breitner authored
      this Diff contains small, self-contained changes as I work towards
      fixing #10613. It is mostly created to let harbormaster do its job, but
      feedback is welcome as well.
      
      Please do not merge this via arc; I’d like to push the individual
      patches as layed out here. I might push mostly trivial ones even without
      review, as long as the build passes.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2014
      6c2c853b
    • Josh Price's avatar
      Add unicode syntax for banana brackets · 03a1bb4d
      Josh Price authored
      Summary:
      Add "⦇" and "⦈" as unicode alternatives for "(|" and "|)" respectively.
      
      This must be implemented differently than other unicode additions
      because ⦇" and "⦈" are interpretted as a $unigraphic rather than
      a $unisymbol.
      
      Test Plan: validate
      
      Reviewers: goldfire, bgamari, austin
      
      Reviewed By: bgamari, austin
      
      Subscribers: thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D2012
      
      GHC Trac Issues: #10162
      03a1bb4d
    • archblob's avatar
      Close ticky profiling file stream after printing (#9405) · 2708c22b
      archblob authored
      Test Plan: T9405
      
      Reviewers: simonmar, austin, bgamari
      
      Reviewed By: simonmar, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2008
      
      GHC Trac Issues: #9405
      2708c22b
    • Rik Steenkamp's avatar
      Add `PatSynSigSkol` and modify `PatSynCtxt` · 997312b0
      Rik Steenkamp authored
      As the type of a pattern synonym cannot in general be represented by a
      value of type Type, we cannot use a value `SigSkol (PatSynCtxt n) (Check
      ty)` to represent the signature of a pattern synonym (this causes
      incorrect signatures to be printed in error messages). Therefore we now
      represent it by a value `PatSynSigSkol n` (instead of incorrect
      signatures we simply print no explicit signature).
      
      Furthermore, we rename `PatSynCtxt` to `PatSynBuilderCtxt`, and use
      `SigSkol (PatSynBuilderCtxt n) (Check ty)` to represent the type of a
      bidirectional pattern synonym when used in an expression context.
      Before, this type was represented by a value `SigSkol (PatSynCtxt n)
      (Check ty)`, which caused incorrect error messages.
      
      Also, in `mk_dict_err` of `typecheck\TcErrors.hs` we now distinguish
      between all enclosing implications and "useful" enclosing implications,
      for better error messages concerning pattern synonyms. See `Note [Useful
      implications]`.
      
      See the Phabricator page for examples.
      
      Reviewers: mpickering, goldfire, simonpj, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1967
      
      GHC Trac Issues: #11667
      997312b0
    • Ben Gamari's avatar
      ErrUtils: Add timings to compiler phases · 8048d51b
      Ben Gamari authored
      This adds timings and allocation figures to the compiler's output when
      run with `-v2` in an effort to ease performance analysis.
      
      Todo:
        * Documentation
        * Where else should we add these?
        * Perhaps we should remove some of the now-arguably-redundant
          `showPass` occurrences where they are
        * Must we force more?
        * Perhaps we should place this behind a `-ftimings` instead of `-v2`
      
      Test Plan: `ghc -v2 Test.hs`, look at the output
      
      Reviewers: hvr, goldfire, simonmar, austin
      
      Reviewed By: simonmar
      
      Subscribers: angerman, michalt, niteria, ezyang, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1959
      8048d51b
    • Ben Gamari's avatar
      Ensure T9646 dump-simpl output is cleaned · da3b29bd
      Ben Gamari authored
      da3b29bd
    • Ben Gamari's avatar
      base: Fix ClockGetTime on OS X · 2ddfb757
      Ben Gamari authored
      Apparently _POSIX_CPUTIME may be defined as -1 if
      CLOCK_PROCESS_CPUTIME_ID isn't defined.
      
      Test Plan: Validate
      
      Reviewers: austin, hvr, erikd, goldfire
      
      Reviewed By: erikd, goldfire
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2028
      
      GHC Trac Issues: #11733
      2ddfb757
    • bollmann's avatar
      Fix regression test for #11145. · e57b9ffe
      bollmann authored
      Test Plan: ./validate
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2032
      
      GHC Trac Issues: #11145
      e57b9ffe
  3. 23 Mar, 2016 3 commits
  4. 22 Mar, 2016 1 commit
    • eir@cis.upenn.edu's avatar
      Avoid running afoul of the zipTvSubst check. · 0beb82c1
      eir@cis.upenn.edu authored
      addDataConStupidTheta includes comments that the types list
      might be longer than the tvs list. And the check in zipTvSubst
      doesn't appear to be terribly recent. I am utterly flummoxed
      as to why this worked before. It was clearly just broken.
      And now it's fixed.
      0beb82c1
  5. 21 Mar, 2016 1 commit
    • niteria's avatar
      Use the correct in-scope set in coercionKind · 685398eb
      niteria authored
      The free vars of `ty2` need to be in scope to satisfy the substitution
      invariant.
      As far as I can tell we don't have the free vars of `ty2` when
      substituting, so unfortunately we have to compute them.
      
      Test Plan: ./validate
      
      Reviewers: austin, bgamari, simonpj, goldfire
      
      Subscribers: thomie, simonmar
      
      Differential Revision: https://phabricator.haskell.org/D2024
      
      GHC Trac Issues: #11371
      685398eb