Created
August 1, 2022 20:28
-
-
Save ggVGc/c20c3a04d2516b61db5f8a82e875a162 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Def1 = Def1 | |
instance HasDefName Def1 where | |
getDefName _ = "Def1" | |
def1_out :: Pin Def1 'NonZeroPos | |
def1_out = Pin "out" | |
data Def2 = Def2 | |
def2_inp :: Pin Def2 'Positive | |
def2_inp = Pin "inp" | |
instance HasDefName Def2 where | |
getDefName _ = "Def2" | |
connectionTest :: SpecWith () | |
connectionTest = it "connects quats" $ do | |
let (a, state) = mkInstance initState Def1 | |
(b, state') = mkInstance state Def2 | |
!(_ref, (_, [conn])) = connect state' (a, def1_out) (b, def2_inp) | |
conn `shouldBe` (("Def1", "out", 0), ("Def2", "inp", 1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment