Commits

Tobias Dammers committed c6d5181

Fixed {%def%} in JsonLisp output mode

Comments (0)

Files changed (1)

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

         SourcePositionStatement fn ln -> Null
         NullStatement -> toJSON ["nop"]
 
+instance ToJSON (String, Statement) where
+    toJSON (name, body) = toJSON $ "def" <:> name <:> [body]
+
 instance ToJSON AST where
     toJSON AST { astRootStatement = stmt, astDefs = defs } =
         toJSON $ (toJSON "progn" <:> map toJSON defs) ++ [toJSON stmt]