Dear FriCAS developers,

I have the following questions on the compiler of FriCAS-1.1.6.

1. For the below small program, it reports    

   Warnings: 
      [1] coerce:  dConsBasic has no value
 
What might this mean?
I tried computations with this  tagged union,  and it seems to work.
May be, I still misuse it?

2. Change the line after `-- (I)'   to the next (commented) line - of  
                                                           Product(...),
   Change the line after `-- (II)'  to the next (commented) line - of 
                                                 eDom := construct(...).
Then, the comipler reports the error of somewhat
                                        "SetCategory is not a LIST".

But may be, I guess now -- why! 
Because the class  SetCategory  is not a member of  SetCategory,
and even not of a LIST
(while Record does not apply such a restriction).
If so, then there remains only the first question.

Thanks,

------
Sergei
[email protected]



----------------------------------------------- t.spad -----------
OF       ==> OutputForm
LexList  ==> List String

DomainWithConstr ==> 
                 -- (I)
                 Record(dCons : DomainConstruction, dDom : SetCategory) 
                 -- Product(DomainConstruction, SetCategory) 

ParseDomRes ==> Record(extDom : DomainWithConstr, remLexs : LexList)

)abbrev domain DOMCONS DomainConstruction 
DomainConstruction() : Export == Implementation  where

  Export == SetCategory  with
                         coerce        : %      -> OF
                         baseDomConstr : Symbol -> %

  Implementation == add

      Rep := Union(dConsBasic : Symbol, dConsFr : %) 
      baseDomConstr s == [s]
      coerce(c) : OutputForm ==  
                             c case dConsBasic => c.dConsBasic :: OF
                             -- c case dConsFr => ... c.dConsFr ...

)abbrev package DPARSE1 DParse1
DParse1() : with
            intDomConstr : () -> DomainConstruction
            parseDomain  : LexList -> ParseDomRes
 ==
  add
    import DomainConstruction

    intDomConstr() == baseDomConstr ("Z" :: Symbol)

    parseDomain(lexemes : LexList) : ParseDomRes ==
                           
      lx := first lexemes
      lx = "Z" => 
            -- (II)
            eDom := [intDomConstr(), Integer]
            -- eDom := construct(intDomConstr(), Integer) $DomainWithConstr 

            [eDom, rest lexemes]
---------------------------------------------------------------------

-- 
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.

Reply via email to