1. 27 Dec, 2015 16 commits
  2. 26 Dec, 2015 7 commits
  3. 25 Dec, 2015 2 commits
  4. 24 Dec, 2015 8 commits
    • eir@cis.upenn.edu's avatar
      Visible type application · 2db18b81
      eir@cis.upenn.edu authored
      This re-working of the typechecker algorithm is based on
      the paper "Visible type application", by Richard Eisenberg,
      Stephanie Weirich, and Hamidhasan Ahmed, to be published at
      ESOP'16.
      
      This patch introduces -XTypeApplications, which allows users
      to say, for example `id @Int`, which has type `Int -> Int`. See
      the changes to the user manual for details.
      
      This patch addresses tickets #10619, #5296, #10589.
      2db18b81
    • thomie's avatar
      Don't drop last char of file if -osuf contains dot · 48db13d2
      thomie authored
      Given:
       * `file = "foo.a.b"`
       * `osuf = ".a.b"`  -- Note the initial dot.
       * `new_osuf = "c"`
      
      Before (bad, the last character of the filename is dropped):
        `dropTail (length osuf + 1) file <.> new_osuf == "fo.c"`
      After (good):
        `stripExtension osuf file <.> new_osuf` == "foo.c"
      
      This regression was introduced in commit c489af73 (#5554). That commit
      fixed a similar but different bug, and care has been taken to not
      reintroduce it (using the the newly introduced
      `System.Filepath.stripExtension`).
      
      Given:
       * `file = "foo.a.b"`
       * `osuf = "a.b"`
       * `new_osuf = "c"`
      
      Before c489af73 (bad, the full suffix should get replaced):
        `replaceExtension file new_osuf == "foo.a.c"`
      After c489af73 (good):
        `dropTail (length osuf + 1) file <.> new_osuf == "foo.c"`
      After this commit (still good):
        `stripExtension osuf file <.> new_osuf == "foo.c"`
      
      Reviewed by: bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1692
      
      GHC Trac Issues: #9760
      48db13d2
    • Erik de Castro Lopo's avatar
      Fix normalisation of TyCon representations · e3383767
      Erik de Castro Lopo authored
      Test Plan: run tests on powerpc and x86_64
      
      Reviewers: hvr, austin, thomie, bgamari
      
      Reviewed By: thomie, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1694
      e3383767
    • Simon Peyton Jones's avatar
      Refactoring only · 1af0d36b
      Simon Peyton Jones authored
      This moves code around to more sensible places.
      
      - Construction for CoAxiom is localised in FamInstEnv
      
      - orphNamesOfxx moves to CoreFVs
      
      - roughMatchTcs, instanceCantMatch moves to Unify
      
      - mkNewTypeCo moves from Coercion to FamInstEnv, and is
        renamed mkNewTypeCoAxiom, which makes more sense
      1af0d36b
    • Simon Peyton Jones's avatar
      Improve tracing a bit in CoreSubst · fcc7498f
      Simon Peyton Jones authored
      fcc7498f
    • Simon Peyton Jones's avatar
      Improve the runRW magic in CorePrep · d9903544
      Simon Peyton Jones authored
      Instead of substituting, just augment the environment.
      Less code, more efficient.
      
      And the previous version had a bogus in-scope set which
      triggered a WARNING
      d9903544
    • Simon Peyton Jones's avatar
      Improve SimplUtils.interestingArg · 6ec236b5
      Simon Peyton Jones authored
      There were two problems here:
       - We were looking under a lambda without extending
         the in-scope env, which triggered a WARNING
         But there's no need to look under a lambda.
      
       - We were looking under a letrec without extending
         the in-scope env, which triggered the same WARNING
         Solution: extend the in-scope env
      6ec236b5
    • Ben Gamari's avatar
      ghc-cabal: Bring back TRANSITIVE_DEP_NAMES · 3017cbcf
      Ben Gamari authored
      This is still needed by the Shake build system until things have been
      reworked to use Cabal directly.
      3017cbcf
  5. 23 Dec, 2015 7 commits
    • Ben Gamari's avatar
      config.mk.in: Disable stripping by default on ARM · 353e97a3
      Ben Gamari authored
      The Cortex A8 hardware apparently has a bug which ld.gold will try to
      correct; however in order to do so it must have unstripped executables
      lest we see warnings of the form (see #10376, #10464),
      
          /usr/bin/ld.gold: warning: cannot scan executable section 1 of ...
          for Cortex-A8 erratum because it has no mapping symbols.
      
      Consequently we disabling stripping by default on this architecture.
      
      A bit more discussion about this issue can be found in this [Android
      issue](http://code.google.com/p/android/issues/detail?id=40794).
      
      Test Plan: Try validating on ARM
      
      Reviewers: erikd, austin, thomie
      
      Reviewed By: austin, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1599
      
      GHC Trac Issues: #10376, #10464
      353e97a3
    • Herbert Valerio Riedel's avatar
      Make testsuite work again with Py3 · 32215996
      Herbert Valerio Riedel authored
      Python 3 support seems to have mildly bitrotten since #9184 was closed.
      Luckily, only some minor tweaks seem necessary.
      32215996
    • thomie's avatar
      Docs: -interactive-print should reside in registered package · 7cddcde5
      thomie authored
      Since commit 03c4893e, ic_int_print is
      retained from registered packages after `:reload`.
      
      Fixes #11159.
      7cddcde5
    • Jan Stolarek's avatar
      Test #10432 · f141f416
      Jan Stolarek authored
      Summary: A regression test for #10432, which seems to already be fixed.
      
      Test Plan: ./validate
      
      Reviewers: simonpj, austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1691
      
      GHC Trac Issues: #10432
      f141f416
    • Simon Peyton Jones's avatar
      Update tests for Trac #11039 · d1e9f827
      Simon Peyton Jones authored
      d1e9f827
    • Alan Zimmerman's avatar
      API Annotaions:add name in PatBind Match · cb989e2f
      Alan Zimmerman authored
      A PatBind operates similarly to a FunBind, and so the RdrName and
      infix/prefix state needs to be captured for use in API Annotations.
      cb989e2f
    • Eric Seidel's avatar
      Allow CallStacks to be frozen · 380b25ea
      Eric Seidel authored
      This introduces "freezing," an operation which prevents further
      locations from being appended to a CallStack.  Library authors may want
      to prevent CallStacks from exposing implementation details, as a matter
      of hygiene. For example, in
      
      ```
      head [] = error "head: empty list"
      
      ghci> head []
      *** Exception: head: empty list
      CallStack (from implicit params):
        error, called at ...
      ```
      
      including the call-site of `error` in `head` is not strictly necessary
      as the error message already specifies clearly where the error came
      from.
      
      So we add a function `freezeCallStack` that wraps an existing CallStack,
      preventing further call-sites from being pushed onto it. In other words,
      
      ```
      pushCallStack callSite (freezeCallStack callStack) = freezeCallStack callStack
      ```
      
      Now we can define `head` to not produce a CallStack at all
      
      ```
      head [] =
        let ?callStack = freezeCallStack emptyCallStack
        in error "head: empty list"
      
      ghci> head []
      *** Exception: head: empty list
      CallStack (from implicit params):
        error, called at ...
      ```
      
      ---
      
      1. We add the `freezeCallStack` and `emptyCallStack` and update the
         definition of `CallStack` to support this functionality.
      
      2. We add `errorWithoutStackTrace`, a variant of `error` that does not
         produce a stack trace, using this feature. I think this is a sensible
         wrapper function to provide in case users want it.
      
      3. We replace uses of `error` in base with `errorWithoutStackTrace`. The
         rationale is that base does not export any functions that use CallStacks
         (except for `error` and `undefined`) so there's no way for the stack
         traces (from Implicit CallStacks) to include user-defined functions.
         They'll only contain the call to `error` itself. As base already has a
         good habit of providing useful error messages that name the triggering
         function, the stack trace really just adds noise to the error. (I don't
         have a strong opinion on whether we should include this third commit,
         but the change was very mechanical so I thought I'd include it anyway in
         case there's interest)
      
      4. Updates tests in `array` and `stm` submodules
      
      Test Plan: ./validate, new test is T11049
      
      Reviewers: simonpj, nomeata, goldfire, austin, hvr, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Projects: #ghc
      
      Differential Revision: https://phabricator.haskell.org/D1628
      
      GHC Trac Issues: #11049
      380b25ea