summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/ghci/shell.hs
blob: 75f78342a433842b065139eb7d0a26236f4af35e (plain)
1
2
3
4
5
6
7
8
9
-- Used to present a consistent shell view for :! commands in GHCi
-- scripts.  We're assuming that sh is in the path and that it
-- is a Bourne-compatible shell.

import System.Cmd
import System.Exit

shell :: String -> IO ExitCode
shell s = rawSystem "sh" ["-c", s]