@@ -5,6 +5,7 @@
55 (export
66 insert
77 main
8+ minusTwo
89 recordAccess
910 recordAddField
1011 recordUpdate)
@@ -13,11 +14,12 @@
1314 (prefix (purs runtime lib) rt:)
1415 (prefix (Record lib) Record.)
1516 (prefix (Test.Assert lib) Test.Assert.)
16− (prefix (Type.Proxy lib) Type.Proxy.))
17+ (prefix (Type.Proxy lib) Type.Proxy.)
18+ (Snapshot.Literals.Record foreign))
1719
1820 (scm:define insert
19− (((Record.insert (rt:make-object "reflectSymbol" (scm:lambda (_)
20− "anotherField"))) (scm:gensym "purs-undefined")) (scm:gensym "purs-undefined")))
21+ (((Record.insert (rt:make-object (scm:cons "reflectSymbol" (scm:lambda (_)
22+ "anotherField")))) (scm:gensym "purs-undefined")) (scm:gensym "purs-undefined")))
2123
2224 (scm:define recordUpdate
2325 (scm:lambda (v0)
@@ -34,7 +36,7 @@
3436
3537 (scm:define main
3638 (scm:let*
37− ([r0 (rt:make-object "fooBarBaz" 5)]
39+ ([r0 (rt:make-object (scm:cons "fooBarBaz" 5))]
3840 [s1 (recordUpdate r0)]
3941 [t2 ((recordAddField (scm:gensym "purs-undefined")) s1)]
4042 [_3 (Test.Assert.assert (scm:fx=? (recordAccess t2) 10))])
@@ -42,5 +44,6 @@
4244 (scm:let*
4345 ([_ (_3)]
4446 [_ ((Test.Assert.assert (scm:fx=? (rt:object-ref t2 "anotherField") 42)))]
45− [_ ((Test.Assert.assert (scm:fx=? (recordAccess s1) 10)))])
46− ((Test.Assert.assert (scm:fx=? (recordAccess r0) 5))))))))
47+ [_ ((Test.Assert.assert (scm:fx=? (recordAccess s1) 10)))]
48+ [_ ((Test.Assert.assert (scm:fx=? (recordAccess r0) 5)))])
49+ ((Test.Assert.assert (scm:fx=? (recordAccess (rt:make-object (scm:cons "fooBarBaz" minusTwo))) minusTwo))))))))