Skip to content

Commit

Permalink
Fixed more [] uses on Anarki.
Browse files Browse the repository at this point in the history
  • Loading branch information
rocketnia committed Apr 8, 2012
1 parent 2d4cfb3 commit a5c0ad5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion arc/more-module-stuff.arc
Expand Up @@ -168,7 +168,9 @@
`(let nmap (table)
(w/global my nspace.nmap
(tldo ,@body))
(pack-nmap:copy nmap ,@(mappend [do `(',_ nil)] names))))
; NOTE: In Anarki, [do `(',_ nil)] is nullary because of the
; quote.
(pack-nmap:copy nmap ,@(mappend (fn (_) `(',_ nil)) names))))


; originally from modules/path.arc
Expand Down
7 changes: 5 additions & 2 deletions arc/orc/orc.arc
Expand Up @@ -37,7 +37,9 @@

(=mc my.def-inherits (subtype . supertypes)
`(,my!fn-def-inherits
,@(map [do `',deglobalize._] (cons subtype supertypes))))
; NOTE: In Anarki, [do `',deglobalize._] is nullary thanks to the
; quote.
,@(map (fn (_) `',deglobalize._) (cons subtype supertypes))))

(=fn my.isinstance (x test-type)
(my.inherits my.otype.x test-type))
Expand All @@ -59,7 +61,8 @@
; types, such as Java objects and tables with their 'type fields set.
(=fn my.otype (x)
(case x nil my!niltype
(on-err [do my!any] (fn () type.x))))
; NOTE: In Anarki, [do my!any] is nullary.
(on-err (fn (_) my!any) (fn () type.x))))


; == A mechanism for rules which dispatch lexicographically by type ==
Expand Down

0 comments on commit a5c0ad5

Please sign in to comment.