Tritlo (Matthías Páll Gissurarson)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 18 2017, 7:42 AM (79 w, 3 d)

Recent Activity

Aug 3 2018

Tritlo added a comment to rGHC588364c38530: Clone relevant constraints to avoid side-effects on HoleDests. Fixes #15370..

The failing T15370 was fixed in D4994.

Aug 3 2018, 9:47 PM

Jul 24 2018

Tritlo updated the diff for D5004: Clone relevant constraints to avoid side-effects on HoleDests. Fixes #15370..
  • Improve comment a bit.
Jul 24 2018, 11:34 AM
Tritlo created D5004: Clone relevant constraints to avoid side-effects on HoleDests. Fixes #15370..
Jul 24 2018, 11:18 AM

Jul 20 2018

Tritlo updated the diff for D4994: Fix the TcLevel not being set correctly when finding valid hole fits.
  • Make implementation more perspicuous and improve comment.
Jul 20 2018, 10:43 AM
Tritlo created D4994: Fix the TcLevel not being set correctly when finding valid hole fits.
Jul 20 2018, 9:11 AM

Jun 29 2018

Tritlo created D4909: Fix errors caused by invalid candidates leaking from hole fits.
Jun 29 2018, 8:02 AM

Jun 20 2018

Tritlo added a comment to D4848: Add flag to show docs of valid hole fits.

@bgamari I agree. Is there any other way to pass this information except via flags? I have it behind a flag precisely so that the length of the error message can be controlled by the user, as having the documentation along by default would be way too much. I'll be sure to update the valid hole fit output to utilize the tools that Trac #8809 will hopefully bring.

Jun 20 2018, 8:16 AM
Tritlo updated the summary of D4848: Add flag to show docs of valid hole fits.
Jun 20 2018, 8:16 AM
Tritlo updated the summary of D4848: Add flag to show docs of valid hole fits.
Jun 20 2018, 8:15 AM

Jun 19 2018

Tritlo added a comment to D4848: Add flag to show docs of valid hole fits.

@bgamari would it be possible to sneak this in with 8.6? It's very small and hidden behind the -fshow-docs-of-hole-fits flag, so it shouldn't pose a risk.

Jun 19 2018, 4:28 AM

Jun 17 2018

Tritlo added inline comments to D4848: Add flag to show docs of valid hole fits.
Jun 17 2018, 6:02 PM
Tritlo updated the diff for D4848: Add flag to show docs of valid hole fits.
  • Rollback changes to getDocs
Jun 17 2018, 6:02 PM
Tritlo updated the diff for D4848: Add flag to show docs of valid hole fits.
  • Refactor to remove dependency on InteractiveEval and hscGetModInterface
Jun 17 2018, 4:52 PM

Jun 15 2018

Tritlo added a comment to D4848: Add flag to show docs of valid hole fits.

extractDocs would only work for bindings local to the module.

Jun 15 2018, 10:01 AM
Tritlo updated the diff for D4848: Add flag to show docs of valid hole fits.
  • Add IFaceLoadError handling to getDocs and use extractDocs for local fits
Jun 15 2018, 9:07 AM
Tritlo added a reviewer for D4848: Add flag to show docs of valid hole fits: sjakobi.
Jun 15 2018, 7:41 AM
Tritlo added a comment to D4848: Add flag to show docs of valid hole fits.

Right, @sjakobi I can handle that for my usecase, but shouldn't it generally be a NoDocsInIface error as well?

Jun 15 2018, 7:06 AM
Tritlo added a comment to D4848: Add flag to show docs of valid hole fits.

@sjakobi @alexbiehl do you know what's going on with the test errors? They all seem to be variants of

Bad interface file: T11274.hi
    T11274.hi: openBinaryFile: does not exist (No such file or directory)

or

