ningning (Ningning Xie)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 27 2018, 11:24 AM (21 w, 4 d)

Recent Activity

Sat, Sep 15

ningning added a comment to rGHCea5ade34788f: Coercion Quantification.

Haddock is not updated properly so the build fails. We should correct

Sat, Sep 15, 12:55 PM

Fri, Sep 14

ningning updated the summary of D5054: Coercion Quantification.
Fri, Sep 14, 1:50 PM
ningning updated the diff for D5054: Coercion Quantification.

update haddock

Fri, Sep 14, 11:02 AM

Thu, Sep 13

ningning added a comment to D5054: Coercion Quantification.

If we want to commit it, we need to deal with submodule properly.
Here I updated submodule to a local commit as a reminder that we need to do that, but I have never updated haddock to match this patch.

Thu, Sep 13, 8:38 PM
ningning updated the diff for D5054: Coercion Quantification.

Address comments; rebase against master

Thu, Sep 13, 8:38 PM

Tue, Sep 11

ningning added a comment to D5054: Coercion Quantification.

@goldfire This patch now should have addressed most comments. Main changes include

Tue, Sep 11, 11:41 AM
ningning updated the diff for D5054: Coercion Quantification.

Clean up the commit tree

Tue, Sep 11, 11:25 AM
ningning updated the diff for D5054: Coercion Quantification.

final clean up; rebase against master

Tue, Sep 11, 11:12 AM

Mon, Sep 3

ningning added a comment to D5054: Coercion Quantification.

@goldfire The current implementation should have addressed most comments.
However I have several questions regarding HEq#.

Mon, Sep 3, 6:08 PM
ningning updated the diff for D5054: Coercion Quantification.

Address most comments: renaming of *_uncheck, correct weird typing rule for forallty, added TyConTyCoBinder, etc

Mon, Sep 3, 5:17 PM

Fri, Aug 31

ningning updated the diff for D5054: Coercion Quantification.

Address many comments: add ASSERTs; add type synonym TyVarBinder; correct UnivTyCoBinders to UnivTyBinder; some simplication of cases

Fri, Aug 31, 10:33 AM
ningning added a comment to D5054: Coercion Quantification.

Thanks for the detailed comments! @goldfire
I replied to some comments. Many other comments will be fixed in next diff.

Fri, Aug 31, 10:30 AM

Tue, Aug 28

ningning updated the diff for D5054: Coercion Quantification.

Small Fix (fix parsing errors)

Tue, Aug 28, 8:43 PM
ningning updated the diff for D5054: Coercion Quantification.

relocate ASSERTs

Tue, Aug 28, 7:48 PM
ningning added a comment to D5054: Coercion Quantification.

Thanks for the comments! @simonpj All the comments should be fixed in last diff.

Tue, Aug 28, 4:53 PM
ningning updated the diff for D5054: Coercion Quantification.

add ASSERT for smart constructors for ForAllCo; correct typos/annotations

Tue, Aug 28, 4:53 PM

Aug 25 2018

ningning updated the diff for D5054: Coercion Quantification.

rebase master; address comments; update submodule haddock

Aug 25 2018, 9:26 PM
ningning added a comment to D5054: Coercion Quantification.

@RyanGlScott Thanks for the quick feedbacks!

Aug 25 2018, 6:29 PM
ningning updated the diff for D5054: Coercion Quantification.

Address most comments: adding examples, annotations and notes

Aug 25 2018, 5:49 PM

Aug 24 2018

ningning added a comment to D5054: Coercion Quantification.

@simonpj Thanks for the comments!

Aug 24 2018, 11:20 AM
ningning added a comment to D5054: Coercion Quantification.

@RyanGlScott Thanks for the comment!

Aug 24 2018, 10:22 AM

Aug 9 2018

ningning updated the summary of D5054: Coercion Quantification.
Aug 9 2018, 2:46 PM
ningning created D5054: Coercion Quantification.
Aug 9 2018, 2:46 PM

Jul 28 2018

ningning added a reviewer for D5018: Fix #15453: bug in ForAllCo case in opt_trans_rule: RyanGlScott.
Jul 28 2018, 5:25 PM
ningning updated the diff for D5018: Fix #15453: bug in ForAllCo case in opt_trans_rule.

Add a test case as suggested by RyanGlScott

Jul 28 2018, 5:25 PM
ningning created D5018: Fix #15453: bug in ForAllCo case in opt_trans_rule.
Jul 28 2018, 3:01 PM

Jul 24 2018

ningning updated the diff for D4984: update core-spec for GRefl and re-factored Refl.

Update notation for MCoercion: MRefl as a dot; (MCo g) as g

Jul 24 2018, 8:45 PM

Jul 17 2018

ningning created D4984: update core-spec for GRefl and re-factored Refl.
Jul 17 2018, 9:02 PM

Jul 9 2018

ningning retitled D4747: Introduce generalized reflexive coercion (GRefl) from Refactor coercion rule to Introduce generalized reflexive coercion (GRefl).
Jul 9 2018, 8:27 PM
ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

update annotations for coercions; rebase on master

Jul 9 2018, 12:02 AM

Jul 4 2018

