From effa818408c1d79d4615122078a816e329d220d1 Mon Sep 17 00:00:00 2001 From: Thomas Hallgren Date: Tue, 16 Oct 2018 16:23:54 +0200 Subject: gf -cshell bug fix The functions cExpr and hsExpr in GF.Command.Commands2 need to handle string literals. --- src/compiler/GF/Command/Commands2.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/compiler/GF/Command/Commands2.hs') diff --git a/src/compiler/GF/Command/Commands2.hs b/src/compiler/GF/Command/Commands2.hs index b5335479c..08caf705d 100644 --- a/src/compiler/GF/Command/Commands2.hs +++ b/src/compiler/GF/Command/Commands2.hs @@ -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 -- cgit v1.2.3