1
0
forked from GitHub/gf-core

gf -cshell bug fix

The functions cExpr and hsExpr in GF.Command.Commands2 need to
handle string literals.
This commit is contained in:
Thomas Hallgren
2018-10-16 16:23:54 +02:00
parent 8df3b458d4
commit effa818408

View File

@@ -804,12 +804,16 @@ prMorphoAnalysis (w,lps) =
hsExpr c =
case unApp c of
Just (f,cs) -> H.mkApp (H.mkCId f) (map hsExpr cs)
_ -> error "GF.Command.Commands2.hsExpr"
_ -> case unStr c of
Just str -> H.mkStr str
_ -> error $ "GF.Command.Commands2.hsExpr "++show c
cExpr e =
case H.unApp e of
Just (f,es) -> mkApp (H.showCId f) (map cExpr es)
_ -> error "GF.Command.Commands2.cExpr"
_ -> case H.unStr e of
Just str -> mkStr str
_ -> error $ "GF.Command.Commands2.cExpr "++show e
needPGF exec opts ts =
do Env mb_pgf cncs <- getPGFEnv