Please log in to watch this conference skillscast.
Join Facundo Domínguez as he discusses using the new language extension LinearTypes to safely manage references to foreign objects/values when integrating Haskell with other languages.
This talk will discuss how to apply the upcoming GHC language extension LinearTypes to manage references to values in a foreign language.
Our case study will be inline-java, a library that allows you to embed Java code in Haskell modules and integrates the JVM and the Haskell runtimes. Managing references to objects in the Java heap has remained an error-prone task. The programmer is responsible for deleting these references in a timely fashion. Delete too soon, and we get use-after-free errors. Delete too late, and we get intermittent OutOfMemory errors from the JVM. Forget to delete a few of them, and the memory of your application will grow steadily over time without an obvious cause.
We will show how linear types involve the compiler in checking that a program does a timely disposal of references to foreign values, effectively eliminating the most common bugs related to it.
YOU MAY ALSO LIKE:
- Implementing Inline-* (SkillsCast recorded in October 2018)
- Extreme Java: Advanced Topics with Dr Heinz Kabutz (Online Course on 29th - 30th March 2021)
- Extreme Java: Concurrency Performance with Dr Heinz Kabutz (Online Course on 31st March - 2nd April 2021)
- Haskell eXchange 2021 (Online Conference on 16th - 17th November 2021)
- Process Automation in Cloud-Native Architectures (SkillsCast recorded in December 2020)
- Theorems for Free (SkillsCast recorded in November 2020)
Typecheck Your Memory Management with Linear Types
Facundo Domínguez is a software engineer at Tweag IO. He has been using Haskell in industry during the last two decades, and he is long-time contributor to Haskell libraries and GHC. Of late, he coauthored the QualifiedDo language extension, and maintains inline-java, a library to bridge Haskell with Java.