summaryrefslogtreecommitdiff
path: root/ghc/InteractiveUI.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-09-22 01:33:59 +0100
committerSimon Marlow <marlowsd@gmail.com>2011-10-06 14:50:55 +0100
commit90d70e44d58bc466a65259c6e371707dc86c3d06 (patch)
tree541dabff8e8104a6dbdd813ffcd68ff09d7410bb /ghc/InteractiveUI.hs
parent25de0abf5416da898ce7c5e7999b3563ce4a1c49 (diff)
downloadhaskell-90d70e44d58bc466a65259c6e371707dc86c3d06.tar.gz
Allow foreign import declarations to the entered interactively in GHCi.
Diffstat (limited to 'ghc/InteractiveUI.hs')
-rw-r--r--ghc/InteractiveUI.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index 28d6bca42e..c635b94d1c 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -728,7 +728,8 @@ enqueueCommands cmds = do
-- | If we one of these strings prefixes a command, then we treat it as a decl
-- rather than a stmt.
declPrefixes :: [String]
-declPrefixes = ["class ","data ","newtype ","type ","instance ", "deriving "]
+declPrefixes = ["class ","data ","newtype ","type ","instance ", "deriving ",
+ "foreign "]
runStmt :: String -> SingleStep -> GHCi Bool
runStmt stmt step