So you'd have:
{
?A : Type,
op : [A, A] -> A,
}
Which could be sugar for:
{
?A : Type,
op : { ?0 : A, ?1 : A, default : A },
}
Conversation
And then something like this maybe:
{
add-int-magma : Magma.{A = Int} = {
op = [x, y] => x + y,
},
test-add-int : Int = add-int-magma.op.[1, 3],
}
2
1
This:
add-int-magma.op.[1, 3]
would elaborate to:
add-int-magma.op.{0 = 1, 1 = 3}.default
2
1
You’re unable to view this Tweet because this account owner limits who can view their Tweets. Learn more
I think I remember the Unison folks thinking about doing something similar with their 'abilities'?
Dunno where in this conversation this is relevant, but there was also this interesting blog post: blog.ezyang.com/2020/08/dynami
Following the Granule stuff with interest - coeffects seem really cool!
1
1
You’re unable to view this Tweet because this account owner limits who can view their Tweets. Learn more
Show replies

