Skip to content

GHC hangs on default implementation of type family

I have this code:

{-# language TypeFamilies #-}
{-# language MultiParamTypeClasses #-}
{-# language FlexibleInstances #-}

import Control.Monad.Except

class Component comp where
    data Error comp :: *
    type ComponentT comp :: * -> *
    type ComponentT comp = ExceptT (Error comp)

I expect it to either compile or fail with error.

Instead, GHC[i] hangs every time.

It prints

<interactive>:10:28: error:

and then hangs.

Trac metadata
Trac field Value
Version 8.4.1
Type Bug
TypeOfFailure OtherFailure
Priority high
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information