Skip to content

Instantly share code, notes, and snippets.

View ceedubs's full-sized avatar

Cody Allen ceedubs

  • central Indiana, USA
View GitHub Profile
@ceedubs
ceedubs / transitive-update-issue.md
Created November 2, 2021 21:22
Unison transitive update issue

We create one (oops with the wrong value).

one = "two"
.>add
@ceedubs
ceedubs / unknown_combinator.md
Created May 10, 2023 01:29
`reference to unknown combinator` when pretty-printing function

reference to unknown combinator when pretty-printing function

This transcript shows an example of a function that returns the expected result but causes the pretty-printer to fail with the error reference to unknown combinator: #0lib3

.> builtins.merge

There is probably a way to reproduce this issue with less code, but I ran into it while writing some recursion scheme code which I have simplified a bit for this transcript:

@ceedubs
ceedubs / scratch.u
Created June 3, 2024 13:07
Unison custom partial ability handler
handleRemoteCustom : '{g, Remote} r -> {g, Remote} r
handleRemoteCustom =
go : forall r. '{g, Remote} r -> {g, Remote} r
go thunk = handle !thunk with cases
{ r } -> r
{ time.now! -> k } ->
res = todo "what do you want to do for time?"
go '(k res)
{ Promise.tryWrite x y -> k } ->
res = Promise.tryWrite x y