This project is mirrored from https://gitlab.haskell.org/ghc/ghc.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
  1. 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
  2. 23 Dec, 2015 21 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
    • Simon Peyton Jones's avatar
      Fix ASSERT in buildPatSyn, and T10897 test · 78248702
      Simon Peyton Jones authored
      This closes Trac #10897
      78248702
    • Simon Peyton Jones's avatar
      Comments only · b37f2164
      Simon Peyton Jones authored
      b37f2164
    • Simon Peyton Jones's avatar
      Fix super-class cycle check · f13de71b
      Simon Peyton Jones authored
      Fixes Trac #11278
      f13de71b
    • kgardas's avatar
      - fix gc_thread related compilation failure on Solaris/i386 platform · 84f67396
      kgardas authored
      Summary:
      This patch fixes gc_thread related compilation failure
      on Solaris/i386 platform. It uses Linux way of __thread declared
      gc_thread variable for register starving i386 from now.
      
      Reviewers: bgamari, austin, erikd
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1688
      84f67396
    • Erik de Castro Lopo's avatar
      Delete incorrect *-ws-32 expected test output · dab8e34d
      Erik de Castro Lopo authored
      Summary:
      The *-ws-32 file were too difficult to keep up-to-date so @bgamari
      updated the test outut normalization code in commit 786d528e
      to make these files un-necessary.
      
      Test Plan: test on PowerPC
      
      Reviewers: hvr, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1690
      dab8e34d
    • MarcelineVQ's avatar
      Modify Nmax to maxN Trac #10728 · 7ed0da6c
      MarcelineVQ authored
      Added test and changed -Nmax to -maxN, -n was taken
      
      Noticed strange -m behavoir and fixed -m from quietly
      ignoring being passed invalid opts, e.g. "-msasd"
      
      Reviewers: simonmar, hvr, austin, thomie, bgamari
      
      Reviewed By: hvr, thomie, bgamari
      
      Subscribers: bgamari, hvr, thomie, simonmar
      
      Differential Revision: https://phabricator.haskell.org/D1677
      
      GHC Trac Issues: #10728
      7ed0da6c
    • Simon Peyton Jones's avatar
      Test Trac #11274 · ed213ead
      Simon Peyton Jones authored
      ed213ead
    • Simon Peyton Jones's avatar
      Tidy up and comment wildcards in family instances · 6eb9dc9c
      Simon Peyton Jones authored
      I found it was possible to do this a bit more nicely
      See Note [Family instance declaration binders] in HsDecls, and
          Note [Wildcards in family instances] in RnSource
      6eb9dc9c
    • Simon Peyton Jones's avatar
      Comments only · 99eb002d
      Simon Peyton Jones authored
      99eb002d
    • Simon Peyton Jones's avatar
      Add a pattern-syn form of PromotionErr · c069be81
      Simon Peyton Jones authored
      The main change is to add PatSynPE to PromotionErr, so that
      when we get an ill-staged use of a pattern synonym we get a
      civilised error message.
      
      We were already doing this in half-baked form in tcValBinds, but
      this patch tidies up the impl (which previously used a hack rather
      than APromotionErr), and does it in tcTyClsInstDecls too.
      c069be81
    • Simon Peyton Jones's avatar
      Comments and white space · 19632501
      Simon Peyton Jones authored
      19632501
    • Simon Peyton Jones's avatar
      b55ad1b3
    • Simon Peyton Jones's avatar
      Revert "Allow as-patterns in pattern synonym declarations." · 48e06346
      Simon Peyton Jones authored
      I'm reverting this until we agree a design.
      See comment:5 in Trac #9793.
      
      Incidentally the reference to Trac #9739 in the reverted
      patch is bogus; it shold have said #9793.
      
      This reverts commit 44640af7.
      48e06346
    • kgardas's avatar
      - fix tests on OpenBSD which requires _DYNAMIC symbol · 5f086816
      kgardas authored
      Summary:
      This patch adds _DYNAMIC symbol to the list of OpenBSD symbols.
      The patch fixes unknown _DYNAMIC symbol runtime linker error caused
      by recent update of unix library.
      
      Reviewers: bgamari, austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1689
      5f086816
  3. 22 Dec, 2015 11 commits
    • Herbert Valerio Riedel's avatar
      3e99980b
    • Edward Z. Yang's avatar
      Implement -hide-all-plugin-packages and -plugin-package(-id), fixing #11244 · 1faf1fca
      Edward Z. Yang authored
      
      
      Summary:
      The basic idea is that we have a new set of "exposed modules"
      which are /only/ used for plugins, i.e. -fplugin Foo and
      --frontend Foo.  You can interact with this namespace
      using the flags -plugin-package-id and -plugin-package.
      By default, this namespace contains all modules in the
      user namespace (as before), but you can toggle that using
      -hide-all-plugin-packages.
      
      There is one nasty hack: GhcMake respects -fplugin in
      GHC_OPTIONS to make local plugins work correctly.  It also
      bails out of you have an import of a module which doesn't
      exist locally or in the package database.  The upshot is
      that we need to be sure to check in the plugin modules
      too, so we don't give a spurious failure when a plugin
      is in the plugin namespace but not the main namespace.
      A better way to fix this would be to distinguish between
      plugin and normal dependencies in ModSummary.
      
      I cheated a little and tweaked a few existing plugins
      tests to exercise the new code paths.
      
      TODO: Documentation
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: bgamari, austin, simonpj, duncan
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1661
      
      GHC Trac Issues: #11244
      1faf1fca
    • Edward Z. Yang's avatar
      Refactor package flags into several distinct types. · 998739df
      Edward Z. Yang authored
      
      
      Summary:
      Previously, all package flags (-package, -trust-package,
      -ignore-package) were bundled up into a single packageFlags
      field in DynFlags, under a single type.  This commit separates
      them based on what they do.
      
      This is a nice improvement, because it means that Packages can
      then be refactored so that a number of functions are "tighter":
      
          - We know longer have to partition PackageFlags into
            the ignore flag and other flags; ignore flags are just
            put into their own field.
      
          - Trust flags modify the package database, but exposed
            flags do not (they modify the visibility map); now
            applyPackageFlag and applyTrustFlag have tighter signatures
            which reflect this.
      
      This patch was motivated by the need to have a separate visibility
      map for plugin packages, which will be in a companion patch.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: austin, bgamari, duncan
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1659
      998739df
    • eir@cis.upenn.edu's avatar
      CoercionN is not in scope in TyCoRep · 21b25dff
      eir@cis.upenn.edu authored
      21b25dff
    • eir@cis.upenn.edu's avatar
      Tweak comments around UnivCos. · d3ce4172
      eir@cis.upenn.edu authored
      d3ce4172
    • Alan Zimmerman's avatar
      APIAnnotations:AnnComma in wrong place in qcnames1 · 721d56d5
      Alan Zimmerman authored
      The list is reversed when it is used, so the comma must be added to the
      item at the front of it, to be following it when used.
      721d56d5
    • Simon Peyton Jones's avatar
      Refactor named wildcards (again) · 575a98e4
      Simon Peyton Jones authored
      Michal's work on #10982, #11098, refactored the handling of named
      wildcards by making them more like ordinary type variables.
      
      This patch takes the same idea to its logical conclusion, resulting
      in a much tidier, tighter implementation.
      
      Read Note [The wildcard story for types] in HsTypes.
      
      Changes:
      
       * Named wildcards are ordinary type variables, throughout
      
       * HsType no longer has a data constructor for named wildcards
         (was NamedWildCard in HsWildCardInfo).  Named wildcards are
         simply HsTyVars
      
       * Similarly named wildcards disappear from Template Haskell
      
       * I refactored RnTypes to avoid polluting LocalRdrEnv with something
         as narrow as named wildcards.  Instead the named wildcard set is
         carried in RnTyKiEnv.
      
      There is a submodule update for Haddock.
      575a98e4
    • Ben Gamari's avatar
      Remove another duplicate test · 01b0461e
      Ben Gamari authored
      01b0461e
    • Alan Zimmerman's avatar
      Localize API Annotation in LInjectivtyAnn · 7966eea9
      Alan Zimmerman authored
      The injectivity_cond production in Parser.y returns the annotation for
      the '->' to the calling production, rather than applying it directly.
      
      Rather apply it directly, so LInjectivityAnn can be rendered as a unit
      from the API Annotations.
      7966eea9
    • Ben Gamari's avatar
      Remove duplicate T11224 test definition · 51d83302
      Ben Gamari authored
      51d83302
    • Simon Peyton Jones's avatar
      Fix typechecking for pattern synonym signatures · f40e122b
      Simon Peyton Jones authored
      Various tickets have revealed bad shortcomings in the typechecking of
      pattern type synonyms.  Discussed a lot in (the latter part of)
      Trac #11224.
      
      This patch fixes the most complex issues:
      
      - Both parser and renamer now treat pattern synonyms as an
        ordinary LHsSigType.  Nothing special.  Hooray.
      
      - tcPatSynSig (now in TcPatSyn) typechecks the signature, and
        decomposes it into its pieces.
        See Note [Pattern synonym signatures]
      
      - tcCheckPatSyn has had a lot of refactoring.
        See Note [Checking against a pattern signature]
      
      The result is a lot tidier and more comprehensible.
      Plus, it actually works!
      
      NB: this patch doesn't actually address the precise
          target of #11224, namely "inlining pattern synonym
          does not preserve semantics".  That's an unrelated
          bug, with a separate patch.
      
      ToDo: better documentation in the user manual
      
      Test Plan: Validate
      
      Reviewers: austin, hvr, goldfire
      
      Subscribers: goldfire, mpickering, thomie, simonpj
      
      Differential Revision: https://phabricator.haskell.org/D1685
      
      GHC Trac Issues: #11224
      f40e122b