summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Interactive2.hs
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2015-08-12 11:01:45 +0000
committerhallgren <hallgren@chalmers.se>2015-08-12 11:01:45 +0000
commit063912c3861d73c0b3cc036394476a4af8eec782 (patch)
tree39fd69d74abf508dbe3cbbf33899a4f57c15f547 /src/compiler/GF/Interactive2.hs
parente50f92c41d2fdfda6d07a1aab0d3e375ab264617 (diff)
Move welcome message from GF.Interactive & GF.Interactive2 to GF.Command.Messages
...to avoid the duplication.
Diffstat (limited to 'src/compiler/GF/Interactive2.hs')
-rw-r--r--src/compiler/GF/Interactive2.hs26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/compiler/GF/Interactive2.hs b/src/compiler/GF/Interactive2.hs
index ed850cb2b..03d91d2a2 100644
--- a/src/compiler/GF/Interactive2.hs
+++ b/src/compiler/GF/Interactive2.hs
@@ -53,9 +53,7 @@ import GF.Server(server)
-}
import GF.System.Console(changeConsoleEncoding)
-import GF.Infra.BuildInfo(buildInfo)
-import Data.Version(showVersion)
-import Paths_gf(version)
+import GF.Command.Messages(welcome)
-- | Run the GF Shell in quiet mode (@gf -run@).
mainRunGFI :: Options -> [FilePath] -> IO ()
@@ -67,6 +65,7 @@ beQuiet = addOptions (modifyFlags (\f -> f{optVerbosity=Quiet}))
mainGFI :: Options -> [FilePath] -> IO ()
mainGFI opts files = do
P.putStrLn welcome
+ P.putStrLn "This shell uses the C run-time system. See help for available commands."
shell opts files
shell opts files = loop opts =<< runSIO (importInEnv emptyGFEnv opts files)
@@ -383,27 +382,6 @@ tryGetLine = do
Left (e :: SomeException) -> return "q"
Right l -> return l
-welcome = unlines [
- " ",
- " * * * ",
- " * * ",
- " * * ",
- " * ",
- " * ",
- " * * * * * * * ",
- " * * * ",
- " * * * * * * ",
- " * * * ",
- " * * * ",
- " ",
- "This is GF version "++showVersion version++". ",
- buildInfo,
- "License: see help -license. ",
---"Bug reports: http://code.google.com/p/grammatical-framework/issues/list",
- "",
- "This shell uses the C run-time system. See help for available commands."
- ]
-
prompt env = abs ++ "> "
where
abs = maybe "" C.abstractName (multigrammar (commandenv env))