ningning added a comment to D4747: Introduce generalized reflexive coercion (GRefl).
  • Overall changes so far:
    1. Removed Refl r ty and CoherenceCo
    2. Introduced Refl ty and GRefl r ty MCoercion
      • Refl ty :: ty ~n ty, note that Refl ty is always nominal.
      • GRefl r ty MRefl :: ty ~r ty. If r == Nominal, use Refl.
      • GRefl r ty (MCo co) :: ty ~r ty |>co.
    3. Replaced original Refl Nominal ty with Refl ty.
    4. Given g1 :: s ~r t, to construct s |> g2 ~r t we used CoherenceCo g1 g2. It is now replaced with Sym (GRefl r s g2) ; g1. Similar for s ~ t |> g3.
    5. It turns out that the explicit patten match in homogenise_result in TcFlatten triggers some optimization of GHC and improves the performance. However it is not useful in master branch.
    6. Added a small regression for T9872d (the added number is the allocation of current master on T9872d).
    7. Added note about flatten_exact_fam_app_fully performance in TcFlatten.
  • Performance summary
    1. This patch intends to improve the overall performance about coercions.
    2. It does perform better in all cases under perf/compiler, except T9872b (0.6%), T9872d(3.7%), and T14683(0.02%).
    3. It failed T9872d, thus we added a small regression.
    4. It seems to perform better to compile large packages, e.g. Cabal.
  • TODO
    1. Further analysis of the performance: a step-by-step replay of the refactor following Simon's suggestion.
Jul 4 2018, 11:12 AM
ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

add notes for GRefl in TyCoRep, performance issue in TcFlatten, and regression for T9872d

Jul 4 2018, 10:42 AM

Jul 2 2018

ningning added a comment to D4747: Introduce generalized reflexive coercion (GRefl).

In the last week, by analyzing the comparing the ddump-simpl code, Richard and I captured a simple optimization.
In this last commit I refactored homogenise_result to patten match explicitly on kind_co to distinguish the case when kind_co is a GRefl co and the case when it is not. It improves the performance notably. Specifically, because flatten_args_fast always returns a Refl co, GHC can make use of this information to go directly into the case when kind_co is a GRefl co, which saves lots of allocation.

Jul 2 2018, 1:44 PM

Jun 29 2018

ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

try a small trick in homogenise_result

Jun 29 2018, 1:07 AM

Jun 26 2018

ningning added a comment to D4747: Introduce generalized reflexive coercion (GRefl).
Jun 26 2018, 8:57 PM

Jun 24 2018

ningning added a comment to D4747: Introduce generalized reflexive coercion (GRefl).

After some profiling, experiments, and discussions with Richard, we made some optimizations and got rid of one performance failure.
Unfortunately we still have 3 performance failures, for T9872a, T9872b, and T9872c, with deviation 6.7%, 5.7%, 6.3% respectively.
(latest master itself has deviation 3.5%, 3%, 3.35% on those cases.)

Jun 24 2018, 4:46 PM
ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

Some optimizations

Jun 24 2018, 3:38 PM

Jun 15 2018

ningning added a comment to D4747: Introduce generalized reflexive coercion (GRefl).

Current version adds the Nominal Reflexive Coercion Refl ty :: ty ~n ty.

Jun 15 2018, 8:49 PM
ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

Add Nominal Refl Coercion

Jun 15 2018, 8:33 PM

Jun 12 2018

ningning added a comment to D4747: Introduce generalized reflexive coercion (GRefl).

After several commits (some simplification for the smart constructors, saving bits whenever possible, etc.), we have a better deviation as 8.8%, 8.9%, 8.1%, 10.2%. At least a little bit progress?

Jun 12 2018, 12:18 AM
ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

address most comments from Richard

Jun 12 2018, 12:05 AM

Jun 9 2018

ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

clean up; add more annotations

Jun 9 2018, 11:32 AM

Jun 8 2018

ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

fix problematic cases according to Simon's comment

Jun 8 2018, 10:07 PM
ningning added inline comments to D4747: Introduce generalized reflexive coercion (GRefl).
Jun 8 2018, 8:07 PM
ningning added inline comments to D4747: Introduce generalized reflexive coercion (GRefl).
Jun 8 2018, 7:58 PM
ningning updated the summary of D4747: Introduce generalized reflexive coercion (GRefl).
Jun 8 2018, 2:39 PM
ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

Refactor Refl to GRefl

Jun 8 2018, 2:30 PM

May 29 2018

ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).
  • fix some comments
May 29 2018, 3:22 PM
ningning added inline comments to D4747: Introduce generalized reflexive coercion (GRefl).
May 29 2018, 2:05 PM

May 28 2018

ningning created D4747: Introduce generalized reflexive coercion (GRefl).
May 28 2018, 5:04 PM

May 16 2018

ningning updated the diff for D4699: Define MCoercion type.
  • update annotations for MCoercion
May 16 2018, 3:38 PM
ningning updated the summary of D4699: Define MCoercion type.
May 16 2018, 10:57 AM
ningning updated the summary of D4699: Define MCoercion type.
May 16 2018, 10:57 AM
ningning created D4699: Define MCoercion type.
May 16 2018, 9:54 AM