I don't even know rn

This commit is contained in:
2026-05-04 01:44:11 -07:00
parent d79206440a
commit 25f95996fb

View File

@@ -259,6 +259,12 @@ renderNftType ts = toJSON ts
exprToVal :: Expr -> Value exprToVal :: Expr -> Value
exprToVal (ELit (LPort p)) = toJSON p exprToVal (ELit (LPort p)) = toJSON p
exprToVal (ELit (LInt n)) = toJSON n exprToVal (ELit (LInt n)) = toJSON n
exprToVal (ELit (LCIDR ip p))= object
[ "prefix" .= object
[ "addr" .= A.String (toText (renderLit ip))
, "len" .= p
]
]
exprToVal (ELit l) = A.String (toText (renderLit l)) exprToVal (ELit l) = A.String (toText (renderLit l))
exprToVal (EVar n) = A.String (toText n) exprToVal (EVar n) = A.String (toText n)
exprToVal (EQual ns) = A.String (toText (intercalate "." ns)) exprToVal (EQual ns) = A.String (toText (intercalate "." ns))