statements: { options = { hoist_funs: false, hoist_vars: true, } input: { function f() { var a = 1; var b = 2; var c = 3; function g() {} return g(a, b, c); } } expect: { function f() { var a = 1, b = 2, c = 3; function g() {} return g(a, b, c); } } } statements_funs: { options = { hoist_funs: true, hoist_vars: true, } input: { function f() { var a = 1; var b = 2; var c = 3; function g() {} return g(a, b, c); } } expect: { function f() { function g() {} var a = 1, b = 2, c = 3; return g(a, b, c); } } } sequences: { options = { hoist_funs: false, hoist_vars: true, } input: { function f() { var a = 1, b = 2; function g() {} var c = 3; return g(a, b, c); } } expect: { function f() { var c, a = 1, b = 2; function g() {} c = 3; return g(a, b, c); } } } sequences_funs: { options = { hoist_funs: true, hoist_vars: true, } input: { function f() { var a = 1, b = 2; function g() {} var c = 3; return g(a, b, c); } } expect: { function f() { function g() {} var a = 1, b = 2, c = 3; return g(a, b, c); } } } issue_2295: { options = { collapse_vars: true, hoist_vars: true, } input: { function foo(o) { var a = o.a; if (a) return a; var a = 1; } } expect: { function foo(o) { var a = o.a; if (a) return a; a = 1; } } } g/?id=50d535ea55c53db48634cf492ae433b986fd5c83'>root/tests/monads.scm
AgeCommit message (Expand)Author
2022-10-22Remove now unnecessary uses of (guix grafts)....These modules would use (guix grafts) just to access '%graft?' and related bindings, which are now in (guix store). * gnu/ci.scm, guix/gexp.scm, guix/lint.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/deploy.scm, guix/scripts/environment.scm, guix/scripts/home.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/pull.scm, guix/scripts/size.scm, guix/scripts/system.scm, guix/scripts/weather.scm, tests/builders.scm, tests/channels.scm, tests/cpan.scm, tests/derivations.scm, tests/gexp.scm, tests/graph.scm, tests/guix-daemon.sh, tests/monads.scm, tests/pack.scm, tests/packages.scm, tests/profiles.scm, tests/system.scm: Remove #:use-module (guix grafts). Ludovic Courtès
2022-07-10monads: Add 'mparameterize'....* etc/system-tests.scm (mparameterize): Move to... * guix/monads.scm (mparameterize): ... here. * tests/monads.scm ("mparameterize"): New test. * .dir-locals.el (c-mode): Add it. Ludovic Courtès