diff options
| author | Thomas Hallgren <th-github@altocumulus.org> | 2018-10-16 16:23:54 +0200 |
|---|---|---|
| committer | Thomas Hallgren <th-github@altocumulus.org> | 2018-10-16 16:23:54 +0200 |
| commit | effa818408c1d79d4615122078a816e329d220d1 (patch) | |
| tree | 6b9231c8e6c2648966ef2073afa7be058caa23f9 /src/compiler/GF/Command | |
| parent | 8df3b458d446297557575511701169bcef229e6f (diff) | |
gf -cshell bug fix
The functions cExpr and hsExpr in GF.Command.Commands2 need to
handle string literals.
Diffstat (limited to 'src/compiler/GF/Command')
| -rw-r--r-- | src/compiler/GF/Command/Commands2.hs | 8 |
1 files changed, 6 insertions, 2 deletions
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 |
