Commit Graph

4396 Commits

Author SHA1 Message Date
Arya Irani
8882687d5d added more error info for getCycleLen 2021-04-27 14:00:38 -06:00
Arya Irani
30c8881c36 a few fixes:
- try not to continue working out of git cache
- turn off cursor during sync22
- after codebase upgrade, set the replaced branch as root instead of the original
- disable root branch update watch thing that didn't work
- add term to git-simple sub-namespace test
2021-04-27 12:55:53 -06:00
Mitchell Rosen
9b5a6edf4a ⅄ trunk → delete-old-runtime 2021-04-27 09:39:55 -04:00
Mitchell Rosen
e643c3d639 new-runtime-transcripts -> transcripts-with-base 2021-04-27 09:33:20 -04:00
Arya Irani
0934e8cc7c Merge remote-tracking branch 'origin/topic/dump-namespace' into wip/codebase2
# Conflicts:
#	parser-typechecker/unison-parser-typechecker.cabal
2021-04-26 22:19:23 -06:00
Paul Chiusano
eba5ab23aa
Merge pull request #1889 from unisonweb/fix/1888
Fix issue with Bytes.at always returning `None` in new runtime
2021-04-26 13:41:12 -05:00
mergify[bot]
2f96b38664
Merge pull request #1893 from unisonweb/topic/dump-namespace
add debug.dump-namespace command
2021-04-26 17:08:47 +00:00
Paul Chiusano
d730346893
Merge pull request #1887 from unisonweb/topic/docs-command-fix
Fix to anonymous doc name selection
2021-04-26 11:19:33 -05:00
Arya Irani
7888a41086 add debug.dump-namespace command 2021-04-26 09:59:40 -06:00
Mitchell Rosen
14f03adbcc ⅄ delete-old-runtime → delete-old-runtime-codebase2 2021-04-25 22:34:02 -04:00
Mitchell Rosen
722ae5ae1d indent call to launch 2021-04-25 20:57:20 -04:00
Mitchell Rosen
f4e353f925 ⅄ trunk → codebase2-merge-trunk 2021-04-25 20:46:03 -04:00
Mitchell Rosen
4c57092398 ⅄ trunk → delete-old-runtime 2021-04-25 20:43:32 -04:00
Paul Chiusano
2599866dea fix #1888 2021-04-24 14:59:12 -05:00
Paul Chiusano
5332cfa89d Add regression test 2021-04-24 13:09:59 -05:00
Paul Chiusano
0191828242 Add comment 2021-04-23 16:36:05 -05:00
Paul Chiusano
f587657adf Fix to anonymous doc name selection
Also allow docs command to use suffixed names from the latest file
2021-04-23 13:48:27 -05:00
Rúnar
1063708450 Make suffixification optional 2021-04-22 22:33:28 -04:00
Rúnar
9a7a1fd78e Always suffixify types and terms on the server. 2021-04-22 21:58:45 -04:00
Rúnar
2782d522db Add an option to suffixify binding names in defs 2021-04-22 15:13:00 -04:00
Rúnar
1350371f88 Add term tags and type tags to definitions 2021-04-22 13:53:55 -04:00
Mitchell Rosen
ac5d1a0056 Delete more io things from IOSource.hs 2021-04-21 21:35:48 -04:00
Arya Irani
1900f20138 copy upgrade12 tests to gitsimple also 2021-04-21 14:04:24 -06:00
Arya Irani
91020f526d remove explicit db connection cleanup actions
while we come up with a better design
2021-04-21 13:53:47 -06:00
Rúnar
404196bcdd Fixes #1878 2021-04-21 15:21:29 -04:00
Mitchell Rosen
bc5cd858f8 Delete io.IO type 2021-04-17 16:55:12 -04:00
Mitchell Rosen
d8ba2c5503 Delete Unison.Test.IO 2021-04-17 16:45:12 -04:00
Rúnar
e0a008f916 Simplify 2021-04-15 21:24:05 -04:00
Rúnar
ab9845af67 Don't wait for CTRL-D before starting up server 2021-04-15 21:01:37 -04:00
Mitchell Rosen
140cf69624 remove old runtime transcripts 2021-04-15 20:42:11 -04:00
Mitchell Rosen
7c0f8ac20b remove Rt1.hs, Rt1IO.hs 2021-04-15 20:37:15 -04:00
Mitchell Rosen
1804ab9d53 remove new runtime arg from UnisonSources test 2021-04-15 20:36:00 -04:00
Mitchell Rosen
e25e43edc9 fix tests 2021-04-15 20:31:12 -04:00
Mitchell Rosen
6019b02787 remove new runtime arg from CommandLine.Main.main 2021-04-15 20:28:48 -04:00
Mitchell Rosen
90f3a0cc53 remote new runtime arg from Main.launch 2021-04-15 20:22:49 -04:00
Mitchell Rosen
a03d6cf5a6 remove new runtime flag from TranscriptParser.run 2021-04-15 20:17:07 -04:00
Arya Irani
401b938a50 fix typo 2021-04-15 16:38:29 -06:00
Arya Irani
3f3d74d709 move setNamespaceRoot call out of syncToDir and into git push 2021-04-15 16:27:09 -06:00
Arya Irani
1362cdfaa5 removed accidental trace from transcripts 2021-04-15 14:05:45 -06:00
Arya Irani
2851b704ce save initial empty branch after creating codebase schema 2021-04-15 14:01:46 -06:00
Arya Irani
5635edd9eb implement something untested for rootBranchUpdates 2021-04-15 13:21:22 -06:00
Rúnar
fb97726ddb Add generated cabal files 2021-04-15 13:22:30 -04:00
Rúnar
8fab375b06 Consistent field naming 2021-04-15 13:17:40 -04:00
Rúnar
b437e09a53 Merge branch 'trunk' of github.com:unisonweb/unison into topic/fzf-endpoint 2021-04-15 10:41:55 -04:00
Arya Irani
743578bb69 verify data version and hash before utilizing root branch cache 2021-04-14 23:48:28 -06:00
Paul Chiusano
494ed7cbd6 Added a few comments and tweaked formatting 2021-04-14 20:10:57 -05:00
Paul Chiusano
73b9eb1424 Text alignment functions are no longer builtin 2021-04-14 15:29:49 -05:00
Rúnar
f84d7a2f26 Fix bug with "test" tag 2021-04-14 14:55:22 -04:00
Arya Irani
6c91c9050c redundant imports 2021-04-12 18:47:00 -06:00
Arya Irani
722748f0b8 formatting 2021-04-12 17:13:43 -06:00
Arya Irani
9f6f613280 fix v2 sync display condition and add quiet flag 2021-04-12 16:05:23 -06:00
Arya Irani
2746c13ce2 cache root branch 2021-04-12 13:26:10 -06:00
Rúnar
42a13baebb Add best names and type definitions to fzf 2021-04-12 15:00:44 -04:00
Arya Irani
66f410544f fix v2 bug for transcript.fork 2021-04-12 10:56:54 -06:00
Arya Irani
4d37edeca7 count branch replacement as a warning 2021-04-12 10:56:34 -06:00
Rúnar
02aa20cdca newtype Width to avoid shenanigans 2021-04-12 12:47:02 -04:00
Paul Chiusano
4704cbf4f2 Added some comments to IOSource 2021-04-12 09:25:18 -05:00
Arya Irani
1bc5abcff9 fix upgrade12 2021-04-10 23:20:49 -06:00
Arya Irani
df5827f9d3 fix typo in optimized flag 2021-04-10 12:29:51 -06:00
Arya Irani
20678bb18a fix codebase.upgrade12.metadataForType test 2021-04-10 12:22:20 -06:00
Arya Irani
1b39da6077 sync progress debug false 2021-04-10 00:47:30 -06:00
Arya Irani
b3831a071b fix bug in referent type lookup 2021-04-10 00:43:25 -06:00
Arya Irani
8c03576c28 move Operations debug trace stuff around 2021-04-10 00:42:30 -06:00
Arya Irani
774d01fedf reformat tests and add link test 2021-04-09 11:00:14 -06:00
Arya Irani
e50045268a output formatting 2021-04-09 10:59:47 -06:00
Rúnar
5b672cd815 Make doc for relativeTo more generic 2021-04-09 11:34:06 -04:00
Arya Irani
6a050e8e70 formatting 2021-04-09 01:58:08 -06:00
Arya Irani
a69c3278d6 change encodeFileName because something weird happened
pulling from ../base
2021-04-09 01:58:00 -06:00
Arya Irani
22ab780e95 disable writing GitSimple transcript output 2021-04-09 01:40:58 -06:00
Arya Irani
9b95f43c71 consolidate Test/GitSimple2 into GitSimple 2021-04-09 01:20:25 -06:00
Paul Chiusano
7e48c4e73b Fixed regression caused by a missing call to eval
Docs need to be eval'd before being displayed
2021-04-08 22:15:24 -05:00
Rúnar
6e6c96aa4d Optimizing fzf endpoint 2021-04-08 23:06:59 -04:00
Paul Chiusano
f6645c5f5c Fix console rendering of nested docs 2021-04-08 21:37:20 -05:00
Paul Chiusano
0d45e26bd9 Fix issue with loading source from the current file 2021-04-08 19:46:53 -05:00
Arya Irani
e7c9c8d516 moved installUcmDependencies + putRootBranch calls 2021-04-08 13:30:50 -06:00
Paul Chiusano
f4e99cbfc2 comments and removed pretty.u 2021-04-08 14:08:57 -05:00
Paul Chiusano
581988e88b Added comment 2021-04-08 13:34:56 -05:00
Paul Chiusano
8262a61ca9 Reenable warning about no signatures 2021-04-08 13:15:31 -05:00
Paul Chiusano
5c6c3f1e2c Allow anonymous doc blocks before types too! 2021-04-08 12:43:11 -05:00
Arya Irani
04f5470ef4 remove some debug prints 2021-04-08 11:34:38 -06:00
Arya Irani
56ce6a4ce8 fixed up Text.stripMargin 2021-04-08 11:34:23 -06:00
Arya Irani
757d4ef9f7 all 5 Upgrade12 tests passing 2021-04-08 10:03:01 -06:00
Paul Chiusano
77058abb09 Fixed parsing of term links to operators - {Nat.+} works fine now 2021-04-08 10:55:45 -05:00
Arya Irani
f982d2bb79 fix 3 of 5 upgrade tests; stripMargin still wonky 2021-04-08 02:55:37 -06:00
Arya Irani
e76df1d7a2 fix 3 upgrade12 bugs 2021-04-08 01:01:33 -06:00
Paul Chiusano
6181733dcb error message cleanup
whenever showing two mismatched types, ensure they are left aligned for easy visual comparison
2021-04-08 00:24:00 -05:00
Paul Chiusano
b59f8c8be6 fix bug with table rendering 2021-04-07 23:43:22 -05:00
Paul Chiusano
573f2b245f Filled in rest of the pretty-printer
There's an issue with table rendering still
2021-04-07 23:05:50 -05:00
Paul Chiusano
c605d04882 filled in more of pretty-printer 2021-04-07 22:17:05 -05:00
Arya Irani
a58d518777 wip 2021-04-07 14:33:12 -06:00
Paul Chiusano
766d8006c3 Fix source rendering 2021-04-07 14:54:34 -05:00
Paul Chiusano
acca802f4e Including source
Still needs pretty-printer support, and the display is getting mangled somehow
2021-04-07 14:12:33 -05:00
Paul Chiusano
3337b3d7d8 Various rendering and pretty-printing fixes 2021-04-07 13:20:55 -05:00
Paul Chiusano
893e918ed4 Embedded evaluation is working in docs
Thanks to @dolio for the decompilation improvements
2021-04-06 21:39:10 -05:00
Paul Chiusano
27de53e1ec Merge remote-tracking branch 'origin/trunk' into topic/doc2a 2021-04-06 21:21:04 -05:00
Paul Chiusano
844deaa9c1
Merge pull request #1858 from unisonweb/topic/decompiling
Further decompiling improvements in the new runtime
2021-04-06 21:20:25 -05:00
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
Arya Irani
10d506208b Merge branch 'trunk' into wip/codebase2
# Conflicts:
#	parser-typechecker/package.yaml
#	parser-typechecker/src/Unison/Codebase/FileCodebase.hs
#	parser-typechecker/transcripts/Transcripts.hs
#	parser-typechecker/unison-parser-typechecker.cabal
#	stack.yaml
#	unison-core/unison-core1.cabal
2021-04-06 16:23:45 -06:00
Paul Chiusano
46d5a94bc7 Doc2 prettyprinting WIP 2021-04-06 14:18:37 -05:00
Arya Irani
e1c3302e6a making a mess in git part 2 2021-04-06 12:52:30 -06:00
Arya Irani
e4f76472d6 making an absolute mess in git 2021-04-06 12:50:35 -06:00
Arya Irani
b6afd46a05 codebase upgrade function 2021-04-06 12:37:46 -06:00
Arya Irani
f4db9f7998 add format tag to watch expression result cache 2021-04-06 12:28:34 -06:00
Arya Irani
f4d4bde92a factor codebase upgrade code out of Main.hs 2021-04-06 12:25:52 -06:00
Dan Doel
439f4c734c Fix an unused import warning 2021-04-06 14:02:32 -04:00
Dan Doel
fc6a00c94e Fix decompilation binding group numbering
The bindings get reversed during translation to supercombinators, so
reverse the letrec numbering to match.
2021-04-06 12:48:29 -04:00
Paul Chiusano
6aad4e79d4 Moar doc pretty printing helpers 2021-04-06 10:54:45 -05:00
Dan Doel
e53c122e0e Fix decompilation of applied lambdas
The decompiler was expecting a bare AbsN for some reason, so it would
never actually substitute into a lambda term.
2021-04-06 11:33:39 -04:00
Dan Doel
9e2aeb6756 Keep track of decompilation info while floating
This allows a much wider range of terms to be decompiled. We remember
the original term that we're about to float, and use it when the floated
combinator is decompiled.

