From bc8f82940099cc60b67040f1c9e13fcdb27b1671 Mon Sep 17 00:00:00 2001 From: Darius Rad Date: Thu, 2 Jan 2025 23:36:12 -0500 Subject: [PATCH] Add Connectable instance for connecting ReadOnly to WriteOnly --- src/Libraries/Base1/Connectable.bs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Libraries/Base1/Connectable.bs b/src/Libraries/Base1/Connectable.bs index 30882459a..a46c52fd1 100644 --- a/src/Libraries/Base1/Connectable.bs +++ b/src/Libraries/Base1/Connectable.bs @@ -152,3 +152,12 @@ instance Connectable Action Action ==> action a1 a2 + +instance Connectable (ReadOnly a) (WriteOnly a) where + mkConnection :: (IsModule m c) => (ReadOnly a) -> (WriteOnly a) -> (m Empty) + mkConnection ro wo = + module + rules + "write": + when True + ==> wo._write(ro._read)