1. 05 Dec, 2015 8 commits
  2. 04 Dec, 2015 27 commits
    • Sergei Trofimovich's avatar
      libdw: enable support only on i386 and amd64 · e2c518e6
      Sergei Trofimovich authored
      Currently libdw requires per-arch implementation of
      set_initial_registers() function.
      Otherwise build fails with linkage error
      (seen on sparc):
            undefined reference to `set_initial_registers'
        collect2: error: ld returned 1 exit status
        `gcc' failed in phase `Linker'. (Exit code: 1)
        make[1]: *** [ghc/stage2/build/tmp/ghc-stage2] Error 1
      Converted link-time error to compile-time error,
      added arch whitelist.
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
      Reviewers: austin, thomie, bgamari
      Reviewed By: bgamari
      Differential Revision: https://phabricator.haskell.org/D1567
    • Ömer Sinan Ağacan's avatar
      StgCmmMonad: Implement Outputable instance for Sequel for debugging · c865c425
      Ömer Sinan Ağacan authored
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1563
    • Ben Gamari's avatar
      lint: Add linter to catch uses of ASSERT macro that Clang dislikes · 901cab10
      Ben Gamari authored
      In particular Clang rejects uses of CPP macros where the argument list
      is separated by a space from the macro name. Warn when we see ASSERT
      used in this way.
    • Ben Gamari's avatar
      Add linter to check for binaries accidentally added to repository · 020375d1
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      This should catch mistakes like
      Adds an arcanist-external-json-linter submodule, which should eventually
      be mirrored on haskell.org resources.
      Test Plan: Validate
      Reviewers: thomie, hvr, austin
      Reviewed By: austin
      Differential Revision: https://phabricator.haskell.org/D1515
    • Ben Gamari's avatar
      Update peak_megabytes_allocated for T9675 · d4bf8632
      Ben Gamari authored
      Interestingly enough this decreased with the new pattern checker. I'm
      not entirely sure why at the moment as the test is merely a large
      record with a bunch of selectors. I wouldn't have thought this would tax
      the pattern checker particularly much but oh well.
    • Ben Gamari's avatar
      testsuite: Rename pmcheck/T7669 to pmcheck/T7669a · caa68516
      Ben Gamari authored
      This was a duplicate.
    • Ben Gamari's avatar
      T5642: Fix skip usage · 16aae608
      Ben Gamari authored
    • Simon Peyton Jones's avatar
      Comments only · 43a5970a
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Tidy user type errors in checkValidType · 67565a72
      Simon Peyton Jones authored
      Trac #11144 showed that we need to tidy the type in the error message
      generated in TcValidity.checkUserTypeError.
      This is still unsatisfactory.  checkValidType was originally supposed
      to be called only on types gotten directly from user-written HsTypes.
      So its error messages do no tidying.  But TcBinds calls it checkValidType
      on an /inferred/ type, which may need tidying.
      Still this at least fixes the bad error message in CustomTypeErrors02,
      which was the original ticket.
      Some other small refactorings:
      * Remove unused Kind result of getUserTypeErrorMsg
      * Rename isUserErrorTy  -->   userTypeError_maybe
    • Simon Peyton Jones's avatar
      Minor refactoring of user type errors · 31b482bf
      Simon Peyton Jones authored
      * Remove unused Kind result of getUserTypeErrorMsg
      * Rename isUserErrorTy  -->   userTypeError_maybe
    • Simon Peyton Jones's avatar
      Fix egregious error in eta-reduction of data families · 1160dc51
      Simon Peyton Jones authored
      This terrible and long-standing bug was shown up by Trac #11148.
      We are trying to eta-reduce a data family instance, so that we
      can then derive Functor or Generic.  But we were assuming, for
      absolutely not reason whatsoever, that the type variables were
      lined up in a convenient order.  The fact that it ever worked
      was a fluke.
      This patch fixes it properly.  Main change is in eta_reduce
      in TcInstDcls.tcDataFamInstDecl
    • Simon Peyton Jones's avatar
      Make -dppr-debug show contents of (TypeError ...) · 822141b9
      Simon Peyton Jones authored
      Just for debugging
    • Simon Peyton Jones's avatar
      Wibbles only · 1cb3c8c2
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Add derived constraints for wildcard signatures · 28035c09
      Simon Peyton Jones authored
      This fixes Trac #11016
      See Note [Add deriveds for signature contexts] in TcSimplify]
    • Simon Peyton Jones's avatar
      Case-of-empty-alts is trivial (Trac #11155) · 1c9fd3f1
      Simon Peyton Jones authored
      As you'll see from Trac #11155, the code generator was confused
      by a binding let x = y in ....   Why did that happen? Because of
      a (case y of {}) expression on the RHS.
      The right thing is just to expand what a "trivial" expression is.
      See Note [Empty case is trivial] in CoreUtils.
    • Bartosz Nitka's avatar
      Make callToPats deterministic in SpecConstr · 5b2b7e33
      Bartosz Nitka authored
      This fixes a non-determinism bug where where depending on the
      order of uniques allocated, the specialized workers would have different
      order of arguments.
        $s$wgo_s1CN :: Int# -> Int -> Int#
        [LclId, Arity=2, Str=DmdType <L,U><L,U>]
        $s$wgo_s1CN =
          \ (sc_s1CI :: Int#) (sc_s1CJ :: Int) ->
            case tagToEnum# @ Bool (<=# sc_s1CI 0#) of _ [Occ=Dead] {
              False ->
                $wgo_s1BU (Just @ Int (I# (-# sc_s1CI 1#))) (Just @ Int sc_s1CJ);
              True -> 0#
        $s$wgo_s18mTj :: Int -> Int# -> Int#
        [LclId, Arity=2, Str=DmdType <L,U><L,U>]
        $s$wgo_s18mTj =
          \ (sc_s18mTn :: Int) (sc_s18mTo :: Int#) ->
            case tagToEnum# @ Bool (<=# sc_s18mTo 0#) of _ [Occ=Dead] {
              False ->
                  (Just @ Int (I# (-# sc_s18mTo 1#))) (Just @ Int sc_s18mTn);
              True -> 0#
      Test Plan:
      I've added a new testcase
      Reviewers: simonmar, simonpj, austin, goldfire, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1508
      GHC Trac Issues: #4012
    • Ben Gamari's avatar
      T5642: Skip it entirely · 96e67c01
      Ben Gamari authored
      It uses so much memory that it would be unsafe to even allow it to run
      as it may jeopardize the stability of the build-bots.
    • Ben Gamari's avatar
      T5642 is broken · dc33e4c6
      Ben Gamari authored
      This appears to be due to the new exhaustiveness checker. See #11163.
    • Ben Gamari's avatar
      Bump allocations for T783 · e9220daf
      Ben Gamari authored
      The new pattern match checker increased allocations by over 100%.
      Tracking in #11162.
    • Ben Gamari's avatar
      Check: More Clang/CPP wibbles · befc4e4c
      Ben Gamari authored
    • Herbert Valerio Riedel's avatar
      Use builtin ISO 8859-1 decoder in mkTextEncoding · 36a208f4
      Herbert Valerio Riedel authored
      We already do this for UTF8/16/32, so it seems obvious do the same
      for the closely related popular ISO 8859-1 encoding, and avoid iconv
      issues on some platforms (such as AIX which which bundles a broken
      `libiconv` by default)
      This fixes #11096
    • Ben Gamari's avatar
      PmExpr: Fix CPP unacceptable too clang's CPP · d40f5b78
      Ben Gamari authored
    • Herbert Valerio Riedel's avatar
      On AIX we need -D_BSD defined in <Stg.h> · 6ef351df
      Herbert Valerio Riedel authored
      As otherwise <math.h> includes <stdlib.h> which breaks compilation
      of .hc files
    • Herbert Valerio Riedel's avatar
      RTS: Rename InCall.stat struct field to .rstat · cd9f3bf9
      Herbert Valerio Riedel authored
      On AIX, C system headers can redirect the token `stat` via
          #define stat stat64
      to provide large-file support. Simply avoiding the use of `stat` as an
      identifier eschews macro-replacement.
      Differential Revision: https://phabricator.haskell.org/D1566
    • Herbert Valerio Riedel's avatar
      Use Autoconf's AC_USE_SYSTEM_EXTENSIONS · 7af29da0
      Herbert Valerio Riedel authored
      This takes care of setting feature test macros (i.e. let Autoconf decide when
      those can be set safely) to allow subsequent Autoconf tests to better detect
      available OS features.
      This also includes a submodule update of unix which enables the use of
      `AC_USE_SYSTEM_EXTENSIONS` in there as well.
      Specifically, this takes care of setting `_GNU_SOURCE` (which allows to remove
      two occurences where it's set manually) and `_ALL_SOURCE` (which fixes issues
      on AIX).
      See also
      for details.
      At some point we may want to reconsider the purpose of "rts/PosixSource.h" and
      rely more on Autoconf instead.
    • Georgios Karachalias's avatar
    • Georgios Karachalias's avatar
      Improve performance for PM check on literals (Fixes #11160 and #11161) · ae4398d6
      Georgios Karachalias authored
      Two changes:
      1. Instead of generating constraints of the form (x ~ e) (as we do in
      the paper), generate constraints of the form (e ~ e). The term oracle
      (`tmOracle` in deSugar/TmOracle.hs) is not really efficient and in the
      presence of many (x ~ e) constraints behaves quadratically. For
      literals, constraints of the form (False ~ (x ~ lit)) are pretty common,
      so if we start with { y ~ False, y ~ (x ~ lit) } we end up givng to the
      solver (a) twice as many constraints as we need and (b) half of them
      trigger the solver's weakness. This fixes #11160.
      2. Treat two overloaded literals that look different as different. This
      is not entirely correct but it is what both the previous and the current
      check did. I had the ambitious plan to do the *right thing* (equality
      between overloaded literals is undecidable in the general case) and just
      use this assumption when issuing the warnings. It seems to generate much
      more constraints than I expected (breaks #11161) so I just do it
      immediately now instead of generating everything and filtering
      Even if it is not (strictly speaking) correct, we have the following:
        * Gives the "expected" warnings (the ones Ocaml or the previous
          algorithm would give) and,
        * Most importantly, it is safe. Unless a catch-all clause exists, a
          match against literals is always non-exhaustive. So, effectively
          this affects only what is shown to the user (and, evidently,
  3. 03 Dec, 2015 5 commits