Commit Graph

30 Commits

Author SHA1 Message Date
Rúnar
29981373ee Transcripts 2024-08-17 22:02:41 -04:00
Chris Penner
5ca1eb3b8d Replace '.' references with scratch/main 2024-06-25 11:11:07 -07:00
Arya Irani
2cf96a36ae
deprecate cd, up; add find-in (#4883)
* deprecate `cd`, `up`, hide `reset-root`, add `find-in`, hides unimplemented `update.builtins`
Co-authored-by: Chris Penner <christopher.penner@gmail.com>
2024-04-28 21:30:02 -04:00
Dan Doel
80c44ed5a1 Merge branch 'trunk' into captureAs 2023-11-30 13:40:57 -05:00
Dan Doel
37b3489c0f Add some new builtins for accessing sandbox information
- `Value.validateSandboxed` checks an interchange value for sandboxing
  before it is decoded. It either returns a list of dependencies the
  runtime doesn't know about yet, or a list of disallowed builtins, both
  as lists of termlinks
- `sandboxLinks` returns the list of sandboxed builtins transitively
  referenced by the code associated to a given termlink
2023-10-23 12:45:02 -04:00
Rúnar
9797a0297f Added a transcript test 2023-06-15 15:19:45 -04:00
Stew O'Connor
5f8ef871ab use breakOn instead of indices which for Text.indexOf 2023-06-12 14:39:04 -07:00
Stew O'Connor
054cdd87de add Bytes.indexOf and Text.indexOf builtins
fixes #4060
2023-06-01 19:24:07 -07:00
Stew O'Connor
e231f80211 Add a new Pattern.captureAs builtin
Adding a Pattern.captureAs which will act just like capture, but
additionally takes an `a` which will be used as a replacement for the
capture.

My motivation for adding it is that I want to match on escape
sequence, but actually capture the unescaped character instead.

For example:

```
Pattern.captureAs "\n" (Pattern.literal "\\n")
```
2023-05-08 16:31:59 -07:00
Dan Doel
9e0e93135f Merge remote-tracking branch 'origin/trunk' into topic/builtins-misc 2023-01-26 10:30:05 -05:00
Fabio Labella
b5a6bb53e7 Name transcripts test for murmur hash 2023-01-25 02:18:25 +00:00
Fabio Labella
543e30b480 Better error: murmurHash crashes on simple values 2023-01-25 02:18:25 +00:00
Fabio Labella
7b991456c3 Add transcript tests, currently broken: hash is nondeterministic 2023-01-25 02:18:25 +00:00
Dan Doel
7261823de1 Make Nat/Int.fromText return None for over/underflows 2023-01-24 14:37:34 -05:00
Dan Doel
884e966ad8 Make take/drop builtins behave better w.r.t large numbers 2022-12-20 11:29:02 -05:00
Dan Doel
ac95b57f7b Added back length comparison, but preferring lexicographic
- Just zipping the lists will report that any two lists with the same
  prefix are equal. So, instead, compare the lengths if the zip check
  reports equality.
- Added a few tests for list equality to builtins.md
2022-11-15 12:14:18 -05:00
Paul Chiusano
a4212e450b added transcript regression test 2022-10-26 09:27:12 -05:00
Rúnar
ff814dca00 Transcript to test 2022-10-13 11:27:26 -04:00
Paul Chiusano
0f1218f8fc moar tests! 2022-07-01 14:47:08 -04:00
Dan Doel
74017804fb Fixed calling convention of Pattern.or
Added a missing comma in test transcript
2022-07-01 14:07:19 -04:00
Paul Chiusano
0a54874876 text pattern tests 2022-07-01 13:51:59 -04:00
mergify[bot]
f344103545
Merge pull request #2929 from unisonweb/topic/fix2925
Fix universal equality
2022-02-18 16:09:44 +00:00
Rúnar
23e13958e6 Added test 2022-02-18 09:14:33 -05:00
Dan Doel
4b57560b85 Fix an issue computing sandbox info
The sandboxed dependencies for combinators were being computed just from
the previously known combinators. So, if multiple new, interrelated
combinators were introduced simultaneously, their full transitive
dependencies wouldn't take into account anything in the new set.

To fix this, just iterate the dependency inference until a fixed point
is reached.
2022-02-16 14:40:04 -05:00
Dan Doel
8c7941296d Move sandbox tests to builtins.md 2022-01-26 11:43:41 -05:00
Chris Penner
8d65babb1e Remove infix from builtins.md 2021-12-15 16:07:39 -06:00
Dan Doel
8fb52bb7f4 Fixed some tags that were still 0 rather than reference packed 2021-11-02 16:56:50 -04:00
Paul Chiusano
26338d89df compression builtins 2021-08-13 20:10:44 -05:00
Paul Chiusano
5bc719944e Fix wildcard imports regression and re-add test for it 2021-08-04 10:42:35 -04:00
Paul Chiusano
41b8068b43 Fix name comparison to take into account absolute names
Transcripts all pass, but have a lot of diffs that I need to investigate
2021-08-01 17:49:24 -04:00