Skip to content

Infinite loop at runtime

Hello,

For this program : https://github.com/OlivierSohn/hamazed/tree/repro-ghc-14521-A

The expected output is:

Before rendering animations
animation is rendered
After rendering animations

What I observe is when compiling with ghc 8.0.2 or 8.2.2, with optimizations:

Before rendering animations

I found several ways to circumvent the bug, and documented each one in the source code.

Can someone take a look? Is my program an invalid program that was not detected by the compiler?

Thank you, Olivier

Edited by OlivierSohn
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information