Commit Graph

2668 Commits

Author SHA1 Message Date
Noah Haasis
07567521a2 Add the language overview to the README 2018-12-15 16:10:58 +01:00
Arya Irani
3f5aecd83a
Merge pull request #273 from noahhaasis/remove-todo
Remove obsolete todo
2018-12-15 09:13:26 -05:00
Arya Irani
42cf81d386
Merge pull request #272 from noahhaasis/fix-developmentmd
Fix the test command
2018-12-15 09:12:17 -05:00
Noah Haasis
98d1bb4057 Remove obsolete todo 2018-12-15 11:52:15 +01:00
Noah Haasis
5d59968fda Fix the test command 2018-12-15 11:09:01 +01:00
Arya Irani
24d6d9c564
Update CONTRIBUTORS.markdown 2018-12-10 15:14:32 -05:00
Arya Irani
923ea70248
Merge pull request #270 from noahhaasis/fix-comment
Change comment to match function behavour.
2018-12-08 14:01:48 -05:00
Noah Haasis
d2019dcf56 Change comment to match function behavour. 2018-12-08 10:48:23 +01:00
Arya Irani
a95b5fbbed
Merge pull request #267 from hepin1989/update-deps
Update dependencies for jvm-runtime.
2018-12-02 21:56:54 -05:00
hepin1989
788998e7d8 Update dependencies for jvm-runtime. 2018-12-01 14:19:03 +08:00
Paul Chiusano
04c310638b
Merge pull request #250 from unisonweb/wip/prettyprint.hs
Type pretty-printer
2018-09-24 19:16:51 -04:00
Chris Gibbs
190f1579dd Code review markups on Type pretty-printer
* (previous commit) backed out 'ambient round trip test' CPP thing in Builtin.hs - also it turned out
it was anyway only kicking in on my tests and on parsing of Builtins!  Would need to make it kick in during file parsing.
* Nest and group App chains properly
* Some extra nesting/grouping in foralls

Also fix rendering of unary tuples so they come out as `Pair a ()` rather than the ambiguous `(a)`.
2018-09-24 23:22:15 +01:00
Chris Gibbs
bfb2cb8d2e Revert "Scaffold for round-trip test of TypePrinter"
This reverts commit a6706b6829.
2018-09-24 21:13:07 +01:00
Paul Chiusano
079ce4b76f
Merge pull request #251 from unisonweb/topic/error-message-updates
introduced some error message debug flags in Unison.Settings...
2018-09-23 13:29:45 -04:00
Arya Irani
6a606f3dbe introduced some error message debug flags in Unison.Settings... 2018-09-23 12:34:14 -04:00
Chris Gibbs
0fed33475b A few more Type pretty-printer tests (some still pending) 2018-09-22 00:00:43 +01:00
Chris Gibbs
a6706b6829 Scaffold for round-trip test of TypePrinter
Adding a #define line to Builtin.hs (see the code), and running the tests, instruments
every call to Builtin.t, to test that the pretty-printer and parser are consistent, i.e.
that `parse . pretty = id` on that input.

Running this didn't throw up any new problems in the Type pretty-printer.  (It did throw up
a known limitation - lack of reversal of generalizeEffects - which is also covered by a pending
test in the suite.)

People may prefer that I take this code out again?
2018-09-22 00:00:38 +01:00
Chris Gibbs
14be343515 More work on Type pretty-printer
* Various tidy-ups.
* Fix bug with nested arrows.
* Enable ' sugar for delay even for chained delays.
* Add a 'Group' node everywhere parentheses might be output.

Also added a note to say I need to make it undo the effect of generalizeEffects.  But I plan to leave that til after the Term printer is done.
2018-09-22 00:00:37 +01:00
Chris Gibbs
026dc21a2e More work on effect and delay rendering in Type pretty-printer
Got through the confusion that was preventing me debug the "a ->{e} 'b" case.

Worked around lexer limitation in "a ->'{e} b" by rendering as "a -> '{e} b".

Realised that failure of "''a" is just a lexer limitation - "'('a)" works - so
intend to remove the code I added to prevent pretty-printer outputting chained
delays using the ' sugar.
2018-09-22 00:00:35 +01:00
Chris Gibbs
05f362e359 More work on effect and delay rendering in Type pretty-printer
Tricky interactions between the two...

Possibly uncovered a parser issue - see Test\TypePrinter.hs.
2018-09-22 00:00:34 +01:00
Chris Gibbs
7304708255 Add support for tuple and delay sugar to type-printer
The latter is unfinished.

Also fix a bug in the Pure' type smart pattern.
2018-09-22 00:00:32 +01:00
Chris Gibbs
0b18e0eb3e Code review markups on Type pretty-printer
Making changes as per Paul's comments at df938b2d85
2018-09-22 00:00:31 +01:00
Chris Gibbs
4fd2350f51 Integrate the Type pretty-printer with PrettyPrint.hs
Add line-break points at
* the space in a function application
* the space before the -> of an arrow
* the space after a comma in an effect list.

