> Normal way to debug such problems is to use Lisp debugger, see
> doc/debug.txt in the trunk.
This seens different ...
)abbrev domain TEST Test
Test(s:List Symbol):A==B where
OVL ==> OrderedVariableList s
A == SetCategory with
gen:()->List %
B == FreeGroup(OVL) add
Rep:=FreeModule(Integer,OVL)
gen() == [x::% for x in enumerate$OVL]
)abbrev package PTEST Ptest
Ptest:A==B where
SL ==> ['a,'b,'c]
A == with --Test(SL) with
foo : Integer -> Test(SL)
B == add
foo(n) == (gen()$Test(SL)).n
Ptest is now explicitly exposed in frame frame0
Ptest will be automatically loaded when needed from
/cygdrive/c/users/kfp/Desktop/work/spad/PTEST.NRLIB/PTEST
(1) -> T:=Test(['a,'b,'c])
(1) Test([a,b,c])
Type: Type
(2) -> gen()$T
(2) [a, b, c]
Type: List(Test([a,b,c]))
(3) -> foo(2)$Ptest
(3) b
Type: Test([a,b,c])
(4) -> )sh Ptest
Ptest is a package constructor
Abbreviation for Ptest is PTEST
This constructor is exposed in this frame.
------------------------------- Operations --------------------------------
>> Error detected within library code:
index out of range
(4) ->
If using A == Test(SL) with (in package PTEST):
(1) -> )version
Value = "FriCAS 1.3.3 compiled at Do, 3. Mai 2018 19:01:26"
------------------------------------------------------------------------
Test is already explicitly exposed in frame frame0
Test will be automatically loaded when needed from
/cygdrive/c/users/kfp/Desktop/work/spad/TEST.NRLIB/TEST
PTEST abbreviates package Ptest
------------------------------------------------------------------------
initializing NRLIB PTEST for Ptest
compiling into NRLIB PTEST
cannot produce category object:
(|Join| (|Test| (|construct| '|a| '|b| '|c|))
(CATEGORY |package|
(SIGNATURE |foo| ((|Test| (|construct| '|a| '|b| '|c|)) (|Integer|)))))
>> Apparent user error:
cannot produce category object
same on 1.3.4, while on older versions:
Value = "FriCAS 1.2.7 compiled at Sat Mar 26 17:23:40 GMT 2016"
(2) ->
------------------------------------------------------------------------
Test is now explicitly exposed in frame initial
Test will be automatically loaded when needed from
/Users/kfp/Desktop/work/spad/TEST.NRLIB/TEST
PTEST abbreviates package Ptest
------------------------------------------------------------------------
initializing NRLIB PTEST for Ptest
compiling into NRLIB PTEST
>> System error:
The index 2 is too large.
On 18.07.2018 01:31, Waldek Hebisch wrote:
> Kurt Pagani wrote:
>>
>> Hello Ric
>>
>> Thanks for concerning yourself with this, it might be helpful indeed.
>>
>> When slightly extending it's even worse ... strange ;)
>> I'd expect that u()$SI worked?
>>
>> ---
>>
>> a) PhysicalUnit() : Category == SetCategory with -- inherit from SETCAT
>> b) baseUnits() == [x::% for x in enumerate$OrderedVariableList(u)]
>>
>> (2) -> b:=baseUnits()$PUSYS(['a,'b,'c])
>>
>> (2) [a,b,c]
>> Type: List(PhysicalUnitSystem([a,b,c]))
>>
>> (3) -> )sh SI
>> SIunits is a package constructor
>> Abbreviation for SIunits is SI
>> This constructor is exposed in this frame.
>> ------------------------------- Operations --------------------------------
>>
>> >> Error detected within library code:
>> Improper script count in symbol
>>
>> (3) -> u()$SI
>>
>>
>> >> Error detected within library code:
>> index out of range
>>
>
> The error happens during printing of type. The following works:
>
> (1) -> u()$SI; 1
>
> (1) 1
> Type: PositiveInteger
>
> Normal way to debug such problems is to use Lisp debugger, see
> doc/debug.txt in the trunk.
>
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.