We do this for every closed term that is being floated. Before floating,
we do a pass to close all lambda terms, so the only free variables in
them are actual recursive references. This means that every (locally)
non-recursive function has retained decompilation information.
2021-04-06 11:31:41 -04:00
Arya Irani
7206a5f9c1 Merge branch 'trunk' into topic/package.yaml-flags 2021-04-06 00:00:24 -06: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
Arya Irani
c27e3e51b6 use liftIO instead of MonadUnliftIO 2021-04-05 19:13:17 -06:00
Arya Irani
aa1628844f update copyright(?) and tweak flags 2021-04-05 12:04:35 -06:00
Arya Irani
6791242ae1 use hpack package.yaml to generate .cabal files 2021-04-05 10:05:48 -06: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
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
Arya Irani
f72a3ce309 ucm test helpers 2021-03-31 22:48:05 -07: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
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
Arya Irani
a20e7eaba1 refactor Codebase.Init interface 2021-03-30 17:16:29 -07: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
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
Arya Irani
6b0751d48f tie the knot on calling Sync12 2021-03-25 11:22:03 -04:00
Arya Irani
b9020aa2c8 move Codebase init and Git commands into interfaces:
* Git cache escaping no longer depends on FileCodebase.common (but is untested)
* Git.{view,import,pushGit}RemoteBranch moved into Codebase interface
* minimized the exports from {File,Sqlite}Codebase
* introduce Codebase.openCodebase which tries to open an existing codebase but _doesn't_ bomb on failure
* Git.hs test is specific to FileCodebase, but GitSimple.hs tests both
* IO test currently uses FileCodebase only, but could be switched with some refactoring.
2021-03-24 16:57:57 -04: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
Rúnar
f097a24803 Sort correctly 2021-03-23 12:20:10 -04:00
Rúnar
cd4863493c Merge branch 'trunk' of github.com:unisonweb/unison into topic/fzf-endpoint 2021-03-23 01:06:08 -04:00
Rúnar
66872fbcd6 Fuzzyfind endpoint 2021-03-23 01:05:33 -04:00
Arya Irani
1225e1ecc5 finished? 2021-03-22 16:30:37 -04:00
Arya Irani
6aae7f39d0 formatting? 2021-03-22 16:08:48 -04:00
Arya Irani
281a657166 wip v1 > v2 conversion 2021-03-22 16:03:30 -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
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
Arya Irani
7ade3699e8 optimize imports 2021-03-20 01:49:01 -04:00
Arya Irani
9378ac958a wip v1 > v2 conversion 2021-03-20 00:16:43 -04:00
Arya Irani
eebd3b8b6a wip v1 > v2 conversion 2021-03-19 14:36:32 -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
Arya Irani
2b77981d70 wip v1 > v2 conversion 2021-03-19 03:46:30 -04:00
Arya Irani
9af62780f1 debug guards & unused import 2021-03-18 21:50:53 -04: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
Dan Doel
3d4393c9a9 Run transcripts in the old-runtime-transcripts directory 2021-03-18 17:08:32 -04:00
Dan Doel
9ceead2d6c Improve the error message for bug/todo in the new runtime 2021-03-18 17:07:52 -04:00
Dan Doel
4261780b31 Somehow missed part of the previous fix. 2021-03-18 17:05:35 -04:00
Dan Doel
710c4eac3e Fix DataC implementation for large data values
- The array-based data type values store their contents in the same
  order as the stack, which grows toward increasing array indices. This
  means that fields are actually stored in reverse order. But the DataC
  auxiliary functions were assuming they were in order. This was only
  really visible via decompilation (or observing the binary
  representation of serialized vlaues).
