Loading...

Into the Core - Squeezing Haskell into Nine Constructors by Simon Peyton Jones

26,633 views

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Sep 14, 2016

Keynote talk from Erlang USer Conference 2016 http://www.erlang-factory.com/euc2016/

Erlang and Haskell are childhood friends who grew up together. Throughout the years, they have learnt a lot from each other. And just because they have become adults does not mean the learning stops.

GHC translates all of Haskell into a tiny but super-expressive intermediate language called Core, does a lot of optimisations on Core, and then generates executable code. Core is statically typed, making GHC one of the very few production compilers that is statically typed all the way through to code generation. It pulls off this trick by drawing directly on System F, a mathematical calculus from type theory. Functional programming is amazing: serious theory leads directly to beautiful implementations.

In this talk I’ll take you on a journey into Core and its design choices. I’ll sketch Core’s type system, and the optimisations that GHC implements in Core, including let-floating, strictness analysis, specialisation, inlining, and the case-of-case transformation.

Haskell and Erlang are both functional languages, albeit with significant differences (strict vs lazy, untyped vs typed). I hope that the talk may lead to dialogue about how these similarities and differences show up in a compiler.

Loading...


to add this to Watch Later

Add to

Loading playlists...