Presumably we might one day want to be able to express a preference between
breaking lines at these various points, and be able to control where
we indent to after the line break.

Still need to re-sugar pairs (,) and delay '

Also look into a regression where it seems like "Pair a b" is being parsed
as "Pair a (Pair b ())" (or at least printed that way).
2018-09-22 00:00:27 +01:00
Chris Gibbs
3db821f8f1 Add precedence support to the Type pretty-printer
...not that there are many levels of precedence to support - just 0 (normal) and 10 (type operator application).

Also render `Sequence a` as `[a]`.
2018-09-22 00:00:22 +01:00
Chris Gibbs
1c3ea375f3 Add EffectfulArrows' pattern for matching on Type
As per Paul's comment, except the for the extra `Maybe` so we can spot the difference between `a -> b` and `a ->{} b`.

So the pattern returns the following

  `(AnnotatedType v a, [(Maybe [AnnotatedType v a], AnnotatedType v a)])`

which gives the spine of function arguments, plus optional ability specifications on each arrow.

Plus use of this pattern in the Type pretty-printer.
2018-09-22 00:00:21 +01:00
Chris Gibbs
6dc1fe58bc Add basic pretty-printer for Types
Add pretty-printer for types, currently lacking precedence-awareness to suppress superfluous parentheses, and lacking integration with PrettyPrint.hs for line-breaking.

Next step is to fix those omissions, then move on to pretty-printing Terms, and data and effect declarations.
2018-09-22 00:00:19 +01:00
Arya Irani
c9e2f82041 start of PrettyPrinter.hs 2018-09-22 00:00:17 +01:00
Rúnar Óli Bjarnason
21df3334a2 Added a file watcher 2018-09-20 13:30:40 -04:00
Paul Chiusano
039bc8cf7f
Merge pull request #247 from unisonweb/topic/haskell-runtime
Merge WIP on a Haskell-based Unison runtime
2018-09-14 15:43:49 -04:00
Paul Chiusano
e23c0cadff
remove outdated comment 2018-09-12 09:49:40 -04:00
Paul Chiusano
56356a844a Merge remote-tracking branch 'origin/master' into topic/haskell-runtime
# Conflicts:
#	parser-typechecker/src/Unison/ABT.hs
2018-09-11 23:13:16 -04:00
Paul Chiusano
8e02bc46a3 Convert lambda application to let, get rid of Apply instruction
Calls to known functions are converted to let bindings
2018-09-11 23:10:00 -04:00
Arya Irani
e14063aa65
Update LICENSE 2018-09-11 14:37:42 -04:00
Rúnar
1020f9a7bc
Update CONTRIBUTORS.markdown 2018-09-11 07:32:42 -04:00
Paul Chiusano
7aada43ffd
Update CONTRIBUTORS.markdown 2018-09-10 23:20:23 -04:00
Paul Chiusano
43e107b56e
decided to keep blurbs more minimal 2018-09-10 23:15:54 -04:00
Paul Chiusano
c04ad64e57
Create CONTRIBUTORS.markdown 2018-09-10 22:38:39 -04:00
Paul Chiusano
248ebf1e0c made IR closed 2018-09-09 16:18:58 -04:00
Paul Chiusano
f3ff3b4ae6 Revert "simplify"
This reverts commit 6c54fe3933.
2018-09-09 15:43:28 -04:00
Paul Chiusano
6c54fe3933 simplify 2018-09-09 15:27:11 -04:00
Paul Chiusano
169c14f784 builtins 2018-09-09 15:05:14 -04:00
Paul Chiusano
f057e59df2 added separate static / dynamic apply IR 2018-09-07 23:41:13 -04:00
Paul Chiusano
2b1bd38246 successfully evaluated (x y -> x) 42 0 2018-09-07 16:55:52 -04:00
Paul Chiusano
493c052b18
Merge pull request #246 from unisonweb/topic/broken-continuations
Topic/broken continuations
2018-09-06 16:02:48 -04:00
Paul Chiusano
d8a4ba9d8e fix issue with Lambda.compose not working in presence of effects 2018-09-05 15:21:05 -04:00
Paul Chiusano
5291996c83 unpending some tests 2018-09-05 14:49:14 -04:00
Paul Chiusano
c6da34fd5e Add missing recursive ANF calls and update pretty-printer to not barf on ANF'd tuples 2018-09-05 11:30:43 -04:00
Arya Irani
880d521ae4 consolidate nested Apply in scala pretty-printer 2018-09-04 17:22:15 -04:00
Arya Irani
b9a97961a1
Merge pull request #245 from unisonweb/topic/minimize-components
fix bug with effects in block
2018-09-04 16:17:54 -04:00
Arya Irani
1f3f405274 better fix for tests/state2a-min.u (effects in non-recursive let rec) 2018-09-04 16:15:32 -04:00