People,
In the below Spad program, the domain DomainConstruction
defines
Rep := Union(dConsBasic : Symbol, dConsFr : %, dConsUP : UPCons)
and uses these tags, for example, by `case'.
The package DParse1 also uses one of these tags by
dc case dConsBasic.
This yields >> Apparent user error:
dConsBasic
is an unknown mode
The impression is that these union tags are not imported, despite that
DomainConstruction is imported.
Can you tell, please, how to fix this?
Thank you in advance for explanation,
------
Sergei
[email protected]
------------------------------------------------------------------------
DomConstr ==> DomainConstruction
DomainWithConstr ==>
Record(dCons : DomainConstruction, dDom : SetCategory)
UPCons ==> Product(Symbol, %)
)abbrev domain DOMCONS DomainConstruction
DomainConstruction() : Export == Implementation where
Export == SetCategory with
coerce : % -> OF
baseDomConstr : Symbol -> %
frDomConstr : % -> %
upDomConstr : (Symbol, %) -> %
Implementation == add
Rep := Union(dConsBasic : Symbol, dConsFr : %, dConsUP : UPCons)
baseDomConstr s == [s]
frDomConstr d == [d]
upDomConstr(x, d) == [construct(x, d) $UPCons]
coerce(c) : OutputForm ==
c case dConsBasic => c.dConsBasic :: OF
c case dConsFr => hconcat["(Fr ", coerce(c.dConsFr), ")"]
c case dConsUP =>
pair1 := c.dConsUP
v := first pair1
cDomCons := second pair1
hconcat["(UP ", v ::OF, SPACEOF, coerce(cDomCons), ")"]
)abbrev package DPARSE1 DParse1
DParse1() : with
fromDomConstr : DomConstr -> Type
==
add
import DomainConstruction
fromDomConstr(dc : DomConstr) : Type ==
dc case dConsBasic => error "debug"
------------------------------------------------------------------------
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.