From 6d5d8c93b6732d5264599547f6c2eb38819e6589 Mon Sep 17 00:00:00 2001 From: Stefan Israelsson Tampe Date: Mon, 13 Aug 2018 19:15:33 +0200 Subject: fix minor module bug --- modules/language/python/module.scm | 58 +++++++++++++++---------------- modules/language/python/module/python.scm | 2 +- 2 files changed, 30 insertions(+), 30 deletions(-) (limited to 'modules/language/python') diff --git a/modules/language/python/module.scm b/modules/language/python/module.scm index aacf3a1..16204e4 100644 --- a/modules/language/python/module.scm +++ b/modules/language/python/module.scm @@ -63,36 +63,36 @@ #f))) (define __init__ - (case-lambda - ((self pre l nm) - (match l - ((name) - (rawset self '_path (reverse (cons name pre))) - (_cont self #f (cons name pre) #f (cons name nm) #f)) + (case-lambda + ((self pre l nm) + (match l + ((name) + (rawset self '_path (reverse (cons name pre))) + (_cont self #f (cons name pre) #f (cons name nm) #f)) - ((name . (and l (name2 . _))) - (rawset self '_path (reverse (cons name pre))) - (_cont self name2 (cons name pre) l (cons name nm) #t)))) + ((name . (and l (name2 . _))) + (rawset self '_path (reverse (cons name pre))) + (_cont self name2 (cons name pre) l (cons name nm) #t)))) - - ((self l nm) - (_cont self #f l #f nm #f)) - - ((self l) - (if (pair? l) - (if (and (> (length l) 3) - (equal? (list (list-ref l 0) - (list-ref l 1) - (list-ref l 2)) - '(language python module))) - (__init__ self (reverse '(language python module)) (cdddr l) - '()) - (__init__ self '() l '())) - (__init__ self - (append - '(language python module) - (map string->symbol - (string-split l #\.)))))))) + + ((self l nm) + (_cont self #f l #f nm #f)) + + ((self l) + (if (pair? l) + (if (and (> (length l) 3) + (equal? (list (list-ref l 0) + (list-ref l 1) + (list-ref l 2)) + '(language python module))) + (__init__ self (reverse '(language python module)) (cdddr l) + '()) + (__init__ self '() l '())) + (__init__ self + (append + '(language python module) + (map string->symbol + (string-split l #\.)))))))) (define __update__ (case-lambda @@ -229,6 +229,6 @@ (define (import-f x f . l) (if x (if (m? x) - (begin (apply (rawref x '__update__) l) x) + (begin (apply (rawref x '__update__) x l) x) (apply f l)) (apply f l))) diff --git a/modules/language/python/module/python.scm b/modules/language/python/module/python.scm index 4c274ea..9f8defe 100644 --- a/modules/language/python/module/python.scm +++ b/modules/language/python/module/python.scm @@ -20,6 +20,6 @@ (resolve-interface 'iface)))])) (set! (@ (language python module os) path) - (Module '(language python module os path))) + (Module '(path os module python language) '(path os))) (re-export-all (language python module _python)) -- cgit v1.2.3