teakM :: Width -> [Chan] -> Chan -> MkPNMonad SimFlow SimValue ()
    teakM width inp (_, (outR, outA)) = withLabel "M" $ do
        reqPlace <- withLabel "r" $ newNumericPlace width []
        ackPlace <- withLabel "a" $ newBlackPlace []
        choicePlace <- withLabel "choice" $ newBlackPlace [token]
        withLabel "or" $ newTrans [reqPlace] [outR] [PNInput 0]
        withLabel "oa" $ newTrans [outA] [ackPlace] [PNLiteral token]
        let
            makeInp i ((inpR, inpA), _) = withLabel ("i" ++ show i) $ do
                inpAPlace <- withLabel "a" $ newBlackPlace []
                withLabel "r" $ newTrans [inpR, choicePlace] [inpAPlace, reqPlace] [PNLiteral token, PNInput 0]
                withLabel "a" $ newTrans [inpAPlace, ackPlace] [inpA, choicePlace] [PNLiteral token, PNLiteral token]
        zipWithM_ makeInp [(0::Int)..] inp
teakM :: Width -> [Chan] -> Chan -> MkPNMonad SimFlow SimValue ()
teakM width inp (_, (outR, outA)) = withLabel "M" $ do
        reqPlace <- withLabel "r" $ newNumericPlace width []
        ackPlace <- withLabel "a" $ newBlackPlace []
        choicePlace <- withLabel "choice" $ newBlackPlace [token]
        withLabel "or" $ newTrans [reqPlace] [outR] [PNInput 0]
        withLabel "oa" $ newTrans [outA] [ackPlace] [PNLiteral token]
        let
            makeInp i ((inpR, inpA), _) = withLabel ("i" ++ show i) $ do
                inpAPlace <- withLabel "a" $ newBlackPlace []
                withLabel "r" $ newTrans [inpR, choicePlace] [inpAPlace, reqPlace] [PNLiteral token, PNInput 0]
                withLabel "a" $ newTrans [inpAPlace, ackPlace] [inpA, choicePlace] [PNLiteral token, PNLiteral token]
        zipWithM_ makeInp [(0::Int)..] inp
teakM width inp (_, (outR, outA)) = withLabel "M" $ do
        reqPlace <- withLabel "r" $ newNumericPlace width []
        ackPlace <- withLabel "a" $ newBlackPlace []
        choicePlace <- withLabel "choice" $ newBlackPlace [token]
        withLabel "or" $ newTrans [reqPlace] [outR] [PNInput 0]
        withLabel "oa" $ newTrans [outA] [ackPlace] [PNLiteral token]
        let
            makeInp i ((inpR, inpA), _) = withLabel ("i" ++ show i) $ do
                inpAPlace <- withLabel "a" $ newBlackPlace []
                withLabel "r" $ newTrans [inpR, choicePlace] [inpAPlace, reqPlace] [PNLiteral token, PNInput 0]
                withLabel "a" $ newTrans [inpAPlace, ackPlace] [inpA, choicePlace] [PNLiteral token, PNLiteral token]
        zipWithM_ makeInp [(0::Int)..] inp