/usr/share/axiom-20170501/src/algebra/SEGBIND.spad is in axiom-source 20170501-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | )abbrev domain SEGBIND SegmentBinding
++ Author: Mark Botch
++ Date Last Updated: June 4, 1991
++ Description:
++ This domain is used to provide the function argument syntax \spad{v=a..b}.
++ This is used, for example, by the top-level \spadfun{draw} functions.
SegmentBinding(S) : SIG == CODE where
S : Type
SIG ==> Type with
equation : (Symbol, Segment S) -> %
++ equation(v,a..b) creates a segment binding value with variable
++ \spad{v} and segment \spad{a..b}. Note that the interpreter parses
++ \spad{v=a..b} to this form.
variable : % -> Symbol
++ variable(segb) returns the variable from the left hand side of
++ the \spadtype{SegmentBinding}. For example, if \spad{segb} is
++ \spad{v=a..b}, then \spad{variable(segb)} returns \spad{v}.
segment : % -> Segment S
++ segment(segb) returns the segment from the right hand side of
++ the \spadtype{SegmentBinding}. For example, if \spad{segb} is
++ \spad{v=a..b}, then \spad{segment(segb)} returns \spad{a..b}.
if S has SetCategory then SetCategory
CODE ==> add
Rep := Record(var:Symbol, seg:Segment S)
equation(x,s) == [x, s]
variable b == b.var
segment b == b.seg
if S has SetCategory then
b1 = b2 == variable b1 = variable b2 and segment b1 = segment b2
coerce(b:%):OutputForm ==
variable(b)::OutputForm = segment(b)::OutputForm
|