Skip to content

Constraint solver loop with quantified constraints

In #17025 (comment 220235), Simon writes the following program:

{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE TypeFamilies #-}

module QC where

class (forall c d. (d ~ F f) => C (d c) c) => C f b where
  type F f :: * -> * -> *
  f :: (c -> b) -> F f c a -> f a

This program seems to make the constraint solver loop, without even hitting a "too many iterations" error.
GHC versions tested: 9.0, HEAD.

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