Value inspection entry point
- Dominant language
- Haskell
- Stars
- 1.3k
- Forks
- 201
- PR merge metrics
- No merged PRs in 30d
Description
Conversation with @peterbecich led to this idea, which is a stepping stone toward #741.
Define a type class that captures the notion of being able to inspect a type in a GUI. Define instances for ALL types in the `codeworld-base` package, even if that means that the notion of "inspect" for some atomic values is useless. Also make it easy to define an instance via Generic. Implement a GHC source plugin that auto-derives both Generic and this new type class (via Generic) for all types defined in user code.
Now, add a CodeWorld entry point that uses this type class to display a GUI value inspector, for the value passed in.
Optional add-on: in another GHC source plugin, if `program` is not defined in a codeworld-mode source file, auto-define it to pop up the value inspector for all top-level values defined in the module. Now it's possible to run a program without defining program at all, and if you do, you just get to poke at the values of everything you've defined in the module.
Contributor guide
Assessment
This issue has not been assessed yet.