Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exploration of the Lower Your Guards paper (#401)
* Init stack project explore/lower-your-guards * lyg test language parser works * basic gaurd tree desugaring * add basic uncovered set function * add pair datacons and pretty printer * inhabitants N function kind of works * Add types * inhabitants mostly working * pretty print patterns * start work on fresh * Fresh works! * Fixed arg id bug, fresh actually works now! * implement Show to make some printing better * done for day. Strange behavoir, check complex2/3 * switch to MaybeT / cleanup * nested patterns work! Still must tune up Int literal stuff, also see type equal TODO * positive info works * positive info and integer negative info work! * no longer list all dataconstructors anyway when covered * remove old negative only inhab code * cleanup comments in inhab hs * remove old TODO message * change refinement type formulas datatype to match paper Originally, I thought I had outsmarted the paper Not so, they broke things up into `Formula`s and `Literal`s for a good reason, which I rediscovered * auto run on files in test folder * huge overhaul to Inhabitants.hs. more to go, but significant cleanup done * refactor / cleanup adding constraints * refactor addLiteral previously known as (<+>) for readability * rename matching to onVar to avoid confusion * major cleanup to inhabitants + lots of documentation * cleanup Pos suffix, all functions use positive info now * small inhabitant cleanup + ready for big changes * play with map merge instead of logic solver idea in inhab2 * add Annotated tree and redundancy checking * attempt my own version of exhaustiveness checking * BROKEN, about to try list monad * match tree broken, might be a lost cause * combined UA function done! * Properly use Fresh moand in Inhabitation checks Before I was manually threading state By rewriting a few things, Fresh and Monad [] can coexist Really hope there are no regressions, I didn't spot any * add comments, prepare for simplification * add throol testcase, proves necessity of cart prod * create Possibilities newtype for lists, to make things more clear * cleanup inhabitants * document + move Possibilities to a new file * attempting to remove MatchInt (CURRENTLY BROKEN) * add int as opaque type, not weird exception (BROKEN) * inhab works again! needs cleanup * remove traces of IntLit, ready for MatchInfo merge * introduce HerebyBe, reads better, hopefully no regressions * Switch to TypedVar everywhere, add Be to MatchInfo * cleanup, commit to TypedVar * More cleanup * document bug, already fixed * clean up bug stuff / test case for termeq bug * small cleanup before merge * Remove unneeded todo * Restyle Exploration of the Lower Your Guards paper (#402) * Restyled by fourmolu * Restyled by hlint --------- Co-authored-by: Restyled.io <[email protected]> * Restyled by fourmolu (#403) Co-authored-by: Restyled.io <[email protected]> --------- Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com> Co-authored-by: Restyled.io <[email protected]>
- Loading branch information