Commit Graph

5691 Commits

Author SHA1 Message Date
Mitchell Rosen
478943f8b6 mapEnv -> hoistEnv 2022-04-19 17:27:19 -04:00
Mitchell Rosen
56e5055757 rename some imports and delete some commented out code 2022-04-15 16:15:08 -04:00
Mitchell Rosen
3fc9435d5f idempotentIO -> unsafeIO 2022-04-15 12:56:51 -04:00
Mitchell Rosen
b4fa3282aa delete a few unused transaction runners and clean up migrations 2022-04-15 10:46:17 -04:00
Mitchell Rosen
edfb7addbf fix sync bugs 2022-04-14 15:41:56 -04:00
Mitchell Rosen
7f4419a82c fix a couple bugs 2022-04-14 10:36:01 -04:00
Mitchell Rosen
55561acd30 ⅄ trunk → 21-12-04-use-unison-sqlite 2022-04-13 13:02:36 -04:00
Chris Penner
d4029a8e10
Prepare local-ui endpoints for use in share-server (#3043)
* Move auth checks up to the top-level for sharing with enlil

* Change handlers to use Backend monad rather than Handler

* Add some helpful Show/Eq instances

* Clarify runtime types

* Fix up Backend error outputs
2022-04-12 20:21:33 -06:00
Mitchell Rosen
875787bc0d fix a couple transaction-inside-transaction bugs 2022-04-12 22:05:13 -04:00
Mitchell Rosen
53beb4ab3b ⅄ trunk → 21-12-04-use-unison-sqlite 2022-04-11 14:50:09 -04:00
Mitchell Rosen
1aef8505f6 get migrations type-checking 2022-04-11 12:43:41 -04:00
Chris Penner
b224bb09c7 Move the Share server into its own package. 2022-04-11 09:57:58 -06:00
Mitchell Rosen
65ee941b0e migration work 2022-04-08 22:28:50 -04:00
Mitchell Rosen
49d4f295a9
Merge pull request #3032 from unisonweb/cp/syncm-concrete
Sync HTTP client
2022-04-08 15:50:30 -04:00
Mitchell Rosen
e2b6dd36d8 work on migrating migrations 2022-04-07 23:41:31 -04:00
Mitchell Rosen
dce743aa61 fix the undefineds in SqliteCodebase.hs 2022-04-07 22:47:34 -04:00
Mitchell Rosen
bcf5d15e0b simplify processBranches 2022-04-07 22:40:23 -04:00
Mitchell Rosen
186b76530a refactor syncInternal to use transaction tech 2022-04-07 22:19:10 -04:00
Mitchell Rosen
ff89287e90 add runWriteTransaction 2022-04-07 19:11:44 -04:00
Chris Penner
e3168ee30b
Use stack test suites (#2656)
* Give tests independent names and use stack test suites

* Update parser-typechecker tests in ci

* Update testing instructions and check.sh
2022-04-07 10:16:13 -06:00
Paul Chiusano
b8a688aac4 tweak output messages + refresh transcripts 2022-04-07 00:48:53 -05:00
Mitchell Rosen
4b9608b66f more work towards transactional layer underneath codebase abstraction 2022-04-07 00:20:17 -04:00
Mitchell Rosen
37c55418a3 make lca just use the one connection 2022-04-06 22:19:24 -04:00
Chris Penner
3aca147a82 Implement sync http client 2022-04-06 15:48:59 -06:00
Cody Allen
428f1a7e9b
Merge pull request #3031 from unisonweb/fix/pop-serial
Make POp serialization more reliable
2022-04-06 11:14:44 -07:00
Dan Doel
f3c7dea316 Make POp serialization more reliable
There was a huge list of all the ops associated with numbers used to
serialize them, but there was no way to check that every POp was in the
list (and some were actually missing). Instead, use a function from POp
to number so that the coverage checker can complain if a new op is
added. Then the list is generated from the Enum/Bounded instances.
2022-04-06 11:02:55 -04:00
Mitchell Rosen
57f0d938f5 start building out Unison.Codebase.SqliteCodebase.Operations 2022-04-06 09:26:44 -04:00
Mitchell Rosen
fa57bd72e8 rewrite Queries/Operations to use Transaction 2022-04-05 10:48:52 -04:00
iamevn
04846d3b7d Add builtin for reading bytes from a handle without blocking. 2022-04-04 15:26:32 -07:00
Mitchell Rosen
5c56e90764 ⅄ trunk → 21-12-04-use-unison-sqlite 2022-04-04 10:57:09 -04:00
Mitchell Rosen
548caaebc4
Merge pull request #3022 from unisonweb/22-03-31-warning-free-ghci
Use explicit deriving strategies where it's ambiguous
2022-04-04 10:07:32 -04:00
mergify[bot]
9a2e90e67e
Merge pull request #3025 from unisonweb/cp/monadunliftio
Add MonadUnliftIO to unison-prelude
2022-04-01 23:19:43 +00:00
Chris Penner
d728a7aaee Add MonadUnliftIO to unison-prelude 2022-04-01 10:59:56 -06:00
Dan Doel
be006ae5d0 Fix a bug with code serialization.
Get group was associating variables with local functions incorrectly. I
had anticipated the right approach, but mistakenly didn't use it.
2022-04-01 12:18:19 -04:00
Mitchell Rosen
ef3282b381 simplify throwing decoding error ceremony a bit 2022-04-01 11:03:26 -04:00
Mitchell Rosen
4adc35016c ⅄ trunk → 21-12-04-use-unison-sqlite 2022-03-31 16:40:07 -04:00
Mitchell Rosen
92e9e37f61 use explicit deriving strategies where it's ambiguous 2022-03-31 16:26:09 -04:00
Mitchell Rosen
81b5f81403 rename a bunch of database things for consistency 2022-03-31 16:24:33 -04:00
Dan Doel
e0c851d10b Use a faster copy function in arrayToChunk 2022-03-31 14:41:42 -04:00
Cody Allen
b71e476586
Merge pull request #3012 from unisonweb/fix/anf-renaming
Fix a bug caused by renaming during ANF
2022-03-31 06:16:46 -07:00
Mitchell Rosen
e3b5ba29b5 ⅄ trunk → 21-12-04-use-unison-sqlite 2022-03-30 20:44:38 -04:00
Dan Doel
de015ba062 Document renameCtx 2022-03-30 17:26:49 -04:00
Dan Doel
ca1509a7b7 Fix a bug when renaming variables during ANF translation
When a binding like:

  let v = u

arose during the translation, the ANF could would simply rename v to
u. However, it was only doing it in the 'body' portion of the code,
not an associated context.
2022-03-30 17:21:32 -04:00
Chris Penner
f1a7bc210c
Authenticate UCM with Codebase Servers. (#3000)
* The auth.login command is hidden until it's officially supported.
2022-03-30 13:19:48 -06:00
Dan Doel
fc296793ba Save information for decompiling non-closed definitions
Previously in cases like:

    let
      f x = ...
      g y = ... f ...
      ...

we would not save decompilation information for `g`, because it wouldn't
be possible to guarantee that the output of decompilation actually made
sense (for instance, if `g` is decompiled, it will not mention `f`.

However, this seems to block some useful documentation, even in cases
where it doesn't seem like such intermediate definitions would need to
be decompiled. So, it seems like a better trade-off to just allow
decompilation, and accept that some output might be difficult to
understand. Such output can be avoided when writing documentation.
2022-03-29 13:59:44 -04:00
Paul Chiusano
d9c339c967
Merge pull request #2998 from unisonweb/fix/assorted
Some assorted fixes
2022-03-28 13:15:12 -05:00
Dan Doel
da1275346b Standardize context handling in ANF serialization 2022-03-24 15:26:48 -04:00
Dan Doel
46e5c910ce Some serialization related tweaks
1. Allow for serializing `Code` with builtin foreign references to
   binary, using a mapping to the builtin name used. This is useful for
   parsing the binary and emitting scheme within unison.
2. Fixed an encoding error where variable indexing was wrong. The
   context maintained for serialization is stored backwards, but
   simultaneous bindings of multiple variables were being pushed on in
   order, which resulted in reversing the order of variables in some
   cases.
2022-03-21 15:26:22 -04:00
Dan Doel
9fc61ff292 Avoid redundant floating due to signatures
Due to a missing case in the floating logic, definitions like:

    f : ...
    f x y z = ...

were being turned into:

    f : ...
    f =
      g x y z = ...
      g

Because the compiler thought the lambda needed to be floated out of the
signature ascription, as the original `f` is the same as:

    f = (x y z -> ...) : ...

This is obviously not necessary, as the signature will be erased anyway,
and just results in extra indirection.
2022-03-21 13:29:37 -04:00
Arya Irani
acfa8ebf18
Merge pull request #2968 from unisonweb/remove-open-access-control-header 2022-03-19 13:24:45 -04:00