Welcome to the CHICKEN Scheme pasting service

unit compilation added by megane on Tue Jul 2 08:28:17 2019

+ more build.sh src/main.scm src/module-a.scm src/module-b.scm src/module-c.scm
+ cat
::::::::::::::
build.sh
::::::::::::::
#!/usr/bin/env bash
set -exuo pipefail

more build.sh src/*.scm | cat
echo "################################################################################"
rm -rf build
mkdir build
cd build
csc -c -J -unit module-b -o module-b.o ../src/module-b.scm
csc -c -J -unit module-a -o module-a.o ../src/module-a.scm -uses module-b
csc -c -J -unit module-c -o module-c.o ../src/module-c.scm
csc ../src/main.scm -o main -uses module-a -uses module-c module-a.o module-b.o module-c.o

tree ..
rm *.o *.import.scm
./main

::::::::::::::
src/main.scm
::::::::::::::
(module
 main
 ()
 (import scheme (chicken base))
 (import module-a module-c)

 (define (foo)
   (foo-a)
   (foo-c))

 (foo)

)
::::::::::::::
src/module-a.scm
::::::::::::::
(module
 module-a
 (foo-a)
 (import scheme (chicken base))
 (import module-b)

 (define (foo-a)
   (print "hello from module-a")
   (foo-b))
 
)
::::::::::::::
src/module-b.scm
::::::::::::::
(module
 module-b
 (foo-b)
 (import scheme (chicken base))

 (define (foo-b)
   (print "hello from module-b"))
 
 )
::::::::::::::
src/module-c.scm
::::::::::::::
(module
 module-c
 (foo-c)
 (import scheme (chicken base))

 (define (foo-c)
   (print "hello from module-c"))
 
 )
+ echo '################################################################################'
################################################################################
+ rm -rf build
+ mkdir build
+ cd build
+ csc -c -J -unit module-b -o module-b.o ../src/module-b.scm
+ csc -c -J -unit module-a -o module-a.o ../src/module-a.scm -uses module-b
+ csc -c -J -unit module-c -o module-c.o ../src/module-c.scm
+ csc ../src/main.scm -o main -uses module-a -uses module-c module-a.o module-b.o module-c.o
+ tree ..
..
├── build
│   ├── main
│   ├── module-a.import.scm
│   ├── module-a.o
│   ├── module-b.import.scm
│   ├── module-b.o
│   ├── module-c.import.scm
│   └── module-c.o
├── build.sh
└── src
    ├── main.scm
    ├── module-a.scm
    ├── module-b.scm
    └── module-c.scm

2 directories, 13 files
+ rm module-a.o module-b.o module-c.o module-a.import.scm module-b.import.scm module-c.import.scm
+ ./main
hello from module-a
hello from module-b
hello from module-c

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What's the procedure to access a character in a string by index in R5RS?
Visually impaired? Let me spell it for you (wav file) download WAV