- |   serialize x with the parser
runW :: ST () -> ByteString
runW (ST f) = unsafePerformIO $ do
      c <- newContext
      return $ case f (Stat(c,"",""))  of
              Right (Stat (c,str,_), _) ->
                let scontext= assocs c
                    vars= B.concat $ Prelude.map (\(n,(_,_,v))->"v" `append`  (pack $ show n)  `append`  "= "  `append`  v  `append`  ";\r\n ")  scontext
                    strContext= if Prelude.null scontext  then "" else  whereSep `append` vars  `append`  "\r\n}"
                in  str  `append`  strContext

              Left (Error s) -> error s



-- | output the string of the serialized variable

runW :: ST () -> ByteString
runW (ST f) = unsafePerformIO $ do
      c <- newContext
      return $ case f (Stat(c,"",""))  of
              Right (Stat (c,str,_), _) ->
                let scontext= assocs c
                    vars= B.concat $ Prelude.map (\(n,(_,_,v))->"v" `append`  (pack $ show n)  `append`  "= "  `append`  v  `append`  ";\r\n ")  scontext
                    strContext= if Prelude.null scontext  then "" else  whereSep `append` vars  `append`  "\r\n}"
                in  str  `append`  strContext

              Left (Error s) -> error s



-- | output the string of the serialized variable
runW (ST f) = unsafePerformIO $ do
      c <- newContext
      return $ case f (Stat(c,"",""))  of
              Right (Stat (c,str,_), _) ->
                let scontext= assocs c
                    vars= B.concat $ Prelude.map (\(n,(_,_,v))->"v" `append`  (pack $ show n)  `append`  "= "  `append`  v  `append`  ";\r\n ")  scontext
                    strContext= if Prelude.null scontext  then "" else  whereSep `append` vars  `append`  "\r\n}"
                in  str  `append`  strContext

              Left (Error s) -> error s



-- | output the string of the serialized variable