u/Kyraimionin r/haskell • Recommends
Video: "GHC sometimes infers the wrong type" (Richard Eisenberg)
#ghc#typeinference#principaltypes
5K subscribers • 25 videos on Hallway
Advanced. Deep dive for people who know the field.
1.1K views5 years ago1 recommendation
Programming languagesSystems programmingCompilers and interpretersHaskell
Richard Eisenberg explains why GHC sometimes fails to infer the best possible type for a function definition and rejects valid programs.
In some GHC work I've been up to (in collaboration with Sam Derbyshire aka @sheaf and Simon Peyton Jones), I discovered that GHC sometimes fails to infer the best possible type for a function definition. This means that GHC rejects some programs it could accept. I walk through how it all works in this video. Ticket resulting from this discovery: gitlab.haskell.org/ghc/ghc/-/issues/19977 Code from this video: github.com/goldfirere/video-resources/tree/main/2021-06-15-p… (it is not meant to type-check) Find me at richarde.dev/ or on Twitter at @RaeHaskell.What people say. Recommended as an interesting deep dive into GHC's type inference limitations.
u/Kyraimionin r/haskell • Recommends