Compile failed (exit code 1) errors were:
[1 of 2] Compiling ValidHoleFits    ( ValidHoleFits.hs, ValidHoleFits.o )
[2 of 2] Compiling Foo              ( valid_hole_fits.hs, valid_hole_fits.o )
attempting to use module ‘main:Foo’ (valid_hole_fits.hs) which is not loaded
Jun 15 2018, 3:09 AM

Jun 14 2018

Tritlo updated the diff for D4848: Add flag to show docs of valid hole fits.
  • Fix typo in documentation of flag
Jun 14 2018, 6:08 PM
Tritlo updated the summary of D4848: Add flag to show docs of valid hole fits.
Jun 14 2018, 6:02 PM
Tritlo retitled D4848: Add flag to show docs of valid hole fits from Add flag to show docs of valid hole fits One issue with valid hole fits is that the function names can often be opaque for the uninitiated, such as ($). This diff adds a new flag, `-fshow-docs-of-hole-fits` that adds the documentation of the... to Add flag to show docs of valid hole fits.
Jun 14 2018, 6:02 PM
Tritlo created D4848: Add flag to show docs of valid hole fits.
Jun 14 2018, 6:02 PM

May 8 2018

Tritlo added a comment to D4444: Improved Valid Hole Fits.

I think I've resolved all the issues raised by @simonpj, and I'm quite happy with it as it is currently. If there aren't any other issues, I'd like to submit this for review @bgamari

May 8 2018, 7:42 PM

May 3 2018

Tritlo updated the diff for D4444: Improved Valid Hole Fits.
  • Revert unconstrained type variable check
May 3 2018, 4:41 AM
Tritlo added inline comments to D4444: Improved Valid Hole Fits.
May 3 2018, 4:35 AM

May 2 2018

Tritlo updated the diff for D4444: Improved Valid Hole Fits.
  • Add note to boot file, move isSolvedWC, and do not attempt to find all solutions to unconstrained type variables
May 2 2018, 11:55 AM
Tritlo added a comment to D4444: Improved Valid Hole Fits.

It does fix some tickets, at least those related to the tcLevels. They are now properly set. The drastically improved performance means that debugging some of the other tickets should now be feasible.
I'll add one more thing: If the type of the hole is a type variable with no relevant constraints, we'll only look at local bindings as possible substitutions. This should make fix the tickets where it hangs due to it matching all identifiers in scope.

May 2 2018, 7:26 AM

May 1 2018

Tritlo updated the diff for D4444: Improved Valid Hole Fits.

I think this is better now, and I've addresed the concerns @simonpj brought up. The relevant constraints and nested implication business is now much better documented, and there is better documentation all around. I've also added an alternative way to display the type applications, so instead of showing e.g.

May 1 2018, 3:37 PM

Apr 24 2018

Tritlo added a comment to D4444: Improved Valid Hole Fits.

I've addressed @simonpj's comments, and I think this is ready for review again, @bgamari.

Apr 24 2018, 7:32 AM

Apr 17 2018

Tritlo retitled D4444: Improved Valid Hole Fits from Refine valid substitutions to Improved Valid Hole Fits.
Apr 17 2018, 6:32 PM
Tritlo updated the diff for D4444: Improved Valid Hole Fits.
  • Update user_guide documentation and add mention to release notes.
Apr 17 2018, 12:53 PM
Tritlo updated the diff for D4444: Improved Valid Hole Fits.
  • [WIP] Update according to SPJ suggestions
  • Merge branch 'master' into wip-local-bindings-substitutions
  • Merge branch 'master' into wip-local-bindings-substitutions
  • Replace misplaced not
  • Rename to hole fits and address some SPJ comments
  • Address SPJ comments and improve notes and naming, and move tcCheckHoleFit to TcHoleErrors
Apr 17 2018, 12:36 PM

Apr 16 2018

Tritlo added a comment to D4444: Improved Valid Hole Fits.
Would "valid hole substitution" be OK?

Better, certainly.

But substitutions generally replace type variables with types, or term variables with terms. This replaces an anonymous hole with an identifier. "Substitution" is so widely used, I'd really prefer another word. How about "valid hole choice"?

