Use the same 'literal' term for all object language literals
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
0b3469b49a
commit
98562eca2d
|
@ -146,9 +146,9 @@ typeToTerm t =
|
|||
exprToTerm : Expr -> Syntax.Term Metavariable
|
||||
exprToTerm e =
|
||||
case e of
|
||||
IntLit i -> Syntax.Call "intlit" [Syntax.IntLit i]
|
||||
FloatLit f -> Syntax.Call "floatlit" [Syntax.FloatLit f]
|
||||
StrLit s -> Syntax.Call "strlit" [Syntax.StringLit s]
|
||||
IntLit i -> Syntax.Call "lit" [Syntax.IntLit i]
|
||||
FloatLit f -> Syntax.Call "lit" [Syntax.FloatLit f]
|
||||
StrLit s -> Syntax.Call "lit" [Syntax.StringLit s]
|
||||
Plus e1 e2 -> Syntax.Call "plus" [exprToTerm e1, exprToTerm e2]
|
||||
Pair e1 e2 -> Syntax.Call "pair" [exprToTerm e1, exprToTerm e2]
|
||||
Fst ep -> Syntax.Call "fst" [exprToTerm ep]
|
||||
|
|
Loading…
Reference in New Issue
Block a user