diff options
| author | hallgren <hallgren@chalmers.se> | 2015-04-17 13:34:41 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2015-04-17 13:34:41 +0000 |
| commit | 78a34bc52b3638ad47f2c5aa75245c7d0cd97e9a (patch) | |
| tree | aa1effe9cb4c3103ba814b8b950c409edbcb13f0 /src/runtime/haskell-bind | |
| parent | 3263968c7985168772875ea1b005425c044cc52d (diff) | |
pgf-shell.hs: remove call to performGC and document the 'i' command
Diffstat (limited to 'src/runtime/haskell-bind')
| -rw-r--r-- | src/runtime/haskell-bind/examples/pgf-shell.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/runtime/haskell-bind/examples/pgf-shell.hs b/src/runtime/haskell-bind/examples/pgf-shell.hs index 4d8bda65f..722770822 100644 --- a/src/runtime/haskell-bind/examples/pgf-shell.hs +++ b/src/runtime/haskell-bind/examples/pgf-shell.hs @@ -1,11 +1,12 @@ -- | pgf-shell: A simple shell to illustrate the use of the Haskell binding -- to the C implementation of the PGF run-time system. -- --- The shell has 3 commands: +-- The shell has 4 commands: -- -- * parse: p <lang> <text> -- * linearize: l <lang> <tree> -- * translate: t <lang> <lang> <text> +-- * import: i <path to pgf> import Control.Monad(forever) import Control.Monad.State(evalStateT,put,get,gets,liftIO) @@ -15,7 +16,6 @@ import qualified Data.Map as M import System.IO(hFlush,stdout) import System.Environment import PGF2 -import System.Mem(performGC) import qualified Data.Map as Map main = getPGF =<< getArgs @@ -25,8 +25,7 @@ getPGF _ = putStrLn "Usage: pgf-shell <path to pgf>" pgfShell pgf = do putStrLn . unwords . M.keys $ languages pgf - flip evalStateT (pgf,[]) $ forever $ do liftIO performGC - puts "> "; liftIO $ hFlush stdout + flip evalStateT (pgf,[]) $ forever $ do puts "> "; liftIO $ hFlush stdout execute =<< liftIO readLn execute cmd = |