Apr 16 2018, 6:39 PM
Tritlo added a comment to D4444: Improved Valid Hole Fits.

Generally a big step forward. Thank you!

Apr 16 2018, 4:20 AM

Apr 15 2018

Tritlo updated the summary of D4444: Improved Valid Hole Fits.
Apr 15 2018, 6:42 PM
Tritlo updated the summary of D4444: Improved Valid Hole Fits.
Apr 15 2018, 6:42 PM

Apr 14 2018

Tritlo updated the diff for D4444: Improved Valid Hole Fits.

We now find the substitutions using the proper manner, namely by solving nested implications. This entails that the givens are passed along using the implications the hole was nested in, which in turn should mean that there will be fewer weird bugs in the typed holes.

Apr 14 2018, 2:44 PM
Tritlo updated the diff for D4444: Improved Valid Hole Fits.

We now find the substitutions using the proper manner, namely by solving nested implications. This entails that the givens are passed along using the implications the hole was nested in, which in turn should mean that there will be fewer weird bugs in the typed holes.

Apr 14 2018, 2:38 PM

Apr 8 2018

Tritlo updated the diff for D4444: Improved Valid Hole Fits.

This updates the flags that control how the substitutions are displayed. The only thing missing now is to update the documentation, and this should be ready for review.

Apr 8 2018, 1:35 PM
Tritlo updated the diff for D4444: Improved Valid Hole Fits.
  • Fix cloned type variables leaking via matches
Apr 8 2018, 9:01 AM

Apr 7 2018

Tritlo added a comment to D4444: Improved Valid Hole Fits.

I think this is in pretty good shape now, except that the output can be a bit long sometimes. I'll add a few flags to configure the output, namely -fno-show-type-app-substitutions, -fno-show-func-type-substitutions, -fno-show-hole-matches-substitutions and -fno-show-provenance-substitutions, and their inverse counterparts. -funclutter-substitutions will then imply -fno-show-type-app-substitutions and -fno-show-provenance-substitutions. Another flag, -fbare-substitutions will imply all of the -fno-show-*-substitutions flags.

Apr 7 2018, 8:05 PM
Tritlo updated the diff for D4444: Improved Valid Hole Fits.
  • Add information at what types the substitutions match
Apr 7 2018, 7:48 PM
Tritlo updated the summary of D4444: Improved Valid Hole Fits.
Apr 7 2018, 3:32 PM
Tritlo updated the diff for D4444: Improved Valid Hole Fits.
  • Add tests which were missing from the test runner
  • Properly zonk valid substitutions before outputting
Apr 7 2018, 2:29 PM
Tritlo added a comment to D4444: Improved Valid Hole Fits.

I noticed that sometimes it says e.g. m0 a0 or f0 a0, but the constraints on m0 and f0 are missing. I'd like to add these to the output, so please wait a bit :)

Apr 7 2018, 12:07 PM
Tritlo updated the diff for D4444: Improved Valid Hole Fits.
  • Sort substitutions and use unclutter to combat test churn
Apr 7 2018, 7:43 AM

Apr 6 2018

Tritlo updated the diff for D4444: Improved Valid Hole Fits.
  • Merge branch 'master' into local-binding-substitutions
Apr 6 2018, 8:10 PM
Tritlo added a comment to D4444: Improved Valid Hole Fits.

Hmm, there seem to be some new things on master causing the tests to fail. I'll merge and update.

Apr 6 2018, 7:15 PM
Tritlo updated the diff for D4444: Improved Valid Hole Fits.
  • Address warnings
Apr 6 2018, 3:59 PM
Tritlo retitled D4444: Improved Valid Hole Fits from Allow solveable substitutions to Refine valid substitutions.
Apr 6 2018, 3:27 PM
Tritlo updated the diff for D4444: Improved Valid Hole Fits.

Rework valid substitutions a bit

Apr 6 2018, 3:27 PM

