Skip to content

Commit

Permalink
Add Connectable instance for connecting ReadOnly to WriteOnly
Browse files Browse the repository at this point in the history
  • Loading branch information
darius-bluespec committed Jan 3, 2025
1 parent a67cac8 commit bc8f829
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Libraries/Base1/Connectable.bs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit bc8f829

Please sign in to comment.