Commit Graph

6305 Commits

Author SHA1 Message Date
Chris Penner
59e8a25693
Fix annotations for bindings and blocks (#3689)
* WIP: fix up anns for bindings, blocks, etc.

* Working annotations for lets

* Add nesting tests

* Fix nesting tests

* Fix annotations on let-rec blocks

* Fix bad test src

* Skip destructuring binds test for now.

* Remove debugging

* Better fallbacks for finding ref nodes

* Transcript updates

* Fix bad 'contains'

* Rewrite letrec and let combinators to avoid requiring semigroup

* Don't include block openers in the block itself.

We don't want things like '=' or '->' to be part of a block

* Re-run transcripts

* Remove redundant constraint
2023-01-10 11:12:51 -06:00
Cody Allen
624b0ec450
Merge pull request #3715 from unisonweb/topic/builtins
Tweak some builtin implementations
2023-01-09 09:51:29 -05:00
Chris Penner
84f36ff4a8
Parse share handles separate from name segments (#3704)
* Parse share handles with `-` in them
2023-01-09 08:42:44 -06:00
Cody Allen
50594818a8
Merge pull request #3717 from ceedubs/default-pull-silent
default pull to silent mode
2023-01-03 18:26:44 -05:00
Mitchell Rosen
68bc9e1561 ⅄ trunk → 22-12-14-tidy-up-hashing-package 2022-12-21 16:55:42 -05:00
Cody Allen
bcba9df787
default pull to silent mode
What was `pull.silent` is now also `pull`.
What was `pull` is now `pull.verbose`.

Resolves #3566.

Before this change, the `Verbosity` type (which I believe was only used
for variations of pulling code) was either `Silent` or `Default`. This
is awkward because silent became the new default. So I changed it to
`Silent` or `Verbose` and filled in default values as needed.

I retained the verbose functionality for `debug.pull-exhaustive` because
if you are in the state that you need that command, some extra output
about what is happening might be useful.
2022-12-21 10:07:09 -05:00
Mitchell Rosen
5e9535425c prepend "test>" to edited tests 2022-12-20 15:49:09 -05:00
Dan Doel
f16514c9a9 Avoid trailing separators in temp directory functions 2022-12-20 15:12:01 -05:00
Dan Doel
884e966ad8 Make take/drop builtins behave better w.r.t large numbers 2022-12-20 11:29:02 -05:00
Paul Chiusano
3d24c5193c
Merge pull request #3714 from unisonweb/topic/debugging 2022-12-19 16:51:56 -06:00
Dan Doel
e148f3c2e8 Fix formatting. 2022-12-19 16:53:38 -05:00
Dan Doel
6ef58e5947 Add machinery for checking alpha equivalence of intermediate code 2022-12-19 16:33:29 -05:00
Mitchell Rosen
af5d1f2f50
Merge pull request #3693 from unisonweb/22-12-12-diff-namespace-v2
Make `diff.namespace.to-patch` use "v2" branch diffs
2022-12-16 21:48:58 -05:00
Dan Doel
754a294d58 Revise implementation of foreign universal eq/compare
- It seems that there are situations where implementing foreign
  equality as:

      promote ((==) @ T)

  (where `promote` wraps the inputs with coercions) can cause memory
  faults. This is _not_ because the runtime is (currently) erroneously
  coercing between distinct types (at least in the test case used to
  find this error). Rather, it has something to do with `unsafeCoerce`
  causing invalid GHC to generate some invalid code, whether via
  optimization or otherwise.

  It seems that separating out the equality test into its own,
  noinline function prevents the issue. So, that has been done for all
  cases. It is actually quite difficult to find simple code that
  triggers the issue, however, so it is difficult to say whether this
  definitively fixes the problem.
2022-12-16 20:00:33 -05:00
Dan Doel
e2ea033747 Use unsafe checked arrays to back array builtins.
- These already have checks in the foreign operations, but another layer
  couldn't hurt for debugging.
2022-12-16 19:56:19 -05:00
Chris Penner
26703a1f84
Simply remove the error printing on scratch file contention (#3702) 2022-12-16 12:08:26 -06:00
Dan Doel
781881dbfb Add debug bounds checking for arrays used in the interpreter 2022-12-16 12:31:44 -05:00
Mitchell Rosen
a87a688471 fold U.Util.Hash into Unison.Hash 2022-12-15 13:48:36 -05:00
Mitchell Rosen
f21e6483e7 code review 2022-12-15 13:32:43 -05:00
Mitchell Rosen
6e99914c77 ⅄ trunk → 22-12-14-tidy-up-hashing-package 2022-12-15 12:46:57 -05:00
Mitchell Rosen
b062e7112f fix test suite again 2022-12-15 12:42:02 -05:00
Mitchell Rosen
3e395e3b89 move unison-hash:Unison.ContentAddressable to unison-hashing:Unison.Hashing.ContentAddressable 2022-12-15 12:31:30 -05:00
Mitchell Rosen
b5138c235e fix errors in test suite 2022-12-15 12:04:07 -05:00
Mitchell Rosen
b68531dad1 ⅄ trunk → 22-12-12-diff-namespace-v2 2022-12-15 11:45:22 -05:00
Mitchell Rosen
ee9309ee15 ⅄ trunk → 22-12-09-break-up-unison-util 2022-12-15 11:41:36 -05:00
Mitchell Rosen
4be5ff5346 ⅄ trunk → 22-12-14-tidy-up-hashing-package 2022-12-14 21:15:35 -05:00
Mitchell Rosen
3c20ab3834 change hashing v2 branch type name from Raw to Branch 2022-12-14 21:00:55 -05:00
Mitchell Rosen
9b423774a6 hide v2 hashing behind an interface 2022-12-14 20:59:46 -05:00
Mitchell Rosen
72c5f1db5e add instance ContentAddressable for hashing branch 2022-12-14 19:26:19 -05:00
Mitchell Rosen
bbc17e01a6 move Unison.Hash and friends to new unison-hash package 2022-12-14 19:03:52 -05:00
Mitchell Rosen
ce23976934 Move hashing-v2 name segment into its own module 2022-12-14 18:20:06 -05:00
Mitchell Rosen
9914000071 ⅄ trunk → 22-12-12-one-name-segment-type 2022-12-14 17:48:57 -05:00
Mitchell Rosen
2dbb867a3c
Merge pull request #3692 from unisonweb/22-12-12-hash-tags-in-core
Cleanup: share hash tags newtypes in codebase/parser-typechecker
2022-12-14 17:42:46 -05:00
Mitchell Rosen
8d25fe1b26
Merge pull request #3599 from unisonweb/22-11-10-get-term-transaction
Refactor: make getTerm in Transaction, not IO
2022-12-14 17:38:17 -05:00
Mitchell Rosen
bfca067ed1 ⅄ trunk → 22-12-12-hash-tags-in-core 2022-12-14 12:49:35 -05:00
Chris Penner
108688aff6
Remove external names from names-index lookups (#3688)
* Remove external names from names-index lookups
2022-12-14 10:16:47 -06:00
Mitchell Rosen
200c8f1cbd make diff.namespace.to-patch command use v2 branch diffs 2022-12-13 14:05:39 -05:00
Mitchell Rosen
f971d8c41d ⅄ trunk → 22-12-09-break-up-unison-util 2022-12-13 14:05:22 -05:00
Mitchell Rosen
ded584447c
Merge pull request #3686 from unisonweb/22-12-09-hashing-v2-cleanup
clean up codebase-sqlite-hashing-v2 package
2022-12-13 13:12:45 -05:00
Mitchell Rosen
b26bbbd31e ⅄ 22-12-12-hash-tags-in-core → 22-12-12-diff-namespace-v2 2022-12-12 16:50:47 -05:00
Mitchell Rosen
af371f100e hpack version flub snuck in through the basement door 2022-12-12 16:26:04 -05:00
Mitchell Rosen
a3a680e548 ⅄ trunk → 22-11-10-get-term-transaction 2022-12-12 16:24:10 -05:00
Mitchell Rosen
e46f44add3
Merge pull request #3594 from unisonweb/22-11-10-term-referents-by-prefix-transaction
Refactor: make termReferentsByPrefix in Transaction, not IO
2022-12-12 16:23:15 -05:00
Mitchell Rosen
98ebde82cd delete second copy of PatchHash (called EditHash) 2022-12-12 16:22:11 -05:00
Mitchell Rosen
fb35e9580c delete second copy of CausalHash 2022-12-12 15:56:44 -05:00
Mitchell Rosen
eb1e3234d5 add NameBasedDiff, nameBasedDiff 2022-12-12 14:47:40 -05:00
Mitchell Rosen
2c8f323d35 eliminate second NameSegment type (U.Codebase.Branch.Type.NameSegment) 2022-12-12 13:11:25 -05:00
Mitchell Rosen
4f38c03f5b pull Unison.Test.Cache out into its own test suite 2022-12-09 14:52:18 -05:00
Mitchell Rosen
7eee9e01bb remove vestigial unison-util package 2022-12-09 14:37:52 -05:00
Mitchell Rosen
a59fdcf2c1 move U.Util.Timing from unison-util to unison-prelude 2022-12-09 14:29:24 -05:00