From d6e7eefde32de78b7db041becf1b156e32fb23f2 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Wed, 14 Jan 2009 01:02:27 -0600 Subject: [PATCH] Fix mnestic's bug and remove math.complex.prettyprint hack --- basis/bootstrap/math/math.factor | 4 +--- basis/math/complex/complex.factor | 8 +++++++- basis/math/complex/prettyprint/prettyprint.factor | 8 -------- 3 files changed, 8 insertions(+), 12 deletions(-) delete mode 100644 basis/math/complex/prettyprint/prettyprint.factor diff --git a/basis/bootstrap/math/math.factor b/basis/bootstrap/math/math.factor index 347969af0d..27b2f6b181 100644 --- a/basis/bootstrap/math/math.factor +++ b/basis/bootstrap/math/math.factor @@ -2,6 +2,4 @@ USING: vocabs vocabs.loader kernel ; "math.ratios" require "math.floats" require -"math.complex" require - -"prettyprint" vocab [ "math.complex.prettyprint" require ] when +"math.complex" require \ No newline at end of file diff --git a/basis/math/complex/complex.factor b/basis/math/complex/complex.factor index 90713cd40f..620a6c3bab 100644 --- a/basis/math/complex/complex.factor +++ b/basis/math/complex/complex.factor @@ -1,4 +1,4 @@ -! Copyright (C) 2006, 2008 Slava Pestov. +! Copyright (C) 2006, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors kernel kernel.private math math.private math.libm math.functions arrays math.functions.private sequences @@ -47,3 +47,9 @@ M: complex sqrt >polar [ fsqrt ] [ 2.0 / ] bi* polar> ; IN: syntax : C{ \ } [ first2 rect> ] parse-literal ; parsing + +USE: prettyprint.custom + +M: complex pprint* pprint-object ; +M: complex pprint-delims drop \ C{ \ } ; +M: complex >pprint-sequence >rect 2array ; \ No newline at end of file diff --git a/basis/math/complex/prettyprint/prettyprint.factor b/basis/math/complex/prettyprint/prettyprint.factor deleted file mode 100644 index 09eeb8045c..0000000000 --- a/basis/math/complex/prettyprint/prettyprint.factor +++ /dev/null @@ -1,8 +0,0 @@ -! Copyright (C) 2008 Slava Pestov. -! See http://factorcode.org/license.txt for BSD license. -USING: math math.functions arrays prettyprint.custom kernel ; -IN: math.complex.prettyprint - -M: complex pprint* pprint-object ; -M: complex pprint-delims drop \ C{ \ } ; -M: complex >pprint-sequence >rect 2array ;