allow literals in the C shell

This commit is contained in:
krangelov
2020-05-20 20:18:47 +02:00
parent 165c5a6d9d
commit 0a915199e8

View File

@@ -806,6 +806,10 @@ hsExpr c =
Just (f,cs) -> H.mkApp (H.mkCId f) (map hsExpr cs) Just (f,cs) -> H.mkApp (H.mkCId f) (map hsExpr cs)
_ -> case unStr c of _ -> case unStr c of
Just str -> H.mkStr str Just str -> H.mkStr str
_ -> case unInt c of
Just n -> H.mkInt n
_ -> case unFloat c of
Just d -> H.mkFloat d
_ -> error $ "GF.Command.Commands2.hsExpr "++show c _ -> error $ "GF.Command.Commands2.hsExpr "++show c
cExpr e = cExpr e =
@@ -813,6 +817,10 @@ cExpr e =
Just (f,es) -> mkApp (H.showCId f) (map cExpr es) Just (f,es) -> mkApp (H.showCId f) (map cExpr es)
_ -> case H.unStr e of _ -> case H.unStr e of
Just str -> mkStr str Just str -> mkStr str
_ -> case H.unInt e of
Just n -> mkInt n
_ -> case H.unFloat e of
Just d -> mkFloat d
_ -> error $ "GF.Command.Commands2.cExpr "++show e _ -> error $ "GF.Command.Commands2.cExpr "++show e
needPGF exec opts ts = needPGF exec opts ts =