Prelude replacement by hash
- Lenguaje dominante
- Haskell
- Estrellas
- 1.3k
- Forks
- 201
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- haskell
- Área
- api, frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100