Explicit Level Imports
summary
Extension changes GHC so imports are annotated with levels instead of being available at all stages, disabling no implicit stage persistence and adding explicit level imports with splice imports (level -1) and quote imports (level +1). Implementation is merged for GHC 9.14 and is tested on Pandoc: five modules get splice-annotated and GHCi bytecode compilation time for that package drops by about 50%. Also enables more precise Cabal/package cross-compilation and staged dependency tracking.
AI-written summary · about
chapters (19)
- 0:00Explicit level imports
- 0:48Template Haskell import issues
- 2:09Precision in compile-time deps
- 3:11GHC’s level system
- 4:38Levels versus stages
- 6:21Principle of levels
- 8:05Cross-stage persistence downsides
- 10:35Explicit level imports
- 12:00Splice and quote import syntax
- 13:25Limits of level system
- 14:27Explicit annotations over inference
- 15:51Design choices for extensions
- 17:17Nested splices and quotations
- 18:22Quote imports for runtime deps
- 19:03Balancing restrictions and usability
- 19:23Pandoc compilation impact
- 20:50Future work and cross-compilation
- 21:52Correct package dependencies impact
- 22:53Q&A
related talks
25mStaging with Class: A Specification for Typed Template Haskell
01h 30mGHC Proposal Presentations
31mEmbedding Functional Logic Programming in Haskell via a Compiler Plugin
56mTypelevel Scala Rebooted
29mAnnotating Deeply Embedded Languages
21mBroaden Scala
33mLightning Talks II
26mHot Call-Chain Inlining for the Glasgow Haskell Compiler
