google / google/codeworld

Prelude replacement by hash

Aperta
#1,245 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
discussion
Lingua principale
Haskell
Stelle
1.3k
Fork
201
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Documenting an idea that came up in discussion with @alphalambda.

In some cases, one wants to give students a different prelude: either to add more primitives, to restrict them, or some combination of those. For these cases, it would be interesting to let teachers implement their own custom prelude within CodeWorld itself. Then there'd be an option to `/compile` on the CodeWorld server that specifies a hash for the custom prelude. This would work similar to import-by-hash, except that the specified hash would be renamed to Prelude. The custom Prelude itself would be implemented with `PackageImports`. I've tested, and GHC will prefer a module named Prelude defined on the command line for the implicit prelude, while still allowing that module to import a Prelude explicitly from the package database.

The UI is a bit tricky. The original idea was to make this part of a UI for more guided activities that implement custom clients for the `/compile` API endpoint. That wouldn't be hard to support. But to select such a custom prelude in the main CodeWorld editor would need some extra UI complexity.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by tracing the /compile API and its existing import-by-hash behavior, then review how PackageImports and the main CodeWorld editor handle Prelude selection. The work is done when a custom prelude can be selected by hash, renamed to Prelude for compilation, and the intended UI or guided-client path is defined.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
haskell
Ambito
api, frontend
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.