Closed
Description
HLS seems to loop forever typechecking certain code.
I have GHC 9.8.2 and HLS 2.8.0.0, both installed by GHCup on Fedora 33 system.
Heres' complete code to reproduce the issue:
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE TypeOperators #-}
module MyLib where
type family F a
class F a ~ F b => C a b
f :: (forall x. C x x) => ()
f y = _
I run haskell-language-server-9.8.2~2.8.0.0 MyLib.hs
on command line and it hangs, consuming 100% cpu. If I change this code just about any way, HLS correctly reports errors and exits. GHC also correctly handles this code, reporting type errors.