Commit Graph

802 Commits

Author SHA1 Message Date
Chris Gibbs
5948f5af54 tweak TODO comment 2018-10-27 15:24:54 +01:00
Paul Chiusano
40a86dacbb Merge remote-tracking branch 'origin/topic/termprinter2' into topic/termprinter-integrate
# Conflicts:
#	parser-typechecker/tests/Unison/Test/TermPrinter.hs
#	parser-typechecker/tests/Unison/Test/TypePrinter.hs
2018-10-27 02:54:07 -04:00
Arya Irani
df9aac0724 Merge branch 'topic/codebase-editor' of github.com:unisonweb/unison into topic/codebase-editor 2018-10-26 20:13:34 -04:00
Arya Irani
8e64102735 add EOF handler 2018-10-26 20:08:52 -04:00
Paul Chiusano
c4c42a10d6 add command now updates namespace, also added really barebones 'list' command 2018-10-26 19:52:59 -04:00
Paul Chiusano
539c866dd3 adding more helper functions to Branch 2018-10-26 11:03:08 -04:00
Paul Chiusano
6699c2c932 Merge branch 'topic/codebase-editor' of https://github.com/unisonweb/unison into topic/codebase-editor 2018-10-26 10:48:23 -04:00
Paul Chiusano
215fa1c874 filling in addDefinition 2018-10-26 10:48:04 -04:00
Arya Irani
1a95fa2ca4 Merge branch 'topic/codebase-editor' of github.com:unisonweb/unison into topic/codebase-editor 2018-10-26 09:26:56 -04:00
Arya Irani
12c8c59d7a cherry-pick colortext cleanup and merge prettyTypecheckedFile' 2018-10-26 09:26:47 -04:00
Paul Chiusano
bc9fe24db9 sorting data declaration constructors by hash 2018-10-26 09:20:41 -04:00
Paul Chiusano
431137cf03 WIP actually adding the definitions to the codebase 2018-10-25 21:49:40 -04:00
Paul Chiusano
8cfb1d3913 add pattern namespace to Branch 2018-10-25 21:04:40 -04:00
Paul Chiusano
18935736e2 bit of formatting cleanup 2018-10-25 20:29:07 -04:00
Paul Chiusano
ec09ad2b28 tweaks to file printing 2018-10-25 15:25:03 -04:00
Paul Chiusano
411a939a5a filled in 'add' command implementation and now printing out both types and terms in the file 2018-10-25 15:18:44 -04:00
Arya Irani
9db597ee5a quick attempt at Menu.groupMenuN 2018-10-25 11:16:03 -04:00
Paul Chiusano
1a4a9f1744 convenience function 2018-10-24 21:29:42 -04:00
Chris Gibbs
9f164fba4f Termprinter support for 'f (delay) sugar 2018-10-25 00:05:22 +01:00
Paul Chiusano
34997cc2cd Merge remote-tracking branch 'origin/topic/codebase-editor' into wip/refrefactor 2018-10-24 18:35:38 -04:00
Paul Chiusano
ad2cf5a13d finished with Haskell side and tests still pass
Just need to update Scala side
2018-10-24 18:35:16 -04:00
Chris Gibbs
25f5f46b61 Termprinter support for !f (bang/force) sugar 2018-10-24 23:14:08 +01:00
Chris Gibbs
39ed4a0acb Revive nesting in TypePrinter 2018-10-24 21:37:03 +01:00
Chris Gibbs
ae14da1f8a Simplify pretty-printing of infix operators
So it turns out there is a simpler way - just pass an extra parameter into the pattern that eats up an infix operator sequence, to control how the pattern match works.

This commit removes the tortuous code that unpicks the over-eager pattern match.

