10000 Merge `bugfix/sync-io-type-restriction` of pull request #127 into `ma… · input-output-hk/thorn-calculus@eec4b44 · GitHub
[go: up one dir, main page]

Skip to content

Commit eec4b44

Browse files
committed
Merge bugfix/sync-io-type-restriction of pull request #127 into master
Restrict the types of `sync_send` and `sync_receive`
2 parents 735dcaf + bb77ad0 commit eec4b44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Thorn_Calculus-Derived-Channels-Synchronous.thy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ instance sync_channel :: (type) embeddable
1717
by standard (meson sync_channel_to_nested_channel_inject ex_inj inj_def)
1818

1919
lift_definition
20-
sync_send :: "'a sync_channel \<Rightarrow> 'a \<Rightarrow> process \<Rightarrow> process"
20+
sync_send :: "'a sync_channel \<Rightarrow> 'a::embeddable \<Rightarrow> process \<Rightarrow> process"
2121
(\<open>(_ \<triangleleft>\<^bsub>s\<^esub> _;/ _)\<close> [53, 0, 52] 52)
2222
is "\<lambda>A x p. A \<triangleright> (a :: 'a channel). (a \<triangleleft> x \<parallel> p)" .
2323

24-
lift_definition sync_receive :: "'a sync_channel \<Rightarrow> ('a \<Rightarrow> process) \<Rightarrow> process"
24+
lift_definition sync_receive :: "'a sync_channel \<Rightarrow> ('a::embeddable \<Rightarrow> process) \<Rightarrow> process"
2525
is "\<lambda>A P. \<nu> (a :: 'a channel). (A \<triangleleft> a \<parallel> a \<triangleright> x. P x)" .
2626

2727
syntax
28-
"_sync_receive" :: "'a sync_channel \<Rightarrow> pttrn \<Rightarrow> process \<Rightarrow> process"
28+
"_sync_receive" :: "'a::embeddable sync_channel \<Rightarrow> pttrn \<Rightarrow> process \<Rightarrow> process"
2929
(\<open>(3_ \<triangleright>\<^bsub>s\<^esub> _./ _)\<close> [53, 0, 52] 52)
3030
translations
3131
"a \<triangleright>\<^bsub>s\<^esub> x. p" \<rightleftharpoons> "CONST sync_receive a (\<lambda>x. p)"

0 commit comments

Comments
 (0)
0