Skip to content

GHCi 8.6.3 hangs and is impossible to kill after `nub $ cycle "a"`

When I open GHCi (version 8.6.3) and type

import Data.List
nub $ cycle "a"

The REPL completely freezes. I cannot even kill it with C-c, SIGTERM. After killing the whole terminal, the process is still present and eats 100% of a single CPU core. I couldn't find different way to stop it than smashing it with SIGKILL. If I omit the nub everything works as expected – the computation obediently terminates after hitting C-c.

Is it desired behavior or is it a bug?

I am using Arch Linux with kernel 5.0 on x86_64 CPU

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