2

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".

banbh
  • 1,331
  • 1
  • 13
  • 31

1 Answers1

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