Mar 19 2018

Tritlo added a comment to D4444: Improved Valid Hole Fits.

After having a chance to sit down with SPJ on Friday, we found out that a rework of the valid substitutions is in order, to make it more in line with how the constraint solver expects things to be done. This should make it much more solid and versatile. As part of that, I'll be splitting the code out into a different module (I assume TcValidSubstitutions.hs or maybe TcHoleSuggestions.hs, I'm not sure yet) and rewriting it in terms of solving wrapped implications (instead of the current "Just try to solve the subtype constraint" as it is currently). I'll keep this diff open and update it with the relevant code when I've made more progress, but don't worry about it until then.

Mar 19 2018, 10:05 AM

Feb 26 2018

Tritlo added a comment to D4444: Improved Valid Hole Fits.

Wait, this is based off of the wrong commit, with all the stuff from the refinement substitution patch included. I'll update this to be based on master shortly.

Feb 26 2018, 4:11 PM

Feb 23 2018

Tritlo updated the summary of D4444: Improved Valid Hole Fits.
Feb 23 2018, 8:15 AM
Tritlo updated the diff for D4444: Improved Valid Hole Fits.
  • Refactor pattern match in TcSimplify and update incorrect test output
Feb 23 2018, 7:45 AM
Tritlo updated the summary of D4444: Improved Valid Hole Fits.
Feb 23 2018, 7:23 AM
Tritlo retitled D4444: Improved Valid Hole Fits from Allow solveable substitutions This extends the current valid substitution functionality to allow substitutions which involve unsolved constraints to appear in the list of valid substitutions. This allows e.g. substitutions like `maxmimum` for... to Allow solveable substitutions.
Feb 23 2018, 7:23 AM
Tritlo created D4444: Improved Valid Hole Fits.
Feb 23 2018, 7:22 AM

Feb 13 2018

Tritlo added a comment to D4357: Add valid refinement substitution suggestions for typed holes.

Alright @bgamari, I've addressed your comments (I think), refactored a bit and added a testcase for the -fabstract-refinement-substitutions flag, which I had neglected. Would you mind taking another look?

Feb 13 2018, 3:01 PM
Tritlo added a comment to D4357: Add valid refinement substitution suggestions for typed holes.
Feb 13 2018, 5:51 AM
Tritlo updated the diff for D4357: Add valid refinement substitution suggestions for typed holes.
  • Refactor mkRefTys and improve documentation of refinement substitutions.
Feb 13 2018, 5:50 AM

Feb 1 2018

Tritlo updated the diff for D4357: Add valid refinement substitution suggestions for typed holes.
  • Refactor abstract refinement checking, and use isFilledMetaTyVar for future proofing
Feb 1 2018, 10:02 PM
Tritlo updated the diff for D4357: Add valid refinement substitution suggestions for typed holes.
  • Fix tiny error in documentation
Feb 1 2018, 9:08 PM
Tritlo updated the diff for D4357: Add valid refinement substitution suggestions for typed holes.

Removed the accidentally included profiling test outputs.

Feb 1 2018, 9:04 PM
Tritlo updated the diff for D4357: Add valid refinement substitution suggestions for typed holes.
  • Remove refinements of the form head _ _, which are unlikely to be useful. They can optionally be enabled by setting the -fabstract-refinement-substitutions flag.
Feb 1 2018, 8:55 PM
Tritlo updated the diff for D4357: Add valid refinement substitution suggestions for typed holes.
  • Add refinement substitutions
  • Sort and limit refinement substitutions as a bundle
Feb 1 2018, 4:23 PM
Tritlo added a comment to D4357: Add valid refinement substitution suggestions for typed holes.

There's a small bug in that each refinement level is sorted and outputted separately. I'll update the patch to remedy that shortly, so that the the top suggestions are the most "relevant" according to the sorting.

Feb 1 2018, 11:18 AM

Jan 31 2018

Tritlo added a comment to D4357: Add valid refinement substitution suggestions for typed holes.

