diff --git a/lib/resource/arabic/LexiconAra.gf b/lib/resource/arabic/LexiconAra.gf index c07acc311..6d457e0d8 100644 --- a/lib/resource/arabic/LexiconAra.gf +++ b/lib/resource/arabic/LexiconAra.gf @@ -7,7 +7,7 @@ concrete LexiconAra of Lexicon = CatAra ** open Prelude in { flags - optimize=values ; + optimize=values ; coding=utf8 ; lin diff --git a/lib/resource/arabic/MorphoAra.gf b/lib/resource/arabic/MorphoAra.gf index 0ab4332ca..8846e11a6 100644 --- a/lib/resource/arabic/MorphoAra.gf +++ b/lib/resource/arabic/MorphoAra.gf @@ -1,6 +1,6 @@ resource MorphoAra = ResAra ** open Prelude in { -flags optimize = all ;--noexpand; +flags optimize = all ;--noexpand; coding=utf8 ; oper diff --git a/lib/resource/arabic/ParadigmsAra.gf b/lib/resource/arabic/ParadigmsAra.gf index dd15ad294..c9816e952 100644 --- a/lib/resource/arabic/ParadigmsAra.gf +++ b/lib/resource/arabic/ParadigmsAra.gf @@ -31,7 +31,7 @@ resource ParadigmsAra = open CatAra in { - flags optimize = noexpand; + flags optimize = noexpand; coding=utf8 ; oper diff --git a/lib/resource/arabic/PatternsAra.gf b/lib/resource/arabic/PatternsAra.gf index 0912c5d88..611fd262a 100644 --- a/lib/resource/arabic/PatternsAra.gf +++ b/lib/resource/arabic/PatternsAra.gf @@ -1,5 +1,7 @@ resource PatternsAra = { +flags coding=utf8 ; + oper fA' = { h = "" ; m1 = ""; m2 = ""; t = "َاء"} ; diff --git a/lib/resource/arabic/ResAra.gf b/lib/resource/arabic/ResAra.gf index d5263815e..a7ecb64ee 100644 --- a/lib/resource/arabic/ResAra.gf +++ b/lib/resource/arabic/ResAra.gf @@ -9,7 +9,7 @@ -- resource ResAra = PatternsAra ** open Prelude, Predef in { - flags optimize=noexpand ; + flags optimize=noexpand ; coding=utf8 ; param diff --git a/lib/resource/arabic/StructuralAra.gf b/lib/resource/arabic/StructuralAra.gf index 8d71e687c..58240c781 100644 --- a/lib/resource/arabic/StructuralAra.gf +++ b/lib/resource/arabic/StructuralAra.gf @@ -1,7 +1,7 @@ concrete StructuralAra of Structural = CatAra ** open MorphoAra, ResAra, ParadigmsAra, Prelude in { - flags optimize=all ; + flags optimize=all ; coding=utf8 ; lin above_Prep = ss "فَوْقَ" ; diff --git a/src/GF/Command/Interpreter.hs b/src/GF/Command/Interpreter.hs index 2762875ec..db4192001 100644 --- a/src/GF/Command/Interpreter.hs +++ b/src/GF/Command/Interpreter.hs @@ -38,10 +38,13 @@ interpretCommandLine :: (String -> String) -> CommandEnv -> String -> IO () interpretCommandLine enc env line = case readCommandLine line of Just [] -> return () + Just pipes -> mapM_ (interpretPipe enc env) pipes +{- Just pipes -> do res <- runInterruptibly (mapM_ (interpretPipe enc env) pipes) case res of Left ex -> putStrLnFlush $ enc (show ex) Right x -> return x +-} Nothing -> putStrLnFlush "command not parsed" interpretPipe enc env cs = do diff --git a/src/GFI.hs b/src/GFI.hs index 75ffa22d8..014fa327e 100644 --- a/src/GFI.hs +++ b/src/GFI.hs @@ -26,6 +26,8 @@ import System.Cmd import System.CPUTime import Control.Exception import Data.Version +import GF.System.Signal + import Paths_gf @@ -53,7 +55,7 @@ loop opts gfenv0 = do pwords = case words s of w:ws -> getCommandOp w :ws ws -> ws - case pwords of + r <- runInterruptibly $ case pwords of -- special commands, requiring source grammar in env "!":ws -> do system $ unwords ws @@ -106,6 +108,8 @@ loop opts gfenv0 = do _ -> do interpretCommandLine enc env s loopNewCPU gfenv + gfenv' <- return $ either (const gfenv) id r + loopNewCPU gfenv' importInEnv :: GFEnv -> Options -> [FilePath] -> IO GFEnv importInEnv gfenv opts files