Fix codegen of nil when translating a constructor
commit85e6eb4bb48d0adb298c70025a7cab1c106d24ae
authorTancredi Orlando <tancredi.orlando@gmail.com>
dateSat 25 Mar 2023, 10:29 (4 years ago)
parent493bf5a
src/PureScript/Backend/Chez/Convert.purs+1−1
@@ -289,7 +289,7 @@ codegenCtorDef (Ident i) [] =
289289 S.List
290290 [ S.Identifier "scm:cons"
291291 , S.List [ S.Identifier "scm:quote", S.Identifier i ]
292− , S.Identifier "scm:nil"
292+ , S.List [ S.Identifier "scm:quote", S.Identifier "()" ]
293293 ]
294294codegenCtorDef (Ident i) ss =
295295 S.List
test-snapshots/snapshots-output/Snapshot.Constructor.ss+2−2
@@ -13,7 +13,7 @@
1313
1414 (scm:define Nil
1515 (scm:lambda ()
16− (scm:cons (scm:quote Nil) scm:nil)))
16+ (scm:cons (scm:quote Nil) (scm:quote ()))))
1717
1818 (scm:define Node
1919 (scm:lambda (value0)
@@ -27,4 +27,4 @@
2727
2828 (scm:define Nothing
2929 (scm:lambda ()
30− (scm:cons (scm:quote Nothing) scm:nil))))
30+ (scm:cons (scm:quote Nothing) (scm:quote ())))))