1. 23 Dec, 2015 9 commits
  2. 22 Dec, 2015 19 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
    • Simon Peyton Jones's avatar
      Fix grouping for pattern synonyms · 29928f29
      Simon Peyton Jones authored
      When grouping pattern synonyms in the desugarer, to find when a single
      match will work for the whole group, we use `Match.sameGroup`.  But this
      function was declaring two pattern-synonym matches equal to often.
      Result: Lint errors and broken semantics.
      
      The fix is easy.  See Note [Pattern synonym groups].
      
      Re-do typechecking for pattern synonym signatures
      
      Test Plan: Validate
      
      Reviewers: austin
      
      Subscribers: thomie, mpickering, simonpj
      
      Differential Revision: https://phabricator.haskell.org/D1684
      29928f29
    • Herbert Valerio Riedel's avatar
      Update stm submodule to v2.4.4.1 release · 6eabd93d
      Herbert Valerio Riedel authored
      This `stm` release also addresses #10967
      6eabd93d
    • Ryan Scott's avatar
      Rework Template Haskell's handling of strictness · f975b0b1
      Ryan Scott authored
      Currently, Template Haskell's treatment of strictness is not enough to
      cover all possible combinations of unpackedness and strictness. In
      addition, it isn't equipped to deal with new features (such as
      `-XStrictData`) which can change a datatype's fields' strictness during
      compilation.
      
      To address this, I replaced TH's `Strict` datatype with
      `SourceUnpackedness` and `SourceStrictness` (which give the programmer a
      more complete toolkit to configure a datatype field's strictness than
      just `IsStrict`, `IsLazy`, and `Unpack`). I also added the ability to
      reify a constructor fields' strictness post-compilation through the
      `reifyConStrictness` function.
      
      Fixes #10697.
      
      Test Plan: ./validate
      
      Reviewers: simonpj, goldfire, bgamari, austin
      
      Reviewed By: goldfire, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1603
      
      GHC Trac Issues: #10697
      f975b0b1
    • Alan Zimmerman's avatar
      Retain AnnTilde in splitTildeApps · b407bd77
      Alan Zimmerman authored
      splitTildeApps can introduce a new HsAppInfix for a tilde, with a fresh
      SrcSpan, disconnecting its existing AnnTilde API Annotation.
      
      A tilde needs AnnTilde to render properly, this patch adds a new one on
      the fresh SrcSpan
      b407bd77
    • Simon Peyton Jones's avatar
      Comments only, about coercion holes · ea3f733a
      Simon Peyton Jones authored
      Richard, pls take a look
      ea3f733a
    • Herbert Valerio Riedel's avatar
      Update Cabal submodule to latest snapshot · 44de66b6
      Herbert Valerio Riedel authored
      The addition of several new Semigroup instances caused
      a Haddock allocation increase.
      44de66b6
    • Alan Zimmerman's avatar
      Make HsAppsType contents Located · ff923954
      Alan Zimmerman authored
      An HsAppInfix can carry a qconop/varop preceded by a SIMPLEQUOTE as a
      Located RdrName.
      
      In this case AnnSimpleQuote is attached to the Located HsAppType.
      
          | SIMPLEQUOTE qconop            {% ams (sLL $1 $> $ HsAppInfix $2)
                                                 [mj AnnSimpleQuote $1] }
          | SIMPLEQUOTE varop             {% ams (sLL $1 $> $ HsAppInfix $2)
                                                 [mj AnnSimpleQuote $1] }
      
      This patch changes
      
          data HsType name
            ...
            | HsAppsTy [HsAppType name]
      
      to
      
          data HsType name
            ...
            | HsAppsTy [LHsAppType name]
      
      so that the annotation is not discarded when it reaches the ParsedSource
      ff923954
    • Tamar Christina's avatar
      Fix GHCi segfault in Windows 32bit · aa7fb9a6
      Tamar Christina authored
      Summary:
      Add missing calling convention to function pointer,
      incorrect `cdecl` calling convention which should be `stdcall`
      on x86 was causing the stack to be corrupted. When it tried to
      return from the function the return pointer would be invalid.
      
      Test Plan: ./validate
      
      Reviewers: austin, erikd, bgamari, thomie
      
      Reviewed By: bgamari, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1683
      
      GHC Trac Issues: #11234
      aa7fb9a6
  3. 21 Dec, 2015 12 commits