1. 23 Feb, 2016 7 commits
  2. 22 Feb, 2016 1 commit
  3. 21 Feb, 2016 3 commits
  4. 20 Feb, 2016 7 commits
  5. 19 Feb, 2016 5 commits
    • thomie's avatar
    • thomie's avatar
      Pass -haddock to tests in should_compile_*flag*_nohaddock · c6007fe6
      thomie authored
      should_compile_flag_nohaddock and should_compile_noflag_nohaddock
      contain the exact same tests. By passing `-haddock` to the tests in
      should_compile_**flag**_nohaddock, at least they're now testing
      different things.
      Add documentation.
    • thomie's avatar
      Modifier letter in middle of identifier is ok · d738e664
      thomie authored
      Refactoring only. Cleanup some loose ends from #10196.
      Initially the idea was to only allow modifier letters at the end of
      identifiers. Since we later decided to allow modifier letters also in
      the middle of identifiers (because not doing so would not fix the
      regression completely), the names `suffix` and `okIdSuffixChar` don't
      seem appropriate anymore.
      Remove TODO. Move test from should_fail to should_compile.
    • thomie's avatar
      Delete support for deprecated "-- # ..."-style haddock options · 2f733b3a
      thomie authored
      A long time ago, you could use `"-- # <haddock options>"` to mean that
      `<haddock options.` should be passed to `haddock`. Since 2007
      (03d8585e), using `OPTIONS_HADDOCK` is
      the preferred way to do this.
      Why is ok to remove support for "-- # .."?
      * It is not mentioned in the Haddock user's guide, nor are there any
        tests that use it.
      * Ever since 2011 (b3e30449), it doesn't
        actually work anymore. The function `getOptionsFromFile` uses
        `gopt_unset dflags Opt_Haddock` for other reasons, so even when
        running ghc with `--haddock`, the following rule always fires when the
        lexer sees "-- # ..", and it gets treated as a normal comment:
          -- Next, match Haddock comments if no -haddock flag
          "-- " [$docsym \#] .* / { ifExtension (not . haddockEnabled) } { lineCommentToken }
      Reviewed by: bgamari
      Differential Revision: https://phabricator.haskell.org/D1932
    • Gabor Greif's avatar
      A few more typos in non-code · 8b073f6c
      Gabor Greif authored
  6. 18 Feb, 2016 7 commits
    • Ben Gamari's avatar
      Bump haddock submodule · 0b68cbef
      Ben Gamari authored
    • Ben Gamari's avatar
      Unwire Typeable representation types · 206a8bf4
      Ben Gamari authored
      In order to make this work I needed to shuffle around typechecking a bit
      such that `TyCon` and friends are available during compilation of
      GHC.Types.  I also did a bit of refactoring of `TcTypeable`.
      Test Plan: Validate
      Reviewers: simonpj, austin
      Subscribers: simonpj, thomie
      Differential Revision: https://phabricator.haskell.org/D1906
      GHC Trac Issues: #11120
    • Simon Peyton Jones's avatar
      Take type-function arity into account · a008eadf
      Simon Peyton Jones authored
      ...when computing the size of a call on the RHS of a type
      instance declaration.
      This came up in Trac #11581.  The change is in
      which now trims the type arguments in a call.  See the
      comments with that function definition.
    • Simon Peyton Jones's avatar
      Improve piResultTys and friends · 4d031cf9
      Simon Peyton Jones authored
      Several things here:
      * Re-implement piResultTys so that its substitution has
        the correct in-scope set
        That means paying close attention to performance, since as we
        discovered in Trac #11371, it's a heavily used function and
        is often used on ordinary function types, with no foralls to
        worry about substituting.
      * Kill off applyTys, which was just the same as piResultTys.
      * Re-engineer MkCore.mkCoreApps so that it calls piResultTys,
        rather than repeatedly calling piResultTy.
    • Simon Peyton Jones's avatar
      (Another) minor refactoring of substitutions · b5292557
      Simon Peyton Jones authored
      No change in functionality here, but greater clarity:
      * In FamInstEnv.FlattenEnv, kill off the fi_in_scope field
        We are already maintaining an in-scope set in the fe_subst field,
        so it's silly do to it twice.
        (This isn't strictly connected to the rest of this patch, but
        the nomenclature changes below affect the same code, so I put
        them together.)
      * TyCoRep.extendTCVSubst used to take a TyVar or a CoVar and work
        out what to do, but in fact we almost always know which of the
        two we are doing.  So:
          - define extendTvSubst, extendCvSubst
          - and use them
      * Similar renamings in TyCoRep:
         - extendTCvSubstList        -->   extendTvSubstList
         - extendTCvSubstBinder      -->   extendTvSubstBinder
         - extendTCvSubstAndInScope  --> extendTvSubstAndInScope
      * Add Type.extendTvSubstWithClone, extendCvSubstWithClone
      * Similar nomenclature changes in Subst, SimplEnv, Specialise
      * Kill off TyCoRep.substTelescope (never used)
    • Simon Peyton Jones's avatar
      Fix desugaring of bang-pattern let-bindings · 01449eb5
      Simon Peyton Jones authored
      When implementing Strict Haskell, the patch 46a03fbe didn't faithfully
      implement the semantics given in the manual. In particular there was
      an ad-hoc case in mkSelectorBinds for "strict and no binders" that
      didn't work.
      This patch fixes it, curing Trac #11572.
      Howver it forced me to think about banged let-bindings, and I rather
      think we do not have quite the right semantics yet, so I've opened
      Trac #11601.
    • Ben Gamari's avatar
      Fix thinko that crept into D1908 · 27842ec1
      Ben Gamari authored
      RyanGlScott updated the Diff only after I had merged it.
  7. 17 Feb, 2016 10 commits
    • eir@cis.upenn.edu's avatar
      Comments only (#11513) · 0c420cb6
      eir@cis.upenn.edu authored
    • mark_christiaens's avatar
      users-guide: Fix typos · 525b54c4
      mark_christiaens authored
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1927
      GHC Trac Issues: #11590
    • Ryan Scott's avatar
      Remove superfluous code when deriving Foldable/Traversable · a82956df
      Ryan Scott authored
      Currently, `-XDeriveFoldable` and `-XDeriveTraversable` generate
      unnecessary `mempty` and `pure` expressions when it traverses of an
      argument of a constructor whose type does not mention the last type
      parameter. Not only is this inefficient, but it prevents `Traversable`
      from being derivable for datatypes with unlifted arguments (see
      Trac #11174).
      The solution to this problem is to adopt a slight change to the
      algorithms for `-XDeriveFoldable` and `-XDeriveTraversable`, which is
      described in [this wiki
      The wiki page also describes why we don't apply the same changes to the
      algorithm for `-XDeriveFunctor`.
      This is techincally a breaking change for users of `-XDeriveFoldable`
      and `-XDeriveTraversable`, since if someone was using a law-breaking
      `Monoid` instance with a derived `Foldable` instance (i.e., one where `x
      <> mempty` does not equal `x`) or a law-breaking `Applicative` instance
      with a derived `Traversable` instance, then the new generated code could
      result in different behavior. I suspect the number of scenarios like
      this is very small, and the onus really should be on those users to fix
      up their `Monoid`/`Applicative` instances.
      Fixes #11174.
      Test Plan: ./validate
      Reviewers: hvr, simonpj, austin, bgamari
      Reviewed By: simonpj, bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1908
      GHC Trac Issues: #11174
    • Gabriel439's avatar
      Derive Eq and Ord instance for SrcLoc and RealSrcLoc · 67d22261
      Gabriel439 authored
      The Eq and Ord instance were previously hand-written and this change
      updates them to be automatically derived by the compiler.  The derived
      behavior should be equivalent to the original.
      Reviewers: hvr, austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1913
    • eir@cis.upenn.edu's avatar
      Fix #11313. · a6152159
      eir@cis.upenn.edu authored
      Previously, we looked through synonyms when counting arguments,
      but that's a bit silly.
    • eir@cis.upenn.edu's avatar
      Fix #11246. · 489e6ab5
      eir@cis.upenn.edu authored
      We have to instantiate any invisible arguments to type families
      right away. This is now done in tcTyCon in TcHsType.
      testcase: typecheck/should_compile/T11246
    • eir@cis.upenn.edu's avatar
      Fix #11241. · 43468fe3
      eir@cis.upenn.edu authored
      When renaming a type, now looks for wildcards in bound variables'
      testcase: dependent/should_compile/T11241
    • eir@cis.upenn.edu's avatar
      Use CoercionN and friends in TyCoRep · 6f952f58
      eir@cis.upenn.edu authored
    • eir@cis.upenn.edu's avatar
      Remove extraneous fundeps on (~) · 7d8031ba
      eir@cis.upenn.edu authored
    • eir@cis.upenn.edu's avatar
      Add missing kind cast to pure unifier. · aff5bb47
      eir@cis.upenn.edu authored