]> gitweb.factorcode.org Git - factor.git/commitdiff
words.constant: store true for "constant" word prop
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 9 Jan 2022 03:39:20 +0000 (19:39 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 9 Jan 2022 03:39:20 +0000 (19:39 -0800)
Fixes ``CONSTANT: foo f``

core/words/constant/constant.factor

index 0d45bbb0fdba21b26cf6ef020f2ed7d54e0227e1..926387539b793e2c5ffe20ed4c85b395c9ba81ab 100644 (file)
@@ -6,12 +6,10 @@ IN: words.constant
 PREDICATE: constant < word "constant" word-prop >boolean ;
 
 : define-constant ( word value -- )
-    [ "constant" set-word-prop ]
+    [ drop t "constant" set-word-prop ]
     [ [ ] curry ( -- value ) define-inline ] 2bi ;
 
 M: constant reset-word
     [ call-next-method ] [ f "constant" set-word-prop ] bi ;
 
 M: constant definer drop \ CONSTANT: f ;
-
-M: constant definition "constant" word-prop literalize 1quotation ;