latch :: ReqAckPair -> ReqAckPair -> MkPNMonad SimFlow SimValue ()
    latch (inpR, inpA) (outR, outA) = withLabel "L" $ do
        ackPlace <- withLabel "a" $ newBlackPlace [token]
        withLabel "r" $ newTrans [inpR, ackPlace] [outR, inpA] [PNInput 0, PNLiteral token]
        withLabel "a" $ newTrans [outA] [ackPlace] [PNLiteral token]
        return ()

    -- type MkPNMonad m value a = State (MkPN m value) a
latch :: ReqAckPair -> ReqAckPair -> MkPNMonad SimFlow SimValue ()
latch (inpR, inpA) (outR, outA) = withLabel "L" $ do
        ackPlace <- withLabel "a" $ newBlackPlace [token]
        withLabel "r" $ newTrans [inpR, ackPlace] [outR, inpA] [PNInput 0, PNLiteral token]
        withLabel "a" $ newTrans [outA] [ackPlace] [PNLiteral token]
        return ()

    -- type MkPNMonad m value a = State (MkPN m value) a
latch (inpR, inpA) (outR, outA) = withLabel "L" $ do
        ackPlace <- withLabel "a" $ newBlackPlace [token]
        withLabel "r" $ newTrans [inpR, ackPlace] [outR, inpA] [PNInput 0, PNLiteral token]
        withLabel "a" $ newTrans [outA] [ackPlace] [PNLiteral token]
        return ()

    -- type MkPNMonad m value a = State (MkPN m value) a