2021-03-18 15:43:32 -04:00
Arya Irani
8571d75892 namespace sync wasn't syncing children right 2021-03-18 14:43:04 -04:00
Dan Doel
e62d4315b5 Add a flag to the transcript tests to use the new runtime
- The new runtime should pass the existing transcripts, so this was an
  oversight. Running this test with `--new-runtime` would previously
  just do an identical set of tests, using the old runtime for most
  transcripts and the new runtime only for things in the specific new
  runtime directory.
2021-03-18 14:21:28 -04:00
Paul Chiusano
216c653cdc stubbed out goSpecial 2021-03-18 08:22:47 -05:00
Arya Irani
244d4636d6 something is missing if it is not present 2021-03-17 21:47:05 -04:00
Stew O'Connor
4e1b7e0c00 allow port / token / ip for codebase server to come from environment variables 2021-03-17 15:22:49 -07:00
Paul Chiusano
d6d912a95b ColorText supports background colors and inverted colors (untested) 2021-03-17 16:22:58 -05:00
Arya Irani
6dd1e4bedd sync progress formatting 2021-03-17 13:47:37 -04:00
Arya Irani
dbd3da0d8b wip:
treat empty git repo as empty codebase
skip schema init if file exists
fill in missing dependency stuff from SqliteCodebase.syncToDirectory'.processBranches
2021-03-17 12:02:01 -04:00
Arya Irani
4e37ebdfdc update a FileCodebase -> SqliteCodebase dependency, and more
remove stray(?) FC.updateCausalHead call
set root namespace after syncToDirectory
2021-03-16 13:48:36 -04:00
Paul Chiusano
625c85c5b9 Fix incorrect type and constructor name 2021-03-16 11:46:03 -05:00
Paul Chiusano
30c47ba4d9 Finished all the boilerplate to make pattern matching on Pretty nicer
Now can start filling in goConsole and goSpecial
2021-03-16 11:40:50 -05:00
Paul Chiusano
7d213d8798 Some tweaks to Doc representation
Embedded evaluation type can't include the evaluated result, since that won't be recomputed when the dependencies are updated. Correct approach is to use the watch cache when evaluating embedded expressions in a doc.
2021-03-16 09:42:23 -05:00
Cody Allen
9f3ce3838c
name.segments test: don't pick from an empty list
Resolves #1648.

