APLicative Programming with Naperian Functors
summary
Shows that APL-style implicit lifting, alignment and static shape checks are expressible in Haskell’s type system rather than a custom language: rank polymorphism and shape errors get rejected at compile time. Uses length-indexed vectors, Fin indices, traversable/Naperian structure and type-class witnesses to induce lifts and transposes. Implements codegen into the Accelerate GPU backend (student prototype exists) so programs compile to GPU kernels and run, proving the approach practical.
AI-written summary · about
chapters (17)
- 0:00Start
- 3:19Binary Operations
- 3:58Operations That Combine Elements
- 5:24Bizarre Notation
- 6:06Prefix Sums
- 7:40Add a Vector to a Matrix
- 10:16Syntax
- 14:21Length Index Vectors
- 14:49Vectors
- 20:08Index Data Types
- 24:40Type Classes
- 31:24Array Bounds Checking
- 35:10Block Structured Vectors
- 35:23Binary Split Vectors
- 35:54Transposition
- 38:52Hyper Cuboids
- 39:54Alignment
related talks
27mA Novice Introduces APL Programming Language
01h 00mPragmatic Functional Programming using Dyalog
54mDesign Patterns vs Anti pattern in APL
15mAutomatic and Efficient Variability-Aware Lifting of Functional Programs
37mGoing bananas with recursion schemes for fixed point data types
16mSyntax-Generic Operations, Reflectively Reified (Extended Abstract)
59mHaskell Design Patterns for Genericity & Asynchronous Behavior
36mConcrete Functional Programming
