aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-10-18 01:27:42 +0000
committerdos-reis <gdr@axiomatics.org>2011-10-18 01:27:42 +0000
commit630b6f25ff2900a31326141b67a187a685e7e9b8 (patch)
treef87d21c2387137ff8500e0e0ede9f2dbcabac64a /src/algebra
parent16111656afaa94a382d61de6c3ec37a9bdca05ef (diff)
downloadopen-axiom-630b6f25ff2900a31326141b67a187a685e7e9b8.tar.gz
* interp/spad-parser.boot (parseSegmentTail): Tidy.
* interp/postpar.boot (postSEGMENT): Remove. (postTupleCollect): Likewise. (postBootNotEqual): Likewise. * interp/parsing.lisp (CHAR-EQ): Remove. (CHAR-NE): Likewise. (getToken): Likewise. * interp/newaux.lisp: Remove "^=" as legitimate operator. * interp/lexing.boot (geToken): Rename from getSpadToken. * interp/i-intern.boot (mkAtree3): Check for new form of universal segment. * interp/parse.boot (parseSegment): Likewise. * algebra/seg.spad.pamphlet (Segment): Use .. instead of SEGMENT. (SegmentFunctions2): Likewise. (UniversalSegment): Likewise.
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/seg.spad.pamphlet14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/algebra/seg.spad.pamphlet b/src/algebra/seg.spad.pamphlet
index c0795e9e..7bd81dcd 100644
--- a/src/algebra/seg.spad.pamphlet
+++ b/src/algebra/seg.spad.pamphlet
@@ -139,7 +139,7 @@ Segment(S:Type): SegmentCategory(S) with
s1.low = s2.low and s1.high=s2.high and s1.incr = s2.incr
coerce(s:%):OutputForm ==
- seg := SEGMENT(s.low::OutputForm, s.high::OutputForm)
+ seg := s.low::OutputForm..s.high::OutputForm
s.incr = 1 => seg
infix(" by "::OutputForm, seg, s.incr::OutputForm)
@@ -217,7 +217,7 @@ SegmentFunctions2(R:Type, S:Type): public == private where
private ==> add
map(f : R->S, r : Segment R): Segment S ==
- SEGMENT(f lo r,f hi r)$Segment(S)
+ (f(lo r)..f(hi r))$Segment(S)
if R has OrderedRing then
map(f : R->S, r : Segment R): List S ==
@@ -412,8 +412,8 @@ UniversalSegment(S: Type): SegmentCategory(S) with
s case Rec2 => (s :: Rec2).incr
(s :: Rec).incr
- SEGMENT(a) == segment a
- SEGMENT(a,b) == segment(a,b)
+ a.. == segment a
+ a..b == segment(a,b)
coerce(sg : SEG): % == segment(lo sg, hi sg)
@@ -435,8 +435,8 @@ UniversalSegment(S: Type): SegmentCategory(S) with
coerce(s: %): OutputForm ==
seg :=
e := (lo s)::OutputForm
- hasHi s => SEGMENT(e, (hi s)::OutputForm)
- SEGMENT e
+ hasHi s => e..(hi s)::OutputForm
+ e..
inc := incr s
inc = 1 => seg
infix(" by "::OutputForm, seg, inc::OutputForm)
@@ -455,7 +455,7 @@ UniversalSegment(S: Type): SegmentCategory(S) with
while not null ls and hasHi first ls repeat
s := first ls
ls := rest ls
- ns := BY(SEGMENT(lo s, hi s), incr s)$Segment(S)
+ ns := BY(lo(s)..hi(s), incr s)$Segment(S)
lb := concat!(lb,ns)
if not null ls then
s := first ls