Technically I think that this has slightly different RNG characteristics
than the old implementation, but I wouldn't expect it to matter for
the sake of the test.
2021-03-15 19:21:24 -07:00
Paul Chiusano
3c46801cfc Stub out implementation of DisplayValues for Pretty 2021-03-15 16:22:30 -05:00
Paul Chiusano
bb993626d2 Fix some compile errors after merge w/ trunk 2021-03-15 15:47:06 -05:00
Paul Chiusano
42bc5d55aa Merge remote-tracking branch 'origin/trunk' into topic/doc2 2021-03-15 15:34:58 -05:00
Paul Chiusano
95f8bba90c Noncompiling WIP 2021-03-15 15:34:19 -05:00
Paul Chiusano
cb8bfd57fa Filled in Haskell vals to reference doc-related types and ctors 2021-03-15 13:32:27 -05:00
Paul Chiusano
fe64df4d19 New text alignment functions align{Left,Right,Center}With
These use new calling conventions wordBoxDirect and wordWordBox direct.

Also added foreign convention for chars.
2021-03-15 12:09:54 -05:00
Paul Chiusano
4540cac968 IOSource finally compiles with new docs 2021-03-15 11:19:22 -05:00
Arya Irani
d4b1d0c2a8 syncToDirectory & initial test 2021-03-15 00:48:15 -04:00
Cody Allen
334fa29607
Tests: explicit branch in git init
Before this change, when I ran the tests I got the following "hints"
printed to the console:

