]> gitweb.factorcode.org Git - factor.git/commitdiff
core, basis: Don't use the IN: foo.private feature and undocument it.
authorDoug Coleman <doug.coleman@gmail.com>
Tue, 30 Jun 2015 15:51:07 +0000 (08:51 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Tue, 30 Jun 2015 15:51:07 +0000 (08:51 -0700)
It only works well when you are loading code dynamically.

basis/math/combinatorics/combinatorics-docs.factor
basis/math/complex/complex.factor
basis/tools/deploy/shaker/strip-destructors.factor
core/math/floats/floats.factor
core/math/integers/integers.factor
core/syntax/syntax-docs.factor

index 776ab37916f7323edb975cdbe470ca23449595eb..02da187331c56fb56e1fc15e5c34b67d827a611e 100644 (file)
@@ -102,8 +102,6 @@ HELP: each-combination
 { $description "Applies the quotation to each combination of " { $snippet "seq" } " choosing " { $snippet "k" } " elements, in order." } ;
 
 
-IN: math.combinatorics.private
-
 HELP: factoradic
 { $values { "n" integer } { "factoradic" sequence } }
 { $description "Converts a positive integer " { $snippet "n" } " to factoradic form.  The factoradic of an integer is its representation based on a mixed radix numerical system that corresponds to the values of " { $snippet "n" } " factorial." }
index 381f21d693d2ea1fc74fa26c918a30bfc8cfb089..c73315a8df10c31feb034a90beaa57426acbf6fc 100644 (file)
@@ -3,7 +3,9 @@
 USING: accessors kernel kernel.private math math.private
 math.functions arrays math.functions.private sequences
 sequences.private parser ;
-IN: math.complex.private
+IN: math.complex
+
+<PRIVATE
 
 M: real real-part ; inline
 M: real imaginary-part drop 0 ; inline
@@ -43,3 +45,5 @@ USE: prettyprint.custom
 M: complex pprint* pprint-object ;
 M: complex pprint-delims drop \ C{ \ } ;
 M: complex >pprint-sequence >rect 2array ;
+
+PRIVATE>
index 86c08ebcb549ea30e63bcb9a813cc00aa08fc95f..fd505b9c9863a0962514728a7edfd696d8fa37db 100644 (file)
@@ -1,6 +1,10 @@
 USE: kernel
-IN: destructors.private
+IN: destructors
+
+<PRIVATE
 
 : register-disposable ( obj -- ) drop ; inline
 
 : unregister-disposable ( obj -- ) drop ; inline
+
+PRIVATE>
index 05eb4d4722981da1662e87f4e35582e79a7ca802..c5882724f4da4a2aca7a1f94e6a6b590d0ba8242 100644 (file)
@@ -1,8 +1,9 @@
 ! Copyright (C) 2004, 2010 Slava Pestov, Joe Groff.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel math math.private math.order ;
-IN: math.floats.private
+IN: math.floats
 
+<PRIVATE
 : float-unordered? ( x y -- ? ) [ fp-nan? ] either? ;
 : float-min ( x y -- z ) [ float< ] most ; foldable
 : float-max ( x y -- z ) [ float> ] most ; foldable
@@ -79,3 +80,5 @@ M: float fp-sign double>bits 63 bit? ; inline
 M: float neg? fp-sign ; inline
 
 M: float abs double>bits 63 2^ bitnot bitand bits>double ; inline
+
+PRIVATE>
index 7aae3c5362925b64589cda0d72e044edafcd60ba..7cc3b3448fc01a8d04b0a681a8f2bcb9e5b93a61 100644 (file)
@@ -3,7 +3,9 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: combinators kernel kernel.private math math.order
 math.private ;
-IN: math.integers.private
+IN: math.integers
+
+<PRIVATE
 
 : fixnum-min ( x y -- z ) [ fixnum< ] most ; foldable
 : fixnum-max ( x y -- z ) [ fixnum> ] most ; foldable
@@ -186,3 +188,5 @@ M: fixnum /f
     { bignum } declare 1 >bignum bignum/f ;
 
 M: bignum >float bignum>float ; inline
+
+PRIVATE>
index a91023f222f7d057c5a8caae6c8598370d6607c1..4670c460228d68bc0ad966b95e3a67a393156621 100644 (file)
@@ -867,17 +867,6 @@ HELP: <PRIVATE
         ""
         ": fac ( n -- n! ) 1 swap (fac) ;"
     }
-    "The above is equivalent to:"
-    { $code
-        "IN: factorial.private"
-        ""
-        ": (fac) ( accum n -- n! )"
-        "    dup 1 <= [ drop ] [ [ * ] keep 1 - (fac) ] if ;"
-        ""
-        "IN: factorial"
-        ""
-        ": fac ( n -- n! ) 1 swap (fac) ;"
-    }
 } ;
 
 HELP: PRIVATE>