Typology
Swift type checking and semantic analysis for developer tools
Install / Use
/learn @MaxDesiatov/TypologyREADME
Typology
Typology is a work in progress attempt to implement type checking of Swift in Swift itself. Currently it uses SwiftSyntax as a parser, but is ready to switch to other pure Swift parsers in the future when any are available.
Goals
- Education: understanding how type checking can be implemented in a Swift compiler
- User Experience: finding the best way to report type errors and to improve related developer tools
- Research and Experimentation: prototyping advanced features that could be fully developed within Swift's type system.
How does it work?
Same as the type checker in Apple's Swift compiler, Typology relies on the fact that you can express type systems with a set of constraints on types that are resolved through unification.
See also
Type systems and type checkers
- Apple's Swift Compiler Type Checker Design and Implementation by multiple contributors
- A Type System From Scratch by @CodaFi
- Write You a Haskell: Hindley-Milner Inference by @sdiehl
- Typing Haskell in Haskell by Mark P Jones
- “What part of Hindley-Milner do you not understand?” question and answers on StackOverflow
- So you want to write a type checker... by @psygnisfive
- Exponential time complexity in the Swift type checker by @mattgallagher
- A Swift Playground containing Martin Grabmüller's "Algorithm W Step-by-Step" by @CodaFi
Error reporting
Optimizing type checker's performance for large projects
- Apple's Swift Compiler Dependency Analysis by multiple contributors
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
