Commit Graph

6989 Commits

Author SHA1 Message Date
Paul Chiusano
47122c2f5b It's... ALIVE!!!! The pretty printer is totally working on docs
View patterns ftw.
2021-04-06 21:19:52 -05:00
Paul Chiusano
46d5a94bc7 Doc2 prettyprinting WIP 2021-04-06 14:18:37 -05:00
Paul Chiusano
6aad4e79d4 Moar doc pretty printing helpers 2021-04-06 10:54:45 -05:00
Paul Chiusano
6abc4b7cbf helper functions for pretty printing doc2s 2021-04-05 21:46:17 -05:00
Paul Chiusano
a7f290b61a Switch to camel case for doc syntax, for easier pretty-printing 2021-04-05 21:02:27 -05:00
Paul Chiusano
02595c78f8 Allow a token immediately following @eval{..} 2021-04-05 09:50:46 -05:00
Paul Chiusano
79b7e218d7 fix term link rendering 2021-04-05 09:41:02 -05:00
Paul Chiusano
97a3d51756 Fix misc doc rendering issues 2021-04-05 09:25:45 -05:00
Paul Chiusano
713194ac35 Fix infinite loop in rendering of docs 2021-04-03 09:54:46 -05:00
Paul Chiusano
bfc6c3ed63 Fill in missing case in Pretty.map 2021-04-02 18:45:57 -05:00
Paul Chiusano
3e4163acce Merge remote-tracking branch 'origin/trunk' into topic/doc2a 2021-04-02 08:37:09 -05:00
Paul Chiusano
492e346a7b
Merge pull request #1854 from unisonweb/fix/thro 2021-04-01 14:36:47 -05:00
Dan Doel
9a7499ee95 Fix some uses of throwing in the new runtime
When adding arguments to the instruction for bug/todo output, some other
uses of throwing errors were neglected and passed the wrong number of
arguments. This change also customizes the error messages a bit
(although they do not quite match the old messages).
2021-04-01 14:41:24 -04:00
Paul Chiusano
9271749a04 Pull base.u out into its own file rather than embedding in the transcript 2021-03-31 20:44:01 -05:00
Paul Chiusano
c6ffbc8cf6 Add a grouping level to the docs element 2021-03-31 19:57:42 -05:00
Paul Chiusano
79cd41fb2e Merge remote-tracking branch 'origin/trunk' into topic/doc2a 2021-03-31 19:40:40 -05:00
Paul Chiusano
59c065727c Added annotations to source includes 2021-03-31 19:37:40 -05:00
Paul Chiusano
d9b70bc793 Error messages use suffixed names 2021-03-31 16:23:34 -05:00
Paul Chiusano
6d357dec83
Merge pull request #1852 from unisonweb/topic/decompiling
Keep track of more decompilation information.
2021-03-31 14:41:56 -05:00
Dan Doel
d3910d62a1 Keep track of more decompilation information.
In addition to the whole term for a combinator, each floated expression
is remembered so it can be used in decompilation when they are partially
applied.
2021-03-31 15:29:48 -04:00
Paul Chiusano
a059ae5815 Added anchor element and just using plain text for style arg 2021-03-31 10:55:23 -05:00
Paul Chiusano
bbbdbe0c69 Merge remote-tracking branch 'origin/trunk' into topic/doc2a 2021-03-29 19:50:43 -05:00
Paul Chiusano
71d6837ec1 Tweaks to Doc AST following feedback from Simon
Also added Pretty.table (untested)
2021-03-29 19:49:53 -05:00
Paul Chiusano
270fc5cb69 Sometime compiles for the docs command (untested) 2021-03-29 16:11:20 -05:00
Paul Chiusano
3ada3e0d98
Merge pull request #1851 from unisonweb/topic/decompiling
Avoid unnecessary floating of some lambdas
2021-03-29 11:31:25 -05:00
Dan Doel
05c2060548 Avoid unnecessary floating of some lambdas
- The old floater would float even
    x -> e
  into:
    let f x = e
        f
  which is quite unnecessary.

