Coverage report: /home/runner/work/geb/geb/src/entry/package.lisp
Kind | Covered | All | % |
expression | 0 | 5 | 0.0 |
branch | 0 | 0 | nil |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
(in-package :geb.utils)
3
(muffle-package-variance
4
(defpackage #:geb.entry
5
(:documentation "Entry point for the geb codebase")
6
(:local-nicknames (#:poly #:geb.poly)
13
(in-package :geb.entry)
15
(pax:defsection @geb-entry (:title "Geb as a binary")
16
"The standard way to use geb currently is by loading the code into
17
one's lisp environment
23
However, one may be interested in running geb in some sort of
24
compilation process, that is why we also give out a binary for people
27
An example use of this binary is as follows
30
mariari@Gensokyo % ./geb.image -i \"foo.lisp\" -e \"geb.lambda.main::*entry*\" -l -p -o \"foo.pir\"
32
mariari@Gensokyo % cat foo.pir
36
mariari@Gensokyo % ./geb.image -i \"foo.lisp\" -e \"geb.lambda.main::*entry*\" -l -p
41
mariari@Gensokyo % ./geb.image -h
42
-i --input string Input geb file location
43
-e --entry-point string The function to run, should be fully qualified I.E. geb::my-main
44
-l --stlc boolean Use the simply typed lambda calculus frontend
45
-o --output string Save the output to a file rather than printing
46
-v --version boolean Prints the current version of the compiler
47
-p --vampir string Return a vamp-ir expression
48
-h -? --help boolean The current help message
50
mariari@Gensokyo % ./geb.image -v
54
starting from a file *foo.lisp* that has
56
any valid lambda form. Good examples can be found at the following section:
58
[GEB.LAMBDA:@STLC][pax:section]
60
with the term bound to some global variable
63
(in-package :geb.lambda.main)
66
(lamb (list (coprod so1 so1))
72
The command needs an entry-point (-e or --entry-point), as we are
73
simply call LOAD on the given file, and need to know what to
76
from STLC, we expect the form to be wrapped in the
77
GEB.LAMBDA.SPEC.TYPED which takes both the type and the value to
78
properly have enough context to evaluate.
80
It is advised to bind this to a parameter like in our example as -e
83
the -l flag means that we are not expecting a geb term, but rather a
84
lambda frontend term, this is to simply notify us to compile it as a
85
lambda term rather than a geb term. In time this will go away"
86
(compile-down pax:function))