mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 13:09:33 -06:00
added Readline to GF3 shell (in the same way as GF2, using GFCFLAGS in Makefile)
This commit is contained in:
@@ -5,6 +5,7 @@ import GF.Command.Importing
|
||||
import GF.Command.Commands
|
||||
import GF.GFCC.API
|
||||
|
||||
import GF.System.Arch (fetchCommand)
|
||||
import GF.Devel.UseIO
|
||||
import GF.Devel.Arch
|
||||
import GF.Infra.Option ---- Haskell's option lib
|
||||
@@ -20,8 +21,7 @@ mainGFI xx = do
|
||||
loop :: GFEnv -> IO GFEnv
|
||||
loop gfenv0 = do
|
||||
let env = commandenv gfenv0
|
||||
putStrFlush (prompt env)
|
||||
s <- getLine
|
||||
s <- fetchCommand (prompt env)
|
||||
let gfenv = gfenv0 {history = s : history gfenv0}
|
||||
case words s of
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ gfc: gf3
|
||||
gfi: gf3
|
||||
|
||||
gf3:
|
||||
$(GHMAKE) $(GHCOPTFLAGS) -o gf3 GF/Devel/GF.hs
|
||||
$(GHMAKE) $(GHCOPTFLAGS) $(GHCFLAGS) -o gf3 GF/Devel/GF.hs
|
||||
strip $(GF3_EXE)
|
||||
mv $(GF3_EXE) ../bin/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user