Skip to content
0:00 / 0:00

#haskell#ghc-vis#thunks

Screencast: The Haskell heap and the infinite list of primes

Joachim Breitner

155 subscribers • 3 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Joachim Breitner

Intermediate. Assumes working knowledge.

1.3K views5 years ago1 recommendation

Programming languagesSystems programmingHaskellMemory managementPerformance and optimization

Joachim Breitner uses ghc-vis to inspect the Haskell heap and visualize how infinite lists and thunks are represented in memory.

In this screencast, I explore how the list of primes can be defined in Haskell as an infinite list. Using the ghc-vis library, we inspect the actual heap (memory) of the running program, and see how the code translates to lists, thunks and function in the heap. If you want to learn more, sign up for BobConf (2020-02-26, bobkonf.de/2021/registration.html) and attend my tutorial on “Haskell Bytes” If you want to play around more with ghc-vis, check out felsin9.de/nnis/ghc-vis/. If you liked this video, please comment below and tell me what else you’d like to see and hear more about.

Why it's here

1 person recommends this

What people say. Recommended as a great visual explanation of Haskell's lazy evaluation and heap representation.

u/n00bombin r/haskell • Recommends

Screencast: The Haskell heap and the infinite list of primes