I changed this diff a whole lot, since I realized that the previous diff was not really worthy of a patch and this includes the flag implemented in that patch. I hope it's not bad form :)

Jan 31 2018, 1:39 PM
Tritlo updated the diff for D4357: Add valid refinement substitution suggestions for typed holes.
  • Add refinement substitutions
Jan 31 2018, 1:19 PM
Tritlo retitled D4357: Add valid refinement substitution suggestions for typed holes from Add -funclutter-valid-substitutions to Add valid refinement substitution suggestions for typed holes.
Jan 31 2018, 1:18 PM

Jan 30 2018

Tritlo updated the diff for D4357: Add valid refinement substitution suggestions for typed holes.

Fix bug in documentation causing build to fail.

Jan 30 2018, 2:56 PM
Tritlo updated the diff for D4357: Add valid refinement substitution suggestions for typed holes.

Fixed some spelling errors in the documentation. Sorry!

Jan 30 2018, 2:56 PM
Tritlo created D4357: Add valid refinement substitution suggestions for typed holes.
Jan 30 2018, 1:16 PM

Jan 23 2018

Tritlo added a comment to D4326: Sort valid substitutions for typed holes by "relevance".

One question: how do you sort the results that are not comparable? Is that strong enough to avoid test case churn?

Jan 23 2018, 11:39 AM
Tritlo updated the diff for D4326: Sort valid substitutions for typed holes by "relevance".

This change documents the new valid substitution feature in the user guide under Typed Holes and updates the examples provided there to match the current output. This also moves the documentation of the flags related to valid substitutions under the same section, and gives a better explanation of them.

Jan 23 2018, 10:53 AM
Tritlo added inline comments to D4326: Sort valid substitutions for typed holes by "relevance".
Jan 23 2018, 9:41 AM
Tritlo added a comment to D4326: Sort valid substitutions for typed holes by "relevance".

@dfeuer Could you have another look? :)

Jan 23 2018, 9:28 AM

Jan 22 2018

Tritlo updated the diff for D4326: Sort valid substitutions for typed holes by "relevance".

I accidentally changed lclFits to gblFits in one place while reverting a change I did while debugging. That has now been fixed, sorry!

Jan 22 2018, 4:25 AM
Tritlo updated the diff for D4326: Sort valid substitutions for typed holes by "relevance".

I've fixed the issues that @dfeuer brought to light, and added a note to the comment on how sorting can be disabled.

Jan 22 2018, 4:25 AM
Tritlo added inline comments to D4326: Sort valid substitutions for typed holes by "relevance".
Jan 22 2018, 4:25 AM

Jan 21 2018

Tritlo updated the diff for D4326: Sort valid substitutions for typed holes by "relevance".

This changes the Ord class of HoleFit to be based on the name of the identifier in the hole instead of the Identifier itself, to avoid any non-determinisim due to nonDetCmpVar being used when ordering Ids. This also sorts the locals and globals in isolation, since we want the locals to appear first in any case.

Jan 21 2018, 11:36 AM
Tritlo updated the diff for D4326: Sort valid substitutions for typed holes by "relevance".

Whoops. Of course the sorting should be done only on the found substitutions, and not on all the globalRdrEnvElts. Sorry about that!

Jan 21 2018, 9:21 AM
Tritlo updated the diff for D4326: Sort valid substitutions for typed holes by "relevance".

Before checking for whether things fit, we now also sort the elements to be checked (the globalRdrEnvElts list) prior to checking. This is so that tests do not change when functions are reordered within modules.

Jan 21 2018, 9:07 AM

Jan 19 2018

Tritlo updated the diff for D4326: Sort valid substitutions for typed holes by "relevance".

I missed a mention of talking about steps in the note. Should be good now.

Jan 19 2018, 9:30 AM
Tritlo updated the summary of D4326: Sort valid substitutions for typed holes by "relevance".
Jan 19 2018, 7:25 AM
Tritlo updated the diff for D4326: Sort valid substitutions for typed holes by "relevance".

