How to use srfi-105 with chicken scheme ?

30 views
Skip to first unread message

Alain De Vos

unread,
Nov 11, 2021, 12:30:27 PM11/11/21
to
When i try :

(display {1+1})

it does not compile with csc5


https://srfi.schemers.org/srfi-105/srfi-105-1.2.html

Alain De Vos

unread,
Nov 11, 2021, 12:58:31 PM11/11/21
to
I have run as root :
# chicken-install5 srfi-105
Maybe i still have to do something else ?

Alain De Vos

unread,
Nov 11, 2021, 1:06:35 PM11/11/21
to
(import srfi-105)
(display { 1 + 1 } )

returns,
Warning: literal in operator position: (1 + 1)
Warning: Invalid procedure
At the toplevel,
In procedure call:
(1 scheme#+ 1)
The procedure expression does not appear to be a callable.
This is the expression:
1
The expected type is:
(* * -> *)
The actual type is:
fixnum
Error: call of non-procedure: 1
Call history:
test01.scm:1: chicken.load#load-extension
srfi-105.scm:2: chicken.load#load-extension

Vasilij Schneidermann

unread,
Dec 11, 2021, 4:40:31 AM12/11/21
to
SRFI-105 defines a reader extension. To use one in compiled code, you need to load the code providing it before compilation. In this case, with `csc5 -X srfi-105 test01.scm`.

Feel free to ask questions specific to CHICKEN Scheme on our IRC channel (#chicken on libera.chat) or mailing list (chicke...@nongnu.org).
Reply all
Reply to author
Forward
0 new messages