From 25f95996fbd86ec7e94d6cbdf6b5cc2517f5e0c1 Mon Sep 17 00:00:00 2001 From: Yuri Tatishchev Date: Mon, 4 May 2026 01:44:11 -0700 Subject: [PATCH] I don't even know rn --- src/FWL/Compile.hs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/FWL/Compile.hs b/src/FWL/Compile.hs index 0fa206a..f4043c1 100644 --- a/src/FWL/Compile.hs +++ b/src/FWL/Compile.hs @@ -257,9 +257,15 @@ renderNftType [t] = A.String (toText t) renderNftType ts = toJSON ts exprToVal :: Expr -> Value -exprToVal (ELit (LPort p)) = toJSON p -exprToVal (ELit (LInt n)) = toJSON n -exprToVal (ELit l) = A.String (toText (renderLit l)) +exprToVal (ELit (LPort p)) = toJSON p +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 (EVar n) = A.String (toText n) exprToVal (EQual ns) = A.String (toText (intercalate "." ns)) exprToVal _ = A.String "_"