```
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint:   git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint:   git branch -m <name>
```

I think that this means that the tests could potentially fail, depending
on the user's local git config and/or version.

I tried using the `trunk` branch and the tests failed. It seems that
the tests are dependent on the `master` branch being used, so I figured
it was probably be best to explicitly specify that branch name.
2021-03-13 07:50:32 -08:00
Arya Irani
bc46711c6b syncToDirectory 2021-03-11 13:02:08 -05:00
Arya Irani
ca16a803be render CouldntOpenCodebase git error 2021-03-10 13:57:47 -05:00
Arya Irani
d1ddcfef45 Merge remote-tracking branch 'origin/trunk' into wip/codebase2
# Conflicts:
#	parser-typechecker/src/Unison/Codebase.hs
#	parser-typechecker/src/Unison/Codebase/Branch.hs
#	parser-typechecker/src/Unison/Codebase/Editor/HandleCommand.hs
#	parser-typechecker/tests/Unison/Test/ANF.hs
#	parser-typechecker/unison-parser-typechecker.cabal
#	parser-typechecker/unison/Main.hs
#	stack.yaml
2021-03-10 13:57:04 -05:00
Paul Chiusano
1c6f9cc4ed Avoid loading IOSource unless necessary in old runtime 2021-03-09 16:08:04 -06:00
Arya Irani
28f48be943 split out git-specific vs filecodebase-specific git code
also MonadIO'ed stuff
2021-03-09 11:48:58 -05:00
Paul Chiusano
f941687229
Merge pull request #1827 from nini-faroux/seq-list 2021-03-06 06:51:38 -06:00
Paul Chiusano
4f0267ce79
Merge pull request #1831 from unisonweb/topic/restore-git-test
update git test after #1817
2021-03-05 12:32:44 -06:00
Ian Grant Jeffries
7ee453af18 Add some Haddocks for key declarations 2021-03-04 18:14:23 -05:00
Arya Irani
2785610aad update git test after #1817 2021-03-04 10:55:32 -05:00
runarorama
2f12f86642 add comments 2021-03-04 09:57:31 -05:00
runarorama
de9dd75998 Repair merge 2021-03-03 23:04:46 -05:00
runarorama
458574e6b3 oops 2021-03-03 22:56:36 -05:00
runarorama
c766837e3e Merge branch 'trunk' of github.com:unisonweb/unison into topic/codebaseserver-listingtags 2021-03-03 22:39:13 -05:00
runarorama
9225ee6ef1 Distinguish docs, tests, and abilities in listing 2021-03-03 22:30:56 -05:00
Paul Chiusano
aa47117512 Porting pretty-printer to Unison
WIP. In prep for having all the rendering logic for docs be written in Unison.
2021-03-03 16:16:57 -06:00
ninifaroux
f4b8e87258 add consistent list naming 2021-03-03 19:19:47 +00:00
Paul Chiusano
97deaf5ff3 Fix issue with lexing/parsing of eval blocks 2021-03-03 11:35:45 -06:00
Paul Chiusano
8465458625 sync with trunk 2021-03-02 10:20:28 -06:00
Paul Chiusano
94f18027bd Fix @source parsing bug; down to 1 parse bug that I know of 2021-03-02 10:18:48 -06:00
Paul Chiusano
3dcfeb1686 fixed several lexer/parser bugs; only 2 remain that I'm aware of 2021-03-01 16:12:51 -06:00
runarorama
ceba095354 Fix merge 2021-02-27 20:30:21 -05:00
runarorama
95a5542a60 Merge branch 'trunk' of github.com:unisonweb/unison into topic/codebaseserver-morenames 2021-02-26 22:14:52 -05:00
runarorama
ddf86018ab Allow namespace lookup by hash 2021-02-26 22:11:35 -05:00
runarorama
5f6e305858 Merge branch 'trunk' of github.com:unisonweb/unison into topic/codebaseserver-openapi 2021-02-25 23:49:07 -05:00
runarorama
4a577bed2b Fix regression in term printer 2021-02-25 23:07:06 -05:00
runarorama
e51d959616 Merge branch 'trunk' of github.com:unisonweb/unison into topic/codebaseserver-openapi 2021-02-25 22:05:00 -05:00
Arya Irani
666919b87b
Merge pull request #1814 from samgqroberts/1747.run-type-error-message
provide more helpful error message when `run`ning an improperly-typed term
2021-02-25 16:35:21 -05:00
Stew O'Connor
d3bc3df9b4 Merge remote-tracking branch 'origin/trunk' into feature/nice-IO-names 2021-02-25 01:25:59 -08:00
Stew O'Connor
1c443459ea Treat transcripts starting with _ as prelude 2021-02-25 00:47:23 -08:00
runarorama
dcc8954fe5 Revert Referent data constructors 2021-02-24 22:58:22 -05:00
Arya Irani
e73811326c move ... stuff 2021-02-24 17:53:27 -05:00
runarorama
5da295feb0 Merge branch 'topic/codebaseserver-morenames' of github.com:unisonweb/unison into topic/codebaseserver-openapi 2021-02-24 15:21:00 -05:00
runarorama
593e61e372 Merge branch 'trunk' of github.com:unisonweb/unison into topic/codebaseserver-openapi 2021-02-24 15:19:24 -05:00
Stew O'Connor
7a2a8fb28b refactoring new-runtime-transcripts
This adds a _base transcript which will be run as a prelude before the
other transcripts (not sure how yet). The goal is to cut down on the
boilerplate which has been creeping into the tests.