- It is also unnecessary to float a lambda immediately in the body of a
  let rec, because the entry point for a compiled let rec can take
  variables.

- The old floating behavior was essentially ensuring that lambda
  expressions could not be decompiled (currently), because they are
  turned into references to internal bindings of a top level combinator.

- Note that the transcript change is because we are serializing a
  different value, not because serialization has changed.
2021-03-28 18:07:33 -04:00
Paul Chiusano
4440aa002d display now applies doc rendering! 2021-03-26 13:10:52 -05:00
Paul Chiusano
ddc72fbc01 Display of definitions in the file is working 2021-03-25 23:12:15 -05:00
Paul Chiusano
fb99c608ec In theory display should get access to defs in the file now
Still need to supply alternate rendering function for docs
2021-03-25 22:58:18 -05:00
Paul Chiusano
764fa2f17d Display now takes a term rather than a referent, to support displaying terms from the file 2021-03-25 20:21:42 -05:00
Paul Chiusano
9d0a526f58 Adding some loop state so display can have access to latest typechecked file 2021-03-25 20:07:00 -05:00
Paul Chiusano
aec2ec3350 Filled in DisplayValues handing of evaluation 2021-03-25 17:01:05 -05:00
Paul Chiusano
378f769e60 DisplayValues now accepts a expression cache rather than a reference cache 2021-03-25 16:33:01 -05:00
Paul Chiusano
8813da9369 DisplayValues works with unannotated terms now
This is prep for allowing the cache used by display to work with whole terms rather than just references
2021-03-25 16:27:41 -05:00
Paul Chiusano
bfb08ab9a1 Simplify displayTerm 2021-03-25 15:34:39 -05:00
Paul Chiusano
192b431cb9 Populate the cache after evaluation1 if the caching flag is set 2021-03-25 15:18:48 -05:00
Paul Chiusano
015c85a9bd Use cache for the top level term in Runtime.evaluateTerm' 2021-03-25 15:13:47 -05:00
Paul Chiusano
7979190405 Added caching flag to Evaluate1 command 2021-03-25 15:07:31 -05:00
Paul Chiusano
37c040a29a
Merge pull request #1850 from JohannesHuster/redundant-commas-in-list
Allow redundant commas in list parsing
2021-03-24 14:43:07 -05:00
Hans Schuster
3ee004bd72 Allow redundant commas in lists
Allows multiple commas leading, trailing and between elements (Issue 1841)
2021-03-24 19:35:12 +01:00
Paul Chiusano
4e19a6837d filled in more of DisplayValues, just have eval left 2021-03-23 19:12:26 -05:00
Arya Irani
d20157079f
Merge pull request #1849 from bontaq/ian/run-matched-transcripts
Allow filtering of transcript tests by prefix
2021-03-21 15:55:26 -04:00
Ian
15f437ac60 Fix prefix-search halting early
If there weren't any matches in the first directory searched,
it was stopping with "hmm ... no test results recorded",
so we skip to the next test set if there are no transcripts
found.
2021-03-21 13:06:23 -04:00
Ian
e42d5c180e Update development md as well 2021-03-21 12:17:10 -04:00
Ian
ee98317fed Make transcript tests filterable by prefix
Now you can `stack exec transcripts -- prefix-of-test` like
`stack exec tests -- prefix`
2021-03-21 12:17:08 -04:00
Paul Chiusano
36aa82fb74
Merge pull request #1846 from unisonweb/ucm-env-vars-readme
Update README with ucm env var instructions
2021-03-19 09:40:58 -05:00
Simon Højberg
a725f91dab Env vars: rename UCM_BIND to UCM_HOST 2021-03-19 09:40:22 -04:00
Paul Chiusano
93c873b208
Merge pull request #1848 from unisonweb/fix/1844
Fix decompilation of 'large' constructors + extra
2021-03-18 17:16:53 -05:00
Paul Chiusano
d57ff32fd1 fill in more of DisplayValues 2021-03-18 17:16:25 -05:00
Dan Doel
b746803f20 Roll back an unintended modification to Transcripts.hs 2021-03-18 17:23:42 -04:00