Commits

Tobias Dammers  committed eae476f

Fixed JSON output bug in JsonLisp writer

  • Participants
  • Parent commits 3f930b6

Comments (0)

Files changed (1)

File hpaco-lib/Text/HPaco/Writers/JsonLisp.hs

             --     IntLiteral _ -> writeWithHead "print" [expr]
             --     FloatLiteral _ -> writeWithHead "print" [expr]
             --     otherwise -> wrapList $ write "flatten " >> writeWithHead "print" [expr]
-        NullStatement -> return ()
-        IfStatement expr true false -> writeList [ write $ StringLiteral "if", write expr, write true, write false ]
+        NullStatement ->
+            writeList
+                [ write $ StringLiteral "nop" ]
+        IfStatement expr true false ->
+            writeList
+                [ write $ StringLiteral "if"
+                , write expr
+                , write true
+                , write false
+                ]
         LetStatement identifier expr stmt ->
             writeList
                 [ write $ StringLiteral "let"