1. 12 Jun, 2015 5 commits
    • Simon Marlow's avatar
      Add parseExpr and compileParsedExpr and use them in GHC API and GHCi · d20031d4
      Simon Marlow authored
      This commit brings following changes and fixes:
       * Implement parseExpr and compileParsedExpr;
       * Fix compileExpr and dynCompilerExpr, which returned `()` for empty expr;
       * Fix :def and :cmd, which didn't work if `IO` or `String` is not in scope;
       * Use GHCiMonad instead IO in :def and :cmd;
       * Clean PrelInfo: delete dead comment and duplicate entries, add assertion.
      See new tests for more details.
      Test Plan: ./validate
      Reviewers: austin, dterei, simonmar
      Reviewed By: simonmar
      Subscribers: thomie, bgamari
      Differential Revision: https://phabricator.haskell.org/D974
      GHC Trac Issues: #10508
    • Thomas Miedema's avatar
      Testsuite: fix the little known CHECK_FILES_WRITTEN=1 · c14bd017
      Thomas Miedema authored
      The testsuite driver has a little known feature to check which files
      each test writes to, whether there are tests that write to same file,
      and whether the tests leave any files behind when CLEANUP=1. It uses
      strace under the hood.
      This commit fixes some bitrot, and filters out some more strace lines
      that we're not interested in (and are shown as framework failures
      Differential Revision: https://phabricator.haskell.org/D979
    • Gabor Greif's avatar
      Squash typos in comments · 0ef71740
      Gabor Greif authored
    • Sebastian Reuße's avatar
      docs: Fix unicode alternatives table (fixes #10509). · 016bbfd2
      Sebastian Reuße authored and Thomas Miedema's avatar Thomas Miedema committed
      The alternatives table gave the wrong glyphs for LEFTWARDS resp.
      RIGHTWARDS ARROW-TAIL notation. The listed codepoint was correct,
      but the entities corresponded to characters different from those
      This also adds the glyphs for LEFTWARDS resp. RIGHTWARDS
      DOUBLE ARROW-TAIL, which were formerly missing, and the PROPORTION
      glyph, which was formerly given as ASCII.
    • Berdes's avatar
      Delete _MSC_VER when not necessary, fix #10511 · ce53138f
      Berdes authored and Thomas Miedema's avatar Thomas Miedema committed
      Simplify some preprocessor expressions involving `_MSC_VER` because
      `_WIN32` is always defined when `_MSC_VER` is.
      Differential Revision: https://phabricator.haskell.org/D981
  2. 11 Jun, 2015 15 commits
  3. 10 Jun, 2015 1 commit
    • Austin Seipp's avatar
      docs: Fix #10416 · ca39b96e
      Austin Seipp authored
      This commit fixes #10416 by using an EPS-based file-format for embedding
      images in the users guide, as opposed to a png. This is because 'latex'
      in some distributions is actually 'pdflatex', which supports reading the
      size of PNGs in DVI mode, while traditional latex does not.
      Rather than fiddle with the build a whole bunch, it's easy and simple to
      just convert the png into a eps file and embed that instead.
      But apparently we already had an EPS file, added in
      ! But it was quite large, so
      instead I used `convert` to shrink it down from 1.7MB to about 20kb, the
      same size as the original PDF (by using level3 postscript, which is not
      as wasteful.)
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      Differential Revision: https://phabricator.haskell.org/D970
      GHC Trac Issues: #10416
  4. 09 Jun, 2015 9 commits
    • Thomas Miedema's avatar
    • Thomas Miedema's avatar
      Build: run autoreconf jobs in parallel · 4a0b7a10
      Thomas Miedema authored
      Running ./boot takes ~20 seconds on my laptop with 2 cores. With this change,
      that goes down to a little over 10 seconds. There are 8 configure.ac files in
      total, so max 8 parallel jobs.
      Differential Revision: https://phabricator.haskell.org/D962
    • Thomas Miedema's avatar
      Testsuite: delete expect_fail setups for ghc < 7.1 · 3445947a
      Thomas Miedema authored
      This makes it easier to grep for expect_fail in the tests directory.
      Differential Revision: https://phabricator.haskell.org/D965
    • Thomas Miedema's avatar
      Testsuite: delete expect_fail setups for hugs · 43ebe24a
      Thomas Miedema authored
      This makes it easier to grep for expect_fail in the tests directory.
      Differential Revision: https://phabricator.haskell.org/D964
    • Thomas Miedema's avatar
      Revert "The test runner now also works under the msys-native Python." · bb996712
      Thomas Miedema authored
      To make the test runner work under msys-native Python...
      Commit 5258566e broke the msys testsuite
      driver (#10441). It changed the quoting of `config.compiler` from single
      quotes to double quote, which turns out to not be compatible with what
      the function `passThroughCmd` expected.
      We could fix `passThroughCmd` to handle the case where `config.compiler`
      is double quoted, and scatter some notes around to make sure the quoting
      done in various places of the testsuite driver stay compatible.
      Instead, this commit reverts 101c62e2,
      which introdced the function `passThroughCmd` in the first place
      (#9626). ezyang reports that doing this revert fixes the testsuite
      driver for him using the the following version of msys2:
        msys2-keyring r8.3864337-1
      Ideally we'd know what minimum version of msys2 we require, but for now
      this fix is better than nothing.
      Only gintas ever reported the original problem, and he actually
      mentioned shortly afterwards: "This may have been fixed by a recent
      release of msys2, but I am not sure."
      Differential Revision: https://phabricator.haskell.org/D952
    • Zejun Wu's avatar
      Always force the exception in enqueued commands · 3b55659d
      Zejun Wu authored
      `enqueueCommands` should always force exception in commands. Otherwise
      the exception thrown in `:cmd` (e.g. `:cmd return $ head []`) will cause
      GHCi to terminate with panic.
      Test Plan: `cd testsuite/tests/ghci/ && make`
      Reviewed By: austin
      Differential Revision: https://phabricator.haskell.org/D967
      GHC Trac Issues: #10501
    • Austin Seipp's avatar
      build: Clean testsuite before sdist · a48167ea
      Austin Seipp authored
      When making the `sdist` tarball, we don't really need anything inside
      $(TOP)/testsuite in order to do our thing. So make sure we clean it
      first to avoid situations like #10406.
      With D917 landed, this can actually avoided entirely by fixing the
      official release process to instead build an `sdist` //first// from the
      clean git repository and then build that (to fixpoint) and test it. Then
      the originall clean tarball can be shipped.
      But it's nice to be safe in the general case where someone might want to
      (in the future) `sdist` out of their build tree.
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      Reviewed By: thomie
      Differential Revision: https://phabricator.haskell.org/D956
      GHC Trac Issues: #10406
    • thomasw's avatar
      Refactor wild card renaming · 058af6c9
      thomasw authored
      Refactor wild card error reporting
      * Merge `HsWildcardTy` and `HsNamedWildcardTy` into one constructor
        `HsWildCardTy` with as field the new type `HsWildCardInfo`, which has two
        constructors: `AnonWildCard` and `NamedWildCard`.
      * All partial type checks are removed from `RdrHsSyn.hs` and are now done
        during renaming in order to report better error messages. When wild cards
        are allowed in a type, the new function `rnLHsTypeWithWildCards` (or
        `rnHsSigTypeWithWildCards`) should be used. This will bring the named wild
        cards into scope before renaming them. When this is not done, renaming will
        trigger "Unexpected wild card..." errors.
        Unfortunately, this has to be done separately for anonymous wild cards
        because they are given a fresh name during renaming, so they will not cause
        an out-of-scope error. They are handled in `tc_hs_type`, as a special case
        of a lookup that fails.
        The previous opt-out approach is replaced with an opt-in approach. No more
        panics because of forgotten checks!
      * `[t| _ |]` isn't caught by the above two checks, so it is currently handled
        by a special case. The error message (generated in the `DsM` monad) doesn't
        provide as much context information as the other cases.
      * Instead of three (!) functions that walk `HsType`, there is now only one
        pure function called `collectWildCards`.
      * Alternative approach: catch all unwanted wild cards in `rnHsTyKi` by looking
        at the `HsDocContext`. This will reduce the number of places to catch
        unwanted wild cards form three to one, and make the error messages more
        uniform, albeit less informative, as the error context for renaming is not
        as informative as the one for type checking. A new constructor of
        `HsDocContext` will be required for pattern synonyms signatures.
        Small problem: currently type-class type signatures can't be distinguished
        from type signatures using the `HsDocContext`.
      This requires an update to the Haddock submodule.
      Test Plan: validate
      Reviewers: goldfire, simonpj, austin
      Reviewed By: simonpj
      Subscribers: bgamari, thomie, goldfire
      Differential Revision: https://phabricator.haskell.org/D613
      GHC Trac Issues: #10098
    • Austin Seipp's avatar
      Revert "docs: Fix #10416" · 7944a68f
      Austin Seipp authored
      This causes the buildbots and other users to choke when building the
      user documentation, but I haven't figured out why.
      This reverts commit dcaaa980.
  5. 08 Jun, 2015 1 commit
    • Simon Marlow's avatar
      Fix for CAF retention when dynamically loading & unloading code · 19ec6a84
      Simon Marlow authored
      In a situaion where we have some statically-linked code and we want to
      load and unload a series of objects, we need the CAFs in the
      statically-linked code to be retained indefinitely, while the CAFs in
      the dynamically-linked code should be GC'd as normal, so that we can
      detect when the code is unloadable.  This was wrong before - we GC'd
      CAFs in the static code, leading to a crash in the rare case where we
      use a CAF, GC it, and then load a new object that uses it again.
      I also did some tidy up: RtsConfig now has a field keep_cafs to
      indicate whether we want CAFs to be retained in static code.
  6. 06 Jun, 2015 3 commits
    • Thomas Miedema's avatar
      Fix the build when SplitObjs=YES · 89223ce1
      Thomas Miedema authored
      The default (perf) build, which sets SplitObjs=YES, was broken with
      commit 5dd02864.
      I accidently removed the wrong `endif`. This should fix it.
    • Thomas Miedema's avatar
      Fix the sdist build · 328c212b
      Thomas Miedema authored
      Since commit 824e34e30338b4b1de0ab5467ffd29da4c7c805a, building ghc from
      a source distribution doesn't work.
      The error is:
          make[3]: *** No rule to make target
          'utils/genprimopcode/dist/build/Lexer.hs', needed by
          'utils/genprimopcode/dist/build/Lexer.o'.  Stop.
      This commit fixes that. See note [Implicit rule search algorithm].
      Differential Revision: https://phabricator.haskell.org/D959
    • Thomas Miedema's avatar
      Testsuite: only show output diff when test is expected to pass · ae83a81a
      Thomas Miedema authored
      Don't let the output of tests that either have missing libraries or are
      expected to be broken obscure real failures.
      This makes it easier to analyse the testlogs.
      The only consequence is that when a test fails because a certain library
      isn't installed, you have to check the all.T file in which the test is
      defined to actually find out _which_ library that is. Before it would
      print something like
          Compile failed (status 256) errors were:
          stm052.hs:10:8: error:
           Could not find module ‘System.Random’
           Use -v to see a list of the files searched for.
      And now it doesn't. I think this is an acceptable tradeoff.
      Differential Revision: https://phabricator.haskell.org/D945
  7. 05 Jun, 2015 4 commits
  8. 04 Jun, 2015 2 commits