Skip to content

HLS hangs in file with typed hole #4242

Closed
@andriusstank

Description

@andriusstank

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions