Paul Chiusano
a626cb5785
Don't just tell me the transcript failed on the above stanza, show me the error!
2020-10-13 09:35:35 -04:00
mergify[bot]
0eddff323f
Merge pull request #1720 from unisonweb/topic/multiarg-cases
...
Add multi-argument `cases` lambdas
2020-10-11 21:57:11 +00:00
Paul Chiusano
45189cf0f5
Merge remote-tracking branch 'origin/trunk' into topic/multiarg-cases
2020-10-11 17:24:07 -04:00
Paul Chiusano
7bd463d712
fixup comment, thanks @atacratic
2020-10-11 17:24:04 -04:00
Paul Chiusano
de8086c9cf
fix bug with variable name generation
2020-10-09 18:22:15 -04:00
Paul Chiusano
d872eca0c8
added transcript, but noticed that some hashes differ unexpectedly
2020-10-09 18:10:16 -04:00
Paul Chiusano
ced4eeec71
Add a couple unit tests
2020-10-09 15:56:45 -04:00
Paul Chiusano
88abd44b45
Merge pull request #1719 from unisonweb/fix/socket-ops
...
Assorted builtin fixes
2020-10-09 15:14:27 -04:00
Paul Chiusano
7b2a2384eb
Corresponding pretty-printer changes.
...
Moved some pretty-printer specific patterns and helper functions into TermPrinter
2020-10-09 15:02:27 -04:00
Paul Chiusano
a8c722ed80
finish with parser changes
2020-10-09 12:52:18 -04:00
Paul Chiusano
c732ee753d
wip on multiarg cases
2020-10-09 11:33:23 -04:00
Dan Doel
f9c9d4954f
Merge branch 'trunk' into fix/socket-ops
2020-10-09 10:22:28 -04:00
Dan Doel
b86eca9a09
Assorted builtin fixes
...
- The operations that produce sockets were just throwing them away
completely, breaking the calling convention.
- The IOError wrapper was not obeying the calling convention either. It
expected a boxed result, but it is returned as an enum tag.
- Helpful addition to Show instance for Foreign wrapped text to show the
actual text.
2020-10-08 16:55:11 -04:00
Paul Chiusano
8186cb11f7
Merge pull request #1712 from unisonweb/topic/basic-hashing
...
Cryptographic primitives for hashing and HMAC
2020-10-08 16:03:26 -04:00
mergify[bot]
136a0cc990
Merge pull request #1716 from unisonweb/topic/relax-var-constraint-on-hashComponent
...
relax Var constraint on a few ABT functions
2020-10-07 22:22:34 +00:00
Arya Irani
470e318659
relax Var constraint on a few ABT functions
2020-10-07 16:59:35 -04:00
Paul Chiusano
ee9a547796
switch to using unpinned memory
2020-10-07 13:59:20 -04:00
Paul Chiusano
9f23277a4d
Added comment on bytes conversion functions
2020-10-07 12:57:13 -04:00
Paul Chiusano
6fc235cc3f
fix imports
2020-10-07 12:28:08 -04:00
Paul Chiusano
9244f14de6
A bit of cleanup to not hardcode the underlying bytestring type used by Bytes
2020-10-07 12:16:43 -04:00
Paul Chiusano
9ed2a46310
Finish up transcript and tests
2020-10-07 11:21:15 -04:00
Paul Chiusano
65acd453b9
Merge remote-tracking branch 'origin/trunk' into topic/basic-hashing
2020-10-07 09:36:09 -04:00
Paul Chiusano
1c880c064a
Merge pull request #1710 from unisonweb/fix/1709
...
Do transitive dependency resolution in the new runtime
2020-10-06 18:48:10 -04:00
Dan Doel
0a498a922c
Add a test transcript for recursive dependencies
2020-10-06 17:45:19 -04:00
Dan Doel
39a6c7b4ae
Do transitive dependency resolution in the new runtime
...
The existing code was only loading the immediate child dependencies.
2020-10-06 17:39:05 -04:00
Paul Chiusano
2e5833d29c
WIP of transcripts and docs
2020-10-06 14:09:33 -04:00
Paul Chiusano
b2882fe042
working on transcript test and docs. Also added new-runtime-transcripts directory for transcripts that are only run with the new runtime
2020-10-06 10:59:17 -04:00
Paul Chiusano
1447b0a2cd
Merge remote-tracking branch 'origin/trunk' into topic/hashing
2020-10-02 11:26:01 -04:00
Paul Chiusano
1e395336b4
Bytes.{to,from}Base{16,32,64,64UrlUnpadded} builtins
2020-10-02 11:16:36 -04:00
Paul Chiusano
af9190ee22
simplify API - not supporting streaming hashing / hmac for now as serializing / decompiling the hash / hmac state is a can of worms
2020-10-02 11:02:24 -04:00
Paul Chiusano
71ff9f7c48
Merge pull request #1706 from unisonweb/topic/mobile-code
...
Pull in some changes from the mobile code development
2020-10-01 18:45:10 -04:00
Paul Chiusano
f17fafb27f
Reworked API some more. It's looking good. Still testing left to do.
2020-10-01 18:41:49 -04:00
Dan Doel
90d7731c9f
Make the decompiler explicitly reject some PAps that won't work
2020-10-01 16:36:02 -04:00
Dan Doel
2018653afb
Rework data/code referencing at various stages
...
- Make ANF representation work entirely in terms of Reference. Since ANF
is significantly closer to something that could actually be moved
between machines, it doesn't make much sense to work in terms of
machine-local numberings at that stage.
- Reference => Numbering resolution has been moved to the process of
compiling ANF code to MCode.
- References are now stored directly in closures for partial
applications and data. This means that Foreign functions can
potentially inspect them without making a reverse mapping function
available to them.
* The interpreter mostly ignores these references, working in terms of
an ephemeral numbering of these references.
* This makes the RTag/CTag packing scheme unnecessary. Runtime tags
are now just storing the constructor number, and the full Word64
space is available for data/effect and constructor numbering for
now.
* The performance implications of this haven't been tested. If this
is too slow, the strategy may need to be rethought.
- Universal comparison has been tweaked to use these references. It's
also been tweaked to try to avoid comparing references in situations
where it should be impossible for them to not match.
2020-10-01 15:40:41 -04:00
Dan Doel
44a9010c6b
Closed term hashing helper function
2020-10-01 14:27:18 -04:00
Dan Doel
ee71f810d8
Show exceptions in Unison.Test.UnisonSources
...
- Previously an exception would just result in a test failure with the
uninformative message from `undefined`
2020-10-01 14:25:21 -04:00
Paul Chiusano
25a2e43071
Greatly simplified hashing API and support decompilation of hashing contexts. In prep for HMAC implementation.
2020-10-01 12:46:18 -04:00
Paul Chiusano
238dfbe26c
sync with master
2020-09-30 18:55:11 -04:00
Paul Chiusano
91220df8fc
Merge remote-tracking branch 'origin/trunk' into topic/hashing
2020-09-30 18:51:11 -04:00
mergify[bot]
e041c5d19c
Merge pull request #1700 from unisonweb/topic/destructuring-bind
...
New syntax: destructuring bind
2020-09-30 22:31:19 +00:00
Paul Chiusano
7de847ce0d
Improved transcript docs and have pretty-printer avoid using the syntax for patterns that *contain* literals. Thanks @atacratic!
2020-09-30 18:03:54 -04:00
Chris Gibbs
37bcd95009
tweak interaction between destructuring bind and calculate imports (use insertion)
2020-09-30 22:16:47 +01:00
Paul Chiusano
27173e5cc6
Something implemented and runs for Sha3{512,256}, Sha2{512,256}, Blake2b{512,256}, Blake2s{256}. Still pending work from @dolio for the universal hashing functions.
2020-09-30 17:14:25 -04:00
Dan Doel
55f6d594fc
Merge branch 'trunk' into topic/mobile-code
2020-09-30 12:34:24 -04:00
Paul Chiusano
2f2ec701af
Merge remote-tracking branch 'origin/trunk' into topic/hashing
2020-09-29 22:11:13 -04:00
mergify[bot]
5d6a0bfc0f
Merge pull request #1703 from unisonweb/fix/builtin-types
...
Remove some magic numbers in the interpreter
2020-09-30 02:10:30 +00:00
Dan Doel
ab94a23bfc
Remove some magic numbers in the interpreter
...
- Certain functions need to inspect/build data closures directly, and
they were using fixed numbers rather than computing them from the
information that determines them.
2020-09-29 21:43:59 -04:00
Paul Chiusano
9c9b623699
Compiles! But this example crashes:
...
ex : Bytes
ex =
h = Sha3_512.new
h2 = h `appendBytes` Bytes.fromList [1,2,3,4]
Sha3_512.finish h2
> ex
unison: pack bytes: non-natural closure: DataU1 589824 1
CallStack (from HasCallStack):
error, called at src/Unison/Runtime/Machine.hs:1027:14 in unison-parser-typechecker-0.1-DahyA8UvBK0B5OVYJToEFT:Unison.Runtime.Machine
2020-09-29 19:30:55 -04:00
Paul Chiusano
c9e45f0744
remove redundant import
2020-09-29 18:58:56 -04:00
Paul Chiusano
87b83a305a
Merge remote-tracking branch 'origin/trunk' into topic/hashing
2020-09-29 18:57:41 -04:00