I should learn to stop sooner when things get too complicated...
2018-10-24 20:48:15 +01:00
Arya Irani
7120829c55 switch let for where 2018-10-24 11:41:54 -04:00
Paul Chiusano
4d7f772082 define hashDecls in terms of ABT.hashComponents 2018-10-24 10:41:02 -04:00
Paul Chiusano
802e4f0419 Merge remote-tracking branch 'origin/topic/codebase-editor' into wip/refrefactor 2018-10-24 10:13:46 -04:00
Paul Chiusano
f94330b0a5 wip refactoring Reference to allow a Ref to refer to a cycle 2018-10-24 10:13:29 -04:00
Arya Irani
9c04dbdc86 formatting bugs 2018-10-23 22:17:01 -04:00
Arya Irani
c2d60eb728 Merge remote-tracking branch 'origin/topic/codebase-editor' into topic/codebase-editor 2018-10-23 21:55:26 -04:00
Arya Irani
4c96b92bca wrapping up first draft of Menu.menu1 and groupMenu1 2018-10-23 21:54:05 -04:00
Paul Chiusano
55aafdc237 Merge branch 'wip/hashComponents' into topic/codebase-editor 2018-10-23 21:38:20 -04:00
Paul Chiusano
cc70589fd7 a bit of docs on ABT.hashComponents 2018-10-23 21:37:56 -04:00
Arya Irani
7a985be04f Merge branch 'topic/codebase-editor' into topic/menu 2018-10-23 19:08:28 -04:00
Paul Chiusano
54b2723a18 generic ABT.hashComponents function 2018-10-23 18:33:18 -04:00
Arya Irani
81e791067f menu wip 2018-10-23 18:15:56 -04:00
Paul Chiusano
2c678a6918 wip factoring out logic for hashing strongly connected components 2018-10-23 17:38:58 -04:00
Paul Chiusano
ac5f973efc Add ABT.hashComponent, to be used for hashing a strongly connected component 2018-10-23 17:16:29 -04:00
Paul Chiusano
8b63f9097d menu signature changes 2018-10-23 14:04:50 -04:00
Paul Chiusano
9e010cd70d Merge remote-tracking branch 'origin/topic/menu' into topic/codebase-editor 2018-10-23 13:59:16 -04:00
Arya Irani
f97c371dd0 promote some ColorText helper functions 2018-10-23 11:48:58 -04:00
Arya Irani
9b708bc374 updated signatures in Menu 2018-10-23 11:47:29 -04:00
Paul Chiusano
f33d6815c7 top level components have types in v rather than TypeVar v
TypeVar is just an implementation detail of the typechecker and is used for types that may have unbound existentials. Top level definitions can't have unbound existentials as they aren't nested inside of any other definitions. Added helper functions `Type.toTypeVar/generalizeAndUnTypeVar` and `Term.unTypeVar` used for converting to and from terms / types in `v` vs `TypeVar v`.
2018-10-23 11:36:02 -04:00
Paul Chiusano
af83ed6903 delete unused Session type for now 2018-10-23 11:31:20 -04:00
Arya Irani
83e5f69911 auto-generate Monoid instances in AnnotatedText 2018-10-23 11:13:50 -04:00
Paul Chiusano
0bc58352bb stubbed out menu interface 2018-10-23 09:45:39 -04:00
Chris Gibbs
b67b4635c5 Add support for infix syntax (x + y) to TermPrinter
Crikey that was tricky...
* First use a pattern synonym to gather sequences of the form x + y `foo` z.
  * (We can't just use the trick of rendering each operator application one at a time, because then we'd
    end up wanting the precedence level for infix applications to be both greater than and less than
    regular function applications - to get the brackets right in f (x + y) and (f x) + y respectively.)
* Then rule out things like `foo` from being rendered as infix, by telescoping parts of the sequence back down into a single Term.
* Take care not to infinite loop between the above two steps.
2018-10-23 01:57:10 +01:00
Paul Chiusano
38710c71e7 refactored component printing to be more reusable and started on add command 2018-10-22 16:22:28 -04:00
Paul Chiusano
428dcfffbe ignore info notes if there's a compile error 2018-10-22 15:24:56 -04:00
Paul Chiusano
b72a082238 lexer change for a comment that extends to end of file 2018-10-22 15:19:03 -04:00