effectBind :: Name -> OptDesc -> Q (Name, Stmt)
effectBind pclv o = do
  b   <- newName $ name o
  dfg <- dfGetter o
  let enact = AppE (enactor o) (AppE dfg (VarE pclv))
      tryW  = composeApE (VarE 'tryWriteF) enact
  return (b, BindS (VarP b) tryW)

-- t2apply ---------------------------------------------------------------------

-- | apply a monadic fn to the second element of a monadic pair
effectBind :: Name -> OptDesc -> Q (Name, Stmt)
effectBind pclv o = do
  b   <- newName $ name o
  dfg <- dfGetter o
  let enact = AppE (enactor o) (AppE dfg (VarE pclv))
      tryW  = composeApE (VarE 'tryWriteF) enact
  return (b, BindS (VarP b) tryW)

-- t2apply ---------------------------------------------------------------------

-- | apply a monadic fn to the second element of a monadic pair
effectBind pclv o = do
  b   <- newName $ name o
  dfg <- dfGetter o
  let enact = AppE (enactor o) (AppE dfg (VarE pclv))
      tryW  = composeApE (VarE 'tryWriteF) enact
  return (b, BindS (VarP b) tryW)

-- t2apply ---------------------------------------------------------------------

-- | apply a monadic fn to the second element of a monadic pair