1. 12 Jan, 2017 1 commit
  2. 06 Jan, 2017 2 commits
  3. 16 Dec, 2016 1 commit
  4. 15 Nov, 2016 1 commit
  5. 12 Oct, 2016 1 commit
  6. 21 Aug, 2016 1 commit
  7. 28 Jun, 2016 1 commit
    • Facundo Domínguez's avatar
      Stop the simplifier from removing StaticPtr binds. · dd92c67b
      Facundo Domínguez authored
      Summary:
      We have the FloatOut pass create exported ids for floated StaticPtr
      bindings. The simplifier doesn't try to remove those.
      
      This patch also improves on 7fc20b by making a common definition
      collectStaticPtrSatArgs to test for StaticPtr binds.
      
      Fixes #12207.
      
      Test Plan: ./validate
      
      Reviewers: simonpj, austin, bgamari, simonmar, goldfire
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2366
      
      GHC Trac Issues: #12207
      dd92c67b
  8. 22 Jun, 2016 1 commit
  9. 15 Jun, 2016 1 commit
    • Simon Peyton Jones's avatar
      Re-add FunTy (big patch) · 77bb0927
      Simon Peyton Jones authored
      With TypeInType Richard combined ForAllTy and FunTy, but that was often
      awkward, and yielded little benefit becuase in practice the two were
      always treated separately.  This patch re-introduces FunTy.  Specfically
      
      * New type
          data TyVarBinder = TvBndr TyVar VisibilityFlag
        This /always/ has a TyVar it.  In many places that's just what
        what we want, so there are /lots/ of TyBinder -> TyVarBinder changes
      
      * TyBinder still exists:
          data TyBinder = Named TyVarBinder | Anon Type
      
      * data Type = ForAllTy TyVarBinder Type
                  | FunTy Type Type
                  |  ....
      
      There are a LOT of knock-on changes, but they are all routine.
      
      The Haddock submodule needs to be updated too
      77bb0927
  10. 09 Jun, 2016 1 commit
  11. 20 Apr, 2016 1 commit
    • niteria's avatar
      Build a correct substitution in dataConInstPat · 62943d2a
      niteria authored
      This adds the tyvars of the domain of the substitution into the in-scope
      set as well.
      What I'm not sure here is if the kinds can have any free vars that
      should be in the in-scope set as well.
      
      Test Plan: ./validate
      
      Reviewers: goldfire, austin, bgamari, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: thomie, simonmar
      
      Differential Revision: https://phabricator.haskell.org/D2094
      
      GHC Trac Issues: #11371
      62943d2a
  12. 08 Apr, 2016 1 commit
  13. 29 Mar, 2016 1 commit
  14. 18 Feb, 2016 2 commits
    • 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.
      4d031cf9
    • 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)
      b5292557
  15. 30 Jan, 2016 1 commit
    • niteria's avatar
      Add asserts to other substitution functions · bb956eb8
      niteria authored
      This adds asserts to `substTys`, `substCo` and `substCos` in
      the same spirit as already existing asserts on `substTy`, protecting
      every possible entry point to `subst_ty` and `subst_co`.
      
      I've replaced the violators with unchecked versions.
      
      Test Plan: ./validate --slow
      
      Reviewers: simonpj, goldfire, austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1862
      
      GHC Trac Issues: #11371
      bb956eb8
  16. 27 Jan, 2016 2 commits
    • niteria's avatar
      Rename "open" subst functions · 5dcae88b
      niteria authored
      This is the renaming that @simonpj requested:
      ```
      · zipOpenTCvSubst  -> zipTvSubst   (It only deals with tyvars)
      
      · zipOpenTCvSubstCoVars -> zipCvSubst   (it only deals with
      covars)
      
      · zipOpenTCvSubstBinders ->  zipTyBinderSubst  (it only deals
      with TyBinders, not covars)
      ```
      plus the `mk` variant.
      
      Test Plan: ./validate
      
      Reviewers: simonpj, goldfire, austin, bgamari
      
      Subscribers: thomie, simonpj
      
      Differential Revision: https://phabricator.haskell.org/D1853
      
      GHC Trac Issues: #11371
      5dcae88b
    • Ömer Sinan Ağacan's avatar
      s/unLifted/unlifted for consistency · 4faa1a63
      Ömer Sinan Ağacan authored
      This was causing trouble as we had to remember when to use "unLifted"
      and when to use "unlifted".
      
      "unlifted" is used instead of "unLifted" as it's a single word.
      
      Reviewers: austin, hvr, goldfire, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1852
      4faa1a63
  17. 25 Jan, 2016 1 commit
    • Simon Peyton Jones's avatar
      Fix exprIsHNF (Trac #11248) · 3c060f36
      Simon Peyton Jones authored
      Blimey!  CoreUtils.exprIsHNFlike had not one but two bugs.
      
       * is_hnf_like treated coercion args like type args
         (result: exprIsHNF might wrongly say True)
      
       * app_is_value treated type args like value args
         (result: exprIsHNF might wrongly say False)
      
      Bizarre.  This goes back to at least 2012. It's amazing that it
      hasn't caused more trouble.
      
      It was discovered by a Lint error when compiling Trac #11248 with -O.
      3c060f36
  18. 20 Jan, 2016 2 commits
    • Simon Peyton Jones's avatar
      Oops. Add missing close-comment · 0373a845
      Simon Peyton Jones authored
      This fixes 514bac26 for Trac #11172.  Sorry!
      0373a845
    • Simon Peyton Jones's avatar
      Fix combineIdenticalAlts · 514bac26
      Simon Peyton Jones authored
      This long-standing bug in CoreUtils.combineIdenticalAlts
      was shown up by Trac #11172. The effect was that it returned
      a correct set of alternatives, but a bogus set of "impossible
      default constructors".  That meant that we subsequently
      removed all the alternatives from a case, and hence ended
      up with a bogusly empty case that should not have been empty.
      
      See Note [Care with impossible-constructors when
      combining alternatives] in CoreUtils.
      514bac26
  19. 19 Jan, 2016 1 commit
    • niteria's avatar
      Check InScopeSet in substTy and provide substTyUnchecked · 9d33adb6
      niteria authored
      This adds sanity checks to `substTy` that implement:
      
      > when calling substTy subst ty it should be the case that the in-scope
      > set in the substitution is a superset of
      > * The free vars of the range of the substitution
      > * The free vars of ty minus the domain of the substitution
      
      and replaces violators with unchecked version. The violators were found
      by running the GHC test suite.
      
      This ensures that I can work on this incrementally and that what I fix won't
      be undone by some other change.
      
      It also includes a couple of fixes that I've already done.
      
      Test Plan: ./validate
      
      Reviewers: simonmar, goldfire, simonpj, austin, bgamari
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1792
      
      GHC Trac Issues: #11371
      9d33adb6
  20. 18 Jan, 2016 1 commit
    • Jan Stolarek's avatar
      Replace calls to `ptext . sLit` with `text` · b8abd852
      Jan Stolarek authored
      Summary:
      In the past the canonical way for constructing an SDoc string literal was the
      composition `ptext . sLit`.  But for some time now we have function `text` that
      does the same.  Plus it has some rules that optimize its runtime behaviour.
      This patch takes all uses of `ptext . sLit` in the compiler and replaces them
      with calls to `text`.  The main benefits of this patch are clener (shorter) code
      and less dependencies between module, because many modules now do not need to
      import `FastString`.  I don't expect any performance benefits - we mostly use
      SDocs to report errors and it seems there is little to be gained here.
      
      Test Plan: ./validate
      
      Reviewers: bgamari, austin, goldfire, hvr, alanz
      
      Subscribers: goldfire, thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D1784
      b8abd852
  21. 31 Dec, 2015 1 commit
    • Simon Peyton Jones's avatar
      Improve exprIsBottom · 0579fe99
      Simon Peyton Jones authored
      This fixes Trac #11290, by being sligthtly cleverer about finding
      what expressions are bottom.  Actually this might have minor
      other side benefits.
      0579fe99
  22. 26 Dec, 2015 1 commit
    • eir@cis.upenn.edu's avatar
      Fix #11287. · da69358b
      eir@cis.upenn.edu authored
      Happily, the fix is simply deleting some old code. I love it when
      that happens.
      da69358b
  23. 17 Dec, 2015 1 commit
  24. 11 Dec, 2015 1 commit
    • eir@cis.upenn.edu's avatar
      Add kind equalities to GHC. · 67465497
      eir@cis.upenn.edu authored
      This implements the ideas originally put forward in
      "System FC with Explicit Kind Equality" (ICFP'13).
      
      There are several noteworthy changes with this patch:
       * We now have casts in types. These change the kind
         of a type. See new constructor `CastTy`.
      
       * All types and all constructors can be promoted.
         This includes GADT constructors. GADT pattern matches
         take place in type family equations. In Core,
         types can now be applied to coercions via the
         `CoercionTy` constructor.
      
       * Coercions can now be heterogeneous, relating types
         of different kinds. A coercion proving `t1 :: k1 ~ t2 :: k2`
         proves both that `t1` and `t2` are the same and also that
         `k1` and `k2` are the same.
      
       * The `Coercion` type has been significantly enhanced.
         The documentation in `docs/core-spec/core-spec.pdf` reflects
         the new reality.
      
       * The type of `*` is now `*`. No more `BOX`.
      
       * Users can write explicit kind variables in their code,
         anywhere they can write type variables. For backward compatibility,
         automatic inference of kind-variable binding is still permitted.
      
       * The new extension `TypeInType` turns on the new user-facing
         features.
      
       * Type families and synonyms are now promoted to kinds. This causes
         trouble with parsing `*`, leading to the somewhat awkward new
         `HsAppsTy` constructor for `HsType`. This is dispatched with in
         the renamer, where the kind `*` can be told apart from a
         type-level multiplication operator. Without `-XTypeInType` the
         old behavior persists. With `-XTypeInType`, you need to import
         `Data.Kind` to get `*`, also known as `Type`.
      
       * The kind-checking algorithms in TcHsType have been significantly
         rewritten to allow for enhanced kinds.
      
       * The new features are still quite experimental and may be in flux.
      
       * TODO: Several open tickets: #11195, #11196, #11197, #11198, #11203.
      
       * TODO: Update user manual.
      
      Tickets addressed: #9017, #9173, #7961, #10524, #8566, #11142.
      Updates Haddock submodule.
      67465497
  25. 04 Dec, 2015 1 commit
    • Simon Peyton Jones's avatar
      Case-of-empty-alts is trivial (Trac #11155) · 1c9fd3f1
      Simon Peyton Jones authored
      As you'll see from Trac #11155, the code generator was confused
      by a binding let x = y in ....   Why did that happen? Because of
      a (case y of {}) expression on the RHS.
      
      The right thing is just to expand what a "trivial" expression is.
      
      See Note [Empty case is trivial] in CoreUtils.
      1c9fd3f1
  26. 30 Jul, 2015 1 commit
    • Simon Peyton Jones's avatar
      Define DsUtils.mkCastDs and use it · 92d25672
      Simon Peyton Jones authored
      This change avoids a spurious WARNing from mkCast.  In the output of
      the desugarer (only, I think) we can have a cast where the type of the
      expression and cast don't syntactically match, because of an enclosing
      type-let binding.
      92d25672
  27. 16 Jul, 2015 2 commits
  28. 18 Jun, 2015 1 commit
  29. 01 Jun, 2015 1 commit
  30. 24 Mar, 2015 2 commits
  31. 23 Mar, 2015 4 commits