Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Mar 4, 2015
  1. Thomas Miedema

    Remove unused/undocumented flag `-fhpc-no-auto`

    thomie authored
    Added in 53a5d0b. Perhaps accidentally? It didn't do anything back then
    either.
    
    Reviewed By: austin
    
    Differential Revision: https://phabricator.haskell.org/D700
  2. Joachim Breitner
  3. simonpj
  4. simonpj

    Check for equality before deferring

    simonpj authored
    This one was a bit of a surprise. In fixing Trac #7854, I moved
    the checkAmbiguity tests to checkValidType. That meant it happened
    even for monotypes, and that turned out to be very expensive in
    T9872a, for reasons described in this (new) Note in TcUnify:
    
        Note [Check for equality before deferring]
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Particularly in ambiguity checks we can get equalities like (ty ~ ty).
        If ty involves a type function we may defer, which isn't very sensible.
        An egregious example of this was in test T9872a, which has a type signature
               Proxy :: Proxy (Solutions Cubes)
        Doing the ambiguity check on this signature generates the equality
           Solutions Cubes ~ Solutions Cubes
        and currently the constraint solver normalises both sides at vast cost.
        This little short-cut in 'defer' helps quite a bit.
    
    I fixed the problem with a quick equality test, but it feels like an ad-hoc
    solution; I think we might want to do something in the constraint solver too.
    
    (The problem was there all along, just more hidden.)
  5. simonpj

    Comments only

    simonpj authored
  6. simonpj

    A raft of small changes associated with -XConstrainedClassMethods

    simonpj authored
    See Trac #7854.  Specifically:
    
    * Major clean up and simplification of check_op in checkValidClass;
      specifically
         - use checkValidType on the entire method-selector type to detect
           ambiguity
         - put a specific test for -XConstrainedClassMethods
    
    * Make -XConstrainedClassMethods be implied by -XMultiParamTypeClasses
      (a bit ad-hoc but see #7854), and document in the user manual.
    
    * Do the checkAmbiguity test just once in TcValidity.checkValidType,
      rather than repeatedly at every level. See Note [When to call checkAmbiguity]
    
    * Add -XAllowAmbiguousTypes in GHC.IP, since 'ip' really is ambiguous.
      (It's a rather magic function.)
    
    * Improve location info for check_op in checkValidClass
    
    * Update quite a few tests, which had genuinely-ambiguous class
      method signatures.  Some I fixed by making them unambiguous; some
      by adding -XAllowAmbiguousTypes
  7. simonpj
  8. simonpj

    Tidy up and improve comments about one-shot info

    simonpj authored
    (Triggered by investigating Trac #10102 etc.)
  9. Tamar Christina Austin Seipp

    Fix -Werror build failure in RtsMain

    Mistuke authored thoughtpolice committed
    Summary:
    Something in Excn.h's include chain is loading _mingw.h which is defining a macro that
    PosixSource.h is going to define.
    
    _mingw.h's version properly checks if it has already been defined and skips it, so fixing the warning can be done
    by just including Excn.h later (moved it to before last include).
    
    Test Plan: ./validate
    
    Reviewers: austin
    
    Reviewed By: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D698
Commits on Mar 3, 2015
  1. Edward Z. Yang

    Clarify some comments in Packages.hs [skip-ci]

    ezyang authored
    Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
  2. Richard Eisenberg

    Don't use deriveUnique *twice* in flattenTys.

    goldfirere authored
    Previously, we used deriveUnique and then uniqAway. This worked
    doubly hard to avoid clashes. Doing just uniqAway is enough.
    
    This commit also includes clarifying comments.
  3. Oleg Grenrus Austin Seipp

    Add various instances to newtypes in Data.Monoid

    phadej authored thoughtpolice committed
    Summary:
    Add Functor instances for Dual, Sum and Product
    Add Foldable instances for Dual, Sum and Product
    Add Traversable instances for Dual, Sum and Product
    Add Foldable and Traversable instances for First and Last
    Add Applicative, Monad instances to Dual, Sum, Product
    Add MonadFix to Data.Monoid wrappers
    Derive Data for Identity
    Add Data instances to Data.Monoid wrappers
    Add Data (Alt f a) instance
    
    Reviewers: ekmett, dfeuer, hvr, austin
    
    Reviewed By: dfeuer, austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D673
    
    GHC Trac Issues: #10107
  4. Thomas Miedema Austin Seipp

    Pretty-print # on unboxed literals in core

    thomie authored thoughtpolice committed
    Summary:
    Ticket #10104 dealt with showing the '#'s on types with unboxed fields. This
    commit pretty prints the '#'s on unboxed literals in core output.
    
    Test Plan: simplCore/should_compile/T8274
    
    Reviewers: jstolarek, simonpj, austin
    
    Reviewed By: simonpj, austin
    
    Subscribers: simonpj, thomie
    
    Differential Revision: https://phabricator.haskell.org/D678
    
    GHC Trac Issues: #8274
  5. Tamar Christina Austin Seipp

    Replaced SEH handles with VEH handlers which should work uniformly ac…

    Mistuke authored thoughtpolice committed
    …ross x86 and x64
    
    Summary:
    On Windows, the default action for things like division by zero and
    segfaults is to pop up a Dr. Watson error reporting dialog if the exception
    is unhandled by the user code.
    
    This is a pain when we are SSHed into a Windows machine, or when we
    want to debug a problem with gdb (gdb will get a first and second chance to
    handle the exception, but if it doesn't the pop-up will show).
    
    veh_excn provides two macros, `BEGIN_CATCH` and `END_CATCH`, which
    will catch such exceptions in the entire process and die by
    printing a message and calling `stg_exit(1)`.
    
    Previously this code was handled using SEH (Structured Exception Handlers)
    however each compiler and platform have different ways of dealing with SEH.
    
    `MSVC` compilers have the keywords `__try`, `__catch` and `__except` to have the
    compiler generate the appropriate SEH handler code for you.
    
    `MinGW` compilers have no such keywords and require you to manually set the
    SEH Handlers, however because SEH is implemented differently in x86 and x64
    the methods to use them in GCC differs.
    
    `x86`: SEH is based on the stack, the SEH handlers are available at `FS[0]`.
         On startup one would only need to add a new handler there. This has
         a number of issues such as hard to share handlers and it can be exploited.
    
    `x64`: In order to fix the issues with the way SEH worked in x86, on x64 SEH handlers
         are statically compiled and added to the .pdata section by the compiler.
         Instead of being thread global they can now be Image global since you have to
         specify the `RVA` of the region of code that the handlers govern.
    
    You can on x64 Dynamically allocate SEH handlers, but it seems that (based on
    experimentation and it's very under-documented) that the dynamic calls cannot override
    static SEH handlers in the .pdata section.
    
    Because of this and because GHC no longer needs to support < windows XP, the better
    alternative for handling errors would be using the in XP introduced VEH.
    
    The bonus is because VEH (Vectored Exception Handler) are a runtime construct the API
    is the same for both x86 and x64 (note that the Context object does contain CPU specific
    structures) and the calls are the same cross compilers. Which means this file can be
    simplified quite a bit.
    Using VEH also means we don't have to worry about the dynamic code generated by GHCi.
    
    Test Plan:
    Prior to this diff the tests for `derefnull` and `divbyzero` seem to have been disabled for windows.
    To reproduce the issue on x64:
    1) open ghci
    2) import GHC.Base
    3) run: 1 `divInt` 0
    
    which should lead to ghci crashing an a watson error box displaying.
    
    After applying the patch, run:
    
    make TEST="derefnull divbyzero"
    
    on both x64 and x86 builds of ghc to verify fix.
    
    Reviewers: simonmar, austin
    
    Reviewed By: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D691
    
    GHC Trac Issues: #6079
Commits on Mar 2, 2015
  1. Edward Z. Yang

    Cite the TrieMap idea [skip-ci]

    ezyang authored
    Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
  2. Edward Z. Yang

    Give full-precision time for BEGIN_SAMPLE/END_SAMPLE.

    ezyang authored
    Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
    
    Test Plan: validate
    
    Reviewers: simonmar, austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D679
  3. Joachim Breitner

    Small emitCmmSwitch/emitCmmLitSwitch refactoring

    nomeata authored
    both use the same logic to divide, so put it in
        divideBranches :: Ord a => [(a,b)] -> ([(a,b)], a, [(a,b)])
  4. Joachim Breitner

    Improve if-then-else tree for cases on literal values

    nomeata authored
    Previously, in the branch of the if-then-else tree, it would emit a
    final check if the scrut matches the alternative, even if earlier
    comparisons alread imply this equality. By keeping track of the bounds
    we can skip this check. Of course this is only sound for integer types.
    This closes #10129.
    Differential Revision: https://phabricator.haskell.org/D693
  5. Gabor Greif

    Typos in non-code

    ggreif authored
  6. Tamar Christina Austin Seipp

    Removed unused constrained which causes build to fail with -Werror

    Mistuke authored thoughtpolice committed
    Summary:
     Unused Show constraint is cauzing validate build failures because of -Werror.
     Removing constraint solves the problem
    
    Test Plan: validate
    
    Reviewers: austin, hvr
    
    Reviewed By: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D690
  7. Thomas Miedema Austin Seipp

    `make test` in root directory now runs fulltest

    thomie authored thoughtpolice committed
    Summary:
    Currently, running `make test` in:
      /                   runs fast testsuite
      /testsuite          doesn't work
      /testsuite/tests    runs slow testsuite
    
    This commit:
      * changes `make test` in the ghc root directory to run the slow testsuite,
        just like it already does in `testsuite/tests`
      * adds some simple targets to `/testsuite`, that all delegate to
        `/testsuite/tests`
      * adds a new target `fasttest` to the toplevel Makefile, with a shorthand
        name `fast` (for consistency with /testsuite and /testsuite/tests)
      * declares some more targets PHONY for safety
    
    Wiki pages that need updating:
      * Building/StandardTargets
      * Buliding/RunningTests
    
    Reviewers: austin
    
    Reviewed By: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D685
  8. Thomas Miedema Austin Seipp

    Fix typecheck tests (--slow)

    thomie authored thoughtpolice committed
    Summary:
    Fallout from AMP, recent addition of -fwarn-redundant-constraints and others.
    Some of these tests need `mtl` or `syb` to run.
    
    Reviewers: austin
    
    Reviewed By: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D684
  9. Thomas Miedema Austin Seipp

    Fix detection of llvm-x.x

    thomie authored thoughtpolice committed
    Summary:
    Four bug fixes and a little refactoring.
    * `find -perm \mode` should be `find -perm /mode` (#9697)
    
    * `find -regex '$3' should be `find -regex "$3"` (#7661)
    
    From `man sh` on my system (Ubuntu 14.04):
    "Enclosing characters in single quotes preserves the literal meaning of all
    the characters ..."
    
    * LlcCmd and OptCmd should be passed to ghc, using `-pgmlo` and `-pgmlc`, for
      detection of #9439.
    
    * -pgmlo and -pgmlc were undocumented because of an xml tag misplacement.
    
    Test Plan:
    The aclocal.m4 macro has seen about 10 iterations since its inception. Without a
    testsuite, I can't guarantee this version is bug free either. It's all pretty
    frustrating.
    
    Reviewers: bgamari, austin
    
    Reviewed By: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D683
    
    GHC Trac Issues: #9697, #7661, #9439
  10. Javran Cheng Austin Seipp

    fix typos in coreSyn

    Javran authored thoughtpolice committed
    Summary: fixed few typos in coreSyn, no trac number
    
    Test Plan: validate
    
    Reviewers: austin
    
    Reviewed By: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D682
  11. Thomas Miedema Austin Seipp

    Show record construction/update without parens

    thomie authored thoughtpolice committed
    Summary:
    The 2010 report mentions:
    "The result of `show` is a syntactically correct Haskell expression ...
    Parenthesis are only added where needed, //ignoring associativity//".
    
    Reviewers: austin
    
    Reviewed By: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D669
    
    GHC Trac Issues: #2530
  12. simonpj

    Improve documentation of infinite inlining bug

    simonpj authored
    This fixes the documentation suggestion in Trac #10105
  13. simonpj

    Two kind-polymorphism fixes (Trac #10122)

    simonpj authored
    * The original fix was to improve the documentation, in
      line with the suggestions on Trac #10122
    
    * But in doing so I realised that the kind generalisation in
      TcRnDriver.tcRnType was completely wrong.  So I fixed that
      and updated Note [Kind-generalise in tcRnType] to explain.
  14. simonpj

    Comments only

    simonpj authored
  15. simonpj

    Test Trac #10112

    simonpj authored
  16. simonpj

    Improve comments on coreView/tcView, and combine coreExpandTyCon/tcEx…

    simonpj authored
    …pandTyCon
    
    This is minor stuff triggered by Trac #10103.
    
    * Fix outdated comments on tcView/coreView (we should really combine
      them with a new name, but I'll leave that slightly-disruptive change
      for now)
    
    * Combine tcExpandTyCon_maybe and coreExpandTyCon_maybe (which were identical)
      into expandSynTyCon_maybe
    
    * A few more comment fixups
  17. simonpj

    Comments only

    simonpj authored
  18. Joachim Breitner

    Extend the docs for Data.List.transpose

    nomeata authored
    by giving a sufficient general example to explain what happens when the
    rows are not of the same lengths. Thanks to Doug McIlroy for the
    suggestoin. Fixes #10128.
Commits on Feb 27, 2015
  1. Herbert Valerio Riedel

    Update process submodule to 1.2.3.0 snapshot

    hvr authored
    This fixes the compilation failure
    
      libraries\process\System\Process\Internals.hs:36:5:
          Not in scope: `stopDelegateControlC'
          ...
    
    (however, GHC HEAD skipped process-1.2.2 which has that issue)
Commits on Feb 26, 2015
  1. Simon Marlow
Commits on Feb 24, 2015
  1. Edward Z. Yang

    Axe ModFinderCache, folding it into a generalized FinderCache.

    ezyang authored
    Summary:
    FinderCache is now keyed by a module, ModuleNames in the home package are
    turned into Modules using thisPackage in the dynamic flags.  Simplifies some
    code!
    
    Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
    
    Test Plan: validate
    
    Reviewers: simonpj, austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D634
Something went wrong with that request. Please try again.