When writing in the Pie language within racket (i.e., a file starting with #lang pie
) is there a way to include another file into the current file? I.e., something like #include "common.pie"
.
Asked
Active
Viewed 52 times
1 Answers
1
This more a question about pie
than about racket
.
According to the documentation of #lang pie
the answer is no.
https://docs.racket-lang.org/pie/index.html
There is neither an include
or an require
in the list of available forms.
Consider sending a feature request to the authors of Pie.

soegaard
- 30,661
- 4
- 57
- 106
-
You are right, the Pie language does not itself implement anything to include an external file. My hope was that `racket` might provide some generic mechanism for file inclusion which was independent of the `#lang pie`. I think your answer implies that this is not possible (sadly). – banbh Feb 07 '20 at 14:51
-
I suspect that the authors of Pie would be unlikely to make any changes to Pie (beyond bug fixes) in order to maintain compatibility with the language described in the book ("The Little Typer"). I suppose I could fork the repo (as others have done in order to add features such as a `let` form). – banbh Sep 17 '21 at 13:04