I've updated the note to match the implementation, and done some refactoring to make the code cleaner.

Jan 19 2018, 6:17 AM
Tritlo updated the diff for D4326: Sort valid substitutions for typed holes by "relevance".

This is a more refined version that takes the found substitutions and builds a subsumption graph (i.e. based on which fit subsumes which other fit) and then outputs the fits in the order defined by a topological sort on this graph. This makes "more specific" suggestions appear earlier in the list, and suggestions like "undefined" appear later, which certainly improves relevance.

Jan 19 2018, 5:47 AM

Jan 18 2018

Tritlo added a comment to D4326: Sort valid substitutions for typed holes by "relevance".

I'm currently working on an improved version, which orders the suggestions based on the subsumption relation graph that they form. This makes the most specific (and thus the "best fit") to appear first in the list. I'll upload it when I've finished building it.

Jan 18 2018, 10:14 PM
Tritlo retitled D4326: Sort valid substitutions for typed holes by "relevance" from Sort valid substitutions for typed holes by number of steps taken by the simplifier as a proxy for "relevance" to Sort valid substitutions for typed holes by "relevance".
Jan 18 2018, 9:34 PM
Tritlo updated the diff for D4326: Sort valid substitutions for typed holes by "relevance".

Merge with master so that the changes are clear.

Jan 18 2018, 3:57 PM
Tritlo created D4326: Sort valid substitutions for typed holes by "relevance".
Jan 18 2018, 3:21 PM

Jan 17 2018

Tritlo updated the diff for D4315: Inform hole substitutions of typeclass constraints (fixes #14273)..

I updated the note to match what we do now, described how the confusion was revealed and the trickiness involved in solving Trac #14273.
I also made some minor adjustment to other comments, and added an explanatory comment to where we filter the constraints to only
relevant constraints. Thanks for the review!

Jan 17 2018, 6:53 PM

Jan 16 2018

Tritlo added a comment to D4315: Inform hole substitutions of typeclass constraints (fixes #14273)..

Sorry about all the builds! I'd stop all but the latest one, but I don't have clearance.

Jan 16 2018, 9:21 AM
Tritlo updated the diff for D4315: Inform hole substitutions of typeclass constraints (fixes #14273)..

Added a test for interactions with constraints, and also a test for two holes.

Jan 16 2018, 9:10 AM
Tritlo updated the diff for D4315: Inform hole substitutions of typeclass constraints (fixes #14273)..

Removed commented out code. Sorry about that!

Jan 16 2018, 8:50 AM
Tritlo updated the diff for D4315: Inform hole substitutions of typeclass constraints (fixes #14273)..

After a chat with Iceland_Jack, I realized that the interaction with GADTs wasn't working,
and it also wasn't picking up any data constructors. It now finds dataconstructors as well,
and works for GADTs.

Jan 16 2018, 8:44 AM
Tritlo updated the diff for D4315: Inform hole substitutions of typeclass constraints (fixes #14273)..

Remove unused where definition.

Jan 16 2018, 6:34 AM

Jan 15 2018

Tritlo updated the diff for D4315: Inform hole substitutions of typeclass constraints (fixes #14273)..

Add new output for valid_substitutions.hs testing for missing identifiers.

Jan 15 2018, 9:08 PM
Tritlo added inline comments to D4315: Inform hole substitutions of typeclass constraints (fixes #14273)..
Jan 15 2018, 9:04 PM
Tritlo updated the diff for D4315: Inform hole substitutions of typeclass constraints (fixes #14273)..

This fixes some possible substitutions being erroneously filtered out due to the relevant binding
set being incorrectly calculated. I've added a test case (in valid_substitutions.hs, the hole in c
shows b neither as a valid substitutions nor a relevant binding, even though it is) to test it, and
modified the other test cases to reflect that relevant binindgs are now shown as well.

Jan 15 2018, 9:04 PM