Coroutine interfaces for interpreters, like Bash and Sh.
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1 commit behind solidsnack:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
System/Posix
LICENSE
README
coproc.cabal

README

A coroutine interface for interactive interpreters. One use case is extracting
shell function definitions from source relying on the Bash's parser:

  ghci> import System.Posix.CoProc
  ghci> b <- start Bash
    b :: Session Bash
  ghci> print b
    Session pid=30591 interpreter=bash [lock] [handles]
    it :: ()
  ghci> query b "function echo_x { echo x ;}"
    ("","")
    it :: (ByteString, ByteString)
  ghci> query b "declare -F"
    ("declare -f echo_x\n","")
    it :: (ByteString, ByteString)
  ghci> query b "declare -f echo_x"
    ("echo_x () \n{ \n    echo x\n}\n","")
    it :: (ByteString, ByteString)