summaryrefslogtreecommitdiff
path: root/src/GF/Shell.hs
diff options
context:
space:
mode:
authoraarne <unknown>2004-06-16 14:49:50 +0000
committeraarne <unknown>2004-06-16 14:49:50 +0000
commita77519ba1045d23a7bb8ea1c56cc90518e9fedb9 (patch)
tree68d72eb77950cf179e8a23ca749a9909b1f2d457 /src/GF/Shell.hs
parent9fae09a77c1f31468129a47cb79156d55f5f2939 (diff)
bug fixes ; command so ; reintroduce batch mode
Diffstat (limited to 'src/GF/Shell.hs')
-rw-r--r--src/GF/Shell.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/GF/Shell.hs b/src/GF/Shell.hs
index ebfa332b0..e00382bff 100644
--- a/src/GF/Shell.hs
+++ b/src/GF/Shell.hs
@@ -5,6 +5,7 @@ import Str
import qualified Grammar as G
import qualified Ident as I
import qualified Compute as Co
+import qualified Lookup as L
import qualified GFC
import Values
import GetTree
@@ -158,6 +159,16 @@ execC co@(comm, opts0) sa@((st,(h,_)),a) = checkOptions st co >> case comm of
getOptVal opts useResource -- flag -res=m
justOutput (putStrLn (err id (prt . stripTerm) (
string2srcTerm src m t >>= Co.computeConcrete src))) sa
+ CShowOpers t -> do
+ m <- return $
+ maybe (I.identC "?") id $ -- meaningful if no opers in t
+ maybe (resourceOfShellState st) (return . I.identC) $ -- topmost res
+ getOptVal opts useResource -- flag -res=m
+ justOutput (putStrLn (err id (unlines . map prOperSignature) (
+ string2srcTerm src m t >>=
+ Co.computeConcrete src >>=
+ return . L.opersForType src))) sa
+
CTranslationQuiz il ol -> justOutput (teachTranslation opts (sgr il) (sgr ol)) sa
CTranslationList il ol n -> do