Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Commits on Aug 17, 2015
  1. @thomie
Commits on Aug 15, 2015
  1. @thomie

    Testsuite: speedup running a single test

    thomie authored
    Benchmark: in rootdirectory, run `time make test TEST=dummy VERBOSE=0`
    Before this commit: 2.6s
    After this commit: 0.7s
  2. @thomie

    Testsuite: recenter 2 performance tests on Windows

    thomie authored
    No major deviations. Also fixup T7861.
  3. @thomie
  4. @thomie
Commits on Aug 13, 2015
  1. @bgamari

    Name: Show NameSort in warning

    bgamari authored
    This is quite useful information to know. Spotted when looking at #10769.
  2. @bgamari

    DynFlags: Prohibit hpc and byte-code interpreter

    bgamari authored
    The user's guide says hpc is incompatible with GHCi and #9903 would
    agree. Fixes #9903.
Commits on Aug 12, 2015
  1. @bgamari
  2. @bgamari

    Update mingw tarball location

    bgamari authored
  3. @Mistuke @bgamari

    Upgrade GCC to 5.2.0 for Windows x86 and x86_64

    Mistuke authored bgamari committed
    This patch does a few things
    
    - Moved GHC x86 to MinGW-w64 (Using Awson's patch)
    - Moves Both GHCs to MSYS2 toolchains
    - Completely removes the dependencies on the git tarball repo
      - Downloads only the required tarball for the architecture for
        which we are building
      - Downloads the perl tarball is missing as well
      - Fixed a few bugs in the linker to fix tests on Windows
    
    The links currently point to repo.msys2.org and GitHub, it might be
    more desirable to mirror them on
    http://downloads.haskell.org/~ghc/mingw/ as with the previous patch
    attempt.
    
    For more details on what the MSYS2 packages I include see #10726
    (Awson's comment). but it should contain all we need
    and no python or fortran, which makes the uncompressed tar a 1-2
    hundreds mb smaller.
    
    The `GCC 5.2.0` in the package supports `libgcc` as a shared library,
    this is a problem since
    when compiling with -shared the produced dll now has a dependency on
    `libgcc_s_sjlj-1.dll`.
    To solve this the flag `-static-libgcc` is now being used for all GCC
    calls on windows.
    
    Test Plan:
    ./validate was ran both on x86 and x86_64 windows and compared against
    the baseline.
    
    A few test were failing due to Ld no longer being noisy. These were
    updated.
    
    The changes to the configure script *should* be validated by the build
    bots for the other platforms before landing
    
    Reviewers: simonmar, awson, bgamari, austin, thomie
    
    Reviewed By: thomie
    
    Subscribers: #ghc_windows_task_force, thomie, awson
    
    Differential Revision: https://phabricator.haskell.org/D1123
    
    GHC Trac Issues: #10726, #9014, #9218, #10435
  4. @bgamari
  5. @thomie

    Pretty: improving the space/time performance of vcat, hsep, hcat (#10…

    thomie authored
    …735)
    
    After 5d57087 ("Pretty: fix a broken
    invariant"), T3294 showed 50% more max_bytes_used (#3294). After this
    commit, max_bytes_used is back to what it was before, and the test
    passes again.
    
    This is a backport of a bug fix by Benedikt Huber (#2393), from commit
    1e50748beaa4bd2281d323b18ea51c786bba04a1 in the pretty library.
    
    From https://mail.haskell.org/pipermail/libraries/2008-June/009991.html:
    
        vcat (hsep,cat) is implemented in an unneccessarily strict way.
        We only get some output after all of vcat's arguments are evaluated
        and checked against being Empty.
        This can be improved by only checking the right argument of foldr
        against being Empty, and
        then applying an Empty-filter on the resulting Doc. Space improvement
        is obvious.
        The microbenchmark (code.haskell.org/~bhuber/Text/PrettyPrint/
        HughesPJPerfCheck.hs) suggests that
        the improvements in time are remarkable too.
  6. @thomie

    Pretty: show rational as is (#10735)

    thomie authored
    Following libraries/pretty. I'm not sure why it converted to Double
    before.
    
    This function isn't used by GHC itself. It is exported from these two
    places:
      * compiler/utils/Outputable
      * libraries/template-haskell/Language/Haskell/TH/PprLib.hs
  7. @thomie

    Pretty: fix a broken invariant (#10735)

    thomie authored
    This is a backport of a bug fix from
    6cfbd0444981c074bae10a3cf72733bcb8597bef in libraries/pretty:
    
        Fix a broken invariant
        Patch from #694,  for the problem "empty is an identity for <> and $$" is
        currently broken by eg. isEmpty (empty<>empty)"
  8. @thomie

    Pretty: fix potential bad formatting of error message (#10735)

    thomie authored
    This is a backport of a bug fix by Benedikt Huber for the same problem
    in the pretty library (#1337), from commit
    8d8866a8379c2fe8108ef034893c59e06d5e752f. The original explanation for
    the fix is attached below.
    
    Ticket #1776 originally reported an infinite loop when printing error
    message. This promptly got fixed in:
    
      commit 2d52ee0
      Author: simonpj@microsoft.com <unknown>
      Date:   Thu Mar 1 11:45:13 2007 +0000
    
          Do not go into an infinite loop when pretty-printer finds a
          negative indent (Trac #1176)
    
    SPJ reports in the ticket: "So infinite loop is fixed, but the bad
    formatting remains. I've added a test, tcfail177."
    
    tcfail177 however hasn't triggered the formatting problem for years (as
    Ian reported in c9e0e60).
    
    This patch updates the test to a version that at least still failed with
    ghc-7.0 (from #1776#comment:7).
    
    -------------------
    
    From https://mail.haskell.org/pipermail/libraries/2008-June/010013.html,
    by Benedikt Huber:
    
        Concerning ticket #1337, we have to change the formal specification of
        fill (it doesn't match the implementation):
    
        -- Current Specification:
        --   fill []  = empty
        --   fill [p] = p
        --   fill (p1:p2:ps) = oneLiner p1 <#> nest (length p1)
        --                                          (fill (oneLiner p2 : ps))
        --                     `union`
        --                      p1 $$ fill ps
    
        Problem 1: We want to `unnest' the second argument of (p1 $$ fill ps),
        but not the first one
    
        In the definition above we have e.g.
    
        > getSecondLayout $
        >   fillDef False [text "a", text "b", text "a"]
    
        >> text "ab"; nilabove; nest -1; text "a"; empty
        >> |ab|
        >> |.a|
    
        Problem 2: The overlapping $$ should only be used for those layouts of
        p1 which aren't one liners (otherwise violating the invariant "Left
        union arg has shorter first line").
    
        I suggest the following specification (i believe it almost matches the
        current implementation, modulo [fillNB: fix bug #1337] (see below):
    
        -- Revised Specification:
        --   fill g docs = fill' 0 docs
        --   gap g       = if g then 1 else 0
        --   fill' n []  = []
        --   fill' n [p] = [p]
        --   fill' n (p1:p2:ps) =
        --      oneLiner p1 <g> (fill' (n+length p1+gap g) (oneLiner p2 : ps))
        --        `union`
        --     (p1 $*$ nest (-n) (fill' g ps))
        --
        -- $*$ is defined for layouts (One-Layout Documents) as
        --
        -- layout1 $*$ layout2 | isOneLiner layout1 = layout1 $+$ layout2
        --                     | otherwise          = layout1 $$ layout2
    
        I've also implemented the specification in HughesPJQuickCheck.hs,
        and checked them against the patched pretty printer.
    
        Concerning Bug #1337:
        ~~~~~~~~~~~~~~~~~~~~~
    
        If the above formal specification is fine, it is easy to fix:
        elide the nests of (oneLiner p2) [see attached patch, record bug #1337].
    
        > PrettyPrint(0) $ ./Bug1337
        > ....ab
        > ...c
    
        The (long) explanation follows below.
    
        <snip/>
    
        ===========================================================
        Explanation of Bug #1337:
    
        Consider
    
        > fcat [ nest 1 $ text "a", nest 2 $ text "b", text "c"]
    
        --> expected: (nest 1; text "a"; text "b"; nest -3; "c")
        --> actual  : (nest 1; text "a"; text "b"; nest -5; "c")
    
        Reduction:
        === (nest 1; text a) <> (fill (-2) (p2:ps))
        ==>                     (nest 2 (text "b") $+$ text "c")
        ==>                     (nest 2 (text "b")) `nilabove`
                                (nest (-3) (text "c"))
        ==> (nest 1; text a; text b; nest -5 c)
    
        The problem is that if we decide to layout (p1:p2:ps) as
    
        | p1 p2
        | ps
    
        (call it layout A), then we want to have
    
        > (p1 <> p2) $+$ ps.
    
        But following law <n6> this means that
    
        > fcat_A [p1:nest k p2:ps]
    
        is equivalent to
    
        > fcat_A [p1,p2,ps]
    
        so the nest of p2 has to be removed.
    
        This is somewhat similar to bug #667, but easier to fix
        from a semantic point of view:
        p1,p2 and ps are distinct layouts - we only have to preserve the
        individual layouts, and no combinations of them.
  9. @thomie

    Pretty: bugfix fillNB (#10735)

    thomie authored
    This is a backport of a bug fix by Benedikt Huber (#2393), from commit
    1e50748beaa4bd2281d323b18ea51c786bba04a1 in the pretty library.
    
    From https://mail.haskell.org/pipermail/libraries/2008-June/009991.html:
    
        Law <l1> states that
    
        > sep (ps++[empty]++qs)   = sep (ps ++ qs)
        >         ...ditto hsep, hcat, vcat, fill...
    
        In the current implementation, this fails for the paragraph fill
        variants.
    
        > render' $ fsep [ text "c", text "c",empty, text "c", text "b"]
        >   where render' = renderStyle (Style PageMode 7 1.4)
        >> c c c
        >>     b
  10. @hvr

    Bump template-haskell to new major version 2.11

    hvr authored
    ...since we already have introduced backward compat breakage
    that breaks packages such as QuickCheck-2.8.1
    
    Differential Revision: https://phabricator.haskell.org/D1144
Commits on Aug 11, 2015
  1. @thomie
  2. @goldfirere

    User manual update, as prodded by #10760.

    goldfirere authored
    This clarifies that kind variables are inputs to type families
    and can be used to distinguish instances.
Commits on Aug 10, 2015
  1. @adamse @bgamari

    Replace HsBang type with HsSrcBang and HsImplBang

    adamse authored bgamari committed
    Updates haddock submodule.
    
    Reviewers: tibbe, goldfire, simonpj, austin, bgamari
    
    Reviewed By: simonpj, bgamari
    
    Subscribers: goldfire, thomie, mpickering
    
    Differential Revision: https://phabricator.haskell.org/D1069
Commits on Aug 9, 2015
  1. @thomie
  2. @thomie
  3. @hvr
Commits on Aug 8, 2015
  1. @nomeata

    cmmCreateSwitchPlan: Handle singletons up-front

    nomeata authored
    and make sure these are implemented with an equality check, which is a
    shorter instruction. This was suggested by rwbarton in #10677.
    
    Differential Revision: https://phabricator.haskell.org/D1137
  2. @nomeata

    Make oneShot open-kinded

    nomeata authored
    akio wants to use oneShot with unlifted types as well, and there is no
    good reason not to let him. This changes the type of the built-in
    oneShot definition to open kinds, and also expand the documentation a
    little bit.
    
    Differential Revision: https://phabricator.haskell.org/D1136
Commits on Aug 7, 2015
  1. @hvr

    Sync base/changelog.md with GHC 7.10.2 release

    hvr authored
    [skip ci]
  2. @simonpj

    Comments only

    simonpj authored
  3. @simonpj

    Test Trac #10753

    simonpj authored
  4. @ezyang

    Big batch of Backpack documentation edits.

    ezyang authored
    Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
  5. @bgamari
Commits on Aug 6, 2015
  1. @goldfirere

    Rejigger OSMem.my_mmap to allow building on Mac

    goldfirere authored
    Previously, the prot and flags variables were set but never used
    on Mac (darwin). This caused a warning, and the build setup stopped
    compilation. This commit is intended simply to omit these variables
    when building with darwin_HOST_OS set. No change in behavior on any
    platform is intended.
  2. @rwbarton
  3. @bgamari

    llvmGen: Rework LLVM mangler

    bgamari authored bgamari committed
    The LLVM mangler does not currently transform AVX instructions on x86-64
    platforms, due to a missing #include. Also, it is significantly more
    complicated than necessary, due to the file into sections (not needed
    anymore), and is sensitive to the details of the whitespace in the
    assembly.
    
    Author: dobenour
    
    Test Plan: Validation on x86-64, x86-32, and ARM
    
    Reviewers: austin
    
    Subscribers: thomie, bgamari, rwbarton
    
    Differential Revision: https://phabricator.haskell.org/D1034
    
    GHC Trac Issues: #10394
  4. @fumieval @bgamari

    base: Add instances

    fumieval authored bgamari committed
    This patch adds following instances:
    
    * Foldable ZipList
    * Traversable ZipList
    * Functor Complex
    * Applicative Complex
    * Monad Complex
    * Foldable Complex
    * Traversable Complex
    * Generic1 Complex
    * Monoid a => Monoid (Identity a)
    * Storable ()
    
    Reviewers: ekmett, fumieval, hvr, austin
    
    Subscribers: thomie, #core_libraries_committee
    
    Projects: #core_libraries_committee
    
    Differential Revision: https://phabricator.haskell.org/D1049
    
    GHC Trac Issues: #10609
  5. @bgamari

    Ensure DynFlags are consistent

    bgamari authored bgamari committed
    While we have always had makeDynFlagsConsistent to enforce a variety of
    consistency invariants on DynFlags, it hasn't been widely used.
    GHC.Main, for instance, ignored it entirely. This leads to issues like
    Trac #10549, where an OPTIONS_GHC pragma introduced an inconsistency,
    leading to a perplexing crash later in compilation.
    
    Here I add consistency checks in GHC.Main.set{Session,Program}DynFlags,
    closing this hole.
    
    Fixes #10549.
    
    Test Plan: Validate with T10549
    
    Reviewers: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1128
    
    GHC Trac Issues: #10549
Something went wrong with that request. Please try again.