We also rename a few more of the builtin IO functions which return
Either Failure a
2021-02-23 23:56:04 -08:00
Arya Irani
1c4d2bb006
Merge pull request #1817 from unisonweb/topic/deterministic-transcript-rng
Use .u file count, rather than Command count, to seed transcript guid rng
2021-02-23 10:56:43 -05:00
runarorama
6ba27f4ec8 Update message on start 2021-02-22 14:50:21 -05:00
Paul Chiusano
10fa9838a3 fix parse bug with inline @eval blocks 2021-02-19 11:42:51 -06:00
runarorama
488630677c Urlencode the token 2021-02-19 00:27:10 -05:00
runarorama
57aaadfde7 Add random auth token for basic security 2021-02-18 23:42:24 -05:00
runarorama
4fcd7aad33 Merge branch 'topic/codebaseserver-openapi' of github.com:unisonweb/unison into topic/codebaseserver-openapi 2021-02-18 23:25:14 -05:00
runarorama
c8a1ea6fdf Builds 2021-02-18 22:23:57 -05:00
Paul Chiusano
a971ee423b fixed bug with nested bulleted lists inside numbered lists 2021-02-17 22:35:54 -06:00
Paul Chiusano
c43951152c fix bug with non-Unison fenced code blocks 2021-02-17 21:51:18 -06:00
Arya Irani
2a5654dae5 switch Free.foldWithIndex for StateT Int in HandleCommand
closes #1816
2021-02-17 22:42:52 -05:00
runarorama
fbf4bade3e wip 2021-02-17 22:36:20 -05:00
runarorama
fd45070bc5 wip 2021-02-17 22:35:30 -05:00
runarorama
92cbf1ceb8 wip 2021-02-17 22:26:21 -05:00
Stew O'Connor
2f01c8ca37 we dont need this in IOSource either 2021-02-17 13:00:36 -08:00
Dan Doel
5878c61410 Fix a corner case in abilityCheck' 2021-02-17 15:50:33 -05:00
Stew O'Connor
2dddd9e42d we're not going to add the nice names to IOSource, but to base 2021-02-17 12:21:01 -08:00
Stew O'Connor
ecf11c64f3 Extra copies of bultins that shouldn't have been added 2021-02-17 12:20:19 -08:00
Arya Irani
ed9bf17dd1
Merge branch 'trunk' into topic/codebaseserver-openapi 2021-02-16 13:12:44 -05:00
Sam Roberts
8cb0b20615 provide more helpful error message running term with bad type 2021-02-16 12:22:02 -05:00
runarorama
92f3a52a32 Connect to a random available port 2021-02-13 10:56:02 -05:00
Paul Chiusano
e8b6df076e started on sample file to exercise all the doc2 syntax, fixed several bugs in the process 2021-02-12 21:37:37 -06:00
runarorama
47c6e2c0d0 Add hashes to namespace listing 2021-02-12 20:49:37 -05:00
Paul Chiusano
0ced52b58b WIP debugging lexer/parser interaction. This parses now:
doc1 = {{
__Hello__, world!

__Also see:__

1. Hi
2. Bye

- A
- B
- C
  + D
  + E
    - F
  + [Unison](https://unisonweb.org)

}}

Haven't tested most of the other syntax, and spotted at least one issue with term and type link parsing
---

unique[b7a4fb87e34569319591130bf3ec6e24c9955b6ae06b5f6895e908d58c3f6113] type Doc2
  = Word Text
  | Code Doc2
  | CodeBlock Text Doc2
  | Bold Doc2
  | Italic Doc2
  | Strikethrough Doc2
  -- style {{ myclass }} mydoc
  | Style Doc2 Doc2
  | Blockquote Doc2
  | Embed Any
  | Blankline
  | SectionBreak
  | Aside (Optional Doc2) Doc2
  -- callout icon title content
  | Callout (Optional Doc2) (Optional Doc2) Doc2
  | Folded Boolean Doc2 Doc2
  | Paragraph [Doc2]
  | BulletedList [Doc2]
  | NumberedList Nat [Doc2]
  | Section Doc2 [Doc2]
  | Source [Either Link.Type Any]
  | NamedLink Doc2 Doc2
  | Link [Either Link.Type Any]
  | Signature [Any]
  | Example Nat Any
  | InlineSignature Any
  | InlineEval Any
  | Eval Any
  | Trace Any
  | Docs [Doc2]

syntax.doc.docs = cases [d] -> d
                        ds -> Docs ds
syntax.doc.word = Word
syntax.doc.bold = Bold
syntax.doc.italic = Italic
syntax.doc.strikethrough = Strikethrough
syntax.doc.paragraph = Paragraph
syntax.doc.embedTermLink any =
  guid = "b7a4fb87e34569319591130bf3ec6e24"
  Right any
syntax.doc.embedTypeLink tl =
  guid = "b7a4fb87e34569319591130bf3ec6e24"
  Left tl
syntax.doc.source = Source
syntax.doc.signature = Signature
syntax.doc.inlineSignature = InlineSignature
syntax.doc.inlineEval = InlineEval
syntax.doc.inlineCode = Code
syntax.doc.codeBlock = CodeBlock
syntax.doc.example n a = Example n (Any a)
syntax.doc.link = Link
syntax.doc.transclude d =
  guid = "b7a4fb87e34569319591130bf3ec6e24"
  d
syntax.doc.namedLink = NamedLink
syntax.doc.bulletedList = BulletedList
syntax.doc.numberedList = NumberedList
syntax.doc.section = Section
2021-02-12 19:08:40 -06:00